I've got a server that can't negotiate a cipher suite with a client
when using ECDSA certificates. When using ECDSA, the server reports
0x1408a0c1 (no shared cipher).
The same server can consume RSA and DSA certificates. (In fact, all
the public key and certificate routines are generic and only differ by
EVP key type, so the same routines produced the RSA, DSA and ECDSA
keys and certs).
The ECDSA CA and Server certs are built using P-256 (specifically,
NID_X9_62_prime256v1) and SHA-256.
The server cert verifies as expected:
$ openssl verify -CAfile signing-ecdsa-cert.pem server-ecdsa-cert.pem
server-ecdsa-cert.pem: OK
Server cert signature algorithm is ecdsa-with-SHA256. The cert key
usage is Digital Signature, Key Encipherment, Key Agreement. AKI and
SKI are present. EKU is *not* present. (Again, these same certs work
with RSA and DSA).
When loading them into the server, SSL_CTX_use_certificate_chain_file,
SSL_CTX_use_PrivateKey_file, and SSL_CTX_check_private_key succeed. I
also perform manual verification on the key, the certifcate, and the
chain (in addition to OpenSSL's SSL_CTX_check_private_key).
Cipher numbers one and two in the server are
"ECDHE-ECDSA-AES256-GCM-SHA384" and "ECDHE-ECDSA-AES128-GCM-SHA256"
when using ECDSA. Using default ciphers by removing the call to
SSL_CTX_set_cipher_list does not help.
When testing under RSA, the ECDH callback is successfully inovked.
When teting under ECDSA, the ECDH callback is never invoked.
When the negotiation fails, the server's SSL object reports 0x1408a0c1
(no shared cipher). Below is what it looks like from the client's
perspective.
I found one bug report form 2010 or so mentioning to ECSA and
0x1408a0c1, but it does not appear to be related (the source code no
longer looks as described in the bug report).
Any ideas what's going on here?
Thanks in advance.
**********
$ /usr/local/ssl/bin/openssl s_client -tls1_2 -connect localhost:8443
-CAfile ./pki/signing-ecdsa-cert.pem
CONNECTED(00000003)
140404774033064:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3
alert handshake failure:s3_pkt.c:1256:SSL alert number 40
140404774033064:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl
handshake failure:s3_pkt.c:596:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 7 bytes and written 0 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1.2
Cipher : 0000
...
Verify return code: 0 (ok)
Adding `-cipher` with ECDHE-ECDSA-AES128-GCM-SHA256 and
ECDHE-ECDSA-AES256-GCM-SHA384 produce the same results.
______________________________________________________________________
OpenSSL Project
http://www.openssl.org
User Support Mailing List
openss...@openssl.org
Automated List Manager
majo...@openssl.org