|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.vt.middleware.crypt.x509.X509Utils
public final class X509Utils
Utility class providing convenience methods for common operations on X.509 certificates.
| Method Summary | |
|---|---|
static X509Certificate |
findEntityCertificate(Collection<X509Certificate> candidates,
PrivateKey key)
Finds a certificate whose public key is paired with the given private key. |
static X509Certificate |
findEntityCertificate(X509Certificate[] candidates,
PrivateKey key)
Finds a certificate whose public key is paired with the given private key. |
static List<GeneralName> |
getSubjectAltNames(X509Certificate cert)
Gets all subject alternative names defined on the given certificate. |
static List<GeneralName> |
getSubjectAltNames(X509Certificate cert,
GeneralNameType... types)
Gets all subject alternative names of the given type(s) on the given cert. |
static List<String> |
getSubjectNames(X509Certificate cert)
Gets all subject names present on the given certificate, i.e. |
static List<String> |
getSubjectNames(X509Certificate cert,
GeneralNameType... types)
Gets CN from the subject DN and the set of all alternative names of the given type. |
static Object |
readExtension(X509Certificate cert,
ExtensionType type)
Reads a single extension field from the given X.509 certificate. |
static Map<ExtensionType,Object> |
readExtensions(X509Certificate cert)
Reads all the X.509 extension fields from the certificate and makes them available as a map of types to values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static List<GeneralName> getSubjectAltNames(X509Certificate cert)
cert - X.509 certificate to examine.
public static List<GeneralName> getSubjectAltNames(X509Certificate cert,
GeneralNameType... types)
cert - X.509 certificate to examine.types - One or more name types to fetch.
public static List<String> getSubjectNames(X509Certificate cert)
cert - X.509 certificate to examine.
public static List<String> getSubjectNames(X509Certificate cert,
GeneralNameType... types)
cert - X.509 certificate to examine.types - One or more name types to fetch.
public static X509Certificate findEntityCertificate(X509Certificate[] candidates,
PrivateKey key)
candidates - Array of candidate certificates.key - Private key used to find matching public key.
public static X509Certificate findEntityCertificate(Collection<X509Certificate> candidates,
PrivateKey key)
candidates - Collection of candidate certificates.key - Private key used to find matching public key.
public static Object readExtension(X509Certificate cert,
ExtensionType type)
cert - Certificate from which to read extensions.type - Type that describes the extension to read.
edu.vt.middleware.crypt.x509.types package or null if no such extension is
defined.public static Map<ExtensionType,Object> readExtensions(X509Certificate cert)
cert - Certificate to read.
edu.vt.middleware.crypt.x509.types package.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||