public class GlobusCredential extends Object implements Serializable
Constructor and Description |
---|
GlobusCredential(InputStream input)
Deprecated.
Creates a GlobusCredential from an input stream.
|
GlobusCredential(PrivateKey key,
X509Certificate[] certs)
Deprecated.
Creates a GlobusCredential from a private key and a certificate chain.
|
GlobusCredential(String proxyFile)
Deprecated.
Creates a GlobusCredential from a proxy file.
|
GlobusCredential(String certFile,
String unencryptedKeyFile)
Deprecated.
Creates a GlobusCredential from certificate file and a unencrypted key file.
|
Modifier and Type | Method and Description |
---|---|
X509Certificate[] |
getCertificateChain()
Deprecated.
Returns the certificate chain of this credential.
|
int |
getCertNum()
Deprecated.
Returns the number of certificates in the credential without the self-signed certificates.
|
static GlobusCredential |
getDefaultCredential()
Deprecated.
Returns the default credential.
|
String |
getIdentity()
Deprecated.
Returns the identity of this credential.
|
X509Certificate |
getIdentityCertificate()
Deprecated.
Returns the identity certificate of this credential.
|
String |
getIssuer()
Deprecated.
Returns the issuer DN of the first certificate in the chain.
|
int |
getPathConstraint()
Deprecated.
Returns the path length constraint.
|
PrivateKey |
getPrivateKey()
Deprecated.
Returns the private key of this credential.
|
int |
getProxyType()
Deprecated.
Returns the certificate type of the first certificate in the chain.
|
int |
getStrength()
Deprecated.
Returns strength of the private/public key in bits.
|
String |
getSubject()
Deprecated.
Returns the subject DN of the first certificate in the chain.
|
long |
getTimeLeft()
Deprecated.
Returns time left of this credential.
|
void |
save(OutputStream out)
Deprecated.
Saves the credential into a specified output stream.
|
static void |
setDefaultCredential(GlobusCredential cred)
Deprecated.
Sets default credential.
|
String |
toString()
Deprecated.
|
void |
verify()
Deprecated.
Verifies the validity of the credentials.
|
public GlobusCredential(PrivateKey key, X509Certificate[] certs)
key
- the private keycerts
- the certificate chainpublic GlobusCredential(String proxyFile) throws GlobusCredentialException
proxyFile
- the file to load the credential from.GlobusCredentialException
- if the credential failed to load.public GlobusCredential(String certFile, String unencryptedKeyFile) throws GlobusCredentialException
certFile
- the file containing the certificateunencryptedKeyFile
- the file containing the private key. The key must be unencrypted.GlobusCredentialException
- if something goes wrong.public GlobusCredential(InputStream input) throws GlobusCredentialException
input
- the stream to load the credential from.GlobusCredentialException
- if the credential failed to load.public void save(OutputStream out) throws IOException
out
- the output stream to write the credential to.IOException
- if any error occurred during saving.public void verify() throws GlobusCredentialException
GlobusCredentialException
- if one of the certificates in the chain expired or if path validiation fails.public X509Certificate getIdentityCertificate()
X509Certificate
the identity cert. Null, if unable to get the identity certificate
(an error occurred)public int getPathConstraint()
public String getIdentity()
getIdentityCertificate()
public PrivateKey getPrivateKey()
PrivateKey
the private keypublic X509Certificate[] getCertificateChain()
X509Certificate []
the certificate chainpublic int getCertNum()
public int getStrength()
public String getSubject()
public String getIssuer()
public int getProxyType()
BouncyCastleUtil.getCertificateType(X509Certificate)
public long getTimeLeft()
public static GlobusCredential getDefaultCredential() throws GlobusCredentialException
GlobusCredentialException
- if the credential expired or some other error with the credential.public static void setDefaultCredential(GlobusCredential cred)
cred
- the credential to set a default.Copyright © 2016. All rights reserved.