Fix compilation error on JDK 15 (#10462)
Motivation: AlgorithmId.sha256WithRSAEncryption_oid was removed in JDK15 and later so we should not depend on it as otherwise we will see compilation errors Modifications: Replace AlgorithmId.sha256WithRSAEncryption_oid usage with specify the OID directly Result: Compiles on JDK15+
This commit is contained in:
parent
a4c44aa34a
commit
bb18479434
@ -66,7 +66,8 @@ final class OpenJdkSelfSignedCertGenerator {
|
||||
info.set(X509CertInfo.VALIDITY, new CertificateValidity(notBefore, notAfter));
|
||||
info.set(X509CertInfo.KEY, new CertificateX509Key(keypair.getPublic()));
|
||||
info.set(X509CertInfo.ALGORITHM_ID,
|
||||
new CertificateAlgorithmId(new AlgorithmId(AlgorithmId.sha256WithRSAEncryption_oid)));
|
||||
// sha256WithRSAEncryption
|
||||
new CertificateAlgorithmId(AlgorithmId.get("1.2.840.113549.1.1.11")));
|
||||
|
||||
// Sign the cert to identify the algorithm that's used.
|
||||
X509CertImpl cert = new X509CertImpl(info);
|
||||
|
Loading…
x
Reference in New Issue
Block a user