signature=70e902f89f03293bdcc59e78538792ab,0x2700 - X509 - Certificate verification failed, e.g. CRL...

@Carmeloning证书验证失败可能由于多种原因而发生。例如,您尚未设置正确的受信任根证书。证书验证失败时返回

错误-0x2700 MBEDTLS_ERR_X509_CERT_VERIFY_FAILED并返回。

您还应该检查验证标志。

I used the server to give me the root certificate in the browser test and the server handshake is able to pass,But when i use the Mbed. IT is faild and it return like this:

Starting mbed-os-example-tls/tls-client

Using Mbed OS 5.9.7

[EasyConnect] IPv4 mode

[EasyConnect] Using WiFi (ESP8266)

[EasyConnect] Connecting to WiFi GE

[EasyConnect] Connected to Network successfully

[EasyConnect] MAC address 84:0d:8e:97:40:ca

[EasyConnect] IP address 192.168.1.15

Successfully connected to 39.108.211.173 at port 443

Starting the TLS handshake...

ssl_tls.c:6717: |2| => handshake

ssl_cli.c:3386: |2| client state: 0

ssl_tls.c:2471: |2| => flush output

ssl_tls.c:2483: |2| <= flush output

ssl_cli.c:3386: |2| client state: 1

ssl_tls.c:2471: |2| => flush output

ssl_tls.c:2483: |2| <= flush output

ssl_cli.c:770: |2| => write client hello

ssl_tls.c:2764: |2| => write record

ssl_tls.c:2471: |2| => flush output

ssl_tls.c:2489: |2| message length: 189, out_left: 189

ssl_tls.c:2496: |2| ssl->f_send() returned 189 (-0xffffff43)

ssl_tls.c:2523: |2| <= flush output

ssl_tls.c:2922: |2| <= write record

ssl_cli.c:1085: |2| <= write client hello

ssl_cli.c:3386: |2| client state: 2

ssl_tls.c:2471: |2| => flush output

ssl_tls.c:2483: |2| <= flush output

ssl_cli.c:1478: |2| => parse server hello

ssl_tls.c:3809: |2| => read record

ssl_tls.c:2252: |2| => fetch input

ssl_tls.c:2412: |2| in_left: 0, nb_want: 5

ssl_tls.c:2436: |2| in_left: 0, nb_want: 5

ssl_tls.c:2438: |2| ssl->f_recv(_timeout)() returned 5 (-0xfffffffb)

ssl_tls.c:2458: |2| <= fetch input

ssl_tls.c:2252: |2| => fetch input

ssl_tls.c:2412: |2| in_left: 5, nb_want: 66

ssl_tls.c:2436: |2| in_left: 5, nb_want: 66

ssl_tls.c:2438: |2| ssl->f_recv(_timeout)() returned 61 (-0xffffffc3)

ssl_tls.c:2458: |2| <= fetch input

ssl_tls.c:3846: |2| <= read record

ssl_cli.c:1760: |2| server hello, total extension length: 17

ssl_cli.c:1949: |2| <= parse server hello

ssl_cli.c:3386: |2| client state: 3

ssl_tls.c:2471: |2| => flush output

ssl_tls.c:2483: |2| <= flush output

ssl_tls.c:4376: |2| => parse certificate

ssl_tls.c:3809: |2| => read record

ssl_tls.c:2252: |2| => fetch input

ssl_tls.c:2412: |2| in_left: 0, nb_want: 5

ssl_tls.c:2436: |2| in_left: 0, nb_want: 5

ssl_tls.c:2438: |2| ssl->f_recv(_timeout)() returned 5 (-0xfffffffb)

ssl_tls.c:2458: |2| <= fetch input

ssl_tls.c:2252: |2| => fetch input

ssl_tls.c:2412: |2| in_left: 5, nb_want: 877

ssl_tls.c:2436: |2| in_left: 5, nb_want: 877

ssl_tls.c:2438: |2| ssl->f_recv(_timeout)() returned 872 (-0xfffffc98)

ssl_tls.c:2458: |2| <= fetch input

ssl_tls.c:3846: |2| <= read record

Verifying certificate at depth 0:

cert. version : 1

serial number : 8D:9E:62:C5:CC:7A:BA:B6

issuer name : C=CN, ST=myprovince, L=mycity, O=myorganization, OU=mygroup, CN=myCA

subject name : C=CN, ST=myprovince, L=mycity, O=myorganization, OU=mygroup, CN=myServer

issued on : 2019-01-14 02:25:20

expires on : 2020-01-14 02:25:20

signed using : RSA with SHA1

RSA key size : 2048 bits

ssl_tls.c:4643: |1| x509_verify_cert() returned -9984 (-0x2700)

ssl_tls.c:4180: |2| => send alert message

ssl_tls.c:2764: |2| => write record

ssl_tls.c:2471: |2| => flush output

ssl_tls.c:2489: |2| message length: 7, out_left: 7

ssl_tls.c:2496: |2| ssl->f_send() returned 7 (-0xfffffff9)

ssl_tls.c:2523: |2| <= flush output

ssl_tls.c:2922: |2| <= write record

ssl_tls.c:4193: |2| <= send alert message

ssl_tls.c:4740: |2| <= parse certificate

ssl_tls.c:6727: |2| <= handshake

mbedtls_ssl_handshake() returned -0x2700

FAIL

ssl_tls.c:7495: |2| => free

ssl_tls.c:7560: |2| <= free

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值