Package org.apache.wss4j.common.crypto
Class BouncyCastleUtils
java.lang.Object
org.apache.wss4j.common.crypto.BouncyCastleUtils
Deprecated, for removal: This API element is subject to removal in a future version.
Decodes the X.509 key identifier extensions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]Deprecated, for removal: This API element is subject to removal in a future version.static byte[]Deprecated, for removal: This API element is subject to removal in a future version.
-
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.
-
X509KeyIdentifierUtil. This name is retained for callers compiled against 4.0.1 and earlier, and delegates to the new class. UseX509KeyIdentifierUtilinstead.