Currently I'm working on server based application which is using libssl for ssl implementation. When I use RSA certificate, everything works fine but when I use Elliptic Curve key with my certificate, I'm unable to connect to server. When I try to curl, it gives following error
NSS error -12286 (SSL_ERROR_NO_CYPHER_OVERLAP)
Cannot communicate securely with peer: no common encryption algorithm(s).
Closing connection 0
By using "openssl s_client" command, I came to know that server is only offering "ECDH-ECDSA-AES256-GCM-SHA384" but curl or chrome are unable to recognise this cipher suite.
Steps to produce certificate are:
openssl ecparam -name prime256v1 -genkey -noout -out ecCert.key
openssl req -new -key ecCert.key -out ecCert.csr -subj /CN=servername.com
openssl x509 -req -in ecCert.csr -CA ./rootCA.pem -CAkey ./rootCA.key -CAcreateserial -sha256 -out ecCert.crt -days 500
cat ecCert.crt ecCert.key > ecCert.pem
Is there a way to configure ciphering method of server?
P.S. I'm using openssl version "OpenSSL 1.0.2g 1 Mar 2016"
I have also tried to set cipher list by using SSL_CTX_set_cipher_list(ctx, ciphers)