Client handshake fails after sending Client Finished msg. Async BIO

Hi, I am trying to implement a tls client in a STM32H device. I started using the CubeMX mbedtls, wich bundles version 2.6.1. I need to access google drive.
I already got it working on my pc using the ssl_client2 example and setting up the correct google CA. (In my pc I used mbedtls last version).
I used the same CA in my application and it looks like I got the CA validation passed. But after that, the client fails when trying to parse the “new session ticket”.
All the BIO is async, so normally it returns “want write” or “want read” when it is busy.
auth mode is “Required”
“HAVE_TIME” and “HAVE_DATETIME” are both commented out.

I would like to know:

  1. From the log, is it correct to say that certificates are working correctly?
  2. Why am I getting a different response from the server when using the sample application?
  3. Can this be related to a BIO implementation problem?
  4. Any further help to make this work will be highly appreciated.

This is the debug log with level = 5 from my application:

=> handshake
client state: 0
=> flush output
<= flush output
client state: 1
=> flush output
<= flush output
=> write client hello
client hello, max version: [3:3]
dumping 'client hello, random bytes' (32 bytes)
0000:  95 76 2f 00 cf 5e 42 99 c3 6e 21 0c 3e 2d 80 41  .v/..^B..n!.>-.A
0010:  df 07 b4 8a 69 4e 50 79 6b a9 00 5b d1 dd ac 51  ....iNPyk..[...Q
client hello, session id len.: 0
dumping 'client hello, session id' (0 bytes)
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: 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: 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: 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 131 ciphersuites
client hello, compress len.: 1
client hello, compress alg.: 0
client hello, adding server name extension: drive.google.com
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: 97
=> write record
output record: msgtype = 22, version = [3:1], msglen = 404
dumping 'output record sent to network' (409 bytes)
0000:  16 03 01 01 94 01 00 01 90 03 03 95 76 2f 00 cf  ............v/..
0010:  5e 42 99 c3 6e 21 0c 3e 2d 80 41 df 07 b4 8a 69  ^B..n!.>-.A....i
0020:  4e 50 79 6b a9 00 5b d1 dd ac 51 00 01 06 c0 2c  NPyk..[...Q....,
0030:  c0 30 00 9f c0 ad c0 9f c0 24 c0 28 00 6b c0 0a  .0.......$.(.k..
0040:  c0 14 00 39 c0 af c0 a3 c0 87 c0 8b c0 7d c0 73  ...9.........}.s
0050:  c0 77 00 c4 00 88 c0 2b c0 2f 00 9e c0 ac c0 9e  .w.....+./......
0060:  c0 23 c0 27 00 67 c0 09 c0 13 00 33 c0 ae c0 a2  .#.'.g.....3....
0070:  c0 86 c0 8a c0 7c c0 72 c0 76 00 be 00 45 c0 08  .....|.r.v...E..
0080:  c0 12 00 16 00 ab c0 a7 c0 38 00 b3 c0 36 00 91  .........8...6..
0090:  c0 91 c0 9b c0 97 c0 ab 00 aa c0 a6 c0 37 00 b2  .............7..
00a0:  c0 35 00 90 c0 90 c0 96 c0 9a c0 aa c0 34 00 8f  .5...........4..
00b0:  00 9d c0 9d 00 3d 00 35 c0 32 c0 2a c0 0f c0 2e  .....=.5.2.*....
00c0:  c0 26 c0 05 c0 a1 c0 7b 00 c0 00 84 c0 8d c0 79  .&.....{.......y
00d0:  c0 89 c0 75 00 9c c0 9c 00 3c 00 2f c0 31 c0 29  ...u.....<./.1.)
00e0:  c0 0e c0 2d c0 25 c0 04 c0 a0 c0 7a 00 ba 00 41  ...-.%.....z...A
00f0:  c0 8c c0 78 c0 88 c0 74 00 0a c0 0d c0 03 00 ad  ...x...t........
0100:  00 b7 00 95 c0 93 c0 99 00 ac 00 b6 00 94 c0 92  ................
0110:  c0 98 00 93 00 a9 c0 a5 00 af 00 8d c0 8f c0 95  ................
0120:  c0 a9 00 a8 c0 a4 00 ae 00 8c c0 8e c0 94 c0 a8  ................
0130:  00 8b 00 ff 01 00 00 61 00 00 00 15 00 13 00 00  .......a........
0140:  10 64 72 69 76 65 2e 67 6f 6f 67 6c 65 2e 63 6f  .drive.google.co
0150:  6d 00 0d 00 16 00 14 06 03 06 01 05 03 05 01 04  m...............
0160:  03 04 01 03 03 03 01 02 03 02 01 00 0a 00 18 00  ................
0170:  16 00 19 00 1c 00 18 00 1b 00 17 00 16 00 1a 00  ................
0180:  15 00 14 00 13 00 12 00 0b 00 02 01 00 00 16 00  ................
0190:  00 00 17 00 00 00 23 00 00                       ......#..
=> flush output
message length: 409, out_left: 409
ssl->f_send() returned 409 (-0xfffffe67)
<= flush output
<= write record
<= 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
<= handshake
=> 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
<= handshake
=> 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
<= handshake
=> 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
<= handshake
=> 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
<= handshake
=> 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
<= handshake
=> 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
<= handshake
=> 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
<= handshake
=> 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 5 (-0xfffffffb)
<= fetch input
dumping 'input record header' (5 bytes)
0000:  16 03 03 00 3f                                   ....?
input record: msgtype = 22, version = [3:3], msglen = 63
=> fetch input
in_left: 5, nb_want: 68
in_left: 5, nb_want: 68
ssl->f_recv(_timeout)() returned 63 (-0xffffffc1)
<= fetch input
dumping 'input record from network' (68 bytes)
0000:  16 03 03 00 3f 02 00 00 3b 03 03 5d dd 3e 89 03  ....?...;..].>..
0010:  dd 20 ab 3d 3d 23 88 5c 30 17 d5 69 70 e6 1f 54  . .==#.\0..ip..T
0020:  be e8 70 44 4f 57 4e 47 52 44 01 00 c0 2b 00 00  ..pDOWNGRD...+..
0030:  13 00 17 00 00 ff 01 00 01 00 00 0b 00 02 01 00  ................
0040:  00 23 00 00                                      .#..
handshake message: msglen = 63, type = 2, hslen = 63
<= read record
dumping 'server hello, version' (2 bytes)
0000:  03 03                                            ..
server hello, current time: 1574780553
dumping 'server hello, random bytes' (32 bytes)
0000:  5d dd 3e 89 03 dd 20 ab 3d 3d 23 88 5c 30 17 d5  ].>... .==#.\0..
0010:  69 70 e6 1f 54 be e8 70 44 4f 57 4e 47 52 44 01  ip..T..pDOWNGRD.
server hello, session id len.: 0
dumping 'server hello, session id' (0 bytes)
no session has been resumed
server hello, chosen ciphersuite: c02b
server hello, compress alg.: 0
server hello, chosen ciphersuite: TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
server hello, total extension length: 19
found extended_master_secret extension
found renegotiation extension
found supported_point_formats extension
point format selected: 0
found session_ticket extension
<= parse server hello
client state: 3
=> flush output
<= flush output
=> parse certificate
=> read record
=> fetch input
in_left: 0, nb_want: 5
in_left: 0, nb_want: 5
ssl->f_recv(_timeout)() returned 5 (-0xfffffffb)
<= fetch input
dumping 'input record header' (5 bytes)
0000:  16 03 03 0d a4                                   .....
input record: msgtype = 22, version = [3:3], msglen = 3492
=> fetch input
in_left: 5, nb_want: 3497
in_left: 5, nb_want: 3497
ssl->f_recv(_timeout)() returned 3492 (-0xfffff25c)
<= fetch input
dumping 'input record from network' (3497 bytes)
0000:  16 03 03 0d a4 0b 00 0d a0 00 0d 9d 00 09 49 30  ..............I0
0010:  82 09 45 30 82 08 2d a0 03 02 01 02 02 10 21 dd  ..E0..-.......!.
0020:  bb e8 fb 43 60 09 08 00 00 00 00 1d 8a 46 30 0d  ...C`........F0.
0030:  06 09 2a 86 48 86 f7 0d 01 01 0b 05 00 30 42 31  ..*.H........0B1
0040:  0b 30 09 06 03 55 04 06 13 02 55 53 31 1e 30 1c  .0...U....US1.0.
0050:  06 03 55 04 0a 13 15 47 6f 6f 67 6c 65 20 54 72  ..U....Google Tr
0060:  75 73 74 20 53 65 72 76 69 63 65 73 31 13 30 11  ust Services1.0.
0070:  06 03 55 04 03 13 0a 47 54 53 20 43 41 20 31 4f  ..U....GTS CA 1O
0080:  31 30 1e 17 0d 31 39 31 31 30 35 30 37 34 36 31  10...19110507461
0090:  36 5a 17 0d 32 30 30 31 32 38 30 37 34 36 31 36  6Z..200128074616
00a0:  5a 30 66 31 0b 30 09 06 03 55 04 06 13 02 55 53  Z0f1.0...U....US
00b0:  31 13 30 11 06 03 55 04 08 13 0a 43 61 6c 69 66  1.0...U....Calif
00c0:  6f 72 6e 69 61 31 16 30 14 06 03 55 04 07 13 0d  ornia1.0...U....
00d0:  4d 6f 75 6e 74 61 69 6e 20 56 69 65 77 31 13 30  Mountain View1.0
00e0:  11 06 03 55 04 0a 13 0a 47 6f 6f 67 6c 65 20 4c  ...U....Google L
00f0:  4c 43 31 15 30 13 06 03 55 04 03 0c 0c 2a 2e 67  LC1.0...U....*.g
0100:  6f 6f 67 6c 65 2e 63 6f 6d 30 59 30 13 06 07 2a  oogle.com0Y0...*
0110:  86 48 ce 3d 02 01 06 08 2a 86 48 ce 3d 03 01 07  .H.=....*.H.=...
0120:  03 42 00 04 44 f0 58 f7 48 88 93 f6 11 78 84 f9  .B..D.X.H....x..
0130:  81 f8 a0 a8 0d 35 3f ef 81 f1 45 7f a4 ac 9b bf  .....5?...E.....
0140:  94 80 97 f4 a9 9f a8 63 ad f1 a9 f8 44 6c e2 ee  .......c....Dl..
0150:  d0 9d 1a 81 76 b9 a0 b1 98 90 c7 9d 80 78 70 02  ....v........xp.
0160:  0b 3f 17 6e a3 82 06 dc 30 82 06 d8 30 0e 06 03  .?.n....0...0...
0170:  55 1d 0f 01 01 ff 04 04 03 02 07 80 30 13 06 03  U...........0...
0180:  55 1d 25 04 0c 30 0a 06 08 2b 06 01 05 05 07 03  U.%..0...+......
0190:  01 30 0c 06 03 55 1d 13 01 01 ff 04 02 30 00 30  .0...U.......0.0
01a0:  1d 06 03 55 1d 0e 04 16 04 14 d9 56 05 a2 11 5e  ...U.......V...^
01b0:  ae 8e a0 a9 78 c6 53 1f a9 3e 1f 2f ab 70 30 1f  ....x.S..>./.p0.
01c0:  06 03 55 1d 23 04 18 30 16 80 14 98 d1 f8 6e 10  ..U.#..0......n.
01d0:  eb cf 9b ec 60 9f 18 90 1b a0 eb 7d 09 fd 2b 30  ....`......}..+0
01e0:  64 06 08 2b 06 01 05 05 07 01 01 04 58 30 56 30  d..+........X0V0
01f0:  27 06 08 2b 06 01 05 05 07 30 01 86 1b 68 74 74  '..+.....0...htt
0200:  70 3a 2f 2f 6f 63 73 70 2e 70 6b 69 2e 67 6f 6f  p://ocsp.pki.goo
0210:  67 2f 67 74 73 31 6f 31 30 2b 06 08 2b 06 01 05  g/gts1o10+..+...
0220:  05 07 30 02 86 1f 68 74 74 70 3a 2f 2f 70 6b 69  ..0...http://pki
0230:  2e 67 6f 6f 67 2f 67 73 72 32 2f 47 54 53 31 4f  .goog/gsr2/GTS1O
0240:  31 2e 63 72 74 30 82 04 9d 06 03 55 1d 11 04 82  1.crt0.....U....
0250:  04 94 30 82 04 90 82 0c 2a 2e 67 6f 6f 67 6c 65  ..0.....*.google
0260:  2e 63 6f 6d 82 0d 2a 2e 61 6e 64 72 6f 69 64 2e  .com..*.android.
0270:  63 6f 6d 82 16 2a 2e 61 70 70 65 6e 67 69 6e 65  com..*.appengine
0280:  2e 67 6f 6f 67 6c 65 2e 63 6f 6d 82 12 2a 2e 63  .google.com..*.c
0290:  6c 6f 75 64 2e 67 6f 6f 67 6c 65 2e 63 6f 6d 82  loud.google.com.
02a0:  18 2a 2e 63 72 6f 77 64 73 6f 75 72 63 65 2e 67  .*.crowdsource.g
02b0:  6f 6f 67 6c 65 2e 63 6f 6d 82 06 2a 2e 67 2e 63  oogle.com..*.g.c
02c0:  6f 82 0e 2a 2e 67 63 70 2e 67 76 74 32 2e 63 6f  o..*.gcp.gvt2.co
02d0:  6d 82 11 2a 2e 67 63 70 63 64 6e 2e 67 76 74 31  m..*.gcpcdn.gvt1
02e0:  2e 63 6f 6d 82 0a 2a 2e 67 67 70 68 74 2e 63 6e  .com..*.ggpht.cn
02f0:  82 0e 2a 2e 67 6b 65 63 6e 61 70 70 73 2e 63 6e  ..*.gkecnapps.cn
0300:  82 16 2a 2e 67 6f 6f 67 6c 65 2d 61 6e 61 6c 79  ..*.google-analy
0310:  74 69 63 73 2e 63 6f 6d 82 0b 2a 2e 67 6f 6f 67  tics.com..*.goog
0320:  6c 65 2e 63 61 82 0b 2a 2e 67 6f 6f 67 6c 65 2e  le.ca..*.google.
0330:  63 6c 82 0e 2a 2e 67 6f 6f 67 6c 65 2e 63 6f 2e  cl..*.google.co.
0340:  69 6e 82 0e 2a 2e 67 6f 6f 67 6c 65 2e 63 6f 2e  in..*.google.co.
0350:  6a 70 82 0e 2a 2e 67 6f 6f 67 6c 65 2e 63 6f 2e  jp..*.google.co.
0360:  75 6b 82 0f 2a 2e 67 6f 6f 67 6c 65 2e 63 6f 6d  uk..*.google.com
0370:  2e 61 72 82 0f 2a 2e 67 6f 6f 67 6c 65 2e 63 6f  .ar..*.google.co
0380:  6d 2e 61 75 82 0f 2a 2e 67 6f 6f 67 6c 65 2e 63  m.au..*.google.c
0390:  6f 6d 2e 62 72 82 0f 2a 2e 67 6f 6f 67 6c 65 2e  om.br..*.google.
03a0:  63 6f 6d 2e 63 6f 82 0f 2a 2e 67 6f 6f 67 6c 65  com.co..*.google
03b0:  2e 63 6f 6d 2e 6d 78 82 0f 2a 2e 67 6f 6f 67 6c  .com.mx..*.googl
03c0:  65 2e 63 6f 6d 2e 74 72 82 0f 2a 2e 67 6f 6f 67  e.com.tr..*.goog
03d0:  6c 65 2e 63 6f 6d 2e 76 6e 82 0b 2a 2e 67 6f 6f  le.com.vn..*.goo
03e0:  67 6c 65 2e 64 65 82 0b 2a 2e 67 6f 6f 67 6c 65  gle.de..*.google
03f0:  2e 65 73 82 0b 2a 2e 67 6f 6f 67 6c 65 2e 66 72  .es..*.google.fr
0400:  82 0b 2a 2e 67 6f 6f 67 6c 65 2e 68 75 82 0b 2a  ..*.google.hu..*
0410:  2e 67 6f 6f 67 6c 65 2e 69 74 82 0b 2a 2e 67 6f  .google.it..*.go
0420:  6f 67 6c 65 2e 6e 6c 82 0b 2a 2e 67 6f 6f 67 6c  ogle.nl..*.googl
0430:  65 2e 70 6c 82 0b 2a 2e 67 6f 6f 67 6c 65 2e 70  e.pl..*.google.p
0440:  74 82 12 2a 2e 67 6f 6f 67 6c 65 61 64 61 70 69  t..*.googleadapi
0450:  73 2e 63 6f 6d 82 0f 2a 2e 67 6f 6f 67 6c 65 61  s.com..*.googlea
0460:  70 69 73 2e 63 6e 82 11 2a 2e 67 6f 6f 67 6c 65  pis.cn..*.google
0470:  63 6e 61 70 70 73 2e 63 6e 82 14 2a 2e 67 6f 6f  cnapps.cn..*.goo
0480:  67 6c 65 63 6f 6d 6d 65 72 63 65 2e 63 6f 6d 82  glecommerce.com.
0490:  11 2a 2e 67 6f 6f 67 6c 65 76 69 64 65 6f 2e 63  .*.googlevideo.c
04a0:  6f 6d 82 0c 2a 2e 67 73 74 61 74 69 63 2e 63 6e  om..*.gstatic.cn
04b0:  82 0d 2a 2e 67 73 74 61 74 69 63 2e 63 6f 6d 82  ..*.gstatic.com.
04c0:  12 2a 2e 67 73 74 61 74 69 63 63 6e 61 70 70 73  .*.gstaticcnapps
04d0:  2e 63 6e 82 0a 2a 2e 67 76 74 31 2e 63 6f 6d 82  .cn..*.gvt1.com.
04e0:  0a 2a 2e 67 76 74 32 2e 63 6f 6d 82 14 2a 2e 6d  .*.gvt2.com..*.m
04f0:  65 74 72 69 63 2e 67 73 74 61 74 69 63 2e 63 6f  etric.gstatic.co
0500:  6d 82 0c 2a 2e 75 72 63 68 69 6e 2e 63 6f 6d 82  m..*.urchin.com.
0510:  10 2a 2e 75 72 6c 2e 67 6f 6f 67 6c 65 2e 63 6f  .*.url.google.co
0520:  6d 82 13 2a 2e 77 65 61 72 2e 67 6b 65 63 6e 61  m..*.wear.gkecna
0530:  70 70 73 2e 63 6e 82 16 2a 2e 79 6f 75 74 75 62  pps.cn..*.youtub
0540:  65 2d 6e 6f 63 6f 6f 6b 69 65 2e 63 6f 6d 82 0d  e-nocookie.com..
0550:  2a 2e 79 6f 75 74 75 62 65 2e 63 6f 6d 82 16 2a  *.youtube.com..*
0560:  2e 79 6f 75 74 75 62 65 65 64 75 63 61 74 69 6f  .youtubeeducatio
0570:  6e 2e 63 6f 6d 82 11 2a 2e 79 6f 75 74 75 62 65  n.com..*.youtube
0580:  6b 69 64 73 2e 63 6f 6d 82 07 2a 2e 79 74 2e 62  kids.com..*.yt.b
0590:  65 82 0b 2a 2e 79 74 69 6d 67 2e 63 6f 6d 82 1a  e..*.ytimg.com..
05a0:  61 6e 64 72 6f 69 64 2e 63 6c 69 65 6e 74 73 2e  android.clients.
05b0:  67 6f 6f 67 6c 65 2e 63 6f 6d 82 0b 61 6e 64 72  google.com..andr
05c0:  6f 69 64 2e 63 6f 6d 82 1b 64 65 76 65 6c 6f 70  oid.com..develop
05d0:  65 72 2e 61 6e 64 72 6f 69 64 2e 67 6f 6f 67 6c  er.android.googl
05e0:  65 2e 63 6e 82 1c 64 65 76 65 6c 6f 70 65 72 73  e.cn..developers
05f0:  2e 61 6e 64 72 6f 69 64 2e 67 6f 6f 67 6c 65 2e  .android.google.
0600:  63 6e 82 04 67 2e 63 6f 82 08 67 67 70 68 74 2e  cn..g.co..ggpht.
0610:  63 6e 82 0c 67 6b 65 63 6e 61 70 70 73 2e 63 6e  cn..gkecnapps.cn
0620:  82 06 67 6f 6f 2e 67 6c 82 14 67 6f 6f 67 6c 65  ..goo.gl..google
0630:  2d 61 6e 61 6c 79 74 69 63 73 2e 63 6f 6d 82 0a  -analytics.com..
0640:  67 6f 6f 67 6c 65 2e 63 6f 6d 82 0f 67 6f 6f 67  google.com..goog
0650:  6c 65 63 6e 61 70 70 73 2e 63 6e 82 12 67 6f 6f  lecnapps.cn..goo
0660:  67 6c 65 63 6f 6d 6d 65 72 63 65 2e 63 6f 6d 82  glecommerce.com.
0670:  18 73 6f 75 72 63 65 2e 61 6e 64 72 6f 69 64 2e  .source.android.
0680:  67 6f 6f 67 6c 65 2e 63 6e 82 0a 75 72 63 68 69  google.cn..urchi
0690:  6e 2e 63 6f 6d 82 0a 77 77 77 2e 67 6f 6f 2e 67  n.com..www.goo.g
06a0:  6c 82 08 79 6f 75 74 75 2e 62 65 82 0b 79 6f 75  l..youtu.be..you
06b0:  74 75 62 65 2e 63 6f 6d 82 14 79 6f 75 74 75 62  tube.com..youtub
06c0:  65 65 64 75 63 61 74 69 6f 6e 2e 63 6f 6d 82 0f  eeducation.com..
06d0:  79 6f 75 74 75 62 65 6b 69 64 73 2e 63 6f 6d 82  youtubekids.com.
06e0:  05 79 74 2e 62 65 30 21 06 03 55 1d 20 04 1a 30  .yt.be0!..U. ..0
06f0:  18 30 08 06 06 67 81 0c 01 02 02 30 0c 06 0a 2b  .0...g.....0...+
0700:  06 01 04 01 d6 79 02 05 03 30 2f 06 03 55 1d 1f  .....y...0/..U..
0710:  04 28 30 26 30 24 a0 22 a0 20 86 1e 68 74 74 70  .(0&0$.". ..http
0720:  3a 2f 2f 63 72 6c 2e 70 6b 69 2e 67 6f 6f 67 2f  ://crl.pki.goog/
0730:  47 54 53 31 4f 31 2e 63 72 6c 30 82 01 06 06 0a  GTS1O1.crl0.....
0740:  2b 06 01 04 01 d6 79 02 04 02 04 81 f7 04 81 f4  +.....y.........
0750:  00 f2 00 77 00 b2 1e 05 cc 8b a2 cd 8a 20 4e 87  ...w......... N.
0760:  66 f9 2b b9 8a 25 20 67 6b da fa 70 e7 b2 49 53  f.+..% gk..p..IS
0770:  2d ef 8b 90 5e 00 00 01 6e 3a be 51 db 00 00 04  -...^...n:.Q....
0780:  03 00 48 30 46 02 21 00 e9 39 5f 3d bb 91 2a 38  ..H0F.!..9_=..*8
0790:  03 77 ba d4 bd be f5 ca e9 bf 6a c2 76 20 b2 24  .w........j.v .$
07a0:  6f 4c 33 f3 2a 3f d1 32 02 21 00 9b 5f e6 f3 cc  oL3.*?.2.!.._...
07b0:  eb 41 d8 24 32 0c 20 3a de 50 9f 45 25 73 75 81  .A.$2. :.P.E%su.
07c0:  9f 34 88 f0 96 6b 75 c9 7c cb fd 00 77 00 5e a7  .4...ku.|...w.^.
07d0:  73 f9 df 56 c0 e7 b5 36 48 7d d0 49 e0 32 7a 91  s..V...6H}.I.2z.
07e0:  9a 0c 84 a1 12 12 84 18 75 96 81 71 45 58 00 00  ........u..qEX..
07f0:  01 6e 3a be 52 0e 00 00 04 03 00 48 30 46 02 21  .n:.R......H0F.!
0800:  00 96 eb 89 4e e9 d0 5f eb 0e bd 1b 60 a0 68 b9  ....N.._....`.h.
0810:  15 68 cb 99 2c 9f 91 1f 45 a3 19 53 23 02 3d 30  .h..,...E..S#.=0
0820:  f0 02 21 00 eb bc ea 62 93 91 06 90 a0 87 41 84  ..!....b......A.
0830:  33 8c 78 c4 26 cf fa a0 c3 7c b2 77 ec 16 46 ac  3.x.&....|.w..F.
0840:  a4 2d 69 67 30 0d 06 09 2a 86 48 86 f7 0d 01 01  .-ig0...*.H.....
0850:  0b 05 00 03 82 01 01 00 4b 6a 5c 3e 1a dd b2 40  ........Kj\>...@
0860:  08 6f 79 40 0a fc d5 9a 7c 46 6f f7 46 04 76 7d  .oy@....|Fo.F.v}
0870:  b4 86 1e dd ae d4 12 67 15 9e 5d 66 94 dc d6 58  .......g..]f...X
0880:  b6 a4 6e 15 f2 9a a2 4e f5 76 5d 0f ef 8b 55 ba  ..n....N.v]...U.
0890:  d2 fd 34 c5 5e 44 c2 f2 cf 83 fb 7c 4b b0 0d f5  ..4.^D.....|K...
08a0:  29 c2 9a 09 17 2c fe 4d e2 89 b9 f1 a3 a0 d0 31  )....,.M.......1
08b0:  7b e8 e7 66 9a 75 98 78 36 2a 1c 11 a6 cc 52 0c  {..f.u.x6*....R.
08c0:  e3 67 2e 57 3c de be 62 e0 bf e5 4b 6f 46 60 b6  .g.W<..b...KoF`.
08d0:  84 43 9f c4 d9 19 2b b5 a1 85 f2 6a f8 ca 13 b8  .C....+....j....
08e0:  85 79 83 6d b5 1a 95 82 a6 b9 c5 98 c6 fd 24 28  .y.m..........$(
08f0:  d9 83 78 d1 f3 c9 00 a0 84 d4 47 ba c9 9c a5 d0  ..x.......G.....
0900:  2c eb bb 1c 89 e5 b8 1a dc 82 0f 66 e7 f0 2e 9b  ,..........f....
0910:  dc 9f 05 5d d3 c9 e0 ff 2d 6c 22 df aa 8b f6 38  ...]....-l"....8
0920:  76 87 c2 fd fa 9d 23 2e 94 1c 60 e0 f5 e5 80 be  v.....#...`.....
0930:  8e dc 73 bc 18 b3 a8 e9 e5 ae 2e 9c 64 1d f8 b0  ..s.........d...
0940:  74 ac 5b c6 52 18 5a 4b bd ac d6 f0 09 a5 b2 0b  t.[.R.ZK........
0950:  6d d7 6d 70 36 8d 5e 85 00 04 4e 30 82 04 4a 30  m.mp6.^...N0..J0
0960:  82 03 32 a0 03 02 01 02 02 0d 01 e3 b4 9a a1 8d  ..2.............
0970:  8a a9 81 25 69 50 b8 30 0d 06 09 2a 86 48 86 f7  ...%iP.0...*.H..
0980:  0d 01 01 0b 05 00 30 4c 31 20 30 1e 06 03 55 04  ......0L1 0...U.
0990:  0b 13 17 47 6c 6f 62 61 6c 53 69 67 6e 20 52 6f  ...GlobalSign Ro
09a0:  6f 74 20 43 41 20 2d 20 52 32 31 13 30 11 06 03  ot CA - R21.0...
09b0:  55 04 0a 13 0a 47 6c 6f 62 61 6c 53 69 67 6e 31  U....GlobalSign1
09c0:  13 30 11 06 03 55 04 03 13 0a 47 6c 6f 62 61 6c  .0...U....Global
09d0:  53 69 67 6e 30 1e 17 0d 31 37 30 36 31 35 30 30  Sign0...17061500
09e0:  30 30 34 32 5a 17 0d 32 31 31 32 31 35 30 30 30  0042Z..211215000
09f0:  30 34 32 5a 30 42 31 0b 30 09 06 03 55 04 06 13  042Z0B1.0...U...
0a00:  02 55 53 31 1e 30 1c 06 03 55 04 0a 13 15 47 6f  .US1.0...U....Go
0a10:  6f 67 6c 65 20 54 72 75 73 74 20 53 65 72 76 69  ogle Trust Servi
0a20:  63 65 73 31 13 30 11 06 03 55 04 03 13 0a 47 54  ces1.0...U....GT
0a30:  53 20 43 41 20 31 4f 31 30 82 01 22 30 0d 06 09  S CA 1O10.."0...
0a40:  2a 86 48 86 f7 0d 01 01 01 05 00 03 82 01 0f 00  *.H.............
0a50:  30 82 01 0a 02 82 01 01 00 d0 18 cf 45 d4 8b cd  0...........E...
0a60:  d3 9c e4 40 ef 7e b4 dd 69 21 1b c9 cf 3c 8e 4c  ...@.~..i!...<.L
0a70:  75 b9 0f 31 19 84 3d 9e 3c 29 ef 50 0d 10 93 6f  u..1..=.<).P...o
0a80:  05 80 80 9f 2a a0 bd 12 4b 02 e1 3d 9f 58 16 24  ....*...K..=.X.$
0a90:  fe 30 9f 0b 74 77 55 93 1d 4b f7 4d e1 92 82 10  .0..twU..K.M....
0aa0:  f6 51 ac 0c c3 b2 22 94 0f 34 6b 98 10 49 e7 0b  .Q...."..4k..I..
0ab0:  9d 83 39 dd 20 c6 1c 2d ef d1 18 61 65 e7 23 83  ..9. ..-...ae.#.
0ac0:  20 a8 23 12 ff d2 24 7f d4 2f e7 44 6a 5b 4d d7   .#...$../.Dj[M.
0ad0:  50 66 b0 af 9e 42 63 05 fb e0 1c c4 63 61 af 9f  Pf...Bc.....ca..
0ae0:  6a 33 ff 62 97 bd 48 d9 d3 7c 14 67 dc 75 dc 2e  j3.b..H..|.g.u..
0af0:  69 e8 f8 6d 78 69 d0 b7 10 05 b8 f1 31 c2 3b 24  i..mxi......1.;$
0b00:  fd 1a 33 74 f8 23 e0 ec 6b 19 8a 16 c6 e3 cd a4  ..3t.#..k.......
0b10:  cd 0b db b3 a4 59 60 38 88 3b ad 1d b9 c6 8c a7  .....Y`8.;......
0b20:  53 1b fc bc d9 a4 ab bc dd 3c 61 d7 93 15 98 ee  S........<a.....
0b30:  81 bd 8f e2 64 47 20 40 06 4e d7 ac 97 e8 b9 c0  ....dG @.N......
0b40:  59 12 a1 49 25 23 e4 ed 70 34 2c a5 b4 63 7c f9  Y..I%#..p4,..c|.
0b50:  a3 3d 83 d1 cd 6d 24 ac 07 02 03 01 00 01 a3 82  .=...m$.........
0b60:  01 33 30 82 01 2f 30 0e 06 03 55 1d 0f 01 01 ff  .30../0...U.....
0b70:  04 04 03 02 01 86 30 1d 06 03 55 1d 25 04 16 30  ......0...U.%..0
0b80:  14 06 08 2b 06 01 05 05 07 03 01 06 08 2b 06 01  ...+.........+..
0b90:  05 05 07 03 02 30 12 06 03 55 1d 13 01 01 ff 04  .....0...U......
0ba0:  08 30 06 01 01 ff 02 01 00 30 1d 06 03 55 1d 0e  .0.......0...U..
0bb0:  04 16 04 14 98 d1 f8 6e 10 eb cf 9b ec 60 9f 18  .......n.....`..
0bc0:  90 1b a0 eb 7d 09 fd 2b 30 1f 06 03 55 1d 23 04  ....}..+0...U.#.
0bd0:  18 30 16 80 14 9b e2 07 57 67 1c 1e c0 6a 06 de  .0......Wg...j..
0be0:  59 b4 9a 2d df dc 19 86 2e 30 35 06 08 2b 06 01  Y..-.....05..+..
0bf0:  05 05 07 01 01 04 29 30 27 30 25 06 08 2b 06 01  ......)0'0%..+..
0c00:  05 05 07 30 01 86 19 68 74 74 70 3a 2f 2f 6f 63  ...0...http://oc
0c10:  73 70 2e 70 6b 69 2e 67 6f 6f 67 2f 67 73 72 32  sp.pki.goog/gsr2
0c20:  30 32 06 03 55 1d 1f 04 2b 30 29 30 27 a0 25 a0  02..U...+0)0'.%.
0c30:  23 86 21 68 74 74 70 3a 2f 2f 63 72 6c 2e 70 6b  #.!http://crl.pk
0c40:  69 2e 67 6f 6f 67 2f 67 73 72 32 2f 67 73 72 32  i.goog/gsr2/gsr2
0c50:  2e 63 72 6c 30 3f 06 03 55 1d 20 04 38 30 36 30  .crl0?..U. .8060
0c60:  34 06 06 67 81 0c 01 02 02 30 2a 30 28 06 08 2b  4..g.....0*0(..+
0c70:  06 01 05 05 07 02 01 16 1c 68 74 74 70 73 3a 2f  .........https:/
0c80:  2f 70 6b 69 2e 67 6f 6f 67 2f 72 65 70 6f 73 69  /pki.goog/reposi
0c90:  74 6f 72 79 2f 30 0d 06 09 2a 86 48 86 f7 0d 01  tory/0...*.H....
0ca0:  01 0b 05 00 03 82 01 01 00 1a 80 3e 36 79 fb f3  ...........>6y..
0cb0:  2e a9 46 37 7d 5e 54 16 35 ae c7 4e 08 99 fe bd  ..F7}^T.5..N....
0cc0:  d1 34 69 26 52 66 07 3d 0a ba 49 cb 62 f4 f1 1a  .4i&Rf.=..I.b...
0cd0:  8e fc 11 4f 68 96 4c 74 2b d3 67 de b2 a3 aa 05  ...Oh.Lt+.g.....
0ce0:  8d 84 4d 4c 20 65 0f a5 96 da 0d 16 f8 6c 3b db  ..ML e.......l;.
0cf0:  6f 04 23 88 6b 3a 6c c1 60 bd 68 9f 71 8e ee 2d  o.#.k:l.`.h.q..-
0d00:  58 34 07 f0 d5 54 e9 86 59 fd 7b 5e 0d 21 94 f5  X4...T..Y.{^.!..
0d10:  8c c9 a8 f8 d8 f2 ad cc 0f 1a f3 9a a7 a9 04 27  ...............'
0d20:  f9 a3 c9 b0 ff 02 78 6b 61 ba c7 35 2b e8 56 fa  ......xka..5+.V.
0d30:  4f c3 1c 0c ed b6 3c b4 4b ea ed cc e1 3c ec dc  O.....<.K....<..
0d40:  0d 8c d6 3e 9b ca 42 58 8b cc 16 21 17 40 bc a2  ...>..BX...!.@..
0d50:  d6 66 ef da c4 15 5b cd 89 aa 9b 09 26 e7 32 d2  .f....[.....&.2.
0d60:  0d 6e 67 20 02 5b 10 b0 90 09 9c 0c 1f 9e ad d8  .ng .[..........
0d70:  3b ea a1 fc 6c e8 10 5c 08 52 19 51 2a 71 bb ac  ;...l..\.R.Q*q..
0d80:  7a b5 dd 15 ed 2b c9 08 2a 2c 8a b4 a6 21 ab 63  z....+..*,...!.c
0d90:  ff d7 52 49 50 d0 89 b7 ad f2 af fb 50 ae 2f e1  ..RIP.......P./.
0da0:  95 0d f3 46 ad 9d 9c f5 ca                       ...F.....
handshake message: msglen = 3492, type = 11, hslen = 3492

----- Contiues in next post ----

— Continue debug log ----

<= read record
peer certificate #1:
cert. version     : 3
serial number     : 21:DD:BB:E8:FB:43:60:09:08:00:00:00:00:1D:8A:46
issuer name       : C=US, O=Google Trust Services, CN=GTS CA 1O1
subject name      : C=US, ST=California, L=Mountain View, O=Google LLC, CN=*.google.com
issued  on        : 2019-11-05 07:46:16
expires on        : 2020-01-28 07:46:16
signed using      : RSA with SHA-256
EC key size       : 256 bits
basic constraints : CA=false
value of 'crt->eckey.Q(X)' (255 bits) is:
 44 f0 58 f7 48 88 93 f6 11 78 84 f9 81 f8 a0 a8
 0d 35 3f ef 81 f1 45 7f a4 ac 9b bf 94 80 97 f4
value of 'crt->eckey.Q(Y)' (256 bits) is:
 a9 9f a8 63 ad f1 a9 f8 44 6c e2 ee d0 9d 1a 81
 76 b9 a0 b1 98 90 c7 9d 80 78 70 02 0b 3f 17 6e
peer certificate #2:
cert. version     : 3
serial number     : 01:E3:B4:9A:A1:8D:8A:A9:81:25:69:50:B8
issuer name       : OU=GlobalSign Root CA - R2, O=GlobalSign, CN=GlobalSign
subject name      : C=US, O=Google Trust Services, CN=GTS CA 1O1
issued  on        : 2017-06-15 00:00:42
expires on        : 2021-12-15 00:00:42
signed using      : RSA with SHA-256
RSA key size      : 2048 bits
basic constraints : CA=true, max_pathlen=0
key usage         : Digital Signature, Key Cert Sign, CRL Sign
ext key usage     : TLS Web Server Authentication, TLS Web Client Authentication
value of 'crt->rsa.N' (2048 bits) is:
 d0 18 cf 45 d4 8b cd d3 9c e4 40 ef 7e b4 dd 69
 21 1b c9 cf 3c 8e 4c 75 b9 0f 31 19 84 3d 9e 3c
 29 ef 50 0d 10 93 6f 05 80 80 9f 2a a0 bd 12 4b
 02 e1 3d 9f 58 16 24 fe 30 9f 0b 74 77 55 93 1d
 4b f7 4d e1 92 82 10 f6 51 ac 0c c3 b2 22 94 0f
 34 6b 98 10 49 e7 0b 9d 83 39 dd 20 c6 1c 2d ef
 d1 18 61 65 e7 23 83 20 a8 23 12 ff d2 24 7f d4
 2f e7 44 6a 5b 4d d7 50 66 b0 af 9e 42 63 05 fb
 e0 1c c4 63 61 af 9f 6a 33 ff 62 97 bd 48 d9 d3
 7c 14 67 dc 75 dc 2e 69 e8 f8 6d 78 69 d0 b7 10
 05 b8 f1 31 c2 3b 24 fd 1a 33 74 f8 23 e0 ec 6b
 19 8a 16 c6 e3 cd a4 cd 0b db b3 a4 59 60 38 88
 3b ad 1d b9 c6 8c a7 53 1b fc bc d9 a4 ab bc dd
 3c 61 d7 93 15 98 ee 81 bd 8f e2 64 47 20 40 06
 4e d7 ac 97 e8 b9 c0 59 12 a1 49 25 23 e4 ed 70
 34 2c a5 b4 63 7c f9 a3 3d 83 d1 cd 6d 24 ac 07
value of 'crt->rsa.E' (17 bits) is:
 01 00 01
Certificate verification flags clear
<= parse certificate
client state: 4
=> flush output
<= flush output
=> parse server key exchange
=> read record
=> fetch input
in_left: 0, nb_want: 5
in_left: 0, nb_want: 5
ssl->f_recv(_timeout)() returned 5 (-0xfffffffb)
<= fetch input
dumping 'input record header' (5 bytes)
0000:  16 03 03 00 93                                   .....
input record: msgtype = 22, version = [3:3], msglen = 147
=> fetch input
in_left: 5, nb_want: 152
in_left: 5, nb_want: 152
ssl->f_recv(_timeout)() returned 147 (-0xffffff6d)
<= fetch input
dumping 'input record from network' (152 bytes)
0000:  16 03 03 00 93 0c 00 00 8f 03 00 17 41 04 4c ec  ............A.L.
0010:  cf 3d af e3 e8 de c9 5c 23 da 79 06 9f ea 35 a1  .=.....\#.y...5.
0020:  89 40 64 73 0c 3c bb 16 68 c6 6f 45 d5 94 e0 08  .@ds.<..h.oE....
0030:  91 7b f1 9e f4 b4 b2 c8 6b 06 1e 67 95 50 37 51  .{......k..g.P7Q
0040:  6e 82 34 e6 6b 49 6d 9c eb ed 42 da 1d 7a 04 03  n.4.kIm...B..z..
0050:  00 46 30 44 02 20 54 98 e5 59 d7 74 a5 e6 56 93  .F0D. T..Y.t..V.
0060:  42 a7 c6 a0 3b cf 5b 02 5c 97 af c9 00 2a 13 c2  B...;.[.\....*..
0070:  89 28 09 95 b3 55 02 20 5d 9a e3 c8 0c e7 ae 59  .(...U. ]......Y
0080:  36 d5 29 87 c0 a4 38 20 53 3a 6d d2 88 5f 69 25  6.)...8 S:m.._i%
0090:  e4 30 66 e3 c1 0f d6 c3                          .0f.....
handshake message: msglen = 147, type = 12, hslen = 147
<= read record
dumping 'server key exchange' (143 bytes)
0000:  03 00 17 41 04 4c ec cf 3d af e3 e8 de c9 5c 23  ...A.L..=.....\#
0010:  da 79 06 9f ea 35 a1 89 40 64 73 0c 3c bb 16 68  .y...5..@ds.<..h
0020:  c6 6f 45 d5 94 e0 08 91 7b f1 9e f4 b4 b2 c8 6b  .oE.....{......k
0030:  06 1e 67 95 50 37 51 6e 82 34 e6 6b 49 6d 9c eb  ..g.P7Qn.4.kIm..
0040:  ed 42 da 1d 7a 04 03 00 46 30 44 02 20 54 98 e5  .B..z...F0D. T..
0050:  59 d7 74 a5 e6 56 93 42 a7 c6 a0 3b cf 5b 02 5c  Y.t..V.B...;.[.\
0060:  97 af c9 00 2a 13 c2 89 28 09 95 b3 55 02 20 5d  ....*...(...U. ]
0070:  9a e3 c8 0c e7 ae 59 36 d5 29 87 c0 a4 38 20 53  ......Y6.)...8 S
0080:  3a 6d d2 88 5f 69 25 e4 30 66 e3 c1 0f d6 c3     :m.._i%.0f.....
ECDH curve: secp256r1
value of 'ECDH: Qp(X)' (255 bits) is:
 4c ec cf 3d af e3 e8 de c9 5c 23 da 79 06 9f ea
 35 a1 89 40 64 73 0c 3c bb 16 68 c6 6f 45 d5 94
value of 'ECDH: Qp(Y)' (256 bits) is:
 e0 08 91 7b f1 9e f4 b4 b2 c8 6b 06 1e 67 95 50
 37 51 6e 82 34 e6 6b 49 6d 9c eb ed 42 da 1d 7a
Server used SignatureAlgorithm 3
Server used HashAlgorithm 4
dumping 'signature' (70 bytes)
0000:  30 44 02 20 54 98 e5 59 d7 74 a5 e6 56 93 42 a7  0D. T..Y.t..V.B.
0010:  c6 a0 3b cf 5b 02 5c 97 af c9 00 2a 13 c2 89 28  ..;.[.\....*...(
0020:  09 95 b3 55 02 20 5d 9a e3 c8 0c e7 ae 59 36 d5  ...U. ]......Y6.
0030:  29 87 c0 a4 38 20 53 3a 6d d2 88 5f 69 25 e4 30  )...8 S:m.._i%.0
0040:  66 e3 c1 0f d6 c3                                f.....
dumping 'parameters hash' (32 bytes)
0000:  94 fa fa 94 5e 2f 66 c9 84 5e ba ca f6 d8 a8 bb  ....^/f..^......
0010:  83 c6 67 d8 a7 49 9c 5c cb 9a d3 7c 5c eb bd 0e  ..g..I.\...|\...
<= parse server key exchange
client state: 5
=> flush output
<= flush output
=> parse certificate request
=> read record
=> fetch input
in_left: 0, nb_want: 5
in_left: 0, nb_want: 5
ssl->f_recv(_timeout)() returned 5 (-0xfffffffb)
<= fetch input
dumping 'input record header' (5 bytes)
0000:  16 03 03 00 04                                   .....
input record: msgtype = 22, version = [3:3], msglen = 4
=> fetch input
in_left: 5, nb_want: 9
in_left: 5, nb_want: 9
ssl->f_recv(_timeout)() returned 4 (-0xfffffffc)
<= fetch input
dumping 'input record from network' (9 bytes)
0000:  16 03 03 00 04 0e 00 00 00                       .........
handshake message: msglen = 4, type = 14, hslen = 4
<= read record
got no certificate request
<= parse certificate request
client state: 6
=> flush output
<= flush output
=> parse server hello done
=> read record
<= reuse previously read message
<= read record
<= parse server hello done
client state: 7
=> flush output
<= flush output
=> write certificate
<= skip write certificate
client state: 8
=> flush output
<= flush output
=> write client key exchange
value of 'ECDH: Q(X)' (256 bits) is:
 b3 6e 99 69 c0 53 ac e9 39 e9 c7 09 a3 13 fb f2
 2b 13 80 4d 65 07 07 55 cf fb c3 0a b3 f0 7e 5f
value of 'ECDH: Q(Y)' (256 bits) is:
 aa 2f 8a cd 19 d5 92 5c f8 af bc 03 bd 89 18 de
 c0 ee 48 1d 5d 42 46 2f 22 50 a5 e3 1d b4 3e 11
value of 'ECDH: z' (254 bits) is:
 29 3c 22 a5 eb d4 d3 34 58 94 e0 da 19 4d 29 00
 ef 90 a6 38 8d cc 6b 3f fb c3 ae b7 93 0f 65 7d
=> write record
output record: msgtype = 22, version = [3:3], msglen = 70
dumping 'output record sent to network' (75 bytes)
0000:  16 03 03 00 46 10 00 00 42 41 04 b3 6e 99 69 c0  ....F...BA..n.i.
0010:  53 ac e9 39 e9 c7 09 a3 13 fb f2 2b 13 80 4d 65  S..9.......+..Me
0020:  07 07 55 cf fb c3 0a b3 f0 7e 5f aa 2f 8a cd 19  ..U......~_./...
0030:  d5 92 5c f8 af bc 03 bd 89 18 de c0 ee 48 1d 5d  ..\..........H.]
0040:  42 46 2f 22 50 a5 e3 1d b4 3e 11                 BF/"P....>.
=> flush output
message length: 75, out_left: 75
ssl->f_send() returned 75 (-0xffffffb5)
<= flush output
<= write record
<= write client key exchange
client state: 9
=> flush output
<= flush output
=> write certificate verify
=> derive keys
dumping 'premaster secret' (32 bytes)
0000:  29 3c 22 a5 eb d4 d3 34 58 94 e0 da 19 4d 29 00  )<"....4X....M).
0010:  ef 90 a6 38 8d cc 6b 3f fb c3 ae b7 93 0f 65 7d  ...8..k?......e}
using extended master secret
=> calc verify sha256
dumping 'calculated verify result' (32 bytes)
0000:  ef 14 db 4a 3d 95 2d 05 2d 62 69 65 3d df 92 32  ...J=.-.-bie=..2
0010:  8e 6d c3 f2 26 b5 60 68 33 86 32 e4 68 52 21 d6  .m..&.`h3.2.hR!.
<= calc verify
dumping 'session hash' (32 bytes)
0000:  ef 14 db 4a 3d 95 2d 05 2d 62 69 65 3d df 92 32  ...J=.-.-bie=..2
0010:  8e 6d c3 f2 26 b5 60 68 33 86 32 e4 68 52 21 d6  .m..&.`h3.2.hR!.
ciphersuite = TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
dumping 'master secret' (48 bytes)
0000:  60 5e e3 85 f9 4b cb de c3 0b de ae f5 1d 93 94  `^...K..........
0010:  f5 79 5c b8 d7 51 f6 a1 6d bb f4 43 70 43 36 0d  .y\..Q..m..CpC6.
0020:  e4 69 e1 53 dd 25 dd a4 5a e1 d9 ef 6d 79 9d 09  .i.S.%..Z...my..
dumping 'random bytes' (64 bytes)
0000:  5d dd 3e 89 03 dd 20 ab 3d 3d 23 88 5c 30 17 d5  ].>... .==#.\0..
0010:  69 70 e6 1f 54 be e8 70 44 4f 57 4e 47 52 44 01  ip..T..pDOWNGRD.
0020:  95 76 2f 00 cf 5e 42 99 c3 6e 21 0c 3e 2d 80 41  .v/..^B..n!.>-.A
0030:  df 07 b4 8a 69 4e 50 79 6b a9 00 5b d1 dd ac 51  ....iNPyk..[...Q
dumping 'key block' (256 bytes)
0000:  67 3a d3 72 06 e8 4a 01 85 9f 2f 0b fd c0 11 01  g:.r..J.../.....
0010:  35 fe c1 81 40 84 6e ec a5 47 2f 5c 0a ed 92 fd  5...@.n..G/\....
0020:  47 63 15 b8 cf 4c 54 e0 18 7a 2c 16 be ce 0b 59  Gc...LT..z,....Y
0030:  56 53 0c 0b 7f 6b 23 89 d0 7f 98 26 67 2b ee 43  VS...k#....&g+.C
0040:  12 c0 61 a9 09 1e 8c da a7 e0 b1 87 38 94 55 f5  ..a.........8.U.
0050:  33 46 67 46 d3 b2 7b fb e8 ff 04 fd 90 2a a3 8b  3FgF..{......*..
0060:  09 ed db 39 82 e8 d5 d6 26 58 3e c1 45 ed fa d3  ...9....&X>.E...
0070:  8c 6d 6c fb eb ef 1e 33 c4 95 82 d5 94 dc 15 01  .ml....3........
0080:  e4 08 b8 f0 61 6d ec 3a 7e 07 ef 04 c5 32 93 e2  ....am.:~....2..
0090:  78 f9 3a 02 15 ca 68 d8 79 76 54 fc d2 ff 7e f5  x.:...h.yvT...~.
00a0:  48 e0 01 20 cc 01 f4 5e ee 09 f5 02 11 db d6 62  H.. ...^.......b
00b0:  a1 ba 3a ca 58 1a f2 c6 99 22 57 82 b4 fc d7 2d  ..:.X...."W....-
00c0:  c7 a2 78 8a be 1c 87 f9 3e b3 e2 26 59 84 bf da  ..x.....>..&Y...
00d0:  8e 65 48 85 5d 5f ef 8e 04 05 e4 58 48 e7 1f 79  .eH.]_.....XH..y
00e0:  52 4b b7 0b 64 7a d6 2d d0 ed f4 a0 90 5b 4b 24  RK..dz.-.....[K$
00f0:  5e 60 8f 3b 77 7a c1 dd 57 9f 97 56 13 76 48 2d  ^`.;wz..W..V.vH-
keylen: 16, minlen: 24, ivlen: 12, maclen: 0
<= derive keys
<= skip write certificate verify
client state: 10
=> flush output
<= flush output
=> write change cipher spec
=> write record
output record: msgtype = 20, version = [3:3], msglen = 1
dumping 'output record sent to network' (6 bytes)
0000:  14 03 03 00 01 01                                ......
=> flush output
message length: 6, out_left: 6
ssl->f_send() returned -26752 (-0x6880)
mbedtls_ssl_flush_output() returned -26752 (-0x6880)
mbedtls_ssl_write_record() returned -26752 (-0x6880)
<= handshake
=> handshake
client state: 11
=> flush output
message length: 6, out_left: 6
ssl->f_send() returned -26752 (-0x6880)
<= handshake
=> handshake
client state: 11
=> flush output
message length: 6, out_left: 6
ssl->f_send() returned -26752 (-0x6880)
<= handshake
=> handshake
client state: 11
=> flush output
message length: 6, out_left: 6
ssl->f_send() returned 6 (-0xfffffffa)
<= flush output
=> write finished
=> calc  finished tls sha256
dumping 'finished sha2 state' (32 bytes)
0000:  a2 77 4f 42 7d 88 8c 8c 58 3d 4c 59 b6 2c fe 11  .wOB}...X=LY.,..
0010:  99 d9 af 46 3c a8 49 59 6a 8c e7 3b c0 78 d8 2c  ...F<.IYj..;.x.,
dumping 'calc finished result' (12 bytes)
0000:  30 82 5f 69 bb 71 74 8a ca 9d 73 43              0._i.qt...sC
<= calc  finished
switching to new transform spec for outbound data
=> write record
=> encrypt buf
dumping 'before encrypt: output payload' (16 bytes)
0000:  14 00 00 0c 30 82 5f 69 bb 71 74 8a ca 9d 73 43  ....0._i.qt...sC
dumping 'additional data used for AEAD' (13 bytes)
0000:  00 00 00 00 00 00 00 00 16 03 03 00 10           .............
dumping 'IV used' (8 bytes)
0000:  00 00 00 00 00 00 00 00                          ........
before encrypt: msglen = 24, including 0 bytes of padding
dumping 'after encrypt: tag' (16 bytes)
0000:  5a 2d 41 92 eb 50 9a 59 ff 69 e4 02 52 31 12 ad  Z-A..P.Y.i..R1..
<= encrypt buf
output record: msgtype = 22, version = [3:3], msglen = 40
dumping 'output record sent to network' (45 bytes)
0000:  16 03 03 00 28 00 00 00 00 00 00 00 00 7d c7 1f  ....(........}..
0010:  b8 c2 a2 0c 9e 09 38 30 ef 6b 0b 13 62 5a 2d 41  ......80.k..bZ-A
0020:  92 eb 50 9a 59 ff 69 e4 02 52 31 12 ad           ..P.Y.i..R1..
=> flush output
message length: 45, out_left: 45
ssl->f_send() returned -26752 (-0x6880)
mbedtls_ssl_flush_output() returned -26752 (-0x6880)
mbedtls_ssl_write_record() returned -26752 (-0x6880)
<= handshake
=> handshake
client state: 12
=> flush output
message length: 45, out_left: 45
ssl->f_send() returned -26752 (-0x6880)
<= handshake
=> handshake
client state: 12
=> flush output
message length: 45, out_left: 45
ssl->f_send() returned -26752 (-0x6880)
<= handshake
=> handshake
client state: 12
=> flush output
message length: 45, out_left: 45
ssl->f_send() returned 45 (-0xffffffd3)
<= flush output
=> parse new session ticket
=> read record
=> fetch input
in_left: 0, nb_want: 5
in_left: 0, nb_want: 5
<= handshake
=> handshake
client state: 17
=> flush output
<= flush output
=> parse new session ticket
=> read record
=> fetch input
in_left: 0, nb_want: 5
in_left: 0, nb_want: 5
<= handshake
=> handshake
client state: 17
=> flush output
<= flush output
=> parse new session ticket
=> read record
=> fetch input
in_left: 0, nb_want: 5
in_left: 0, nb_want: 5
<= handshake
=> handshake
client state: 17
=> flush output
<= flush output
=> parse new session ticket
=> read record
=> fetch input
in_left: 0, nb_want: 5
in_left: 0, nb_want: 5
<= handshake
=> handshake
client state: 17
=> flush output
<= flush output
=> parse new session ticket
=> read record
=> fetch input
in_left: 0, nb_want: 5
in_left: 0, nb_want: 5
<= handshake
=> handshake
client state: 17
=> flush output
<= flush output
=> parse new session ticket
=> read record
=> fetch input
in_left: 0, nb_want: 5
in_left: 0, nb_want: 5
ssl->f_recv(_timeout)() returned 5 (-0xfffffffb)
<= fetch input
dumping 'input record header' (5 bytes)
0000:  16 03 03 00 3f                                   ....?
input record: msgtype = 22, version = [3:3], msglen = 63
=> fetch input
in_left: 5, nb_want: 68
in_left: 5, nb_want: 68
ssl->f_recv(_timeout)() returned 63 (-0xffffffc1)
<= fetch input
dumping 'input record from network' (68 bytes)
0000:  16 03 03 00 3f 02 00 00 3b 03 03 5d dd 3e 89 03  ....?...;..].>..
0010:  dd 20 ab 3d 3d 23 88 5c 30 17 d5 69 70 e6 1f 54  . .==#.\0..ip..T
0020:  be e8 70 44 4f 57 4e 47 52 44 01 00 c0 2b 00 00  ..pDOWNGRD...+..
0030:  13 00 17 00 00 ff 01 00 01 00 00 0b 00 02 01 00  ................
0040:  00 23 00 00                                      .#..
handshake message: msglen = 63, type = 2, hslen = 63
<= read record
bad new session ticket message
=> send alert message
send alert level=2 message=50
=> write record
=> encrypt buf
dumping 'before encrypt: output payload' (2 bytes)
0000:  02 32                                            .2
dumping 'additional data used for AEAD' (13 bytes)
0000:  00 00 00 00 00 00 00 01 15 03 03 00 02           .............
dumping 'IV used' (8 bytes)
0000:  00 00 00 00 00 00 00 01                          ........
before encrypt: msglen = 10, including 0 bytes of padding
dumping 'after encrypt: tag' (16 bytes)
0000:  7f 26 0b 9b ab c8 b9 47 d0 f0 af 6f 93 bf 3d d1  .&.....G...o..=.
<= encrypt buf
output record: msgtype = 21, version = [3:3], msglen = 26
dumping 'output record sent to network' (31 bytes)
0000:  15 03 03 00 1a 00 00 00 00 00 00 00 01 67 e4 7f  .............g..
0010:  26 0b 9b ab c8 b9 47 d0 f0 af 6f 93 bf 3d d1     &.....G...o..=.
=> flush output
message length: 31, out_left: 31
ssl->f_send() returned 31 (-0xffffffe1)
<= flush output
<= write record
<= send alert message
<= handshake

Thank you very much for any help
Regards.
Martin

Sorry, Just solved it myself.
It was a problem with the receive function
Thank you