7174966: With OCSP enabled on Java 7 get error 'Wrong key usage' with Comodo certificate
authorvinnie
Wed, 29 May 2013 14:57:51 +0100
changeset 17729 90a2bf654c4f
parent 17728 8bbdf55ba9d4
child 17730 5e7cbd6236de
child 17910 82d10099a8a6
child 21392 fb8d040cb72e
7174966: With OCSP enabled on Java 7 get error 'Wrong key usage' with Comodo certificate Reviewed-by: xuelei
jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java
--- a/jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java	Wed May 29 10:24:11 2013 +0100
+++ b/jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java	Wed May 29 14:57:51 2013 +0100
@@ -552,7 +552,7 @@
 
         try {
             Signature respSignature = Signature.getInstance(sigAlgId.getName());
-            respSignature.initVerify(cert);
+            respSignature.initVerify(cert.getPublicKey());
             respSignature.update(tbsResponseData);
 
             if (respSignature.verify(signature)) {