public class GlobusGSSCredentialImpl extends java.lang.Object implements ExtendedGSSCredential, java.io.Serializable
GlobusGSSCredential
.IMPEXP_MECH_SPECIFIC, IMPEXP_OPAQUE
Constructor and Description |
---|
GlobusGSSCredentialImpl()
Creates anonymous credential.
|
GlobusGSSCredentialImpl(X509Credential cred,
int usage)
Creates regular credential from specified
X509Credential object.
|
Modifier and Type | Method and Description |
---|---|
void |
add(org.ietf.jgss.GSSName aName,
int initLifetime,
int acceptLifetime,
org.ietf.jgss.Oid mech,
int usage)
Currently not implemented.
|
void |
dispose() |
boolean |
equals(java.lang.Object obj) |
byte[] |
export(int option)
Exports this credential so that another process might import it.
|
byte[] |
export(int option,
org.ietf.jgss.Oid mech)
Exports this credential so that another process might import it.
|
java.security.cert.X509Certificate[] |
getCertificateChain()
Returns certificate chain of this credential (if any).
|
org.ietf.jgss.Oid[] |
getMechs() |
org.ietf.jgss.GSSName |
getName() |
org.ietf.jgss.GSSName |
getName(org.ietf.jgss.Oid mech) |
java.security.PrivateKey |
getPrivateKey()
Returns the private key of this credential (if any).
|
int |
getRemainingAcceptLifetime(org.ietf.jgss.Oid mech) |
int |
getRemainingInitLifetime(org.ietf.jgss.Oid mech) |
int |
getRemainingLifetime() |
int |
getUsage() |
int |
getUsage(org.ietf.jgss.Oid mech) |
X509Credential |
getX509Credential()
Returns actual X509Credential object represented
by this credential (if any).
|
int |
hashCode() |
java.lang.Object |
inquireByOid(org.ietf.jgss.Oid oid)
Retrieves arbitrary data about this credential.
|
public GlobusGSSCredentialImpl()
public GlobusGSSCredentialImpl(X509Credential cred, int usage) throws org.ietf.jgss.GSSException
cred
- the credentialusage
- credential usageorg.ietf.jgss.GSSException
public int hashCode()
hashCode
in interface org.ietf.jgss.GSSCredential
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in interface org.ietf.jgss.GSSCredential
equals
in class java.lang.Object
public void dispose() throws org.ietf.jgss.GSSException
dispose
in interface org.ietf.jgss.GSSCredential
org.ietf.jgss.GSSException
public org.ietf.jgss.GSSName getName() throws org.ietf.jgss.GSSException
getName
in interface org.ietf.jgss.GSSCredential
org.ietf.jgss.GSSException
public org.ietf.jgss.GSSName getName(org.ietf.jgss.Oid mech) throws org.ietf.jgss.GSSException
getName
in interface org.ietf.jgss.GSSCredential
org.ietf.jgss.GSSException
public void add(org.ietf.jgss.GSSName aName, int initLifetime, int acceptLifetime, org.ietf.jgss.Oid mech, int usage) throws org.ietf.jgss.GSSException
add
in interface org.ietf.jgss.GSSCredential
org.ietf.jgss.GSSException
public int getUsage() throws org.ietf.jgss.GSSException
getUsage
in interface org.ietf.jgss.GSSCredential
org.ietf.jgss.GSSException
public int getUsage(org.ietf.jgss.Oid mech) throws org.ietf.jgss.GSSException
getUsage
in interface org.ietf.jgss.GSSCredential
org.ietf.jgss.GSSException
public int getRemainingLifetime() throws org.ietf.jgss.GSSException
getRemainingLifetime
in interface org.ietf.jgss.GSSCredential
org.ietf.jgss.GSSException
public int getRemainingInitLifetime(org.ietf.jgss.Oid mech) throws org.ietf.jgss.GSSException
getRemainingInitLifetime
in interface org.ietf.jgss.GSSCredential
org.ietf.jgss.GSSException
public int getRemainingAcceptLifetime(org.ietf.jgss.Oid mech) throws org.ietf.jgss.GSSException
getRemainingAcceptLifetime
in interface org.ietf.jgss.GSSCredential
org.ietf.jgss.GSSException
public org.ietf.jgss.Oid[] getMechs() throws org.ietf.jgss.GSSException
getMechs
in interface org.ietf.jgss.GSSCredential
org.ietf.jgss.GSSException
public byte[] export(int option) throws org.ietf.jgss.GSSException
ExtendedGSSCredential
ExtendedGSSManager.createCredential
method.export
in interface ExtendedGSSCredential
option
- The export type. If set to ExtendedGSSCredential.IMPEXP_OPAQUE
exported buffer is an opaque
buffer suitable for storage in memory or on disk or passing to
another process. If set to ExtendedGSSCredential.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.org.ietf.jgss.GSSException
- containing the following major error codes:
GSSException.CREDENTIAL_EXPIRED,
GSSException.UNAVAILABLE, GSSException.FAILURE
public byte[] export(int option, org.ietf.jgss.Oid mech) throws org.ietf.jgss.GSSException
ExtendedGSSCredential
ExtendedGSSManager.createCredential
method.export
in interface ExtendedGSSCredential
option
- The export type. If set to ExtendedGSSCredential.IMPEXP_OPAQUE
exported buffer is an opaque
buffer suitable for storage in memory or on disk or passing to
another process. If set to ExtendedGSSCredential.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.org.ietf.jgss.GSSException
- containing the following major error codes:
GSSException.CREDENTIAL_EXPIRED,
GSSException.UNAVAILABLE, GSSException.BAD_MECH, GSSException.FAILURE
public java.lang.Object inquireByOid(org.ietf.jgss.Oid oid) throws org.ietf.jgss.GSSException
GSSConstants.X509_CERT_CHAIN
returns certificate chain of this credential
(X509Certificate[]
).
inquireByOid
in interface ExtendedGSSCredential
oid
- the oid of the information desired.org.ietf.jgss.GSSException
- containing the following major error codes:
GSSException.FAILURE
public X509Credential getX509Credential()
public java.security.PrivateKey getPrivateKey() throws org.ietf.jgss.GSSException
org.ietf.jgss.GSSException
public java.security.cert.X509Certificate[] getCertificateChain()
Copyright © 2013. All Rights Reserved.