Statistics: Posted by electronicsguy — Sun Apr 02, 2017 11:48 pm
Statistics: Posted by carlosvvv — Tue Dec 06, 2016 5:02 pm
Statistics: Posted by Her Mary — Mon May 16, 2016 4:16 pm
Statistics: Posted by avinash.gonsalves — Mon May 16, 2016 2:54 pm
Statistics: Posted by ubergeeknz — Thu May 05, 2016 7:18 pm
Deadolus wrote:@chaeplin Very good point.
When I test it with TLS1.2, using opensslCode:
openssl s_server -accept 8883 -cert ~/device3/device3_certificate.pem -key ~/device3/device3_private.pem -CAfile ~/VeriSign-Class\ 3-Public-Primary-Certification-Authority-G5.pem -msg -verify 1 -tls1_2
I get<<< TLS 1.2 Handshake [length 0033], ClientHello
...
>>> TLS 1.1 Alert [length 0002], fatal protocol_version
...
ERROR
140387270956704:error:1408A10B:SSL routines:SSL3_GET_CLIENT_HELLO:wrong version number:s3_srvr.c:956:
shutting down SSL
CONNECTION CLOSED
and on the ESP
Error: SSL error 70
Also https://github.com/esp8266/Arduino/issues/43 indicates that the ESP does not (yet?) support TLS1.2 and thus can't be connected using the standard SDK ssl library.
Statistics: Posted by electronicsguy — Sat Apr 23, 2016 11:10 am
Code:
openssl s_server -accept 8883 -cert ~/device3/device3_certificate.pem -key ~/device3/device3_private.pem -CAfile ~/VeriSign-Class\ 3-Public-Primary-Certification-Authority-G5.pem -msg -verify 1 -tls1_2
<<< TLS 1.2 Handshake [length 0033], ClientHello
...
>>> TLS 1.1 Alert [length 0002], fatal protocol_version
...
ERROR
140387270956704:error:1408A10B:SSL routines:SSL3_GET_CLIENT_HELLO:wrong version number:s3_srvr.c:956:
shutting down SSL
CONNECTION CLOSED
Error: SSL error 70
Statistics: Posted by Tomasz_K — Fri Mar 18, 2016 7:33 pm
Statistics: Posted by cforsberg — Tue Jan 26, 2016 8:29 am
Statistics: Posted by ESP_Faye — Mon Jan 25, 2016 5:58 pm
Code:
openssl s_server -accept 8883 -cert ~/device3/device3_certificate.pem -key ~/device3/device3_private.pem -CAfile ~/VeriSign-Class\ 3-Public-Primary-Certification-Authority-G5.pem -msg -verify 1 -tls1_2
<<< TLS 1.2 Handshake [length 0033], ClientHello
...
>>> TLS 1.1 Alert [length 0002], fatal protocol_version
...
ERROR
140387270956704:error:1408A10B:SSL routines:SSL3_GET_CLIENT_HELLO:wrong version number:s3_srvr.c:956:
shutting down SSL
CONNECTION CLOSED
Error: SSL error 70
Statistics: Posted by Deadolus — Fri Jan 22, 2016 4:00 pm
Statistics: Posted by chaeplin — Fri Jan 22, 2016 1:38 am
STATION_IDLE
STATION_IDLE
STATION_IDLE
STATION_IDLE
ip:10.0.0.11,mask:255.255.255.0,gw:10.0.0.1
TCP: Connect to domain A21PT0FIM59RP0.iot.us-west-2.amazonaws.com:8883
DNS: found ip 54.200.238.99
Loaded certificates, trying to connect...TCP: connecting...
verisign 6c4
the file is a PEM file.
private_key 68b
certificate 4c8
the file is a PEM file.
the file is a PEM file.
client handshake start.
client handshake failed
Error: SSL error 40
pm open,type:2 0
STATION_IDLE
STATION_IDLE
ip:10.0.0.11,mask:255.255.255.0,gw:10.0.0.1
TCP: Connect to ip 10.0.0.3:8883
verisign 6c4
the file is a PEM file.
private_key 68b
certificate 4c8
the file is a PEM file.
the file is a PEM file.
client handshake start.
distinguished names: [<null>], [AWS IoT Certificate]
before 2995055104, tv_sec 2995055113, after 2693241344
client handshake failed
Error: Cert has expired
TCP: Reconnect to 10.0.0.3:8883
Code:
espconn_secure_ca_enable
>>> TLS 1.1 Handshake [length 00dd], CertificateRequest
...
<<< TLS 1.1 Handshake [length 0368], Certificate
....
depth=0 CN = AWS IoT Certificate
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 CN = AWS IoT Certificate
verify error:num=27:certificate not trusted
verify return:1
depth=0 CN = AWS IoT Certificate
verify error:num=21:unable to verify the first certificate
verify return:1
<<< TLS 1.1 Handshake [length 0106], ClientKeyExchange
...
<<< TLS 1.1 Handshake [length 0106], CertificateVerify
...
<<< TLS 1.1 ChangeCipherSpec [length 0001]
01
<<< TLS 1.1 Handshake [length 0010], Finished
...
>>> TLS 1.1 ChangeCipherSpec [length 0001]
01
>>> TLS 1.1 Handshake [length 0010], Finished
...
-----BEGIN SSL SESSION PARAMETERS-----
...
-----END SSL SESSION PARAMETERS-----
Client certificate
-----BEGIN CERTIFICATE-----
....
-----END CERTIFICATE-----
subject=/CN=AWS IoT Certificate
issuer=/OU=Amazon Web Services O=Amazon.com Inc. L=Seattle ST=Washington C=US
Shared ciphers:AES128-SHA:AES256-SHA:RC4-SHA:RC4-MD5
CIPHER is AES128-SHA
Secure Renegotiation IS NOT supported
Statistics: Posted by Deadolus — Thu Jan 21, 2016 6:35 pm
Code:
// espconn_secure_ca_enable(0x01, CA_FLASH_SECTOR); //connect as client
// espconn_secure_cert_req_enable(0x01, CERT_FLASH_SECTOR); //connect as client
Statistics: Posted by ESP_Faye — Thu Jan 21, 2016 5:24 pm
Code:
openssl s_server -accept 8883 -cert ~/device3/device3_certificate.pem -key ~/device3/device3_private.pem -CAfile ~/VeriSign-Class\ 3-Public-Primary-Certification-Authority-G5.pem -msg -verify 1
Code:
<<< TLS 1.1 Handshake [length 0007], Certificate
0b 00 00 03 00 00 00
Code:
STATION_IDLE
ip:10.0.0.11,mask:255.255.255.0,gw:10.0.0.1
TCP: Connect to ip 10.0.0.3:8883
client handshake start.
client handshake failed
Error: SSL error 10
pm open,type:2 0
uint8 flash_sector : Flash sector in which CA certificate
(esp_ca_cert.bin) is written into. For example, parameters 0x3B
should be written into Flash 0x3B000 in the flash. Please be noted
that sectors used for storing codes and system parameters must not
be covered.
Code:
openssl s_client -host A21PT0FIM59RP0.iot.us-west-2.amazonaws.com -port 8883 -cert ~/device3/device3_certificate.pem -key ~/device3/device3_private.pem -CAfile ~/VeriSign-Class\ 3-Public-Primary-Certification-Authority-G5.pem -msg -verify 1
<<< TLS 1.2 Handshake [length 0a5d], Certificate
.......
>>> TLS 1.2 Handshake [length 0368], Certificate
.....
Statistics: Posted by Deadolus — Thu Jan 21, 2016 4:34 pm
Code:
mosquitto_pub --cafile VeriSign-Class\ 3-Public-Primary-Certification-Authority-G5.pem --cert thing_esp8266/a05f990520-certificate.pem.crt --key thing_esp8266/a05f990520-private.pem.key -h A2UPMX25ELLWO1.iot.us-west-2.amazonaws.com -p 8883 -q 1 -d -t topic/test -i esp8266 -m "hello world"
Code:
openssl x509 -in VeriSign-Class\ 3-Public-Primary-Certification-Authority-G5.pem -outform DER -out TLS.ca_x509.cer
Code:
python make_cacert.py
Code:
openssl rsa -in a05f990520-private.pem.key -out private_key.key1024 -outform DER
Code:
openssl x509 -in a05f990520-certificate.pem.crt -outform DER -out certificate.cer
Code:
python make_cert.py
Code:
espconn_secure_ca_enable(0x01, CA_FLASH_SECTOR); //connect as client
espconn_secure_cert_req_enable(0x01, CERT_FLASH_SECTOR); //connect as client
Code:
dhcp client start...
STATION_IDLE
STATION_IDLE
STATION_IDLE
STATION_IDLE
STATION_IDLE
STATION_IDLE
STATION_IDLE
ip:10.0.0.11,mask:255.255.255.0,gw:10.0.0.1
TCP: Connect to domain A21PT0FIM59RP0.iot.us-west-2.amazonaws.com:8883
DNS: found ip 54.187.143.164
TCP: connecting...
TLS.ca_x509.cer 4d7
the file is not a PEM file.
private_key 4a8
certificate 35d
the file is not a PEM file.
the file is not a PEM file.
client handshake start.
client handshake failed
Error: SSL error 40
pm open,type:2 0
Statistics: Posted by Deadolus — Mon Jan 18, 2016 5:38 pm