mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
8221271: sun/security/pkcs11/tls/tls12/TestTLS12.java test failed
Reviewed-by: xuelei
This commit is contained in:
parent
a8550e4589
commit
a8a29bbae6
3 changed files with 10 additions and 14 deletions
|
@ -263,13 +263,13 @@ public final class RSACipher extends CipherSpi {
|
|||
throw new InvalidKeyException("Unknown mode: " + opmode);
|
||||
}
|
||||
RSAKey rsaKey = RSAKeyFactory.toRSAKey(key);
|
||||
if (key instanceof RSAPublicKey) {
|
||||
if (rsaKey instanceof RSAPublicKey) {
|
||||
mode = encrypt ? MODE_ENCRYPT : MODE_VERIFY;
|
||||
publicKey = (RSAPublicKey)key;
|
||||
publicKey = (RSAPublicKey)rsaKey;
|
||||
privateKey = null;
|
||||
} else { // must be RSAPrivateKey per check in toRSAKey
|
||||
mode = encrypt ? MODE_SIGN : MODE_DECRYPT;
|
||||
privateKey = (RSAPrivateKey)key;
|
||||
privateKey = (RSAPrivateKey)rsaKey;
|
||||
publicKey = null;
|
||||
}
|
||||
int n = RSACore.getByteLength(rsaKey.getModulus());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue