在使用 mbedtls 对mqtt进行加密时,设备和服务器之间在握手阶段收到了服务器发送的Alert消息,然后握手返回失败。
[2022/11/22 17:20:07-078] ---------WiFi: Connected---------------
[2022/11/22 17:20:07-078]
[2022/11/22 17:20:07-078] ###########hi3861l send data to ac5713#########
[2022/11/22 17:20:07-078] ###########netifapi_dhcp_start ret=0#########
[2022/11/22 17:20:08-258] local ipaddr : 192.168.031.036
[2022/11/22 17:20:08-258] LWIP_NSC_IPV4_ADDRESS_CHANGED:0x4f0
[2022/11/22 17:20:08-258] into app_demo_netif_ext_callback return
[2022/11/22 17:20:08-258]
[2022/11/22 17:20:08-258] Common_cmd->cmd_type = 18
[2022/11/22 17:20:08-258] SEND_WIFI_ALL_INFO
[2022/11/22 17:20:08-258] netif 0xeaac8, dhcp success, get ip: 192.168.31.36
[2022/11/22 17:20:08-258] ip: 192.168.31.36
[2022/11/22 17:20:08-258] netmask: 255.255.255.0
[2022/11/22 17:20:08-258] gw: 192.168.31.1
[2022/11/22 17:20:08-258] #node ## dns0: 192.168.31.1
[2022/11/22 17:20:08-258] data to sdio buf_length=44
[2022/11/22 17:20:08-258]
[2022/11/22 17:20:08-258] into MQTT_INIT_CLIENT
[2022/11/22 17:20:08-258] Common_cmd->cmd_type = 21
[2022/11/22 17:20:08-258] mqtt_report_network_info...
[2022/11/22 17:20:08-258]
[2022/11/22 17:20:08-258] mqtt publish network inf
[2022/11/22 17:20:08-259]
[2022/11/22 17:20:08-259] start mqtt sync publication test.
[2022/11/22 17:20:08-259] start mqtt sync publication test.
[2022/11/22 17:20:08-259] usedSize = 115100 usageWaterLine 119468
[2022/11/22 17:20:08-259] pwd1:72 0a 0a f3 dd 35 2f 9d 5e 13 f4 11
[2022/11/22 17:20:08-259]
[2022/11/22 17:20:08-259]
[2022/11/22 17:20:08-259]
[2022/11/22 17:20:08-259]
[2022/11/22 17:20:08-259] into pos MQTTClient_createWithOptions 0001
[2022/11/22 17:20:08-259] 0 queued messages restored for client wf:W033221410023
[2022/11/22 17:20:08-259] kaadas into pos MQTTClient_connectAll 0001
[2022/11/22 17:20:08-259] kaadas into pos MQTTClient_connectAll 0002
[2022/11/22 17:20:08-259] kaadas into pos MQTTClient_connectAll 0003
[2022/11/22 17:20:08-259] serverURI = 192.168.118.249:48883
[2022/11/22 17:20:08-259] kaadas into pos MQTTClient_connectURI 0001
[2022/11/22 17:20:08-259] kaadas into pos MQTTClient_connectURI 0002
[2022/11/22 17:20:08-259] kaadas into pos MQTTClient_connectURI 0003
[2022/11/22 17:20:08-259] kaadas into pos MQTTClient_connectURI 0006
[2022/11/22 17:20:08-259] kaadas into pos MQTTClient_connectURI 0007
[2022/11/22 17:20:08-259] Connecting to serverURI 192.168.118.249:48883 with MQTT version 4
[2022/11/22 17:20:08-259] Socket_new addr : 192.168.118.249:48883
[2022/11/22 17:20:08-259] Socket_new getaddrinfo addr_mem : 192.168.118.249
[2022/11/22 17:20:08-259] Socket_new getaddrinfo success !
[2022/11/22 17:20:08-259] New socket 1 for 192.168.118.249:48883, port 48883
[2022/11/22 17:20:08-259] Connect pending
[2022/11/22 17:20:08-259] into pos 20221117 1154 001
[2022/11/22 17:20:08-260] into pos 20221117 1154 002
[2022/11/22 17:20:08-338] Return code 0 from read select
[2022/11/22 17:20:08-359] Return code 1 from write select
[2022/11/22 17:20:08-359] into pos 20221117 1154 003
[2022/11/22 17:20:08-359] into pos 20221117 1154 004
[2022/11/22 17:20:08-359] kaadas into mbedtls_x509_crt_parse
[2022/11/22 17:20:09-119] mbedtls_x509_crt_parse success !
[2022/11/22 17:20:09-119] kaadas 20221122 1353 00001 return rc = 0
[2022/11/22 17:20:09-119] the src string is truncated
[2022/11/22 17:20:09-119] into mbedtls_ssl_conf_authmode(MBEDTLS_SSL_VERIFY_NONE)
[2022/11/22 17:20:09-119] => handshake
[2022/11/22 17:20:09-119]
[2022/11/22 17:20:09-119] third_party/mbedtls/library/ssl_tls.c:8216: => handshake
[2022/11/22 17:20:09-119] client state: 0
[2022/11/22 17:20:09-119]
[2022/11/22 17:20:09-119] third_party/mbedtls/library/ssl_cli.c:3771: client state: 0
[2022/11/22 17:20:09-119] => flush output
[2022/11/22 17:20:09-119]
[2022/11/22 17:20:09-119] third_party/mbedtls/library/ssl_tls.c:2851: => flush output
[2022/11/22 17:20:09-119] <= flush output
[2022/11/22 17:20:09-119]
[2022/11/22 17:20:09-119] third_party/mbedtls/library/ssl_tls.c:2863: <= flush output
[2022/11/22 17:20:09-119] kaadas 20221121_1632 mbedtls_ssl_handshake_client_step into switch(0)
[2022/11/22 17:20:09-119] client state: 1
[2022/11/22 17:20:09-119]
[2022/11/22 17:20:09-119] third_party/mbedtls/library/ssl_cli.c:3771: client state: 1
[2022/11/22 17:20:09-119] => flush output
[2022/11/22 17:20:09-119]
[2022/11/22 17:20:09-119] third_party/mbedtls/library/ssl_tls.c:2851: => flush output
[2022/11/22 17:20:09-119] <= flush output
[2022/11/22 17:20:09-119]
[2022/11/22 17:20:09-119] third_party/mbedtls/library/ssl_tls.c:2863: <= flush output
[2022/11/22 17:20:09-119] kaadas 20221121_1632 mbedtls_ssl_handshake_client_step into switch(1)
[2022/11/22 17:20:09-119] => write client hello
[2022/11/22 17:20:09-120]
[2022/11/22 17:20:09-120] third_party/mbedtls/library/ssl_cli.c:0805: => write client hello
[2022/11/22 17:20:09-120] client hello, max version: [3:3]
[2022/11/22 17:20:09-120]
[2022/11/22 17:20:09-120] third_party/mbedtls/library/ssl_cli.c:0861: client hello, max version: [3:3]
[2022/11/22 17:20:09-120] client hello, current time: 4
[2022/11/22 17:20:09-120]
[2022/11/22 17:20:09-120] third_party/mbedtls/library/ssl_cli.c:0730: client hello, current time: 4
[2022/11/22 17:20:09-120] third_party/mbedtls/library/ssl_cli.c:0870: dumping &#39;client hello, random bytes&#39; (32 bytes)
[2022/11/22 17:20:09-120] third_party/mbedtls/library/ssl_cli.c:0870: 0000: 00 00 00 04 38 7d fd 25 b1 1c 3a a0 8d 32 4f 15 ....8}.%..:..2O.
[2022/11/22 17:20:09-120] third_party/mbedtls/library/ssl_cli.c:0870: 0010: 79 22 63 ee ad 65 57 e0 9c ce ad 73 3c 92 99 08 y"c..eW....s<...
[2022/11/22 17:20:09-120] client hello, session id len.: 0
[2022/11/22 17:20:09-120]
[2022/11/22 17:20:09-120] third_party/mbedtls/library/ssl_cli.c:0930: client hello, session id len.: 0
[2022/11/22 17:20:09-120] third_party/mbedtls/library/ssl_cli.c:0931: dumping &#39;client hello, session id&#39; (0 bytes)
[2022/11/22 17:20:09-120] client hello, add ciphersuite: c02c
[2022/11/22 17:20:09-120]
[2022/11/22 17:20:09-120] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c02c
[2022/11/22 17:20:09-120] client hello, add ciphersuite: c030
[2022/11/22 17:20:09-120]
[2022/11/22 17:20:09-120] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c030
[2022/11/22 17:20:09-120] client hello, add ciphersuite: c0ad
[2022/11/22 17:20:09-120]
[2022/11/22 17:20:09-120] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c0ad
[2022/11/22 17:20:09-120] client hello, add ciphersuite: c024
[2022/11/22 17:20:09-120]
[2022/11/22 17:20:09-120] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c024
[2022/11/22 17:20:09-120] client hello, add ciphersuite: c028
[2022/11/22 17:20:09-120]
[2022/11/22 17:20:09-120] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c028
[2022/11/22 17:20:09-120] client hello, add ciphersuite: c00a
[2022/11/22 17:20:09-121]
[2022/11/22 17:20:09-121] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c00a
[2022/11/22 17:20:09-121] client hello, add ciphersuite: c014
[2022/11/22 17:20:09-121]
[2022/11/22 17:20:09-121] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c014
[2022/11/22 17:20:09-121] client hello, add ciphersuite: c0af
[2022/11/22 17:20:09-121]
[2022/11/22 17:20:09-121] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c0af
[2022/11/22 17:20:09-121] client hello, add ciphersuite: c02b
[2022/11/22 17:20:09-121]
[2022/11/22 17:20:09-121] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c02b
[2022/11/22 17:20:09-121] client hello, add ciphersuite: c02f
[2022/11/22 17:20:09-121]
[2022/11/22 17:20:09-121] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c02f
[2022/11/22 17:20:09-121] client hello, add ciphersuite: c0ac
[2022/11/22 17:20:09-121]
[2022/11/22 17:20:09-121] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c0ac
[2022/11/22 17:20:09-121] client hello, add ciphersuite: c023
[2022/11/22 17:20:09-121]
[2022/11/22 17:20:09-121] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c023
[2022/11/22 17:20:09-121] client hello, add ciphersuite: c027
[2022/11/22 17:20:09-121]
[2022/11/22 17:20:09-121] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c027
[2022/11/22 17:20:09-121] client hello, add ciphersuite: c009
[2022/11/22 17:20:09-121]
[2022/11/22 17:20:09-121] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c009
[2022/11/22 17:20:09-121] client hello, add ciphersuite: c013
[2022/11/22 17:20:09-121]
[2022/11/22 17:20:09-121] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c013
[2022/11/22 17:20:09-121] client hello, add ciphersuite: c0ae
[2022/11/22 17:20:09-121]
[2022/11/22 17:20:09-121] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c0ae
[2022/11/22 17:20:09-121] client hello, add ciphersuite: 00ab
[2022/11/22 17:20:09-121]
[2022/11/22 17:20:09-122] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: 00ab
[2022/11/22 17:20:09-122] client hello, add ciphersuite: c0a7
[2022/11/22 17:20:09-122]
[2022/11/22 17:20:09-122] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c0a7
[2022/11/22 17:20:09-122] client hello, add ciphersuite: c038
[2022/11/22 17:20:09-122]
[2022/11/22 17:20:09-122] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c038
[2022/11/22 17:20:09-463] client hello, add ciphersuite: 00b3
[2022/11/22 17:20:09-463]
[2022/11/22 17:20:09-463] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: 00b3
[2022/11/22 17:20:09-463] client hello, add ciphersuite: c036
[2022/11/22 17:20:09-463]
[2022/11/22 17:20:09-463] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c036
[2022/11/22 17:20:09-464] client hello, add ciphersuite: 0091
[2022/11/22 17:20:09-464]
[2022/11/22 17:20:09-464] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: 0091
[2022/11/22 17:20:09-464] client hello, add ciphersuite: c0ab
[2022/11/22 17:20:09-464]
[2022/11/22 17:20:09-464] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c0ab
[2022/11/22 17:20:09-464] client hello, add ciphersuite: 00aa
[2022/11/22 17:20:09-464]
[2022/11/22 17:20:09-464] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: 00aa
[2022/11/22 17:20:09-464] client hello, add ciphersuite: c0a6
[2022/11/22 17:20:09-464]
[2022/11/22 17:20:09-464] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c0a6
[2022/11/22 17:20:09-464] client hello, add ciphersuite: c037
[2022/11/22 17:20:09-464]
[2022/11/22 17:20:09-464] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c037
[2022/11/22 17:20:09-464] client hello, add ciphersuite: 00b2
[2022/11/22 17:20:09-464]
[2022/11/22 17:20:09-464] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: 00b2
[2022/11/22 17:20:09-464] client hello, add ciphersuite: c035
[2022/11/22 17:20:09-464]
[2022/11/22 17:20:09-464] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c035
[2022/11/22 17:20:09-464] client hello, add ciphersuite: 0090
[2022/11/22 17:20:09-464]
[2022/11/22 17:20:09-464] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: 0090
[2022/11/22 17:20:09-464] client hello, add ciphersuite: c0aa
[2022/11/22 17:20:09-464]
[2022/11/22 17:20:09-464] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c0aa
[2022/11/22 17:20:09-464] client hello, add ciphersuite: c02e
[2022/11/22 17:20:09-464]
[2022/11/22 17:20:09-464] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c02e
[2022/11/22 17:20:09-464] client hello, add ciphersuite: c026
[2022/11/22 17:20:09-464]
[2022/11/22 17:20:09-465] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c026
[2022/11/22 17:20:09-465] client hello, add ciphersuite: c005
[2022/11/22 17:20:09-465]
[2022/11/22 17:20:09-465] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c005
[2022/11/22 17:20:09-465] client hello, add ciphersuite: c02d
[2022/11/22 17:20:09-465]
[2022/11/22 17:20:09-465] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c02d
[2022/11/22 17:20:09-465] client hello, add ciphersuite: c025
[2022/11/22 17:20:09-465]
[2022/11/22 17:20:09-465] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c025
[2022/11/22 17:20:09-465] client hello, add ciphersuite: c004
[2022/11/22 17:20:09-465]
[2022/11/22 17:20:09-465] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c004
[2022/11/22 17:20:09-465] client hello, add ciphersuite: 00a9
[2022/11/22 17:20:09-465]
[2022/11/22 17:20:09-465] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: 00a9
[2022/11/22 17:20:09-465] client hello, add ciphersuite: c0a5
[2022/11/22 17:20:09-465]
[2022/11/22 17:20:09-465] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c0a5
[2022/11/22 17:20:09-465] client hello, add ciphersuite: 00af
[2022/11/22 17:20:09-465]
[2022/11/22 17:20:09-465] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: 00af
[2022/11/22 17:20:09-465] client hello, add ciphersuite: 008d
[2022/11/22 17:20:09-465]
[2022/11/22 17:20:09-465] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: 008d
[2022/11/22 17:20:09-465] client hello, add ciphersuite: c0a9
[2022/11/22 17:20:09-465]
[2022/11/22 17:20:09-465] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c0a9
[2022/11/22 17:20:09-465] client hello, add ciphersuite: 00a8
[2022/11/22 17:20:09-465]
[2022/11/22 17:20:09-465] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: 00a8
[2022/11/22 17:20:09-465] client hello, add ciphersuite: c0a4
[2022/11/22 17:20:09-465]
[2022/11/22 17:20:09-465] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c0a4
[2022/11/22 17:20:09-466] client hello, add ciphersuite: 00ae
[2022/11/22 17:20:09-469]
[2022/11/22 17:20:09-470] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: 00ae
[2022/11/22 17:20:09-470] client hello, add ciphersuite: 008c
[2022/11/22 17:20:09-470]
[2022/11/22 17:20:09-471] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: 008c
[2022/11/22 17:20:09-471] client hello, add ciphersuite: c0a8
[2022/11/22 17:20:09-471]
[2022/11/22 17:20:09-471] third_party/mbedtls/library/ssl_cli.c:0998: client hello, add ciphersuite: c0a8
[2022/11/22 17:20:09-471] client hello, got 46 ciphersuites (excluding SCSVs)
[2022/11/22 17:20:09-471]
[2022/11/22 17:20:09-471] third_party/mbedtls/library/ssl_cli.c:1013: client hello, got 46 ciphersuites (excluding SCSVs)
[2022/11/22 17:20:09-471] adding EMPTY_RENEGOTIATION_INFO_SCSV
[2022/11/22 17:20:09-471]
[2022/11/22 17:20:09-471] third_party/mbedtls/library/ssl_cli.c:1022: adding EMPTY_RENEGOTIATION_INFO_SCSV
[2022/11/22 17:20:09-471] client hello, compress len.: 1
[2022/11/22 17:20:09-471]
[2022/11/22 17:20:09-471] third_party/mbedtls/library/ssl_cli.c:1076: client hello, compress len.: 1
[2022/11/22 17:20:09-471] client hello, compress alg.: 0
[2022/11/22 17:20:09-471]
[2022/11/22 17:20:09-471] third_party/mbedtls/library/ssl_cli.c:1078: client hello, compress alg.: 0
[2022/11/22 17:20:09-471] client hello, adding server name extension: 192.168.118.249
[2022/11/22 17:20:09-471]
[2022/11/22 17:20:09-471] third_party/mbedtls/library/ssl_cli.c:0095: client hello, adding server name extension: 192.168.118.249
[2022/11/22 17:20:09-471] client hello, adding signature_algorithms extension
[2022/11/22 17:20:09-471]
[2022/11/22 17:20:09-809] third_party/mbedtls/library/ssl_cli.c:0213: client hello, adding signature_algorithms extension
[2022/11/22 17:20:09-809] client hello, adding supported_elliptic_curves extension
[2022/11/22 17:20:09-809]
[2022/11/22 17:20:09-809] third_party/mbedtls/library/ssl_cli.c:0306: client hello, adding supported_elliptic_curves extension
[2022/11/22 17:20:09-809] client hello, adding supported_point_formats extension
[2022/11/22 17:20:09-809]
[2022/11/22 17:20:09-809] third_party/mbedtls/library/ssl_cli.c:0376: client hello, adding supported_point_formats extension
[2022/11/22 17:20:09-809] client hello, adding encrypt_then_mac extension
[2022/11/22 17:20:09-809]
[2022/11/22 17:20:09-809] third_party/mbedtls/library/ssl_cli.c:0549: client hello, adding encrypt_then_mac extension
[2022/11/22 17:20:09-809] client hello, adding extended_master_secret extension
[2022/11/22 17:20:09-809]
[2022/11/22 17:20:09-809] third_party/mbedtls/library/ssl_cli.c:0580: client hello, adding extended_master_secret extension
[2022/11/22 17:20:09-809] client hello, adding session ticket extension
[2022/11/22 17:20:09-809]
[2022/11/22 17:20:09-809] third_party/mbedtls/library/ssl_cli.c:0613: client hello, adding session ticket extension
[2022/11/22 17:20:09-809] client hello, total extension length: 78
[2022/11/22 17:20:09-809]
[2022/11/22 17:20:09-809] third_party/mbedtls/library/ssl_cli.c:1218: client hello, total extension length: 78
[2022/11/22 17:20:09-809] => write handshake message
[2022/11/22 17:20:09-809]
[2022/11/22 17:20:09-809] third_party/mbedtls/library/ssl_tls.c:3290: => write handshake message
[2022/11/22 17:20:09-810] => write record
[2022/11/22 17:20:09-810]
[2022/11/22 17:20:09-810] third_party/mbedtls/library/ssl_tls.c:3449: => write record
[2022/11/22 17:20:09-810] output record: msgtype = 22, version = [3:3], msglen = 217
[2022/11/22 17:20:09-810]
[2022/11/22 17:20:09-810] third_party/mbedtls/library/ssl_tls.c:3529: output record: msgtype = 22, version = [3:3], msglen = 217
[2022/11/22 17:20:09-810] third_party/mbedtls/library/ssl_tls.c:3532: dumping &#39;output record sent to network&#39; (222 bytes)
[2022/11/22 17:20:09-810] third_party/mbedtls/library/ssl_tls.c:3532: 0000: 16 03 03 00 d9 01 00 00 d5 03 03 00 00 00 04 38 ...............8
[2022/11/22 17:20:09-810] third_party/mbedtls/library/ssl_tls.c:3532: 0010: 7d fd 25 b1 1c 3a a0 8d 32 4f 15 79 22 63 ee ad }.%..:..2O.y"c..
[2022/11/22 17:20:09-810] third_party/mbedtls/library/ssl_tls.c:3532: 0020: 65 57 e0 9c ce ad 73 3c 92 99 08 00 00 5e c0 2c eW....s<.....^.,
[2022/11/22 17:20:09-810] third_party/mbedtls/library/ssl_tls.c:3532: 0030: c0 30 c0 ad c0 24 c0 28 c0 0a c0 14 c0 af c0 2b .0...$.(.......+
[2022/11/22 17:20:09-810] third_party/mbedtls/library/ssl_tls.c:3532: 0040: c0 2f c0 ac c0 23 c0 27 c0 09 c0 13 c0 ae 00 ab ./...#.&#39;........
[2022/11/22 17:20:09-810] third_party/mbedtls/library/ssl_tls.c:3532: 0050: c0 a7 c0 38 00 b3 c0 36 00 91 c0 ab 00 aa c0 a6 ...8...6........
[2022/11/22 17:20:09-810] third_party/mbedtls/library/ssl_tls.c:3532: 0060: c0 37 00 b2 c0 35 00 90 c0 aa c0 2e c0 26 c0 05 .7...5.......&..
[2022/11/22 17:20:09-810] third_party/mbedtls/library/ssl_tls.c:3532: 0070: c0 2d c0 25 c0 04 00 a9 c0 a5 00 af 00 8d c0 a9 .-.%............
[2022/11/22 17:20:09-810] third_party/mbedtls/library/ssl_tls.c:3532: 0080: 00 a8 c0 a4 00 ae 00 8c c0 a8 00 ff 01 00 00 4e ...............N
[2022/11/22 17:20:09-810] third_party/mbedtls/library/ssl_tls.c:3532: 0090: 00 00 00 14 00 12 00 00 0f 31 39 32 2e 31 36 38 .........192.168
[2022/11/22 17:20:09-810] third_party/mbedtls/library/ssl_tls.c:3532: 00a0: 2e 31 31 38 2e 32 34 39 00 0d 00 16 00 14 06 03 .118.249........
[2022/11/22 17:20:09-810] third_party/mbedtls/library/ssl_tls.c:3532: 00b0: 06 01 05 03 05 01 04 03 04 01 03 03 03 01 02 03 ................
[2022/11/22 17:20:09-810] third_party/mbedtls/library/ssl_tls.c:3532: 00c0: 02 01 00 0a 00 06 00 04 00 17 00 1a 00 0b 00 02 ................
[2022/11/22 17:20:09-810] third_party/mbedtls/library/ssl_tls.c:3532: 00d0: 01 00 00 16 00 00 00 17 00 00 00 23 00 00 ...........#..
[2022/11/22 17:20:09-811] => flush output
[2022/11/22 17:20:09-811]
[2022/11/22 17:20:09-811] third_party/mbedtls/library/ssl_tls.c:2851: => flush output
[2022/11/22 17:20:09-811] message length: 222, out_left: 222
[2022/11/22 17:20:09-811]
[2022/11/22 17:20:09-811] third_party/mbedtls/library/ssl_tls.c:2870: message length: 222, out_left: 222
[2022/11/22 17:20:09-811] third_party/mbedtls/library/ssl_tls.c:2875: ssl->f_send() returned 222 (-0xffffff22)
[2022/11/22 17:20:09-811] <= flush output
[2022/11/22 17:20:09-811]
[2022/11/22 17:20:09-811] third_party/mbedtls/library/ssl_tls.c:2903: <= flush output
[2022/11/22 17:20:09-811] <= write record
[2022/11/22 17:20:09-811]
[2022/11/22 17:20:09-811] third_party/mbedtls/library/ssl_tls.c:3582: <= write record
[2022/11/22 17:20:09-811] <= write handshake message
[2022/11/22 17:20:09-811]
[2022/11/22 17:20:09-811] third_party/mbedtls/library/ssl_tls.c:3426: <= write handshake message
[2022/11/22 17:20:09-811] <= write client hello
[2022/11/22 17:20:09-811]
[2022/11/22 17:20:09-811] third_party/mbedtls/library/ssl_cli.c:1255: <= write client hello
[2022/11/22 17:20:09-811] client state: 2
[2022/11/22 17:20:09-811]
[2022/11/22 17:20:09-811] third_party/mbedtls/library/ssl_cli.c:3771: client state: 2
[2022/11/22 17:20:09-811] => flush output
[2022/11/22 17:20:09-811]
[2022/11/22 17:20:09-811] third_party/mbedtls/library/ssl_tls.c:2851: => flush output
[2022/11/22 17:20:09-811] <= flush output
[2022/11/22 17:20:09-811]
[2022/11/22 17:20:09-811] third_party/mbedtls/library/ssl_tls.c:2863: <= flush output
[2022/11/22 17:20:10-087] kaadas 20221121_1632 mbedtls_ssl_handshake_client_step into switch(2)
[2022/11/22 17:20:10-087] => parse server hello=> read record
[2022/11/22 17:20:10-087]
[2022/11/22 17:20:10-087] third_party/mbedtls/library/ssl_tls.c:4424: => read record
[2022/11/22 17:20:10-087] => fetch input
[2022/11/22 17:20:10-087]
[2022/11/22 17:20:10-087] third_party/mbedtls/library/ssl_tls.c:2632: => fetch input
[2022/11/22 17:20:10-088] in_left: 0, nb_want: 5
[2022/11/22 17:20:10-088]
[2022/11/22 17:20:10-088] third_party/mbedtls/library/ssl_tls.c:2793: in_left: 0, nb_want: 5
[2022/11/22 17:20:10-088] in_left: 0, nb_want: 5
[2022/11/22 17:20:10-088]
[2022/11/22 17:20:10-088] third_party/mbedtls/library/ssl_tls.c:2817: in_left: 0, nb_want: 5
[2022/11/22 17:20:10-088] third_party/mbedtls/library/ssl_tls.c:2818: ssl->f_recv(_timeout)() returned 5 (-0xfffffffb)
[2022/11/22 17:20:10-088] <= fetch input
[2022/11/22 17:20:10-088]
[2022/11/22 17:20:10-088] third_party/mbedtls/library/ssl_tls.c:2838: <= fetch input
[2022/11/22 17:20:10-088] third_party/mbedtls/library/ssl_tls.c:4159: dumping &#39;input record header&#39; (5 bytes)
[2022/11/22 17:20:10-088] third_party/mbedtls/library/ssl_tls.c:4159: 0000: 15 03 03 00 02 .....
[2022/11/22 17:20:10-088] input record: msgtype = 21, version = [3:3], msglen = 2
[2022/11/22 17:20:10-088]
[2022/11/22 17:20:10-088] third_party/mbedtls/library/ssl_tls.c:4168: input record: msgtype = 21, version = [3:3], msglen = 2
[2022/11/22 17:20:10-088] => fetch input
[2022/11/22 17:20:10-088]
[2022/11/22 17:20:10-088] third_party/mbedtls/library/ssl_tls.c:2632: => fetch input
[2022/11/22 17:20:10-088] in_left: 5, nb_want: 7
[2022/11/22 17:20:10-088]
[2022/11/22 17:20:10-088] third_party/mbedtls/library/ssl_tls.c:2793: in_left: 5, nb_want: 7
[2022/11/22 17:20:10-088] in_left: 5, nb_want: 7
[2022/11/22 17:20:10-088]
[2022/11/22 17:20:10-088] third_party/mbedtls/library/ssl_tls.c:2817: in_left: 5, nb_want: 7
[2022/11/22 17:20:10-088] third_party/mbedtls/library/ssl_tls.c:2818: ssl->f_recv(_timeout)() returned 2 (-0xfffffffe)
[2022/11/22 17:20:10-088] <= fetch input
[2022/11/22 17:20:10-088]
[2022/11/22 17:20:10-088] third_party/mbedtls/library/ssl_tls.c:2838: <= fetch input
[2022/11/22 17:20:10-088] third_party/mbedtls/library/ssl_tls.c:4346: dumping &#39;input record from network&#39; (7 bytes)
[2022/11/22 17:20:10-088] third_party/mbedtls/library/ssl_tls.c:4346: 0000: 15 03 03 00 02 02 28 ......(
[2022/11/22 17:20:10-088] got an alert message, type: [2:40]
[2022/11/22 17:20:10-088]
[2022/11/22 17:20:10-089] third_party/mbedtls/library/ssl_tls.c:5283: got an alert message, type: [2:40]
[2022/11/22 17:20:10-089] is a fatal alert message (msg 40)
[2022/11/22 17:20:10-089]
[2022/11/22 17:20:10-089] third_party/mbedtls/library/ssl_tls.c:5291: is a fatal alert message (msg 40)
[2022/11/22 17:20:10-089] third_party/mbedtls/library/ssl_tls.c:4482: mbedtls_ssl_handle_message_type() returned -30592 (-0x7780)
[2022/11/22 17:20:10-089] mbedtls_ssl_read_record ret = 0xffff8880ssl_parse_server_hello ret = 0xffff8880
[2022/11/22 17:20:10-089] <= handshake
[2022/11/22 17:20:10-089]
[2022/11/22 17:20:10-089] third_party/mbedtls/library/ssl_tls.c:8226: <= handshake
[2022/11/22 17:20:10-089] mbedtls_ssl_handshake ret = 0xffff8880
[2022/11/22 17:20:10-089] failed! mbedtls_ssl_handshake returned -0xffff8880
[2022/11/22 17:20:10-089]
[2022/11/22 17:20:10-089] into pos 20221117 1154 007
[2022/11/22 17:20:10-089] into pos 20221117 1154 009
[2022/11/22 17:20:10-089] => write close notify
[2022/11/22 17:20:10-089]
[2022/11/22 17:20:10-089] third_party/mbedtls/library/ssl_tls.c:8861: => write close notify
[2022/11/22 17:20:10-089] <= write close notify
[2022/11/22 17:20:10-089]
[2022/11/22 17:20:10-089] third_party/mbedtls/library/ssl_tls.c:8877: <= write close notify
[2022/11/22 17:20:10-089] => free
[2022/11/22 17:20:10-089]
[2022/11/22 17:20:10-089] third_party/mbedtls/library/ssl_tls.c:9070: => free
[2022/11/22 17:20:10-089] <= free
[2022/11/22 17:20:10-089]
[2022/11/22 17:20:10-089] third_party/mbedtls/library/ssl_tls.c:9135: <= free
[2022/11/22 17:20:10-089] Socket error (null)(14) in shutdown for socket 1
[2022/11/22 17:20:10-089] Removed socket 1
结论:
是设备端底层的mbedtls开源库的config.h文件红开关没打开:
#define MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
导致服务器识别到设备不支持RSA该加密算法,就直接抛了个 告警过来。