Skip to content

Commit

Permalink
svm: CKeyStore#loadKeysOrCertificateChains signature changed in JDK 19
Browse files Browse the repository at this point in the history
  • Loading branch information
zapster committed Sep 4, 2022
1 parent 97203ef commit 69eb739
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,13 @@ private static void registerSunMSCAPIConfig(BeforeAnalysisAccess a) {
"java.security.KeyException", "java.security.KeyStoreException", "java.security.ProviderException",
"java.security.SignatureException", "java.lang.OutOfMemoryError");

a.registerReachabilityHandler(SecurityServicesFeature::registerLoadKeysOrCertificateChains,
method(a, "sun.security.mscapi.CKeyStore", "loadKeysOrCertificateChains", String.class));
if (JavaVersionUtil.JAVA_SPEC >= 19) {
a.registerReachabilityHandler(SecurityServicesFeature::registerLoadKeysOrCertificateChains,
method(a, "sun.security.mscapi.CKeyStore", "loadKeysOrCertificateChains", String.class, int.class));
} else {
a.registerReachabilityHandler(SecurityServicesFeature::registerLoadKeysOrCertificateChains,
method(a, "sun.security.mscapi.CKeyStore", "loadKeysOrCertificateChains", String.class));
}
a.registerReachabilityHandler(SecurityServicesFeature::registerGenerateCKeyPair,
method(a, "sun.security.mscapi.CKeyPairGenerator$RSA", "generateCKeyPair", String.class, int.class, String.class));
a.registerReachabilityHandler(SecurityServicesFeature::registerCPrivateKeyOf,
Expand Down

0 comments on commit 69eb739

Please sign in to comment.