You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to cipher suites in both client side and server side, the SSL negotiation should finally use TLS_RSA_WITH_AES_256_CBC_SHA256, but signature_algorithms extension doesn't contain RSA+SHA256. Since the common cipher suite doesn't match ECDSA+SHA1 or ECDSA+SHA256, the server terminate the negotiation.
I've done some experiments with openssl to support above assumption.
OpenSSL version:
$ openssl version
OpenSSL 1.0.2g 1 Mar 2016
For cipher suited supported by Adafruit WICED Feather, the cipher string is DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:AES256-SHA256:AES256-SHA:AES128-SHA256:AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA256:ECDH-ECDSA-AES128-SHA
Exp 1.
By using option -sigalgs <signature_algorithm>, we simulate the WICED using its signature_algorithm extension ECDSA+SHA1:ECDSA+SHA256.[Errno 104: connection reset by peer]
$ openssl s_client \
-connect cubipal.azure-devices.net:443 \
-cipher DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:AES256-SHA256:AES256-SHA:AES128-SHA256:AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA256:ECDH-ECDSA-AES128-SHA \
-sigalgs ECDSA+SHA1:ECDSA+SHA256
CONNECTED(00000003)
write:errno=104
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 119 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1.2
Cipher : 0000
Session-ID:
Session-ID-ctx:
Master-Key:
Key-Arg : None
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1488339212
Timeout : 300 (sec)
Verify return code: 0 (ok)
---
Exp 2.
Add RSA+SHA256 to signature_algorithm extension. [Successfully connected]
$ openssl s_client \
-connect cubipal.azure-devices.net:443 \
-cipher DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:AES256-SHA256:AES256-SHA:AES128-SHA256:AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA256:ECDH-ECDSA-AES128-SHA \
-sigalgs ECDSA+SHA1:ECDSA+SHA256:RSA+SHA256
CONNECTED(00000003)
depth=2 C = IE, O = Baltimore, OU = CyberTrust, CN = Baltimore CyberTrust Root
verify return:1
depth=1 C = US, ST = Washington, L = Redmond, O = Microsoft Corporation, OU = Microsoft IT, CN = Microsoft IT SSL SHA2
verify return:1
depth=0 CN = *.azure-devices.net
verify return:1
---
Certificate chain
0 s:/CN=*.azure-devices.net
i:/C=US/ST=Washington/L=Redmond/O=Microsoft Corporation/OU=Microsoft IT/CN=Microsoft IT SSL SHA2
1 s:/C=US/ST=Washington/L=Redmond/O=Microsoft Corporation/OU=Microsoft IT/CN=Microsoft IT SSL SHA2
i:/C=IE/O=Baltimore/OU=CyberTrust/CN=Baltimore CyberTrust Root
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIGcjCCBFqgAwIBAgITWgABtrNbz7vBeV0QWwABAAG2szANBgkqhkiG9w0BAQsF
ADCBizELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcT
B1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEVMBMGA1UE
CxMMTWljcm9zb2Z0IElUMR4wHAYDVQQDExVNaWNyb3NvZnQgSVQgU1NMIFNIQTIw
HhcNMTUwODI3MDMxODA0WhcNMTcwODI2MDMxODA0WjAeMRwwGgYDVQQDDBMqLmF6
dXJlLWRldmljZXMubmV0M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BgEFBQcCARYoaHR0cDovL3d3dy5taWNy
b3NvZnQuY29tL3BraS9tc2NvcnAvY3BzADAnBgkrBgEEAYI3FQoEGjAYMAoGCCsG
AQUFBwMBMAoGCCsGAQUFBwMCMA0GCSqGSIb3DQEBCwUAA4ICAQCrjzOSW+X6v+UC
u+JkYyuypXN14pPLcGFbknJWj6DAyFWXKC8ihIYdtf/szWIO7VooplSTZ05u/JYu
ZYh7fAw27qih9CLhhfncXi5yzjgLMlD0mlbORvMJR/nMl7Yh1ki9GyLnpOqMmO+E
yTpOiE07Uyt2uWelLHjMY8kwy2bSRXIp7/+A8qHRaIIdXNtAKIK5jo068BJpo77h
4PljCb9JFdEt6sAKKuaP86Y+8oRZ7YzU4TLDCiK8P8n/gQXH0vvhOE/O0n7gWPqB
n8KxsnRicop6tB6GZy32Stn8w0qktmQNXOGU+hp8OL6irULWZw/781po6d78nmwk
1IFl2TB4+jgyblvJdTM0rx8vPf3F2O2kgsRNs9M5qCI7m+he43Bhue0Fj/h3oIIo
Qx7X/uqc8j3VTNE9hf2A4wksSRgRydjAYoo+bduNagC5s7Eucb4mBG0MMk7HAQU9
m/gyaxqth6ygDLK58wojSV0i4RiU01qZkHzqIWv5FhhMjbFwyKEc6U35Ps7kP/1O
fdGm13ONaYqDl44RyFsLFFiiDYxZFDSsKM0WDxbl9ULAlVc3WR85kEBK6I+pSQj+
7/Z5z2zTz9qOFWgB15SegTbjSR7uk9mEVnj9KDlGtG8W1or0EGrrEDP2CMsp0oEj
VTJbZAxEaZ3cVCKva5sQUxFMjwG32g==
-----END CERTIFICATE-----
subject=/CN=*.azure-devices.net
issuer=/C=US/ST=Washington/L=Redmond/O=Microsoft Corporation/OU=Microsoft IT/CN=Microsoft IT SSL SHA2
---
No client certificate CA names sent
---
SSL handshake has read 3266 bytes and written 495 bytes
---
New, TLSv1/SSLv3, Cipher is AES256-SHA256
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1.2
Cipher : AES256-SHA256
Session-ID: F12200004B7B272FA59EE38A18CC8E016CEB35455E9AD6E6D5F680766224D560
Session-ID-ctx:
Master-Key: 97F19F66232A3242AD08F66F3D67DBE595DB03035FEECAAC92BD273DE64AA0C894E6987008AC2515ADB7AE025DACF60D
Key-Arg : None
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1488339228
Timeout : 300 (sec)
Verify return code: 0 (ok)
---
^C
It's not reasonable that the WICED Feather supports RSA SHA256 cipher suites but doesn't put RSA+SHA256 into Client Hello signature_algorithm extension. And personally I think it may be a firmware issue.
Here is a tcpdump .pcap file when WICED Feather tries to establish the SSL connection, FYI.
Could you help to take a further investigation and resolve this issue?
Thanks
The text was updated successfully, but these errors were encountered:
I use Adafruit WICED Feather to connect AzureIoTHub via
cubipal.azure-devices.net:443
, but fail the SSL handshake after sending Client Hello message.Here is a list of cipher suites supported by Azure IoT
And following is the packet carrying Client Hello message.
According to cipher suites in both client side and server side, the SSL negotiation should finally use
TLS_RSA_WITH_AES_256_CBC_SHA256
, but signature_algorithms extension doesn't containRSA+SHA256
. Since the common cipher suite doesn't matchECDSA+SHA1
orECDSA+SHA256
, the server terminate the negotiation.I've done some experiments with openssl to support above assumption.
OpenSSL version:
For cipher suited supported by Adafruit WICED Feather, the cipher string is
DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:AES256-SHA256:AES256-SHA:AES128-SHA256:AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA256:ECDH-ECDSA-AES128-SHA
Exp 1.
By using option
-sigalgs <signature_algorithm>
, we simulate the WICED using its signature_algorithm extensionECDSA+SHA1:ECDSA+SHA256
.[Errno 104: connection reset by peer]Exp 2.
Add
RSA+SHA256
to signature_algorithm extension. [Successfully connected]It's not reasonable that the WICED Feather supports RSA SHA256 cipher suites but doesn't put RSA+SHA256 into Client Hello signature_algorithm extension. And personally I think it may be a firmware issue.
Here is a tcpdump .pcap file when WICED Feather tries to establish the SSL connection, FYI.
Could you help to take a further investigation and resolve this issue?
Thanks
The text was updated successfully, but these errors were encountered: