This is an automated email from the ASF dual-hosted git repository.
panjuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new c1aa4260232 Fix sonar issue on SSLUtils (#25806)
c1aa4260232 is described below
commit c1aa42602322b12733aef22b4eedfae8fb8bd739
Author: Liang Zhang <[email protected]>
AuthorDate: Sat May 20 15:58:25 2023 +0800
Fix sonar issue on SSLUtils (#25806)
---
.../java/org/apache/shardingsphere/proxy/frontend/ssl/SSLUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/ssl/SSLUtils.java
b/proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/ssl/SSLUtils.java
index b2c67fc4c7d..c31dde13fa4 100644
---
a/proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/ssl/SSLUtils.java
+++
b/proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/ssl/SSLUtils.java
@@ -81,7 +81,7 @@ public final class SSLUtils {
.addRDN(BCStyle.CN, "").addRDN(BCStyle.OU,
"").addRDN(BCStyle.O, "").addRDN(BCStyle.L, "").addRDN(BCStyle.ST,
"").addRDN(BCStyle.C, "").addRDN(BCStyle.E, "").build();
BigInteger certSerialNumber = new BigInteger(Long.toString(now));
Date endDate = Date.from(
-
LocalDateTime.ofInstant(Instant.ofEpochMilli(startDate.getTime() +
TimeUnit.DAYS.toMillis(365 * 100)),
ZoneId.systemDefault()).atZone(ZoneId.systemDefault()).toInstant());
+
LocalDateTime.ofInstant(Instant.ofEpochMilli(startDate.getTime() +
TimeUnit.DAYS.toMillis(365 * 100L)),
ZoneId.systemDefault()).atZone(ZoneId.systemDefault()).toInstant());
ContentSigner contentSigner = new
JcaContentSignerBuilder("SHA256WithRSA").build(keyPair.getPrivate());
return new JcaX509CertificateConverter().getCertificate(new
JcaX509v3CertificateBuilder(dnName, certSerialNumber, startDate, endDate,
dnName, keyPair.getPublic()).build(contentSigner));
}