Package com.sun.gssapi
Interface C018FE95
public interface C018FE95
An object of this class implements the functionality of a GSSContext
for a specific mechanism.
A C018FE95 object can be thought of having 3 states:
-before initialization
-during initialization with its peer
-after it is established
The context options can only be requested in state 1. In state 3, the per message operations are available to the callers. The get methods for the context options will return the requested options while in state 1 and 2, and the established values in state 3. Some mechanisms may allow the access to the per-message operations and the context flags before the context is fully established. The isProtReady method is used to indicate that these services are available.
-
Method Summary
Modifier and TypeMethodDescriptionint
Retrieves the mechanism options.Returns the context initiator name.void
_S00256CF
(InputStream is, InputStream msgStr, MessageProp mProp) Checks the integrity of the supplied tokens.Returns the context acceptor name.Returns the mechanism oid.void
Releases context resources and terminates the context between 2 peer.Returns the delegated credential for the context.void
_S0AC8F9E
(byte[] token) Imports a previously exported context.int
_S0E039DB
(InputStream is, OutputStream os) Initiator context establishment call.boolean
Tests if the context can be used for per-message service.boolean
Tests if this is the initiator side of the context.void
_S1309AFD
(InputStream is, OutputStream os, MessageProp msgProp) Provides per-message token encapsulation.void
_S1513DBA
(InputStream is, OutputStream os, MessageProp msgProp) Applies per-message integrity services.void
_S1576D09
(InputStream is, OutputStream os, MessageProp msgProp) Retrieves the message token previously encapsulated in the wrap call.void
_S235D9C1
(GSSCredSpi myCred, GSSNameSpi targName, int desLifetime, int ctxtOptions) Sets the mechanism options to be used during context creation on the initiator's side.int
Inquire the remaining lifetime.byte[]
Produces a token representing this context.int
_S808028B
(int qop, boolean confReq, int maxTokSize) Queries the context for largest data size to accomodate the specified protection and for the token to remain less then maxTokSize.int
_S80A2F2C
(InputStream is, OutputStream os) Acceptor's context establishment call.void
_S90010CC
(GSSCredSpi myCred) Sets the mechanism options to be used during context creation on the acceptor's side.void
_S9B00AB2
(ChannelBinding chb) Sets the channel bindings to be used during context establishment.
-
Method Details
-
_S235D9C1
void _S235D9C1(GSSCredSpi myCred, GSSNameSpi targName, int desLifetime, int ctxtOptions) throws GSSException Sets the mechanism options to be used during context creation on the initiator's side. This is used to initialize a new C018FE95 object.- Parameters:
myCred
- the principal's credentials; may be nulltargName
- the context peerdesLifetime
- the requested lifetime; 0 indicates use defaultmechOptions
- ORed GSSContext options- Throws:
GSSException
- may be thrown
-
_S90010CC
Sets the mechanism options to be used during context creation on the acceptor's side. This is used to initialize a new C018FE95 object.- Parameters:
myCred
- the principal's credentials; may be null- Throws:
GSSException
- may be thrown
-
_S9B00AB2
Sets the channel bindings to be used during context establishment. This method is only called if the application wishes to use channel bindings with this context.- Parameters:
chb
- channel bindings to be set- Throws:
GSSException
- may be thrown
-
_S00027C3
int _S00027C3()Retrieves the mechanism options.- Returns:
- int GSSContext options ORed together
-
_S4080EED
int _S4080EED()Inquire the remaining lifetime.- Returns:
- the lifetime in seconds. May return reserved value GSSContext.INDEFINITE for an indefinite lifetime.
-
_S0200735
Oid _S0200735()Returns the mechanism oid.- Returns:
- the Oid for this context
-
_S000EEFF
Returns the context initiator name.- Returns:
- initiator name
- Throws:
GSSException
- may be thrown
-
_S011CEF9
Returns the context acceptor name.- Returns:
- context acceptor(target) name
- Throws:
GSSException
- may be thrown
-
_S0293FFA
Returns the delegated credential for the context. This is an optional feature of contexts which not all mechanisms will support. A context can be requested to support credential delegation by using the CRED_DELEG. This is only valid on the acceptor side of the context.- Returns:
- GSSCredSpi object for the delegated credential
- Throws:
GSSException
- may be thrown- See Also:
-
_S123049E
boolean _S123049E()Tests if this is the initiator side of the context.- Returns:
- boolean indicating if this is initiator (true) or target (false)
-
_S1116FAA
boolean _S1116FAA()Tests if the context can be used for per-message service. Context may allow the calls to the per-message service functions before being fully established.- Returns:
- boolean indicating if per-message methods can be called.
-
_S0E039DB
Initiator context establishment call. This method may be required to be called several times. A CONTINUE_NEEDED return call indicates that more calls are needed after the next token is received from the peer.- Parameters:
is
- contains the token received from the peer. On the first call it will be ignored.os
- to which any tokens required to be sent to the peer will be written. It is responsibility of the caller to send the token to its peer for processing.- Returns:
- integer indicating if more calls are needed. Possible values are COMPLETE and CONTINUE_NEEDED.
- Throws:
GSSException
- may be thrown
-
_S80A2F2C
Acceptor's context establishment call. This method may be required to be called several times. A CONTINUE_NEEDED return call indicates that more calls are needed after the next token is received from the peer.- Parameters:
is
- contains the token received from the peer.os
- to which any tokens required to be sent to the peer will be written. It is responsibility of the caller to send the token to its peer for processing.- Returns:
- integer indicating if more calls are needed. Possible values are COMPLETE and CONTINUE_NEEDED.
- Throws:
GSSException
- may be thrown
-
_S808028B
Queries the context for largest data size to accomodate the specified protection and for the token to remain less then maxTokSize.- Parameters:
qop
- the quality of protection that the context will be asked to provide.confReq
- a flag indicating whether confidentiality will be requested or notoutputSize
- the maximum size of the output token- Returns:
- the maximum size for the input message that can be provided to the wrap() method in order to guarantee that these requirements are met.
- Throws:
GSSException
- may be thrown
-
_S1309AFD
Provides per-message token encapsulation.- Parameters:
is
- the user-provided message to be protectedos
- the token to be sent to the peer. It includes the message from is with the requested protection.msgPro
- on input it contains the requested qop and confidentiality state, on output, the applied values- Throws:
GSSException
- may be thrown- See Also:
-
_S1576D09
Retrieves the message token previously encapsulated in the wrap call.- Parameters:
is
- the token from the peeros
- unprotected message datamsgProp
- will contain the applied qop and confidentiality of the input token and any informatory status values- Throws:
GSSException
- may be thrown- See Also:
-
_S1513DBA
Applies per-message integrity services.- Parameters:
is
- the user-provided messageos
- the token to be sent to the peer along with the message token. The message token is not encapsulated.msgProp
- on input the desired QOP and output the applied QOP- Throws:
GSSException
-
_S00256CF
Checks the integrity of the supplied tokens. This token was previously generated by getMIC.- Parameters:
is
- token generated by getMICmsgStr
- the message to check integrity formsgProp
- will contain the applied QOP and confidentiality states of the token as well as any informatory status codes- Throws:
GSSException
- may be thrown
-
_S725B2DA
Produces a token representing this context. After this call the context will no longer be usable until an import is performed on the returned token.- Returns:
- exported context token
- Throws:
GSSException
- may be thrown
-
_S0AC8F9E
Imports a previously exported context. This will be called for newly created objects.- Parameters:
is
- the previously exported token- Throws:
GSSException
- may be thrown- See Also:
-
_S020B957
Releases context resources and terminates the context between 2 peer.- Throws:
GSSException
- may be thrown
-