src/java.base/share/classes/sun/security/rsa/RSAPSSSignature.java
branchJDK-8145252-TLS13-branch
changeset 56802 a48cca98dea6
parent 56592 b1902b22005e
parent 50715 46492a773912
equal deleted inserted replaced
56801:76025c6c6e29 56802:a48cca98dea6
   130         if (!(publicKey instanceof RSAPublicKey)) {
   130         if (!(publicKey instanceof RSAPublicKey)) {
   131             throw new InvalidKeyException("key must be RSAPublicKey");
   131             throw new InvalidKeyException("key must be RSAPublicKey");
   132         }
   132         }
   133         this.pubKey = (RSAPublicKey) isValid((RSAKey)publicKey);
   133         this.pubKey = (RSAPublicKey) isValid((RSAKey)publicKey);
   134         this.privKey = null;
   134         this.privKey = null;
   135 
   135         resetDigest();
   136     }
   136     }
   137 
   137 
   138     // initialize for signing. See JCA doc
   138     // initialize for signing. See JCA doc
   139     @Override
   139     @Override
   140     protected void engineInitSign(PrivateKey privateKey)
   140     protected void engineInitSign(PrivateKey privateKey)
   151         }
   151         }
   152         this.privKey = (RSAPrivateKey) isValid((RSAKey)privateKey);
   152         this.privKey = (RSAPrivateKey) isValid((RSAKey)privateKey);
   153         this.pubKey = null;
   153         this.pubKey = null;
   154         this.random =
   154         this.random =
   155             (random == null? JCAUtil.getSecureRandom() : random);
   155             (random == null? JCAUtil.getSecureRandom() : random);
       
   156         resetDigest();
   156     }
   157     }
   157 
   158 
   158     /**
   159     /**
   159      * Utility method for checking the key PSS parameters against signature
   160      * Utility method for checking the key PSS parameters against signature
   160      * PSS parameters.
   161      * PSS parameters.