public class UserCredentials
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
java.security.cert.X509Certificate |
getUserCertificate()
This method returs the user certificate loaded in this
UserCredentials . |
java.security.cert.X509Certificate[] |
getUserChain()
This method returs the user certificate chain loaded in this
UserCredentials . |
java.security.PrivateKey |
getUserKey()
This method returs the user credential openssl private key.
|
static UserCredentials |
instance()
Static instance constructor for a
UserCredentials . |
static UserCredentials |
instance(java.security.PrivateKey key,
java.security.cert.X509Certificate[] certs) |
static UserCredentials |
instance(java.lang.String keyPassword)
Static instance constructor for a
UserCredentials . |
static UserCredentials |
instance(java.lang.String userCertFile,
java.lang.String userKeyFile)
Static instance constructor for a
UserCredentials . |
static UserCredentials |
instance(java.lang.String userCertFile,
java.lang.String userKeyFile,
java.lang.String keyPassword)
Static instance constructor for a
UserCredentials . |
static UserCredentials |
instance(UserCredentials credentials)
Static instance constructor for a
UserCredentials . |
void |
save(java.io.OutputStream os) |
public void save(java.io.OutputStream os) throws java.io.IOException
java.io.IOException
public java.security.cert.X509Certificate getUserCertificate()
UserCredentials
.public java.security.cert.X509Certificate[] getUserChain()
UserCredentials
.public java.security.PrivateKey getUserKey()
public static UserCredentials instance()
UserCredentials
.
This method should be used with credentials whose private key is not encrypted.
The current implementation looks for user credentials in the following places (in sequence):
X509_USER_CERT
and X509_USER_KEY
system
properties are set, their values are used to load the user credentials
PKCS12_USER_CERT
system property is set, its value is used to
load the user credentials.
.globus
directory in the user's home is searched for a PEM certificate (in the
usercert.pem
and userkey.pem
files).
usercert.p12
file).
VOMSException
- if there is an error loading the user credentials.public static UserCredentials instance(java.lang.String keyPassword)
UserCredentials
.
For more info on the user credentials load procedure, see instance()
.keyPassword
- the password that is to be used to decrypt the user private key.VOMSException
- if there is an error loading the user credentials.public static UserCredentials instance(java.lang.String userCertFile, java.lang.String userKeyFile, java.lang.String keyPassword)
UserCredentials
.
This methods allows a user to bypass the default credentials search procedure (highlighted here
),
by specifying the path to a PEM X509 user cert and private key.userCertFile
- the path to the PEM X509 user certificate.userKeyFile
- the path to the PEM X509 private key.keyPassword
- the password that is to be used to decrypt the user private key.VOMSException
- if there is an error loading the user credentials.public static UserCredentials instance(java.lang.String userCertFile, java.lang.String userKeyFile)
UserCredentials
.
This methods allows a user to bypass the default credentials search procedure (highlighted here
),
by specifying the path to a PEM X509 user cert and private key.userCertFile
- the path to the PEM X509 user certificate.userKeyFile
- the path to the PEM X509 private key.VOMSException
- if there is an error loading the user credentials.public static UserCredentials instance(UserCredentials credentials)
UserCredentials
.
This methods allows a user to bypass the default credentials search procedure (highlighted here
),
by specifying the path to a PEM X509 user cert and private key.credentials
- the GlobusCredentials object containing the user's own proxyVOMSException
- if there is an error loading the user credentials.public static UserCredentials instance(java.security.PrivateKey key, java.security.cert.X509Certificate[] certs)
Copyright © 2012. All Rights Reserved.