src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/NativeRSASignature.java
branchJDK-8145252-TLS13-branch
changeset 56542 56aaa6cb3693
parent 47216 71c04702a3d5
child 51216 e429a304c97d
equal deleted inserted replaced
56541:92cbbfc996f3 56542:56aaa6cb3693
     1 /*
     1 /*
     2  * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   174         this.encodedLen = encodedLen;
   174         this.encodedLen = encodedLen;
   175         this.keyFactory = new NativeRSAKeyFactory();
   175         this.keyFactory = new NativeRSAKeyFactory();
   176     }
   176     }
   177 
   177 
   178     // deprecated but abstract
   178     // deprecated but abstract
       
   179     @Override
   179     @SuppressWarnings("deprecation")
   180     @SuppressWarnings("deprecation")
   180     protected Object engineGetParameter(String param) throws InvalidParameterException {
   181     protected Object engineGetParameter(String param) throws InvalidParameterException {
   181         throw new UnsupportedOperationException("getParameter() not supported");
   182         throw new UnsupportedOperationException("getParameter() not supported");
       
   183     }
       
   184 
       
   185     @Override
       
   186     protected AlgorithmParameters engineGetParameters() {
       
   187         return null;
   182     }
   188     }
   183 
   189 
   184     @Override
   190     @Override
   185     protected synchronized void engineInitSign(PrivateKey privateKey)
   191     protected synchronized void engineInitSign(PrivateKey privateKey)
   186             throws InvalidKeyException {
   192             throws InvalidKeyException {
   249         }
   255         }
   250         init(false, newKey, newSigLength);
   256         init(false, newKey, newSigLength);
   251     }
   257     }
   252 
   258 
   253     // deprecated but abstract
   259     // deprecated but abstract
       
   260     @Override
   254     @SuppressWarnings("deprecation")
   261     @SuppressWarnings("deprecation")
   255     protected void engineSetParameter(String param, Object value) throws InvalidParameterException {
   262     protected void engineSetParameter(String param, Object value) throws InvalidParameterException {
   256         throw new UnsupportedOperationException("setParameter() not supported");
   263         throw new UnsupportedOperationException("setParameter() not supported");
       
   264     }
       
   265 
       
   266     @Override
       
   267     protected void engineSetParameter(AlgorithmParameterSpec params)
       
   268             throws InvalidAlgorithmParameterException {
       
   269         if (params != null) {
       
   270             throw new InvalidAlgorithmParameterException("No parameter accepted");
       
   271         }
   257     }
   272     }
   258 
   273 
   259     @Override
   274     @Override
   260     protected synchronized byte[] engineSign() throws SignatureException {
   275     protected synchronized byte[] engineSign() throws SignatureException {
   261         try {
   276         try {