weixin_39901943
weixin_39901943
2021-01-01 16:52

MQTT connection failed, (ClientConnectionCallback with result = 2, reason = 5)

Development Machine, OS, Compiler (and Other Relevant Toolchain Info)

hardware platform: nRF52840 + esp32 Cross Compiled on Ubuntu 18.04 using GCC 6.3.0

SDK Version (Please Give Commit SHA if Manually Compiling)

software: nrf5_SDK(v15.3) with freeRTOS + mbedTLS + azure-iot-sdk-c(Release-2019-07-01)

Protocol

MQTT

Describe the Bug

I'm trying to connect to azure iot hub by using MQTT protocol, however, I got the result of IOTHUB_CLIENT_CONNECTION_UNAUTHENTICATED , the failed resaon sometimes is oIOTHUB_CLIENT_CONNECTION_RETRY_EXPIRED and sometimes is IOTHUB_CLIENT_CONNECTION_NO_NETWORK. The printed log(see the following logs) shows it is the TLS connection error, the error code is 0-0x6c00(MBEDTLS_ERR_SSL_INTERNAL_ERROR), is there anyone who has experienced this issue? or someone can point out what the problem it is?

Console Logs Sending message 1 to IoTHub ssl_tls.c:6336: |2| => handshake ssl_cli.c:3279: |2| client state: 0 ssl_tls.c:2416: |2| => flush output ssl_tls.c:2428: |2| <= flush output ssl_cli.c:3279: |2| client state: 1 ssl_tls.c:2416: |2| => flush output ssl_tls.c:2428: |2| <= flush output ssl_cli.c:0717: |2| => write client hello ssl_cli.c:0755: |3| client hello, max version: [3:3] ssl_cli.c:0693: |3| client hello, current time: 1568023847 ssl_cli.c:0764: |3| dumping 'client hello, random bytes' (32 bytes) ssl_cli.c:0764: |3| 0000: 5d 76 25 27 dc 39 48 f0 16 7f 84 f6 f8 28 cb 30 ]v%'.9H......(.0 ssl_cli.c:0764: |3| 0010: 20 cb 6c 95 a0 62 6e 44 d1 d1 c9 76 5f 82 98 f7 .l..bnD...v_... ssl_cli.c:0817: |3| client hello, session id len.: 0 ssl_cli.c:0818: |3| dumping 'client hello, session id' (0 bytes) ssl_cli.c:0885: |3| client hello, add ciphersuite: c030 ssl_cli.c:0885: |3| client hello, add ciphersuite: c028 ssl_cli.c:0885: |3| client hello, add ciphersuite: c014 ssl_cli.c:0885: |3| client hello, add ciphersuite: c02f ssl_cli.c:0885: |3| client hello, add ciphersuite: c027 ssl_cli.c:0885: |3| client hello, add ciphersuite: c013 ssl_cli.c:0885: |3| client hello, add ciphersuite: 009d ssl_cli.c:0885: |3| client hello, add ciphersuite: 003d ssl_cli.c:0885: |3| client hello, add ciphersuite: 0035 ssl_cli.c:0885: |3| client hello, add ciphersuite: 009c ssl_cli.c:0885: |3| client hello, add ciphersuite: 003c ssl_cli.c:0885: |3| client hello, add ciphersuite: 002f ssl_cli.c:0918: |3| client hello, got 13 ciphersuites ssl_cli.c:0949: |3| client hello, compress len.: 1 ssl_cli.c:0951: |3| client hello, compress alg.: 0 ssl_cli.c:0072: |3| client hello, adding server name extension: rndiothub.azure-devices.net ssl_cli.c:0178: |3| client hello, adding signature_algorithms extension ssl_cli.c:0263: |3| client hello, adding supported_elliptic_curves extension ssl_cli.c:0326: |3| client hello, adding supported_point_formats extension ssl_cli.c:0508: |3| client hello, adding encrypt_then_mac extension ssl_cli.c:0542: |3| client hello, adding extended_master_secret extension ssl_cli.c:0575: |3| client hello, adding session ticket extension ssl_cli.c:1023: |3| client hello, total extension length: 96 ssl_tls.c:2701: |2| => write record ssl_tls.c:2838: |3| output record: msgtype = 22, version = [3:3], msglen = 167 ssl_tls.c:2416: |2| => flush output ssl_tls.c:2435: |2| message length: 172, out_left: 172 ssl_tls.c:2441: |2| ssl->f_send() returned 172 (-0xffffff54) ssl_tls.c:2460: |2| <= flush output ssl_tls.c:2850: |2| <= write record ssl_cli.c:1049: |2| <= write client hello ssl_cli.c:3279: |2| client state: 2 ssl_tls.c:2416: |2| => flush output ssl_tls.c:2428: |2| <= flush output ssl_cli.c:1410: |2| => parse server hello ssl_tls.c:3728: |2| => read record ssl_tls.c:2208: |2| => fetch input ssl_tls.c:2366: |2| in_left: 0, nb_want: 5 ssl_tls.c:2390: |2| in_left: 0, nb_want: 5 ssl_tls.c:2391: |2| ssl->f_recv(timeout)() returned 5 (-0xfffffffb) ssl_tls.c:2403: |2| <= fetch input ssl_tls.c:3488: |3| input record: msgtype = 22, version = [3:3], msglen = 4009 ssl_tls.c:2208: |2| => fetch input ssl_tls.c:2366: |2| in_left: 5, nb_want: 4014 ssl_tls.c:2390: |2| in_left: 5, nb_want: 4014 ssl_tls.c:2391: |2| ssl->f_recv(_timeout)() returned 4009 (-0xfffff057) ssl_tls.c:2403: |2| <= fetch input ssl_tls.c:3089: |3| handshake message: msglen = 4009, type = 2, hslen = 85 ssl_tls.c:3753: |2| <= read record ssl_cli.c:1483: |3| dumping 'server hello, version' (2 bytes) ssl_cli.c:1483: |3| 0000: 03 03 .. ssl_cli.c:1509: |3| server hello, current time: 1568023868 ssl_cli.c:1516: |3| dumping 'server hello, random bytes' (32 bytes) ssl_cli.c:1516: |3| 0000: 5d 76 25 3c 5d c0 78 de 71 7b b1 9d dc d5 2f e2 ]v%<].x.q{..../. ssl_cli.c:1516: |3| 0010: 21 84 12 38 a2 cf 2c ae 97 7e 42 72 ca c5 3d ca !..8..,..~Br..=. ssl_cli.c:1586: |3| server hello, session id len.: 32 ssl_cli.c:1587: |3| dumping 'server hello, session id' (32 bytes) ssl_cli.c:1587: |3| 0000: c1 03 00 00 ab 1d 84 94 74 38 fc 89 35 d2 4b 68 ........t8..5.Kh ssl_cli.c:1587: |3| 0010: 15 95 55 e5 e4 06 56 f4 46 9a 3b ab 14 3f bc dd ..U...V.F.;..?.. ssl_cli.c:1623: |3| no session has been resumed ssl_cli.c:1625: |3| server hello, chosen ciphersuite: c027 ssl_cli.c:1626: |3| server hello, compress alg.: 0 ssl_cli.c:1640: |3| server hello, chosen ciphersuite: TLS-ECDHE-RSA-WITH-AES-128-CBC-SHA256 ssl_cli.c:1671: |2| server hello, total extension length: 9 ssl_cli.c:1741: |3| found extended_master_secret extension ssl_cli.c:1689: |3| found renegotiation extension ssl_cli.c:1859: |2| <= parse server hello ssl_cli.c:3279: |2| client state: 3 ssl_tls.c:2416: |2| => flush output ssl_tls.c:2428: |2| <= flush output ssl_tls.c:4223: |2| => parse certificate ssl_tls.c:3728: |2| => read record ssl_tls.c:3089: |3| handshake message: msglen = 3924, type = 11, hslen = 3527 ssl_tls.c:3753: |2| <= read record ssl_tls.c:4389: |3| peer certificate #1: ssl_tls.c:4389: |3| cert. version : 3 ssl_tls.c:4389: |3| serial number : 2D:00:05:DE:EC:F9:17:55:7F:D9:C3:16:63:00:00:00:05:DE:EC ssl_tls.c:4389: |3| issuer name : C=US, ST=Washington, L=Redmond, O=Microsoft Corporation, OU=Microsoft IT, CN=Microsoft IT TLS CA 5 ssl_tls.c:4389: |3| subject name : CN=.azure-devices.net ssl_tls.c:4389: |3| issued on : 2019-04-12 23:00:09 ssl_tls.c:4389: |3| expires on : 2020-04-12 23:00:09 ssl_tls.c:4389: |3| signed using : RSA with SHA-256 ssl_tls.c:4389: |3| RSA key size : 2048 bits ssl_tls.c:4389: |3| subject alt name : .azure-devices.net, .amqpws.azure-devices.net, .su.management-azure-devices.net ssl_tls.c:4389: |3| key usage : Digital Signature, Key Encipherment, Data Encipherment ssl_tls.c:4389: |3| ext key usage : TLS Web Client Authentication, TLS Web Server Authentication ssl_tls.c:4389: |3| value of 'crt->rsa.N' (2048 bits) is: ssl_tls.c:4389: |3| e2 69 a4 c2 7e 79 d3 a3 ab c0 f2 a5 07 42 47 c8 ssl_tls.c:4389: |3| e3 da 2d c2 98 62 1e 13 7b 01 f7 7a 14 36 3f 0b ssl_tls.c:4389: |3| 57 71 0d 2e d2 7a 27 04 9e 2b 04 60 86 40 00 0d ssl_tls.c:4389: |3| da 77 f0 f6 17 2c a2 71 e6 02 74 b0 fd 27 00 38 ssl_tls.c:4389: |3| 91 56 66 f8 8f 49 c8 2d a8 3b 05 9e 3f c4 d6 28 ssl_tls.c:4389: |3| 07 a5 7d 52 72 8a 72 2c 86 b4 85 36 c9 1a 92 ef ssl_tls.c:4389: |3| 40 10 f6 d4 9f e7 67 f9 ad 25 f7 d9 4a 4d ba cc ssl_tls.c:4389: |3| 6d 11 fc 1c 5e 76 32 62 55 62 9a 5e 38 a2 bd 8f ssl_tls.c:4389: |3| 3c ed 45 60 0a 0b b3 80 ee a1 86 46 46 4b ed a0 ssl_tls.c:4389: |3| 18 e9 0a 55 76 b9 89 ad d5 d1 64 16 53 42 29 dc ssl_tls.c:4389: |3| 83 0c ff 92 f5 a4 70 a2 f5 20 74 1c b0 fe a0 f7 ssl_tls.c:4389: |3| 62 89 41 53 de 2a d9 e9 63 37 a8 35 fd e0 44 10 ssl_tls.c:4389: |3| 38 d9 fb b1 b9 7c a0 69 e1 86 ee 06 93 7e c3 fa ssl_tls.c:4389: |3| 0a 05 15 b9 26 60 b3 64 3e d6 88 4a 64 92 97 34 ssl_tls.c:4389: |3| 2d 4c ab 1d fb 06 43 22 64 33 06 59 e4 96 35 42 ssl_tls.c:4389: |3| e6 42 b9 79 88 db 94 b3 43 a4 35 87 56 65 09 ab ssl_tls.c:4389: |3| value of 'crt->rsa.E' (17 bits) is: ssl_tls.c:4389: |3| 01 00 01 ssl_tls.c:4389: |3| peer certificate #2: ssl_tls.c:4389: |3| cert. version : 3 ssl_tls.c:4389: |3| serial number : 08:88:CD:52:5F:19:24:44:4D:14:A5:82:91:DE:B9:52 ssl_tls.c:4389: |3| issuer name : C=IE, O=Baltimore, OU=CyberTrust, CN=Baltimore CyberTrust Root ssl_tls.c:4389: |3| subject name : C=US, ST=Washington, L=Redmond, O=Microsoft Corporation, OU=Microsoft IT, CN=Microsoft IT TLS CA 5 ssl_tls.c:4389: |3| issued on : 2016-05-20 12:53:03 ssl_tls.c:4389: |3| expires on : 2024-05-20 12:53:03 ssl_tls.c:4389: |3| signed using : RSA with SHA-256 ssl_tls.c:4389: |3| RSA key size : 4096 bits ssl_tls.c:4389: |3| basic constraints : CA=true, max_pathlen=0 ssl_tls.c:4389: |3| key usage : Digital Signature, Key Cert Sign, CRL Sign ssl_tls.c:4389: |3| ext key usage : TLS Web Server Authentication, TLS Web Client Authentication, OCSP Signing ssl_tls.c:4389: |3| value of 'crt->rsa.N' (4096 bits) is: ssl_tls.c:4389: |3| 9a df 81 5c 3b 8f ae e9 79 96 b9 9a 79 a7 81 f2 ssl_tls.c:4389: |3| 39 da 55 28 46 23 02 c5 82 66 07 b6 15 de fd 9c ssl_tls.c:4389: |3| 3a 1a 9b 91 09 d2 66 8f 0b 89 17 f8 71 87 21 7f ssl_tls.c:4389: |3| 38 d3 3f 9a 25 00 b7 35 d0 ab f8 08 7a 36 f3 50 ssl_tls.c:4389: |3| 5b df 2b 29 27 de a4 dd 24 92 fa f4 c6 70 8d 36 ssl_tls.c:4389: |3| 2a 9a f0 80 de 35 fa 1e 42 9d 09 81 aa d5 07 0a ssl_tls.c:4389: |3| 16 a5 c5 5a 42 6d 42 be 1e 42 82 b4 57 30 99 5b ssl_tls.c:4389: |3| 45 2b d4 8f d3 0a 06 c6 73 93 a4 e1 83 ef c5 bf ssl_tls.c:4389: |3| 05 27 a7 78 cd b3 0b e0 9e 22 16 f3 98 dc a6 14 ssl_tls.c:4389: |3| e8 cc 94 d7 23 f9 d0 50 99 bb b5 0b 10 95 f1 df ssl_tls.c:4389: |3| 02 e9 8f 8e 9d 56 99 3c d8 8f d3 58 fb 5c 92 7e ssl_tls.c:4389: |3| 3d 7b f8 50 49 5a f7 10 7b 77 f8 e6 4a 90 4a 55 ssl_tls.c:4389: |3| 52 de 94 ad 74 09 a0 64 57 2c cd 07 90 9f 16 ad ssl_tls.c:4389: |3| 95 c3 d1 06 ba f1 ef 6c 05 b5 04 ac a9 dc 1b 31 ssl_tls.c:4389: |3| 9b 0e 2d 19 95 04 4f de 66 cb ad 35 72 af 19 82 ssl_tls.c:4389: |3| 08 b2 14 3a 16 5f b0 3c 9b db 8d 0c b0 02 d6 26 ssl_tls.c:4389: |3| 1f e8 15 71 c4 ef f9 63 39 43 8c e9 c2 92 2e a1 ssl_tls.c:4389: |3| c2 a0 30 25 0e 96 27 5f 9e a3 2b 82 d6 10 bd 3c ssl_tls.c:4389: |3| 19 1e a6 87 fe 55 21 3a 5c 41 fc 01 98 cc 2f 92 ssl_tls.c:4389: |3| ff 66 38 b4 b8 66 9c 0f 12 68 4b 4a ac 86 bb 5e ssl_tls.c:4389: |3| 98 ff 9e a6 9c 53 6c 33 11 a4 d0 ae 52 47 d7 8b ssl_tls.c:4389: |3| 8f f1 96 ac b9 29 9a 8f 2c f1 ad 64 18 c3 26 bb ssl_tls.c:4389: |3| 00 64 de 50 70 c0 bb ec c6 6b ae d3 a0 ef c0 f1 ssl_tls.c:4389: |3| 5c 0d f2 cc 7a 59 da 18 33 2f 59 10 ad 67 14 2c ssl_tls.c:4389: |3| 5f 22 43 4a 44 e1 e8 dd e0 e7 55 16 4e 09 ef 03 ssl_tls.c:4389: |3| 4c 0c 48 50 5a f0 03 df 8e ef 63 ca 5b 67 87 43 ssl_tls.c:4389: |3| 40 2c 06 b6 1f 0f 3e 53 c0 66 3f d7 14 15 e6 08 ssl_tls.c:4389: |3| 62 98 48 7e 83 e5 a7 b5 5d 51 2d 54 2d 61 fd 34 ssl_tls.c:4389: |3| 5d d4 b7 80 cd d2 7d ce b1 24 3b f3 97 6c 6c 13 ssl_tls.c:4389: |3| de 8a 17 c9 8a f5 48 95 42 f7 12 90 e3 10 17 f6 ssl_tls.c:4389: |3| a1 00 c5 36 2a 65 91 9e 05 ec 42 2e 5a b8 99 1b ssl_tls.c:4389: |3| ff d4 4e b5 fa 66 55 d9 83 8e bf 08 29 8d fa 0b ssl_tls.c:4389: |3| value of 'crt->rsa.E' (17 bits) is: ssl_tls.c:4389: |3| 01 00 01 ssl_tls.c:4490: |2| <= parse certificate ssl_cli.c:3279: |2| client state: 4 ssl_tls.c:2416: |2| => flush output ssl_tls.c:2428: |2| <= flush output ssl_cli.c:2198: |2| => parse server key exchange ssl_tls.c:3728: |2| => read record ssl_tls.c:3089: |3| handshake message: msglen = 397, type = 12, hslen = 365 ssl_tls.c:3753: |2| <= read record ssl_cli.c:2262: |3| dumping 'server key exchange' (361 bytes) ssl_cli.c:2262: |3| 0000: 03 00 18 61 04 57 db f0 2f 69 41 c5 18 de d8 e1 ...a.W../iA..... ssl_cli.c:2262: |3| 0010: b8 1c 03 1b 86 4e 91 af 4f 8b 01 49 5f a9 f9 89 .....N..O..I... ssl_cli.c:2262: |3| 0020: 12 59 f4 ca 6f a8 c1 20 3e 06 b7 8f 8d a4 16 36 .Y..o.. >......6 ssl_cli.c:2262: |3| 0030: e1 c5 4c 61 a9 94 f6 59 8a e0 d2 61 59 20 b5 3f ..La...Y...aY .? ssl_cli.c:2262: |3| 0040: 10 8d 45 92 aa 5b 70 44 f2 ce f1 16 d6 37 cd 1e ..E..[pD.....7.. ssl_cli.c:2262: |3| 0050: ca 7c c7 c2 c6 dc 3d f2 74 15 75 13 d5 86 2b a3 .|....=.t.u...+. ssl_cli.c:2262: |3| 0060: 9d de 5e 8c b4 02 01 01 00 70 79 88 1d 1f 6b 5f ..^......py...k_ ssl_cli.c:2262: |3| 0070: 4a 2f 39 9f 3e a0 16 22 91 23 ce 5a 03 98 f4 6a J/9.>..".#.Z...j ssl_cli.c:2262: |3| 0080: d8 a4 6f 6f 2e 73 87 58 44 26 e9 3d 5f 0d 58 13 ..oo.s.XD&.=_.X. ssl_cli.c:2262: |3| 0090: 40 2b 99 99 b0 da ca 72 aa 4e 68 b2 4a 2e 4b e4 @+.....r.Nh.J.K. ssl_cli.c:2262: |3| 00a0: 0f 31 c6 34 dc 22 8e 1d 16 64 e7 4f bb d0 9b 86 .1.4."...d.O.... ssl_cli.c:2262: |3| 00b0: 82 00 8b 47 6e f2 79 ac fc 2a 54 2f 9c 50 0f cf ...Gn.y..T/.P.. ssl_cli.c:2262: |3| 00c0: 8e 11 44 4b c4 8f f4 07 7d 75 34 78 b9 bd b5 05 ..DK....}u4x.... ssl_cli.c:2262: |3| 00d0: ee af c3 8f fd 27 79 86 07 26 24 b1 ff d2 33 9a .....'y..&$...3. ssl_cli.c:2262: |3| 00e0: 02 c3 1d 3c ce 63 1c c2 15 81 b7 64 b3 35 f5 4d ...<.c.....d.5.M ssl_cli.c:2262: |3| 00f0: e5 f2 0c 7d 9b f5 5e 9c 5f bb 38 8b 0d 49 02 ff ...}..^._.8..I.. ssl_cli.c:2262: |3| 0100: be 59 45 1f 7d 38 fb ca 2e 1a e4 f0 76 a7 08 cd .YE.}8......v... ssl_cli.c:2262: |3| 0110: 02 8a ee 02 f8 83 eb 57 ae d7 31 15 0f 20 57 6b .......W..1.. Wk ssl_cli.c:2262: |3| 0120: e7 2c 5b 67 53 67 5b f5 c4 72 5f 72 bb f2 39 1c .,[gSg[..r_r..9. ssl_cli.c:2262: |3| 0130: 26 84 09 17 40 56 1b 60 0d a0 0e fa a9 45 15 34 &.........E.4 ssl_cli.c:2262: |3| 0140: be 5d 0d 7c ad b1 57 49 bd e1 9e 2a 2c 11 9a 86 .].|..WI...*,... ssl_cli.c:2262: |3| 0150: f7 10 a0 6a ee b2 83 84 c5 02 22 f2 31 de e2 10 ...j......".1... ssl_cli.c:2262: |3| 0160: 1b fd 3c 36 7a 85 5e 9d bf ..<6z.^.. ssl_cli.c:1919: |2| ECDH curve: secp384r1 ssl_cli.c:1929: |3| value of 'ECDH: Qp(X)' (383 bits) is: ssl_cli.c:1929: |3| 57 db f0 2f 69 41 c5 18 de d8 e1 b8 1c 03 1b 86 ssl_cli.c:1929: |3| 4e 91 af 4f 8b 01 49 5f a9 f9 89 12 59 f4 ca 6f ssl_cli.c:1929: |3| a8 c1 20 3e 06 b7 8f 8d a4 16 36 e1 c5 4c 61 a9 ssl_cli.c:1929: |3| value of 'ECDH: Qp(Y)' (384 bits) is: ssl_cli.c:1929: |3| 94 f6 59 8a e0 d2 61 59 20 b5 3f 10 8d 45 92 aa ssl_cli.c:1929: |3| 5b 70 44 f2 ce f1 16 d6 37 cd 1e ca 7c c7 c2 c6 ssl_cli.c:1929: |3| dc 3d f2 74 15 75 13 d5 86 2b a3 9d de 5e 8c b4 ssl_cli.c:2141: |2| Server used SignatureAlgorithm 1 ssl_cli.c:2142: |2| Server used HashAlgorithm 2 ssl_cli.c:2399: |3| dumping 'signature' (256 bytes) ssl_cli.c:2399: |3| 0000: 70 79 88 1d 1f 6b 5f 4a 2f 39 9f 3e a0 16 22 91 py...k_J/9.>..". ssl_cli.c:2399: |3| 0010: 23 ce 5a 03 98 f4 6a d8 a4 6f 6f 2e 73 87 58 44 #.Z...j..oo.s.XD ssl_cli.c:2399: |3| 0020: 26 e9 3d 5f 0d 58 13 40 2b 99 99 b0 da ca 72 aa &.=_.X.@+.....r. ssl_cli.c:2399: |3| 0030: 4e 68 b2 4a 2e 4b e4 0f 31 c6 34 dc 22 8e 1d 16 Nh.J.K..1.4."... ssl_cli.c:2399: |3| 0040: 64 e7 4f bb d0 9b 86 82 00 8b 47 6e f2 79 ac fc d.O.......Gn.y.. ssl_cli.c:2399: |3| 0050: 2a 54 2f 9c 50 0f cf 8e 11 44 4b c4 8f f4 07 7d *T/.P....DK....} ssl_cli.c:2399: |3| 0060: 75 34 78 b9 bd b5 05 ee af c3 8f fd 27 79 86 07 u4x.........'y.. ssl_cli.c:2399: |3| 0070: 26 24 b1 ff d2 33 9a 02 c3 1d 3c ce 63 1c c2 15 &$...3....<.c... ssl_cli.c:2399: |3| 0080: 81 b7 64 b3 35 f5 4d e5 f2 0c 7d 9b f5 5e 9c 5f ..d.5.M...}..^._ ssl_cli.c:2399: |3| 0090: bb 38 8b 0d 49 02 ff be 59 45 1f 7d 38 fb ca 2e .8..I...YE.}8... ssl_cli.c:2399: |3| 00a0: 1a e4 f0 76 a7 08 cd 02 8a ee 02 f8 83 eb 57 ae ...v..........W. ssl_cli.c:2399: |3| 00b0: d7 31 15 0f 20 57 6b e7 2c 5b 67 53 67 5b f5 c4 .1.. Wk.,[gSg[.. ssl_cli.c:2399: |3| 00c0: 72 5f 72 bb f2 39 1c 26 84 09 17 40 56 1b 60 0d r_r..9.&..... ssl_cli.c:2399: |3| 00d0: a0 0e fa a9 45 15 34 be 5d 0d 7c ad b1 57 49 bd ....E.4.].|..WI. ssl_cli.c:2399: |3| 00e0: e1 9e 2a 2c 11 9a 86 f7 10 a0 6a ee b2 83 84 c5 ..,......j..... ssl_cli.c:2399: |3| 00f0: 02 22 f2 31 de e2 10 1b fd 3c 36 7a 85 5e 9d bf .".1.....<6z.^.. ssl_cli.c:2485: |3| dumping 'parameters hash' (20 bytes) ssl_cli.c:2485: |3| 0000: db de 1f 66 72 be 0c b0 1c fc 82 9b 60 61 a5 07 ...fr.......`a.. ssl_cli.c:2485: |3| 0010: 56 7d 1b d0 V}.. ssl_cli.c:2516: |2| <= parse server key exchange ssl_cli.c:3279: |2| client state: 5 ssl_tls.c:2416: |2| => flush output ssl_tls.c:2428: |2| <= flush output ssl_cli.c:2556: |2| => parse certificate request ssl_tls.c:3728: |2| => read record ssl_tls.c:3089: |3| handshake message: msglen = 32, type = 13, hslen = 28 ssl_tls.c:3753: |2| <= read record ssl_cli.c:2593: |3| got a certificate request ssl_cli.c:2648: |3| Supported Signature Algorithm found: 4,1 ssl_cli.c:2648: |3| Supported Signature Algorithm found: 5,1 ssl_cli.c:2648: |3| Supported Signature Algorithm found: 2,1 ssl_cli.c:2648: |3| Supported Signature Algorithm found: 4,3 ssl_cli.c:2648: |3| Supported Signature Algorithm found: 5,3 ssl_cli.c:2648: |3| Supported Signature Algorithm found: 2,3 ssl_cli.c:2648: |3| Supported Signature Algorithm found: 6,1 ssl_cli.c:2648: |3| Supported Signature Algorithm found: 6,3 ssl_cli.c:2674: |2| <= parse certificate request ssl_cli.c:3279: |2| client state: 6 ssl_tls.c:2416: |2| => flush output ssl_tls.c:2428: |2| <= flush output ssl_cli.c:2689: |2| => parse server hello done ssl_tls.c:3728: |2| => read record ssl_tls.c:3089: |3| handshake message: msglen = 4, type = 14, hslen = 4 ssl_tls.c:3753: |2| <= read record ssl_cli.c:2721: |2| <= parse server hello done ssl_cli.c:3279: |2| client state: 7 ssl_tls.c:2416: |2| => flush output ssl_tls.c:2428: |2| <= flush output ssl_tls.c:4107: |2| => write certificate ssl_tls.c:2701: |2| => write record ssl_tls.c:2838: |3| output record: msgtype = 22, version = [3:3], msglen = 7 ssl_tls.c:2416: |2| => flush output ssl_tls.c:2435: |2| message length: 12, out_left: 12 ssl_tls.c:2441: |2| ssl->f_send() returned 12 (-0xfffffff4) ssl_tls.c:2460: |2| <= flush output ssl_tls.c:2850: |2| <= write record ssl_tls.c:4211: |2| <= write certificate ssl_cli.c:3279: |2| client state: 8 ssl_tls.c:2416: |2| => flush output ssl_tls.c:2428: |2| <= flush output ssl_cli.c:2732: |2| => write client key exchange ssl_cli.c:2797: |3| value of 'ECDH: Q(X)' (382 bits) is: ssl_cli.c:2797: |3| 3f fb 0c b7 79 a7 6c 47 bd 28 a7 15 6d 7f d3 14 ssl_cli.c:2797: |3| 20 3a 0e 01 27 8d 35 9c 0b d9 10 c5 37 45 88 9f ssl_cli.c:2797: |3| 11 75 a8 b7 07 ac 56 c7 97 bf 88 1e 70 db e8 25 ssl_cli.c:2797: |3| value of 'ECDH: Q(Y)' (384 bits) is: ssl_cli.c:2797: |3| b1 3c 32 c3 a0 64 d7 19 b4 54 7c e9 12 50 55 9b ssl_cli.c:2797: |3| 2c 22 08 d3 dd 6d 6d 59 f3 5d 96 22 51 f7 55 88 ssl_cli.c:2797: |3| 16 f7 24 88 12 b3 20 35 f7 e9 8b 32 a8 fb ba 21 ssl_cli.c:2809: |3| value of 'ECDH: z' (382 bits) is: ssl_cli.c:2809: |3| 22 af 4f 27 8f 95 42 b0 54 fc 23 e2 29 dc 12 8b ssl_cli.c:2809: |3| 8a 99 57 48 71 b9 9e a6 a3 bc 19 ed 46 5b b3 f8 ssl_cli.c:2809: |3| f9 29 06 1b fa a7 bc b5 f7 4f 49 7e 63 1d dc d5 ssl_tls.c:2701: |2| => write record ssl_tls.c:2838: |3| output record: msgtype = 22, version = [3:3], msglen = 102 ssl_tls.c:2416: |2| => flush output ssl_tls.c:2435: |2| message length: 107, out_left: 107 ssl_tls.c:2441: |2| ssl->f_send() returned 107 (-0xffffff95) ssl_tls.c:2460: |2| <= flush output ssl_tls.c:2850: |2| <= write record ssl_cli.c:2977: |2| <= write client key exchange ssl_cli.c:3279: |2| client state: 9 ssl_tls.c:2416: |2| => flush output ssl_tls.c:2428: |2| <= flush output ssl_cli.c:3026: |2| => write certificate verify ssl_tls.c:0501: |2| => derive keys ssl_tls.c:0579: |3| dumping 'premaster secret' (48 bytes) ssl_tls.c:0579: |3| 0000: 22 af 4f 27 8f 95 42 b0 54 fc 23 e2 29 dc 12 8b ".O'..B.T.#.)... ssl_tls.c:0579: |3| 0010: 8a 99 57 48 71 b9 9e a6 a3 bc 19 ed 46 5b b3 f8 ..WHq.......F[.. ssl_tls.c:0579: |3| 0020: f9 29 06 1b fa a7 bc b5 f7 4f 49 7e 63 1d dc d5 .).......OI~c... ssl_tls.c:0587: |3| using extended master secret ssl_tls.c:1046: |2| => calc verify sha256 ssl_tls.c:1051: |3| dumping 'calculated verify result' (32 bytes) ssl_tls.c:1051: |3| 0000: 30 46 3f 58 ea 3a 97 7d c8 33 f0 de b3 45 c2 b9 0F?X.:.}.3...E.. ssl_tls.c:1051: |3| 0010: df 68 4c fb 7e bd 97 76 c0 2c a9 c0 30 9f 2e 16 .hL.~..v.,..0... ssl_tls.c:1052: |2| <= calc verify ssl_tls.c:0608: |3| dumping 'session hash' (32 bytes) ssl_tls.c:0608: |3| 0000: 30 46 3f 58 ea 3a 97 7d c8 33 f0 de b3 45 c2 b9 0F?X.:.}.3...E.. ssl_tls.c:0608: |3| 0010: df 68 4c fb 7e bd 97 76 c0 2c a9 c0 30 9f 2e 16 .hL.~..v.,..0... ssl_tls.c:0667: |3| ciphersuite = TLS-ECDHE-RSA-WITH-AES-128-CBC-SHA256 ssl_tls.c:0668: |3| dumping 'master secret' (48 bytes) ssl_tls.c:0668: |3| 0000: 58 1a f4 67 63 71 83 5b 04 cc 5a a7 d8 e7 6e da X..gcq.[..Z...n. ssl_tls.c:0668: |3| 0010: e3 73 99 33 a3 5a 85 f4 91 e3 5c 6e d4 23 16 e9 .s.3.Z....\n.#.. ssl_tls.c:0668: |3| 0020: 68 b7 bf f2 97 a8 4c 95 9c b2 3c d8 da 13 88 d8 h.....L...<..... ssl_tls.c:0767: |3| keylen: 16, minlen: 64, ivlen: 16, maclen: 32 ssl_tls.c:0957: |2| <= derive keys ssl_cli.c:3047: |2| <= skip write certificate verify ssl_cli.c:3279: |2| client state: 10 ssl_tls.c:2416: |2| => flush output ssl_tls.c:2428: |2| <= flush output ssl_tls.c:4506: |2| => write change cipher spec ssl_tls.c:2701: |2| => write record ssl_tls.c:2838: |3| output record: msgtype = 20, version = [3:3], msglen = 1 ssl_tls.c:2416: |2| => flush output ssl_tls.c:2435: |2| message length: 6, out_left: 6 ssl_tls.c:2441: |2| ssl->f_send() returned 6 (-0xfffffffa) ssl_tls.c:2460: |2| <= flush output ssl_tls.c:2850: |2| <= write record ssl_tls.c:4520: |2| <= write change cipher spec ssl_cli.c:3279: |2| client state: 11 ssl_tls.c:2416: |2| => flush output ssl_tls.c:2428: |2| <= flush output ssl_tls.c:5031: |2| => write finished ssl_tls.c:4856: |2| => calc finished tls sha256 ssl_tls.c:4880: |3| dumping 'calc finished result' (12 bytes) ssl_tls.c:4880: |3| 0000: b6 23 a9 04 24 6c 1a 35 fa 24 e3 8a .#..$l.5.$.. ssl_tls.c:4886: |2| <= calc finished ssl_tls.c:5085: |3| switching to new transform spec for outbound data ssl_tls.c:2701: |2| => write record ssl_tls.c:1258: |2| => encrypt buf ssl_tls.c:1481: |3| before encrypt: msglen = 80, including 16 bytes of IV and 16 bytes of padding ssl_tls.c:1560: |2| <= encrypt buf ssl_tls.c:2838: |3| output record: msgtype = 22, version = [3:3], msglen = 80 ssl_tls.c:2416: |2| => flush output ssl_tls.c:2435: |2| message length: 85, out_left: 85 ssl_tls.c:2441: |2| ssl->f_send() returned 85 (-0xffffffab) ssl_tls.c:2460: |2| <= flush output ssl_tls.c:2850: |2| <= write record ssl_tls.c:5140: |2| <= write finished ssl_cli.c:3279: |2| client state: 12 ssl_tls.c:2416: |2| => flush output ssl_tls.c:2428: |2| <= flush output ssl_tls.c:4529: |2| => parse change cipher spec ssl_tls.c:3728: |2| => read record ssl_tls.c:2208: |2| => fetch input ssl_tls.c:2366: |2| in_left: 0, nb_want: 5 ClientConnectionCallback with result = 2, reason = 5 The device client has been disconnected ssl_tls.c:2390: |2| in_left: 0, nb_want: 5 ssl_tls.c:2391: |2| ssl->f_recv(_timeout)() returned -27648 (-0x6c00) ssl_tls.c:3789: |1| mbedtls_ssl_fetch_input() returned -27648 (-0x6c00) ssl_tls.c:3734: |1| mbedtls_ssl_read_record_layer() returned -27648 (-0x6c00) ssl_tls.c:4533: |1| mbedtls_ssl_read_record() returned -27648 (-0x6c00) ssl_tls.c:6346: |2| <= handshake ClientConnectionCallback with result = 2, reason = 5 The device client has been disconnected Sending message 2 to IoTHub Sending message 3 to IoTHub Sending message 4 to IoTHub Sending message 5 to IoTHub error D:/azure-iot-sdk-c/iothub_client/src/iothubtransport_mqtt_common.c: line 2374 ssl_tls.c:7064: |2| => free ssl_tls.c:7129: |2| <= free

该提问来源于开源项目:Azure/azure-iot-sdk-c

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

20条回答

为你推荐

换一换