public class CertUtil
extends java.lang.Object
| Constructor and Description |
|---|
CertUtil()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getProxyTypeAsString(int proxyType)
Deprecated.
Returns a string description of a specified proxy
type.
|
static void |
init()
Deprecated.
A no-op function that can be used to force the class
to load and initialize.
|
static void |
installSecureRandomProvider()
Deprecated.
Installs SecureRandom provider.
|
static boolean |
isGsi2Enabled()
Deprecated.
Checks if GSI-2 mode is enabled.
|
static boolean |
isGsi2Proxy(int certType)
Deprecated.
Determines if a specified certificate type indicates a
GSI-2 proxy certificate.
|
static boolean |
isGsi3Enabled()
Deprecated.
Checks if GSI-3 mode is enabled.
|
static boolean |
isGsi3Proxy(int certType)
Deprecated.
Determines if a specified certificate type indicates a
GSI-3 proxy certificate.
|
static boolean |
isGsi4Proxy(int certType)
Deprecated.
Determines if a specified certificate type indicates a
GSI-4 proxy certificate.
|
static boolean |
isImpersonationProxy(int certType)
Deprecated.
Determines if a specified certificate type indicates a
GSI-2 or GSI-3 or GSI-4 impersonation proxy certificate.
|
static boolean |
isIndependentProxy(int certType)
Deprecated.
Determines if a specified certificate type indicates a
GSI-3 or GS-4 limited proxy certificate.
|
static boolean |
isLimitedProxy(int certType)
Deprecated.
Determines if a specified certificate type indicates a
GSI-2 or GSI-3 or GSI=4 limited proxy certificate.
|
static boolean |
isProxy(int certType)
Deprecated.
Determines if a specified certificate type indicates a GSI-2,
GSI-3 or GSI-4proxy certificate.
|
static java.security.cert.X509Certificate |
loadCertificate(java.io.InputStream in)
Deprecated.
Loads a X509 certificate from the specified input stream.
|
static java.security.cert.X509Certificate |
loadCertificate(java.lang.String file)
Deprecated.
Loads an X.509 certificate from the specified file.
|
static java.security.cert.X509Certificate[] |
loadCertificates(java.lang.String file)
Deprecated.
Loads multiple X.509 certificates from the specified file.
|
static java.security.cert.X509CRL |
loadCrl(java.io.InputStream in)
Deprecated.
|
static java.security.cert.X509CRL |
loadCrl(java.lang.String file)
Deprecated.
|
static java.security.cert.X509Certificate |
readCertificate(java.io.BufferedReader reader)
Deprecated.
Loads a X.509 certificate from the specified reader.
|
static void |
setProvider(java.lang.String providerName)
Deprecated.
Sets a provider name to use for loading certificates
and for generating key pairs.
|
static java.lang.String |
toGlobusID(java.security.Principal name)
Deprecated.
Converts the specified principal into Globus format.
|
static java.lang.String |
toGlobusID(java.lang.String dn)
Deprecated.
Converts DN of the form "CN=A, OU=B, O=C" into Globus
format "/CN=A/OU=B/O=C".
This function might return incorrect Globus-formatted ID when one of the RDNs in the DN contains commas. |
static java.lang.String |
toGlobusID(java.lang.String dn,
boolean noreverse)
Deprecated.
Converts DN of the form "CN=A, OU=B, O=C" into Globus
format "/CN=A/OU=B/O=C" or "/O=C/OU=B/CN=A" depending on the
noreverse option. |
static void |
writeCertificate(java.io.OutputStream out,
java.security.cert.X509Certificate cert)
Deprecated.
Writes certificate to the specified output stream in PEM format.
|
public static void init()
public static void installSecureRandomProvider()
public static void setProvider(java.lang.String providerName)
providerName - provider name to use.public static java.security.cert.X509Certificate loadCertificate(java.io.InputStream in)
throws java.security.GeneralSecurityException
in - the input stream to read the certificate from.X509Certificate the loaded certificate.java.security.GeneralSecurityException - if certificate failed to load.public static java.security.cert.X509Certificate loadCertificate(java.lang.String file)
throws java.io.IOException,
java.security.GeneralSecurityException
file - the file to load the certificate from.java.security.cert.X509Certificate
the loaded certificate.java.io.IOException - if I/O error occursjava.security.GeneralSecurityException - if security problems occurs.public static java.security.cert.X509Certificate[] loadCertificates(java.lang.String file)
throws java.io.IOException,
java.security.GeneralSecurityException
file - the certificate file to load the certificate from.java.io.IOException - if I/O error occursjava.security.GeneralSecurityException - if security problems occurs.public static java.security.cert.X509Certificate readCertificate(java.io.BufferedReader reader)
throws java.io.IOException,
java.security.GeneralSecurityException
reader - the stream from which load the certificate.java.io.IOException - if I/O error occursjava.security.GeneralSecurityException - if security problems occurs.public static void writeCertificate(java.io.OutputStream out,
java.security.cert.X509Certificate cert)
throws java.io.IOException,
java.security.cert.CertificateEncodingException
java.io.IOExceptionjava.security.cert.CertificateEncodingExceptionpublic static java.lang.String toGlobusID(java.lang.String dn)
dn - the DN to convert to Globus format.toGlobusID(String, boolean)public static java.lang.String toGlobusID(java.lang.String dn,
boolean noreverse)
noreverse option. If noreverse is true
the order of the DN components is not reveresed - "/CN=A/OU=B/O=C" is
returned. If noreverse is false, the order of the
DN components is reversed - "/O=C/OU=B/CN=A" is returned. dn - the DN to convert to Globus format.noreverse - the direction of the conversion.public static java.lang.String toGlobusID(java.security.Principal name)
toGlobusID()
function.name - the principal to convert to Globus format.toGlobusID(String)public static boolean isProxy(int certType)
certType - the certificate type to check.public static boolean isGsi4Proxy(int certType)
certType - the certificate type to check.public static boolean isGsi3Proxy(int certType)
certType - the certificate type to check.public static boolean isGsi2Proxy(int certType)
certType - the certificate type to check.public static boolean isLimitedProxy(int certType)
certType - the certificate type to check.public static boolean isIndependentProxy(int certType)
certType - the certificate type to check.public static boolean isImpersonationProxy(int certType)
certType - the certificate type to check.public static java.lang.String getProxyTypeAsString(int proxyType)
proxyType - the proxy type to get the string
description of.public static boolean isGsi3Enabled()
public static boolean isGsi2Enabled()
public static java.security.cert.X509CRL loadCrl(java.lang.String file)
throws java.io.IOException,
java.security.GeneralSecurityException
java.io.IOExceptionjava.security.GeneralSecurityExceptionpublic static java.security.cert.X509CRL loadCrl(java.io.InputStream in)
throws java.security.GeneralSecurityException
java.security.GeneralSecurityExceptionCopyright © 2013. All Rights Reserved.