Open DL6ER opened 1 year ago
The used certificate is:
-----BEGIN EC PRIVATE KEY-----
MIHcAgEBBEIBUc06BvhAAS6de4JASqeFxVnzFp7DJcq2pMybJ0JS3G3KNBDLXraI
m9s1fomUzgyMZc0Krx8sZTHzxc4sY6gGN6OgBwYFK4EEACOhgYkDgYYABABsfrFL
xgwlw10drFlkAnhWrAK0+6ETbEiHXMqMZdUveJmvE98OHsW7VVrpmYOeyVQwpDhG
khAr1qUusyQex7YSnQHiaLSayPLFnkDyHXuBqAl8JfLmsEMFAHKji8QUipdH9Vnk
qI1tN23lvqUuYIg7ctoqP11mT5DmDKFqMh5/6356BA==
-----END EC PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIIB+DCCAVmgAwIBAgIPMzY3NTM1NjI5MTI3MDkzMAwGCCqGSM49BAMCBQAwEjEQ
MA4GA1UEAwwHcGkuaG9sZTAeFw0wMTAxMDEwMDAwMDBaFw0zMDEyMzEyMzU5NTla
MBIxEDAOBgNVBAMMB3BpLmhvbGUwgZswEAYHKoZIzj0CAQYFK4EEACMDgYYABABs
frFLxgwlw10drFlkAnhWrAK0+6ETbEiHXMqMZdUveJmvE98OHsW7VVrpmYOeyVQw
pDhGkhAr1qUusyQex7YSnQHiaLSayPLFnkDyHXuBqAl8JfLmsEMFAHKji8QUipdH
9VnkqI1tN23lvqUuYIg7ctoqP11mT5DmDKFqMh5/6356BKNNMEswCQYDVR0TBAIw
ADAdBgNVHQ4EFgQUvtnBtkXbvds+zEbUzlYtktVIYf4wHwYDVR0jBBgwFoAUvtnB
tkXbvds+zEbUzlYtktVIYf4wDAYIKoZIzj0EAwIFAAOBigAwgYYCQUGYClVatX2f
Nsut5KNkBhTMLmBea4HC/nWtQtmJt0625jjffuj7+/B3iHwqI3m2ak4DsricCCBp
qUTW1SbGlK0iAkFbOqBdvb50NKjboMwp0KF+IWFnLYfFokZR/vIu6n5p1RHaOrIF
taAdh3tJPnOqCrniQ+XZ1h7FXfci0nKS9XofqQ==
-----END CERTIFICATE-----
That's due to Chrome does no support secp521r1
and Firefox supports it. Your private key is secp521r1
. Regenerate certificate with chrome supported private key can resolve that.
From Chrome's log, it supports x25519
, secp256r1
and secp384r1
( 001d 00 17 00 18
)
mbedTLS(ssl_tls12_server.c:1315, 3): 0070: 03 04 03 03 00 0a 00 0a 00 08 ca ca 00 1d 00 17 ................
mbedTLS(ssl_tls12_server.c:1315, 3): 0080: 00 18 00 0d 00 14 00 12 04 03 08 04 04 01 05 03 ................
From Firefox's log, it supports x25519
, secp256r1
,secp384r1
and secp521r1
( 001d 00 17 00 18 00 19
)
mbedTLS(ssl_tls12_server.c:1315, 3): 0000: 00 17 00 00 ff 01 00 01 00 00 0a 00 0e 00 0c 00 ................
mbedTLS(ssl_tls12_server.c:1315, 3): 0010: 1d 00 17 00 18 00 19 01 00 01 01 00 0b 00 02 01 ................
m
The issue can be reproduced by ../programs/ssl/ssl_server2 server_addr=0.0.0.0 server_port=443 allow_sha1=1 debug_level=5 crt_file=../test.crt key_file=../test.key
( test.{key,crt} are from @DL6ER 's comment. It should be executed in tests
folder)
And resolved by ../programs/ssl/ssl_server2 server_addr=0.0.0.0 server_port=443 allow_sha1=1 debug_level=5 crt_file=data_files/ecdsa_secp256r1.crt key_file=data_files/ecdsa_secp256r1.key
( crt_file and key_file exists in tests/data_files
. It should be executed in tests
folder)
Summary
I set up a webserver with
mbedTLS
v3.4.0 andCivetWeb
v1.16. However, I see that Chrome rejects connection withERR_SSL_VERSION_OR_CIPHER_MISMATCH
, Firefox works fineSystem information
Mbed TLS version (number or commit id): 3.4.0 Operating system and version: Linux Configuration (if not default, please attach
mbedtls_config.h
): default Compiler and options (if you used a pre-built binary, please indicate how you obtained it): default Additional environment information: nothing worth mentioningExpected behavior
Chrome should load the page as does Firefox
Actual behavior
Chrome rejects the connection showing
ERR_SSL_VERSION_OR_CIPHER_MISMATCH
Steps to reproduce
mbedTLS
Additional information
Debug output from
mbedTLS
for Chrome (not working!)Debug output from Firefox (working!):