/*
* We only support RSA certificates. Lets hope
* this is one.
*/
RSAPublicKeyStructure rsaKey = null;
try
{
rsaKey = RSAPublicKeyStructure.getInstance(cert.certs[0].getTBSCertificate().getSubjectPublicKeyInfo().getPublicKey());
}
catch (Exception e)
{
/*
* Sorry, we have to fail ;-(
*/
this.failWithError(AL_fatal, AP_unsupported_certificate);
}
/*
* Parse the servers public RSA key.
*/
this.serverRsaKey = new RSAKeyParameters(
false,
rsaKey.getModulus(),
rsaKey.getPublicExponent());
connection_state = CS_SERVER_CERTIFICATE_RECEIVED;
read = true;
break;
default: