public class JcaX509ExtensionUtils extends X509ExtensionUtils
| Constructor and Description |
|---|
JcaX509ExtensionUtils()
Create a utility class pre-configured with a SHA-1 digest calculator based on the
default implementation.
|
JcaX509ExtensionUtils(DigestCalculator calculator) |
| Modifier and Type | Method and Description |
|---|---|
AuthorityKeyIdentifier |
createAuthorityKeyIdentifier(PublicKey pubKey) |
AuthorityKeyIdentifier |
createAuthorityKeyIdentifier(PublicKey pubKey,
GeneralNames generalNames,
BigInteger serial) |
AuthorityKeyIdentifier |
createAuthorityKeyIdentifier(PublicKey pubKey,
X500Principal name,
BigInteger serial) |
AuthorityKeyIdentifier |
createAuthorityKeyIdentifier(X509Certificate cert) |
SubjectKeyIdentifier |
createSubjectKeyIdentifier(PublicKey publicKey)
Return a RFC 3280 type 1 key identifier.
|
SubjectKeyIdentifier |
createTruncatedSubjectKeyIdentifier(PublicKey publicKey)
Return a RFC 3280 type 2 key identifier.
|
static Collection |
getIssuerAlternativeNames(X509Certificate cert) |
static Collection |
getSubjectAlternativeNames(X509Certificate cert) |
static ASN1Primitive |
parseExtensionValue(byte[] encExtValue)
Return the ASN.1 object contained in a byte[] returned by a getExtensionValue() call.
|
createAuthorityKeyIdentifier, createAuthorityKeyIdentifier, createAuthorityKeyIdentifier, createSubjectKeyIdentifier, createTruncatedSubjectKeyIdentifierpublic JcaX509ExtensionUtils()
throws NoSuchAlgorithmException
NoSuchAlgorithmExceptionpublic JcaX509ExtensionUtils(DigestCalculator calculator)
public AuthorityKeyIdentifier createAuthorityKeyIdentifier(X509Certificate cert) throws CertificateEncodingException
CertificateEncodingExceptionpublic AuthorityKeyIdentifier createAuthorityKeyIdentifier(PublicKey pubKey)
public AuthorityKeyIdentifier createAuthorityKeyIdentifier(PublicKey pubKey, X500Principal name, BigInteger serial)
public AuthorityKeyIdentifier createAuthorityKeyIdentifier(PublicKey pubKey, GeneralNames generalNames, BigInteger serial)
public SubjectKeyIdentifier createSubjectKeyIdentifier(PublicKey publicKey)
(1) The keyIdentifier is composed of the 160-bit SHA-1 hash of the value of the BIT STRING subjectPublicKey (excluding the tag, length, and number of unused bits).
publicKey - the key object containing the key identifier is to be based on.public SubjectKeyIdentifier createTruncatedSubjectKeyIdentifier(PublicKey publicKey)
(2) The keyIdentifier is composed of a four bit type field with the value 0100 followed by the least significant 60 bits of the SHA-1 hash of the value of the BIT STRING subjectPublicKey.
publicKey - the key object of interest.public static ASN1Primitive parseExtensionValue(byte[] encExtValue) throws IOException
encExtValue - DER encoded OCTET STRING containing the DER encoded extension object.IOException - on a parsing error.public static Collection getIssuerAlternativeNames(X509Certificate cert) throws CertificateParsingException
CertificateParsingExceptionpublic static Collection getSubjectAlternativeNames(X509Certificate cert) throws CertificateParsingException
CertificateParsingExceptionCopyright © 2015–2020 The veraPDF Consortium. All rights reserved.