[riot-notifications] [RIOT-OS/RIOT] pkg/tinydtls: add DTLS sock API implementation (#11943)

Raul Fuentes notifications at github.com
Sun Sep 29 19:35:44 CEST 2019


Testing with m3 nodes.
- Client PSK with Server PSK  is **OK**
- Client ECC with Server ECC : is **OK** (super slow, but is expected)
- Client PSK with Server ECC (must fail)  **Kernel panic**
- Client ECC with Server PSK (must fail) ** Kernel panic**

**NOTE**: This is not the case with `dtls-echo`
----

Client PSK  with a server ECC  we have  a kernel panic.

```�main(): This is RIOT! (Version: 2019.10-devel-1025-g24226-sock_dtls_impl)
DTLS sock example application
All up, running the shell now
> dtlsc fe80::1711:6b10:65f8:8f32 "To fail"
dtlsc fe80::1711:6b10:65f8:8f32 "To fail"
0x800f25b
*** RIOT kernel panic:
FAILED ASSERTION.

*** halted.
```

**NOTE**: Server is Ok after this one.

---

For the other kernel case, I had the debug enabled

```> dtlsc fe80::1711:6b10:65fd:bd36
dtlsc fe80::1711:6b10:65fd:bd36
usage dtlsc <addr> <data>
> dtlsc fe80::1711:6b10:65fd:bd36 "To fail also"
dtlsc fe80::1711:6b10:65fd:bd36 "To fail also"
Jan 01 00:09:39 DEBG DTLSv12: initialize HASH_SHA256
Jan 01 00:09:39 DEBG send handshake packet of type: client_hello (1)
Jan 01 00:09:39 DEBG send header: (zu bytes):
00000000 16 FE FF 00 00 00 00 00  00 00 00 00 52 
Jan 01 00:09:39 DEBG send unencrypted: (zu bytes):
00000000 01 00 00 46 00 00 00 00  00 00 00 46 
Jan 01 00:09:39 DEBG send unencrypted: (zu bytes):
00000000 FE FD 00 00 02 43 EB F7  15 4F C2 0D F9 2E 34 57 
00000010 E2 80 14 0A F2 17 1A 9B  24 F7 BD D0 EF CB 9F 50 
00000020 58 A7 00 00 00 02 C0 AE  01 00 00 1A 00 13 00 02 
00000030 01 02 00 14 00 02 01 02  00 0A 00 04 00 02 00 17 
00000040 00 0B 00 02 01 00 
Jan 01 00:09:39 DEBG dtls_handle_message: FOUND PEER
Jan 01 00:09:39 DEBG got packet 22 (44 bytes)
Jan 01 00:09:39 DEBG receive header: (zu bytes):
00000000 16 FE FF 00 00 00 00 00  00 00 00 00 1F 
Jan 01 00:09:39 DEBG receive unencrypted: (zu bytes):
00000000 03 00 00 13 00 00 00 00  00 00 00 13 FE FD 10 8A 
00000010 8E 51 7F 8E 37 9A 43 B2  CC 64 DC F2 7E 5C 3E 
Jan 01 00:09:39 DEBG received handshake packet of type: hello_verify_request (3)
Jan 01 00:09:39 DEBG handle handshake packet of type: hello_verify_request (3)
Jan 01 00:09:39 DEBG clear MAC
Jan 01 00:09:39 DEBG add MAC data: (zu bytes): 010000560001000000000056
Jan 01 00:09:39 DEBG add MAC data: (zu bytes): FEFD00000243EBF7154FC20DF92E3457E280140AF2171A9B24F7BDD0EFCB9F5058A700108A8E517F8E379A43B2CC64DCF27E5C3E0002C0AE0100001A001300020102001400020102000A000400020017000B00020100
Jan 01 00:09:39 DEBG send handshake packet of type: client_hello (1)
Jan 01 00:09:39 DEBG send header: (zu bytes):
00000000 16 FE FF 00 00 00 00 00  00 00 01 00 62 
Jan 01 00:09:39 DEBG send unencrypted: (zu bytes):
00000000 01 00 00 56 00 01 00 00  00 00 00 56 
Jan 01 00:09:39 DEBG send unencrypted: (zu bytes):
00000000 FE FD 00 00 02 43 EB F7  15 4F C2 0D F9 2E 34 57 
00000010 E2 80 14 0A F2 17 1A 9B  24 F7 BD D0 EF CB 9F 50 
00000020 58 A7 00 10 8A 8E 51 7F  8E 37 9A 43 B2 CC 64 DC 
00000030 F2 7E 5C 3E 00 02 C0 AE  01 00 00 1A 00 13 00 02 
00000040 01 02 00 14 00 02 01 02  00 0A 00 04 00 02 00 17 
00000050 00 0B 00 02 01 00 
Jan 01 00:09:39 DEBG dtls_handle_message: FOUND PEER
Jan 01 00:09:39 DEBG got packet 21 (15 bytes)
Jan 01 00:09:39 DEBG new packet arrived with seq_nr: lu
Jan 01 00:09:39 DEBG new bitfield is               : lx
Jan 01 00:09:39 DEBG receive header: (zu bytes):
00000000 15 FE FD 00 00 00 00 00  00 00 01 00 02 
Jan 01 00:09:39 DEBG receive unencrypted: (zu bytes):
00000000 02 28 
Jan 01 00:09:39 INFO ** Alert: level 2, description 40
Jan 01 00:09:39 ALRT 40 invalidate peer
Jan 01 00:09:39 WARN received alert, peer has been invalidated

0x801052f
*** RIOT kernel panic:
FAILED ASSERTION.

*** halted.
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11943#issuecomment-536323393
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190929/e972d6e8/attachment.htm>


More information about the notifications mailing list