jdk/src/share/classes/sun/security/jgss/spi/GSSContextSpi.java
changeset 3482 4aaa66ce712d
parent 2 90ce3da70b43
child 4336 4c792c19266e
equal deleted inserted replaced
3481:6ae7a2a6c956 3482:4aaa66ce712d
     1 /*
     1 /*
     2  * Portions Copyright 2000-2005 Sun Microsystems, Inc.  All Rights Reserved.
     2  * Portions Copyright 2000-2009 Sun Microsystems, Inc.  All Rights Reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Sun designates this
     7  * published by the Free Software Foundation.  Sun designates this
    44 
    44 
    45 import org.ietf.jgss.*;
    45 import org.ietf.jgss.*;
    46 import java.io.InputStream;
    46 import java.io.InputStream;
    47 import java.io.OutputStream;
    47 import java.io.OutputStream;
    48 import java.security.Provider;
    48 import java.security.Provider;
       
    49 import com.sun.security.jgss.*;
    49 
    50 
    50 /**
    51 /**
    51  * This interface is implemented by a mechanism specific instance of a GSS
    52  * This interface is implemented by a mechanism specific instance of a GSS
    52  * security context.
    53  * security context.
    53  * A GSSContextSpi object can be thought of having 3 states:
    54  * A GSSContextSpi object can be thought of having 3 states:
   263      * @param os the token to be sent to the peer. It includes
   264      * @param os the token to be sent to the peer. It includes
   264      *    the message from <i>is</i> with the requested protection.
   265      *    the message from <i>is</i> with the requested protection.
   265      * @param msgPro on input it contains the requested qop and
   266      * @param msgPro on input it contains the requested qop and
   266      *    confidentiality state, on output, the applied values
   267      *    confidentiality state, on output, the applied values
   267      * @exception GSSException may be thrown
   268      * @exception GSSException may be thrown
   268      * @see MessageInfo
       
   269      * @see unwrap
   269      * @see unwrap
   270      */
   270      */
   271     public void wrap(InputStream is, OutputStream os, MessageProp msgProp)
   271     public void wrap(InputStream is, OutputStream os, MessageProp msgProp)
   272         throws GSSException;
   272         throws GSSException;
   273 
   273 
   313      * @param is the token from the peer
   313      * @param is the token from the peer
   314      * @param os unprotected message data
   314      * @param os unprotected message data
   315      * @param msgProp will contain the applied qop and confidentiality
   315      * @param msgProp will contain the applied qop and confidentiality
   316      *    of the input token and any informatory status values
   316      *    of the input token and any informatory status values
   317      * @exception GSSException may be thrown
   317      * @exception GSSException may be thrown
   318      * @see MessageInfo
       
   319      * @see wrap
   318      * @see wrap
   320      */
   319      */
   321     public void unwrap(InputStream is, OutputStream os,
   320     public void unwrap(InputStream is, OutputStream os,
   322                         MessageProp msgProp) throws GSSException;
   321                         MessageProp msgProp) throws GSSException;
   323 
   322 
   401      * context between 2 peer.
   400      * context between 2 peer.
   402      *
   401      *
   403      * @exception GSSException may be thrown
   402      * @exception GSSException may be thrown
   404      */
   403      */
   405     public void dispose() throws GSSException;
   404     public void dispose() throws GSSException;
       
   405 
       
   406     /**
       
   407      * Return the mechanism-specific attribute associated with (@code type}.
       
   408      *
       
   409      * @param type the type of the attribute requested
       
   410      * @return the attribute
       
   411      * @throws GSSException see {@link ExtendedGSSContext#inquireSecContext}
       
   412      * for details
       
   413      */
       
   414     public Object inquireSecContext(InquireType type)
       
   415             throws GSSException;
   406 }
   416 }