public class ProxyUtil extends Object
| Constructor and Description |
|---|
ProxyUtil()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
static String |
getCA(org.gridforum.jgss.ExtendedGSSCredential credentials)
This method return the CA of credentials passed as parameter in the OSG format.
|
static org.gridforum.jgss.ExtendedGSSCredential |
getCredentialsFromMyproxy(String myProxyHost,
int myProxyPort,
String username,
String password,
int hours)
This method allows to retrieve credentials from a myproxy repository.
|
static String |
getDN(org.gridforum.jgss.ExtendedGSSCredential credentials)
This method return the DN of credentials passed as parameter in the OSG format.
|
static String |
getDNOnlineRepresentation(String rfc2253Format) |
static int |
getEndUserCertificateindex(X509Certificate[] certs)
This methods returns the certificate index belonging to the array having as issuer a certificate
not present in the array
|
static org.gridforum.jgss.ExtendedGSSCredential |
loadProxyCredentials(byte[] credentials)
Utility method to parse proxy credentials.
|
static org.gridforum.jgss.ExtendedGSSCredential |
loadProxyCredentials(String fileName)
Utility method to load proxy credentials from a file.
|
static X509Certificate[] |
orderChain(X509Certificate[] certs)
Starting from "endUserCertificate" (the certificate retreived with getRootCertificateindex)
this method builds an array containing all descendants certificates.
|
static org.gridforum.jgss.ExtendedGSSCredential |
orderCredentials(org.gridforum.jgss.ExtendedGSSCredential credentials)
Order the certificate chain according to the GSI Requirements
|
static X509Certificate[] |
removeCACertificateFromArray(X509Certificate[] certs)
This methods remove the CA certificate from the certificate chain passed.
|
static void |
storeProxyCredentials(String fileName,
org.gridforum.jgss.ExtendedGSSCredential credentials)
Utility method to store proxy credentials to a file.
|
public static org.gridforum.jgss.ExtendedGSSCredential loadProxyCredentials(byte[] credentials)
throws GSSException
credentials - the byte array containing proxy credentials to loadGSSException - If an exception occurs parsing credentialspublic static org.gridforum.jgss.ExtendedGSSCredential loadProxyCredentials(String fileName) throws IOException, GSSException
fileName - the absolute or relative path of file containing proxy
credentials to loadIOException - if an exeption occurs loading credentials from fileGSSException - If an exception occurs parsing credentialspublic static void storeProxyCredentials(String fileName, org.gridforum.jgss.ExtendedGSSCredential credentials) throws GSSException, IOException
fileName - the absolute or relative path of file where to store proxy
credentialscredentials - Credentials to be stored on fileIOException - if an exeption occurs storing credentials to fileGSSException - If an exception occurs extracting credentialspublic static org.gridforum.jgss.ExtendedGSSCredential getCredentialsFromMyproxy(String myProxyHost, int myProxyPort, String username, String password, int hours) throws org.globus.myproxy.MyProxyException
myProxyHost - host of the myproxy repositorymyProxyPort - port of the myproxy repositoryusername - username of the account to usepassword - password of the account to usehours - lifetime of delegated credentials in hoursorg.globus.myproxy.MyProxyException - if credentials cannot be retrievedpublic static String getDN(org.gridforum.jgss.ExtendedGSSCredential credentials) throws Exception
Exception - if the DN cannot be retrievedpublic static String getCA(org.gridforum.jgss.ExtendedGSSCredential credentials) throws Exception
Exception - if the CA cannot be retrievedpublic static int getEndUserCertificateindex(X509Certificate[] certs)
certs - the certificate chain to searchpublic static X509Certificate[] removeCACertificateFromArray(X509Certificate[] certs)
certs - the certificate chain to searchpublic static X509Certificate[] orderChain(X509Certificate[] certs) throws Exception
certs - the certificate chain to orderExceptionpublic static org.gridforum.jgss.ExtendedGSSCredential orderCredentials(org.gridforum.jgss.ExtendedGSSCredential credentials)
throws Exception
ExceptionCopyright © 2015. All Rights Reserved.