Package org.globus.gsi.gssapi
Class GlobusGSSCredentialImpl
java.lang.Object
org.globus.gsi.gssapi.GlobusGSSCredentialImpl
- All Implemented Interfaces:
Serializable
,Cloneable
,ExtendedGSSCredential
,GSSCredential
An implementation of
GlobusGSSCredential
.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate X509Credential
private GSSName
private static final long
private int
Fields inherited from interface org.gridforum.jgss.ExtendedGSSCredential
IMPEXP_MECH_SPECIFIC, IMPEXP_OPAQUE
Fields inherited from interface org.ietf.jgss.GSSCredential
ACCEPT_ONLY, DEFAULT_LIFETIME, INDEFINITE_LIFETIME, INITIATE_AND_ACCEPT, INITIATE_ONLY
-
Constructor Summary
ConstructorsConstructorDescriptionCreates anonymous credential.GlobusGSSCredentialImpl
(X509Credential cred, int usage) Creates regular credential from specified X509Credential object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Currently not implemented.void
dispose()
boolean
byte[]
export
(int option) Exports this credential so that another process might import it.byte[]
Exports this credential so that another process might import it.Returns certificate chain of this credential (if any).Oid[]
getMechs()
getName()
Returns the private key of this credential (if any).int
int
getRemainingInitLifetime
(Oid mech) int
int
getUsage()
int
Returns actual X509Credential object represented by this credential (if any).int
hashCode()
inquireByOid
(Oid oid) Retrieves arbitrary data about this credential.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
usage
private int usage -
cred
-
name
-
-
Constructor Details
-
GlobusGSSCredentialImpl
public GlobusGSSCredentialImpl()Creates anonymous credential. -
GlobusGSSCredentialImpl
Creates regular credential from specified X509Credential object.- Parameters:
cred
- the credentialusage
- credential usage- Throws:
GSSException
-
-
Method Details
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceGSSCredential
- Overrides:
hashCode
in classObject
-
equals
- Specified by:
equals
in interfaceGSSCredential
- Overrides:
equals
in classObject
-
dispose
- Specified by:
dispose
in interfaceGSSCredential
- Throws:
GSSException
-
getName
- Specified by:
getName
in interfaceGSSCredential
- Throws:
GSSException
-
getName
- Specified by:
getName
in interfaceGSSCredential
- Throws:
GSSException
-
add
public void add(GSSName aName, int initLifetime, int acceptLifetime, Oid mech, int usage) throws GSSException Currently not implemented.- Specified by:
add
in interfaceGSSCredential
- Throws:
GSSException
-
getUsage
- Specified by:
getUsage
in interfaceGSSCredential
- Throws:
GSSException
-
getUsage
- Specified by:
getUsage
in interfaceGSSCredential
- Throws:
GSSException
-
getRemainingLifetime
- Specified by:
getRemainingLifetime
in interfaceGSSCredential
- Throws:
GSSException
-
getRemainingInitLifetime
- Specified by:
getRemainingInitLifetime
in interfaceGSSCredential
- Throws:
GSSException
-
getRemainingAcceptLifetime
- Specified by:
getRemainingAcceptLifetime
in interfaceGSSCredential
- Throws:
GSSException
-
getMechs
- Specified by:
getMechs
in interfaceGSSCredential
- Throws:
GSSException
-
export
Description copied from interface:ExtendedGSSCredential
Exports this credential so that another process might import it. The exported credential might be imported again using theExtendedGSSManager.createCredential
method.- Specified by:
export
in interfaceExtendedGSSCredential
- Parameters:
option
- The export type. If set toExtendedGSSCredential.IMPEXP_OPAQUE
exported buffer is an opaque buffer suitable for storage in memory or on disk or passing to another process. If set toExtendedGSSCredential.IMPEXP_MECH_SPECIFIC
exported buffer is a buffer filled with mechanism-specific information that the calling application can use to pass the credential to another process that is not written to the GSS-API.- Returns:
- The buffer containing the credential
- Throws:
GSSException
- containing the following major error codes:GSSException.CREDENTIAL_EXPIRED, GSSException.UNAVAILABLE, GSSException.FAILURE
-
export
Description copied from interface:ExtendedGSSCredential
Exports this credential so that another process might import it. The exported credential might be imported again using theExtendedGSSManager.createCredential
method.- Specified by:
export
in interfaceExtendedGSSCredential
- Parameters:
option
- The export type. If set toExtendedGSSCredential.IMPEXP_OPAQUE
exported buffer is an opaque buffer suitable for storage in memory or on disk or passing to another process. If set toExtendedGSSCredential.IMPEXP_MECH_SPECIFIC
exported buffer is a buffer filled with mechanism-specific information that the calling application can use to pass the credential to another process that is not written to the GSS-API.mech
- Desired mechanism for exported credential, may be null to indicate system default.- Returns:
- The buffer containing the credential
- Throws:
GSSException
- containing the following major error codes:GSSException.CREDENTIAL_EXPIRED, GSSException.UNAVAILABLE, GSSException.BAD_MECH, GSSException.FAILURE
-
inquireByOid
Retrieves arbitrary data about this credential. Currently supported oid:-
GSSConstants.X509_CERT_CHAIN
returns certificate chain of this credential (X509Certificate[]
).
- Specified by:
inquireByOid
in interfaceExtendedGSSCredential
- Parameters:
oid
- the oid of the information desired.- Returns:
- the information desired. Might be null.
- Throws:
GSSException
- containing the following major error codes:GSSException.FAILURE
-
-
getX509Credential
Returns actual X509Credential object represented by this credential (if any).- Returns:
- The credential object. Might be null if this is an anonymous credential.
-
getPrivateKey
Returns the private key of this credential (if any).- Returns:
- The private key. Might be null if this is an anonymous credential.
- Throws:
GSSException
-
getCertificateChain
Returns certificate chain of this credential (if any).- Returns:
- The certificate chain. Might be null if this is an anonymous credential.
-