Code: Select all
openssl s_client -connect website_name.com:443 -CAfile C:\Users\Shahin.Haque\Downloads\Root_CA_B64.cer
..
SSL handshake has read 2745 bytes and written 453 bytes
Verification: OK
..
..
..
Timeout : 7200 (sec)
Verify return code: 0 (ok)
vs
Code: Select all
openssl s_client -connect website_name.com:443
verify error:num=19:self-signed certificate in certificate chain
verify return:1
..
..
..
SSL handshake has read 2745 bytes and written 453 bytes
Verification error: self-signed certificate in certificate chain
..
..
..
Timeout : 7200 (sec)
Verify return code: 19 (self-signed certificate in certificate chain)
..
..
..
Above caption from OPENSSL, this is what I expected. An error without the file and verified with.
Now that I have varied that this works, I no longer need OPENSSL, the rest should be able to be done on the ESP32C3.
Using:
Code: Select all
/* AT CALLBACK */
AT+CIPSTART="SSL","wesbite_name.com",443
I get
Code: Select all
CONNECT
OK
/* ESP CALLBACK */
cert len=1164
set cert&key ok
ssl established
Which looks like it is working perfectly, however I get that reply with my cert aswell as the esp cert, which should only work with my cert. Furthermore regardless of the date I get an OK response.
I have tried removing the key aswell as making a fake key to see if it passes, but thankfully that fails
Code: Select all
/* AT CALLBACK */
ERROR
/* ESP CALLBACK */
cert len=0
ssl create 0 socket fail
Commands send to the ESP
Code: Select all
AT+RESTORE
AT+CWMODE=1
AT+CWJAP="wifi_name","wifi_password"
AT+CIPSNTPCFG=1,8,"cn.ntp.org.cn","ntp.sjtu.edu.cn"
AT+CIPSNTPTIME? (to check the date is set)
AT+CIPSSLCCONF=3,0,0 (Have also tried 1,0,0 & 2,0,0 arrangements)
AT+CIPSTART="SSL","wesbite_name.com",443
Any ideas?