3909N/A * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 678N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 678N/A * This code is free software; you can redistribute it and/or modify it 678N/A * under the terms of the GNU General Public License version 2 only, as 678N/A * published by the Free Software Foundation. 678N/A * This code is distributed in the hope that it will be useful, but WITHOUT 678N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 678N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 678N/A * version 2 for more details (a copy is included in the LICENSE file that 678N/A * accompanied this code). 678N/A * You should have received a copy of the GNU General Public License version 678N/A * 2 along with this work; if not, write to the Free Software Foundation, 678N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 678N/A * Context of a JGSS subject, encapsulating Subject and GSSContext. 678N/A * Three "constructors", which acquire the (private) credentials and fill 678N/A * 1. static fromJAAS(): Creates a Context using a JAAS login config entry 678N/A * 2. static fromUserPass(): Creates a Context using a username and a password 678N/A * 3. delegated(): A new context which uses the delegated credentials from a 678N/A * previously established acceptor Context 678N/A * Two context initiators, which create the GSSContext object inside: 678N/A * doAs(): Performs an action in the name of the Subject 678N/A * static handShake(initiator, acceptor) 678N/A * A four-phase typical data communication which includes all four GSS 678N/A * actions (wrap, unwrap, getMic and veryfyMiC): 678N/A * static transmit(message, from, to) 678N/A * Using the delegated credentials from a previous acceptor 678N/A * Logins with a JAAS login config entry name 678N/A * Logins with a username and a password, using Krb5LoginModule directly 678N/A * @param storeKey true if key should be saved, used on acceptor side 2461N/A * Logins with a username and a keytab, using Krb5LoginModule directly 2461N/A * @param storeKey true if key should be saved, used on acceptor side 678N/A * @param target communication peer 678N/A * @throws java.lang.Exception 678N/A * @throws java.lang.Exception 4102N/A * Starts as a server with the specified service name 4102N/A * @param name the service name 4102N/A * @throws java.lang.Exception 678N/A * Accesses the internal GSSContext object. Currently it's used for -- 678N/A * 1. calling requestXXX() before handshake 678N/A * 2. accessing source name 678N/A * Note: If the application needs to do any privileged call on this 678N/A * object, please use doAs(). Otherwise, it can be done directly. The 678N/A * methods listed above are all non-privileged calls. 678N/A * @return the GSSContext object 4102N/A * Accesses the internal subject. 678N/A * Disposes the GSSContext within 678N/A * @throws org.ietf.jgss.GSSException 678N/A * Does something using the Subject inside 678N/A * @param action the action 678N/A * @param in the input byte 678N/A * @return the output byte 678N/A * @throws java.lang.Exception 678N/A * Prints status of GSSContext and Subject 678N/A * @throws java.lang.Exception 678N/A * Transmits a message from one Context to another. The sender wraps the 678N/A * message and sends it to the receiver. The receiver unwraps it, creates 678N/A * a MIC of the clear text and sends it back to the sender. The sender 678N/A * verifies the MIC against the message sent earlier. 678N/A * @param message the message 678N/A * @param s2 the receiver 678N/A * @throws java.lang.Exception If anything goes wrong 678N/A * Returns a string description of a MessageProp object 678N/A * @param prop the object 678N/A * @return the description 678N/A * Handshake (security context establishment process) between two Contexts 678N/A * @param c the initiator 678N/A * @param s the acceptor 678N/A * @throws java.lang.Exception 678N/A byte[] t =
new byte[
0];