src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11Signature.java
branchJDK-8145252-TLS13-branch
changeset 56542 56aaa6cb3693
parent 49700 490292739652
child 50364 00ebc17f3cc6
--- a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11Signature.java	Fri May 11 14:55:56 2018 -0700
+++ b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11Signature.java	Fri May 11 15:53:12 2018 -0700
@@ -31,6 +31,7 @@
 
 import java.security.*;
 import java.security.interfaces.*;
+import java.security.spec.AlgorithmParameterSpec;
 import sun.nio.ch.DirectBuffer;
 
 import sun.security.util.*;
@@ -434,6 +435,7 @@
     }
 
     // see JCA spec
+    @Override
     protected void engineInitVerify(PublicKey publicKey)
             throws InvalidKeyException {
         if (publicKey == null) {
@@ -450,6 +452,7 @@
     }
 
     // see JCA spec
+    @Override
     protected void engineInitSign(PrivateKey privateKey)
             throws InvalidKeyException {
         if (privateKey == null) {
@@ -466,6 +469,7 @@
     }
 
     // see JCA spec
+    @Override
     protected void engineUpdate(byte b) throws SignatureException {
         ensureInitialized();
         switch (type) {
@@ -490,6 +494,7 @@
     }
 
     // see JCA spec
+    @Override
     protected void engineUpdate(byte[] b, int ofs, int len)
             throws SignatureException {
         ensureInitialized();
@@ -527,6 +532,7 @@
     }
 
     // see JCA spec
+    @Override
     protected void engineUpdate(ByteBuffer byteBuffer) {
         ensureInitialized();
         int len = byteBuffer.remaining();
@@ -574,6 +580,7 @@
     }
 
     // see JCA spec
+    @Override
     protected byte[] engineSign() throws SignatureException {
         ensureInitialized();
         try {
@@ -633,6 +640,7 @@
     }
 
     // see JCA spec
+    @Override
     protected boolean engineVerify(byte[] signature) throws SignatureException {
         ensureInitialized();
         try {
@@ -824,15 +832,32 @@
 
     // see JCA spec
     @SuppressWarnings("deprecation")
+    @Override
     protected void engineSetParameter(String param, Object value)
             throws InvalidParameterException {
         throw new UnsupportedOperationException("setParameter() not supported");
     }
 
     // see JCA spec
+    @Override
+    protected void engineSetParameter(AlgorithmParameterSpec params)
+            throws InvalidAlgorithmParameterException {
+        if (params != null) {
+            throw new InvalidAlgorithmParameterException("No parameter accepted");
+        }
+    }
+
+    // see JCA spec
     @SuppressWarnings("deprecation")
+    @Override
     protected Object engineGetParameter(String param)
             throws InvalidParameterException {
         throw new UnsupportedOperationException("getParameter() not supported");
     }
+
+    // see JCA spec
+    @Override
+    protected AlgorithmParameters engineGetParameters() {
+        return null;
+    }
 }