ProtocolVersion v =
(ProtocolVersion) session.enabledProtocols.last();
byte[] b = new byte[46];
session.random.nextBytes (b);
preMasterSecret = Util.concat(v.getEncoded(), b);
EME_PKCS1_V1_5 pkcs1 = EME_PKCS1_V1_5.getInstance((RSAPublicKey) serverKex);
BigInteger bi = new BigInteger(1,
pkcs1.encode(preMasterSecret, session.random));
bi = RSA.encrypt((RSAPublicKey) serverKex, bi);
ckex = new ClientKeyExchange(Util.trim(bi));
}
else if (suite.getKeyExchange().startsWith("DH"))
{