Class BouncyCastleUtils

java.lang.Object
org.apache.wss4j.common.crypto.BouncyCastleUtils

@Deprecated(since="4.0.2", forRemoval=true) public final class BouncyCastleUtils extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
the decoding no longer uses Bouncy Castle, so this class was renamed to X509KeyIdentifierUtil. This name is retained for callers compiled against 4.0.1 and earlier, and delegates to the new class. Use X509KeyIdentifierUtil instead.
Decodes the X.509 key identifier extensions.
  • Method Details

    • getAuthorityKeyIdentifierBytes

      @Deprecated(since="4.0.2", forRemoval=true) public static byte[] getAuthorityKeyIdentifierBytes(X509Certificate cert)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Read the keyIdentifier of the AuthorityKeyIdentifier extension (2.5.29.35) of the given certificate.
      Parameters:
      cert - the certificate to read the AuthorityKeyIdentifier from.
      Returns:
      an empty array if the certificate has no AuthorityKeyIdentifier extension, null if the extension is present but carries no keyIdentifier, otherwise the keyIdentifier.
      Throws:
      IllegalArgumentException - if the extension is present but is not valid DER.
    • getSubjectKeyIdentifierBytes

      @Deprecated(since="4.0.2", forRemoval=true) public static byte[] getSubjectKeyIdentifierBytes(X509Certificate cert)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Read the SubjectKeyIdentifier extension (2.5.29.14) of the given certificate.
      Parameters:
      cert - the certificate to read the SubjectKeyIdentifier from.
      Returns:
      an empty array if the certificate has no SubjectKeyIdentifier extension, otherwise the key identifier.
      Throws:
      IllegalArgumentException - if the extension is present but is not valid DER.