hi,
I am trying to write a HTTP Client and Server which uses TLSv1.2. The cipher
my client use is "ECDHE-RSA-AES128-SHA". Now in my server application I have
registered a callback with openssl using
SSL_CTX_set_tmp_ecdh_callback(server_ssl_ctx, tmp_ecdh_cb);
In my implementation of tmp_ecdh_cb I am trying the following to get the
EC_KEY.
static EC_KEY *
tmp_ecdh_cb(SSL *ssl,int is_export, int keylength)
{
EC_KEY *ecdh = NULL;
int nid;
nid = OBJ_sn2nid( (const char *) "secp224r1");
if (nid == 0) {
//Some Error;
}
ecdh = EC_KEY_new_by_curve_name(nid);
if (ecdh == NULL) {
EC_KEY_free(ecdh);
}
return ecdh;
}
I am using some existing RSA certificate that works for normal RSA ciphers.
My questions are:
1) Is this a good way to know the EC_KEY using the curve-name Or there is
some better way to know it?
2) When I tried "prime256v1" curve-name with the same RSA cipher it didn't
work and I got handshake failure. Is there any relationship between ECDH*
cipher used and the curve?
--Sirshendu.
--
View this message in context:
http://old.nabble.com/How-to-know-which-curve-to-use-for-which-cipher-tp34140785p34140785.html
Sent from the OpenSSL - Dev mailing list archive at Nabble.com.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [email protected]
Automated List Manager [email protected]