Class JcaX509ExtensionUtils

    • Method Detail

      • createAuthorityKeyIdentifier

        public org.bouncycastle.asn1.x509.AuthorityKeyIdentifier createAuthorityKeyIdentifier​(PublicKey pubKey)
      • createAuthorityKeyIdentifier

        public org.bouncycastle.asn1.x509.AuthorityKeyIdentifier createAuthorityKeyIdentifier​(PublicKey pubKey,
                                                                                              X500Principal name,
                                                                                              BigInteger serial)
      • createAuthorityKeyIdentifier

        public org.bouncycastle.asn1.x509.AuthorityKeyIdentifier createAuthorityKeyIdentifier​(PublicKey pubKey,
                                                                                              org.bouncycastle.asn1.x509.GeneralNames generalNames,
                                                                                              BigInteger serial)
      • createSubjectKeyIdentifier

        public org.bouncycastle.asn1.x509.SubjectKeyIdentifier createSubjectKeyIdentifier​(PublicKey publicKey)
        Return a RFC 3280 type 1 key identifier. As in:
         (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).
         
        Parameters:
        publicKey - the key object containing the key identifier is to be based on.
        Returns:
        the key identifier.
      • createTruncatedSubjectKeyIdentifier

        public org.bouncycastle.asn1.x509.SubjectKeyIdentifier createTruncatedSubjectKeyIdentifier​(PublicKey publicKey)
        Return a RFC 3280 type 2 key identifier. As in:
         (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.
         
        Parameters:
        publicKey - the key object of interest.
        Returns:
        the key identifier.
      • parseExtensionValue

        public static org.bouncycastle.asn1.ASN1Primitive parseExtensionValue​(byte[] encExtValue)
                                                                       throws IOException
        Return the ASN.1 object contained in a byte[] returned by a getExtensionValue() call.
        Parameters:
        encExtValue - DER encoded OCTET STRING containing the DER encoded extension object.
        Returns:
        an ASN.1 object
        Throws:
        IOException - on a parsing error.