1、I use the openssl command for test,it’s OK.
2、I use the mbedtls,use same CA ,client cert ,client pk,but failed.
this is the log:
=> handshake
client state: 0
=> flush output
<= flush output
client state: 1
=> flush output
<= flush output
=> write client hello
client hello, max version: [3:3]
client hello, current time: 1585880054
dumping ‘client hello, random bytes’ (32 bytes)
0000: 5e 86 9b f6 c6 4a 30 cb bf 02 98 8d 77 63 dd 9f ^…J0…wc…
0010: 22 89 5b fe 8f e9 a1 3a c7 65 f5 71 05 b3 59 d7 ".[…:.e.q…Y.
client hello, session id len.: 0
dumping ‘client hello, session id’ (0 bytes)
client hello, add ciphersuite: cca8
client hello, add ciphersuite: cca9
client hello, add ciphersuite: ccaa
client hello, add ciphersuite: c02c
client hello, add ciphersuite: c030
client hello, add ciphersuite: 009f
client hello, add ciphersuite: c0ad
client hello, add ciphersuite: c09f
client hello, add ciphersuite: c024
client hello, add ciphersuite: c028
client hello, add ciphersuite: 006b
client hello, add ciphersuite: c00a
client hello, add ciphersuite: c014
client hello, add ciphersuite: 0039
client hello, add ciphersuite: c0af
client hello, add ciphersuite: c0a3
client hello, add ciphersuite: c087
client hello, add ciphersuite: c08b
client hello, add ciphersuite: c07d
client hello, add ciphersuite: c073
client hello, add ciphersuite: c077
client hello, add ciphersuite: 00c4
client hello, add ciphersuite: 0088
client hello, add ciphersuite: c02b
client hello, add ciphersuite: c02f
client hello, add ciphersuite: 009e
client hello, add ciphersuite: c0ac
client hello, add ciphersuite: c09e
client hello, add ciphersuite: c023
client hello, add ciphersuite: c027
client hello, add ciphersuite: 0067
client hello, add ciphersuite: c009
client hello, add ciphersuite: c013
client hello, add ciphersuite: 0033
client hello, add ciphersuite: c0ae
client hello, add ciphersuite: c0a2
client hello, add ciphersuite: c086
client hello, add ciphersuite: c08a
client hello, add ciphersuite: c07c
client hello, add ciphersuite: c072
client hello, add ciphersuite: c076
client hello, add ciphersuite: 00be
client hello, add ciphersuite: 0045
client hello, add ciphersuite: c008
client hello, add ciphersuite: c012
client hello, add ciphersuite: 0016
client hello, add ciphersuite: ccac
client hello, add ciphersuite: ccad
client hello, add ciphersuite: 00ab
client hello, add ciphersuite: c0a7
client hello, add ciphersuite: c038
client hello, add ciphersuite: 00b3
client hello, add ciphersuite: c036
client hello, add ciphersuite: 0091
client hello, add ciphersuite: c091
client hello, add ciphersuite: c09b
client hello, add ciphersuite: c097
client hello, add ciphersuite: c0ab
client hello, add ciphersuite: 00aa
client hello, add ciphersuite: c0a6
client hello, add ciphersuite: c037
client hello, add ciphersuite: 00b2
client hello, add ciphersuite: c035
client hello, add ciphersuite: 0090
client hello, add ciphersuite: c090
client hello, add ciphersuite: c096
client hello, add ciphersuite: c09a
client hello, add ciphersuite: c0aa
client hello, add ciphersuite: c034
client hello, add ciphersuite: 008f
client hello, add ciphersuite: 009d
client hello, add ciphersuite: c09d
client hello, add ciphersuite: 003d
client hello, add ciphersuite: 0035
client hello, add ciphersuite: c032
client hello, add ciphersuite: c02a
client hello, add ciphersuite: c00f
client hello, add ciphersuite: c02e
client hello, add ciphersuite: c026
client hello, add ciphersuite: c005
client hello, add ciphersuite: c0a1
client hello, add ciphersuite: c07b
client hello, add ciphersuite: 00c0
client hello, add ciphersuite: 0084
client hello, add ciphersuite: c08d
client hello, add ciphersuite: c079
client hello, add ciphersuite: c089
client hello, add ciphersuite: c075
client hello, add ciphersuite: 009c
client hello, add ciphersuite: c09c
client hello, add ciphersuite: 003c
client hello, add ciphersuite: 002f
client hello, add ciphersuite: c031
client hello, add ciphersuite: c029
client hello, add ciphersuite: c00e
client hello, add ciphersuite: c02d
client hello, add ciphersuite: c025
client hello, add ciphersuite: c004
client hello, add ciphersuite: c0a0
client hello, add ciphersuite: c07a
client hello, add ciphersuite: 00ba
client hello, add ciphersuite: 0041
client hello, add ciphersuite: c08c
client hello, add ciphersuite: c078
client hello, add ciphersuite: c088
client hello, add ciphersuite: c074
client hello, add ciphersuite: 000a
client hello, add ciphersuite: c00d
client hello, add ciphersuite: c003
client hello, add ciphersuite: ccae
client hello, add ciphersuite: 00ad
client hello, add ciphersuite: 00b7
client hello, add ciphersuite: 0095
client hello, add ciphersuite: c093
client hello, add ciphersuite: c099
client hello, add ciphersuite: 00ac
client hello, add ciphersuite: 00b6
client hello, add ciphersuite: 0094
client hello, add ciphersuite: c092
client hello, add ciphersuite: c098
client hello, add ciphersuite: 0093
client hello, add ciphersuite: ccab
client hello, add ciphersuite: 00a9
client hello, add ciphersuite: c0a5
client hello, add ciphersuite: 00af
client hello, add ciphersuite: 008d
client hello, add ciphersuite: c08f
client hello, add ciphersuite: c095
client hello, add ciphersuite: c0a9
client hello, add ciphersuite: 00a8
client hello, add ciphersuite: c0a4
client hello, add ciphersuite: 00ae
client hello, add ciphersuite: 008c
client hello, add ciphersuite: c08e
client hello, add ciphersuite: c094
client hello, add ciphersuite: c0a8
client hello, add ciphersuite: 008b
client hello, got 137 ciphersuites (excluding SCSVs)
adding EMPTY_RENEGOTIATION_INFO_SCSV
client hello, compress len.: 1
client hello, compress alg.: 0
client hello, adding signature_algorithms extension
client hello, adding supported_elliptic_curves extension
client hello, adding supported_point_formats extension
client hello, adding encrypt_then_mac extension
client hello, adding extended_master_secret extension
client hello, adding session ticket extension
client hello, total extension length: 72
=> write handshake message
=> write record
output record: msgtype = 22, version = [3:3], msglen = 393
dumping ‘output record sent to network’ (398 bytes)
0000: 16 03 03 01 89 01 00 01 85 03 03 5e 86 9b f6 c6 …^…
0010: 4a 30 cb bf 02 98 8d 77 63 dd 9f 22 89 5b fe 8f J0…wc…".[…
0020: e9 a1 3a c7 65 f5 71 05 b3 59 d7 00 01 14 cc a8 …:.e.q…Y…
0030: cc a9 cc aa c0 2c c0 30 00 9f c0 ad c0 9f c0 24 …,.0…$
0040: c0 28 00 6b c0 0a c0 14 00 39 c0 af c0 a3 c0 87 .(.k…9…
0050: c0 8b c0 7d c0 73 c0 77 00 c4 00 88 c0 2b c0 2f …}.s.w…+./
0060: 00 9e c0 ac c0 9e c0 23 c0 27 00 67 c0 09 c0 13 …#.'.g…
0070: 00 33 c0 ae c0 a2 c0 86 c0 8a c0 7c c0 72 c0 76 .3…|.r.v
0080: 00 be 00 45 c0 08 c0 12 00 16 cc ac cc ad 00 ab …E…
0090: c0 a7 c0 38 00 b3 c0 36 00 91 c0 91 c0 9b c0 97 …8…6…
00a0: c0 ab 00 aa c0 a6 c0 37 00 b2 c0 35 00 90 c0 90 …7…5…
00b0: c0 96 c0 9a c0 aa c0 34 00 8f 00 9d c0 9d 00 3d …4…=
00c0: 00 35 c0 32 c0 2a c0 0f c0 2e c0 26 c0 05 c0 a1 .5.2.*…&…
00d0: c0 7b 00 c0 00 84 c0 8d c0 79 c0 89 c0 75 00 9c .{…y…u…
00e0: c0 9c 00 3c 00 2f c0 31 c0 29 c0 0e c0 2d c0 25 …<./.1.)…-.%
00f0: c0 04 c0 a0 c0 7a 00 ba 00 41 c0 8c c0 78 c0 88 …z…A…x…
0100: c0 74 00 0a c0 0d c0 03 cc ae 00 ad 00 b7 00 95 .t…
0110: c0 93 c0 99 00 ac 00 b6 00 94 c0 92 c0 98 00 93 …
0120: cc ab 00 a9 c0 a5 00 af 00 8d c0 8f c0 95 c0 a9 …
0130: 00 a8 c0 a4 00 ae 00 8c c0 8e c0 94 c0 a8 00 8b …
0140: 00 ff 01 00 00 48 00 0d 00 16 00 14 06 03 06 01 …H…
0150: 05 03 05 01 04 03 04 01 03 03 03 01 02 03 02 01 …
0160: 00 0a 00 18 00 16 00 19 00 1c 00 18 00 1b 00 17 …
0170: 00 16 00 1a 00 15 00 14 00 13 00 12 00 0b 00 02 …
0180: 01 00 00 16 00 00 00 17 00 00 00 23 00 00 …#…
=> flush output
message length: 398, out_left: 398
ssl->f_send() returned 398 (-0xfffffe72)
<= flush output
<= write record
<= write handshake message
<= write client hello
client state: 2
=> flush output
<= flush output
=> parse server hello
=> read record
=> fetch input
in_left: 0, nb_want: 5
in_left: 0, nb_want: 5
ssl->f_recv(_timeout)() returned -80 (-0x0050)
mbedtls_ssl_fetch_input() returned -80 (-0x0050)
ssl_get_next_record() returned -80 (-0x0050)
mbedtls_ssl_read_record() returned -80 (-0x0050)
<= handshake
mbedtls_ssl_handshake() failed, ret:-0x50.File: OneNETMqttClient.c, Line: 00263: NetworkConnect status: -1
=> write
=> handshake
client state: 2
=> flush output
<= flush output
=> parse server hello
=> read record
=> fetch input
in_left: 0, nb_want: 5
in_left: 0, nb_want: 5
ssl->f_recv(_timeout)() returned 0 (-0x0000)
mbedtls_ssl_fetch_input() returned -29312 (-0x7280)
ssl_get_next_record() returned -29312 (-0x7280)
mbedtls_ssl_read_record() returned -29312 (-0x7280)
<= handshake
mbedtls_ssl_handshake() returned -29312 (-0x7280)
=> write close notify
<= write close notify
=> free
<= free