You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ch...@apache.org on 2025/11/22 18:34:00 UTC
(kafka) branch 4.0 updated: MINOR: Use SHA256withRSA instead of SHA1withRSA when running SslTransportLayerTest (#20961)
This is an automated email from the ASF dual-hosted git repository.
chia7712 pushed a commit to branch 4.0
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/4.0 by this push:
new 2a816950215 MINOR: Use SHA256withRSA instead of SHA1withRSA when running SslTransportLayerTest (#20961)
2a816950215 is described below
commit 2a816950215955459a076a1920daabc51c3fefc2
Author: Ming-Yen Chung <mi...@gmail.com>
AuthorDate: Sun Nov 23 02:27:36 2025 +0800
MINOR: Use SHA256withRSA instead of SHA1withRSA when running SslTransportLayerTest (#20961)
`SHA1withRSA` is disabled in some linux distribution, such as Fedora 43
server, which results in the following error. Hence, this PR adopts the
solution suggested by @gaurav-narula in
https://github.com/apache/kafka/pull/20561#issuecomment-3378701638,
which is to use `SHA256withRSA` instead of `SHA1withRSA`
```
Gradle Test Run :clients:test > Gradle Test Executor 28 > Tls13SslFactoryTest > testSslFactoryConfiguration() FAILED
org.apache.kafka.common.config.ConfigException: Invalid value javax.net.ssl.SSLHandshakeException: (handshake_failure) No available authentication scheme for configuration A client SSLEngine created with the provided settings can't connect to a server SSLEngine created with those settings.
at app//org.apache.kafka.common.security.ssl.SslFactory.configure(SslFactory.java:105)
at app//org.apache.kafka.common.security.ssl.SslFactoryTest.testSslFactoryConfiguration(SslFactoryTest.java:80)
at java.base@21.0.9/java.lang.reflect.Method.invoke(Method.java:580)
at java.base@21.0.9/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base@21.0.9/java.util.ArrayList.forEach(ArrayList.java:1596)
```
Reviewers: Chia-Ping Tsai <ch...@gmail.com>
---
clients/src/test/java/org/apache/kafka/test/TestSslUtils.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/clients/src/test/java/org/apache/kafka/test/TestSslUtils.java b/clients/src/test/java/org/apache/kafka/test/TestSslUtils.java
index 72a1ccfe651..39544e2b154 100644
--- a/clients/src/test/java/org/apache/kafka/test/TestSslUtils.java
+++ b/clients/src/test/java/org/apache/kafka/test/TestSslUtils.java
@@ -111,7 +111,7 @@ public class TestSslUtils {
* @param dn the X.509 Distinguished Name, eg "CN=Test, L=London, C=GB"
* @param pair the KeyPair
* @param days how many days from now the Certificate is valid for, or - for negative values - how many days before now
- * @param algorithm the signing algorithm, eg "SHA1withRSA"
+ * @param algorithm the signing algorithm, eg "SHA256withRSA"
* @return the self-signed certificate
* @throws CertificateException thrown if a security error or an IO error occurred.
*/
@@ -132,7 +132,7 @@ public class TestSslUtils {
* CA.
* @param parentKeyPair The key pair of the issuer. Leave null if you want to generate a root
* CA.
- * @param algorithm the signing algorithm, eg "SHA1withRSA"
+ * @param algorithm the signing algorithm, eg "SHA256withRSA"
* @return the signed certificate
* @throws CertificateException
*/
@@ -399,7 +399,7 @@ public class TestSslUtils {
private byte[] subjectAltName;
public CertificateBuilder() {
- this(30, "SHA1withRSA");
+ this(30, "SHA256withRSA");
}
public CertificateBuilder(int days, String algorithm) {