public class GlobusGSSCredentialImpl extends Object implements ExtendedGSSCredential, Serializable
GlobusGSSCredential
.IMPEXP_MECH_SPECIFIC, IMPEXP_OPAQUE
ACCEPT_ONLY, DEFAULT_LIFETIME, INDEFINITE_LIFETIME, INITIATE_AND_ACCEPT, INITIATE_ONLY
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(GSSName aName,
int initLifetime,
int acceptLifetime,
Oid mech,
int usage)
Currently not implemented.
|
void |
dispose() |
boolean |
equals(Object obj) |
byte[] |
export(int option)
Exports this credential so that another process might import it.
|
byte[] |
export(int option,
Oid mech)
Exports this credential so that another process might import it.
|
X509Certificate[] |
getCertificateChain()
Returns certificate chain of this credential (if any).
|
Oid[] |
getMechs() |
GSSName |
getName() |
GSSName |
getName(Oid mech) |
PrivateKey |
getPrivateKey()
Returns the private key of this credential (if any).
|
int |
getRemainingAcceptLifetime(Oid mech) |
int |
getRemainingInitLifetime(Oid mech) |
int |
getRemainingLifetime() |
int |
getUsage() |
int |
getUsage(Oid mech) |
X509Credential |
getX509Credential()
Returns actual X509Credential object represented
by this credential (if any).
|
int |
hashCode() |
Object |
inquireByOid(Oid oid)
Retrieves arbitrary data about this credential.
|
public GlobusGSSCredentialImpl()
public GlobusGSSCredentialImpl(X509Credential cred, int usage) throws GSSException
cred
- the credentialusage
- credential usageGSSException
public int hashCode()
hashCode
in interface GSSCredential
hashCode
in class Object
public boolean equals(Object obj)
equals
in interface GSSCredential
equals
in class Object
public void dispose() throws GSSException
dispose
in interface GSSCredential
GSSException
public GSSName getName() throws GSSException
getName
in interface GSSCredential
GSSException
public GSSName getName(Oid mech) throws GSSException
getName
in interface GSSCredential
GSSException
public void add(GSSName aName, int initLifetime, int acceptLifetime, Oid mech, int usage) throws GSSException
add
in interface GSSCredential
GSSException
public int getUsage() throws GSSException
getUsage
in interface GSSCredential
GSSException
public int getUsage(Oid mech) throws GSSException
getUsage
in interface GSSCredential
GSSException
public int getRemainingLifetime() throws GSSException
getRemainingLifetime
in interface GSSCredential
GSSException
public int getRemainingInitLifetime(Oid mech) throws GSSException
getRemainingInitLifetime
in interface GSSCredential
GSSException
public int getRemainingAcceptLifetime(Oid mech) throws GSSException
getRemainingAcceptLifetime
in interface GSSCredential
GSSException
public Oid[] getMechs() throws GSSException
getMechs
in interface GSSCredential
GSSException
public byte[] export(int option) throws 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.GSSException
- containing the following major error codes:
GSSException.CREDENTIAL_EXPIRED,
GSSException.UNAVAILABLE, GSSException.FAILURE
public byte[] export(int option, Oid mech) throws 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.GSSException
- containing the following major error codes:
GSSException.CREDENTIAL_EXPIRED,
GSSException.UNAVAILABLE, GSSException.BAD_MECH, GSSException.FAILURE
public Object inquireByOid(Oid oid) throws GSSException
GSSConstants.X509_CERT_CHAIN
returns certificate chain of this credential
(X509Certificate[]
).
inquireByOid
in interface ExtendedGSSCredential
oid
- the oid of the information desired.GSSException
- containing the following major error codes:
GSSException.FAILURE
public X509Credential getX509Credential()
public PrivateKey getPrivateKey() throws GSSException
GSSException
public X509Certificate[] getCertificateChain()
Copyright © 2016. All rights reserved.