6943352: SSL regression: RSAClientKeyExchange fails to pass securerandom arg to KeyGen

Reviewed-by: wetmore, xuelei
This commit is contained in:
Weijun Wang 2010-12-06 10:48:20 +08:00
parent d9f1152680
commit d670fd38bf

View File

@ -103,7 +103,8 @@ final class RSAClientKeyExchange extends HandshakeMessage {
String s = ((protocolVersion.v >= ProtocolVersion.TLS12.v) ?
"SunTls12RsaPremasterSecret" : "SunTlsRsaPremasterSecret");
KeyGenerator kg = JsseJce.getKeyGenerator(s);
kg.init(new TlsRsaPremasterSecretParameterSpec(major, minor));
kg.init(new TlsRsaPremasterSecretParameterSpec(major, minor),
generator);
preMaster = kg.generateKey();
Cipher cipher = JsseJce.getCipher(JsseJce.CIPHER_RSA_PKCS1);