src/java.base/share/classes/sun/security/pkcs10/PKCS10.java
changeset 54483 ac20c3bdc55d
parent 53351 bdb29aa5fd31
--- a/src/java.base/share/classes/sun/security/pkcs10/PKCS10.java	Tue Apr 09 16:32:22 2019 -0700
+++ b/src/java.base/share/classes/sun/security/pkcs10/PKCS10.java	Wed Apr 10 02:35:18 2019 +0000
@@ -167,12 +167,8 @@
         try {
             sigAlg = id.getName();
             sig = Signature.getInstance(sigAlg);
-
-            sig.initVerify(subjectPublicKeyInfo);
-
-            // set parameters after Signature.initSign/initVerify call,
-            // so the deferred provider selections occur when key is set
-            SignatureUtil.specialSetParameter(sig, id.getParameters());
+            SignatureUtil.initVerifyWithParam(sig, subjectPublicKeyInfo,
+                SignatureUtil.getParamSpec(sigAlg, id.getParameters()));
 
             sig.update(data);
             if (!sig.verify(sigData)) {