public interface GSSContext
Encapsulates a GSS context, i.e. an implementation of the
GSS API. This is used by UserAuthGSSAPIWithMIC
to do the
actual cryptographic work. (See this class for a description on how this
interface is used.)
This interface only contains the methods needed for GSS-API authentication, not the full GSS API.
An implementation of this interface is included in the JSch library,
based on the GSS API included in the
Java SE from 1.4 on, using object ID 1.2.840.113554.1.2.2
, i.e.
Kerberos v5 as defined in RFC 1964.
GSSContext
,
RFC 2743,
Generic Security Service Application Program Interface
Version 2, Update 1,
RFC 5653: Generic Security Service API Version 2: Java Bindings Update,
RFC 4462:
Generic Security Service Application Program Interface (GSS-API)
Authentication and Key Exchange for the Secure Shell (SSH) Protocol,
RFC 1964,
The Kerberos Version 5 GSS-API MechanismModifier and Type | Method and Description |
---|---|
void |
create(String user,
String host)
creates the context.
|
void |
dispose()
Disposes this context, releasing any system resources
and stored cryptographic information.
|
byte[] |
getMIC(byte[] message,
int s,
int l)
calculates a Message Integrity Code for a message.
|
byte[] |
init(byte[] token,
int s,
int l)
Tries to establish the secure context by processing a token
from the server and (maybe) creating a new token to send to
the server.
|
boolean |
isEstablished()
Checks is the context establishing already succeeded.
|
void create(String user, String host) throws JSchException
user
- the user name.host
- the server's name.JSchException
GSSManager
boolean isEstablished()
byte[] init(byte[] token, int s, int l) throws JSchException
token
- an array containing the token received from the server.
At the start, this will be an empty array.s
- the index in token
where the token actually starts.l
- the length of the token.JSchException
GSSContext
byte[] getMIC(byte[] message, int s, int l)
message
- an array containing the message for which the
the code should be calculated.s
- the index in message
where the message actually
startsl
- the length of the message.GSSContext
void dispose()
This is an inofficial Javadoc created by PaĆlo Ebermann. Have a look at the official homepage.