github-advanced-security[bot] commented on code in PR #727:
URL: https://github.com/apache/ws-wss4j/pull/727#discussion_r4069987112
##########
ws-security-common/src/test/java/org/apache/wss4j/common/crypto/X509KeyIdentifierUtilTest.java:
##########
@@ -120,6 +120,27 @@
);
}
+ /**
+ * BouncyCastleUtils is the pre-4.0.2 name of this class, kept as a
deprecated delegate so
+ * that code written against 4.0.1 and earlier still compiles and behaves
the same.
+ */
+ @Test
+ @SuppressWarnings("removal")
+ public void testDeprecatedBouncyCastleUtilsDelegates() throws Exception {
+ KeyStore keyStore = loadKeyStore("keys/wss40.jks", "security");
+ X509Certificate cert =
(X509Certificate)keyStore.getCertificate("wss40");
+ assertNotNull(cert);
+
+ assertArrayEquals(
+ X509KeyIdentifierUtil.getAuthorityKeyIdentifierBytes(cert),
+ BouncyCastleUtils.getAuthorityKeyIdentifierBytes(cert)
Review Comment:
## CodeQL / Deprecated method or constructor invocation
Invoking [BouncyCastleUtils.getAuthorityKeyIdentifierBytes](1) should be
avoided because it has been deprecated.
[Show more
details](https://github.com/apache/ws-wss4j/security/code-scanning/426)
##########
ws-security-common/src/test/java/org/apache/wss4j/common/crypto/X509KeyIdentifierUtilTest.java:
##########
@@ -120,6 +120,27 @@
);
}
+ /**
+ * BouncyCastleUtils is the pre-4.0.2 name of this class, kept as a
deprecated delegate so
+ * that code written against 4.0.1 and earlier still compiles and behaves
the same.
+ */
+ @Test
+ @SuppressWarnings("removal")
+ public void testDeprecatedBouncyCastleUtilsDelegates() throws Exception {
+ KeyStore keyStore = loadKeyStore("keys/wss40.jks", "security");
+ X509Certificate cert =
(X509Certificate)keyStore.getCertificate("wss40");
+ assertNotNull(cert);
+
+ assertArrayEquals(
+ X509KeyIdentifierUtil.getAuthorityKeyIdentifierBytes(cert),
+ BouncyCastleUtils.getAuthorityKeyIdentifierBytes(cert)
+ );
+ assertArrayEquals(
+ X509KeyIdentifierUtil.getSubjectKeyIdentifierBytes(cert),
+ BouncyCastleUtils.getSubjectKeyIdentifierBytes(cert)
Review Comment:
## CodeQL / Deprecated method or constructor invocation
Invoking [BouncyCastleUtils.getSubjectKeyIdentifierBytes](1) should be
avoided because it has been deprecated.
[Show more
details](https://github.com/apache/ws-wss4j/security/code-scanning/427)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]