Skip to content

Instantly share code, notes, and snippets.

@pokgak
pokgak / client debug log
Last active December 18, 2019 16:36
Tinydtls debug log for renegotiation test. I added some newlines between the initial handshake and `client:renegotiate` command on the client and result on the server for clarity. See issue eclipse-tinydtls/tinydtls#23.
pokgak:[tests] $ ./dtls-client -v6 ::1
Dec 18 17:25:26 DEBG dtls_new_peer: [::1]:20220
Dec 18 17:25:26 DEBG DTLSv12: initialize HASH_SHA256
Dec 18 17:25:26 DEBG send handshake packet of type: client_hello (1)
Dec 18 17:25:26 DEBG send header: (13 bytes):
00000000 16 FE FF 00 00 00 00 00 00 00 00 00 54
Dec 18 17:25:26 DEBG send unencrypted: (12 bytes):
00000000 01 00 00 48 00 00 00 00 00 00 00 48
Dec 18 17:25:26 DEBG send unencrypted: (72 bytes):
00000000 FE FD 00 00 00 00 7B 45 3D 4E F1 CB AF 97 18 38
@pokgak
pokgak / test-handshake-failure.py
Last active October 18, 2019 12:36
Python pexpect script to test handling handshake_failure alert between two native RIOT instances
#!/usr/bin/env python3
import sys
import os
import pexpect
import time
import signal
serverIP = "<SERVER_IP>"
@pokgak
pokgak / iterate-tinydtls-commits
Last active October 16, 2019 14:56
Python script using pexpect to test tinydtls client and server in RIOT using examples/dtls-echo example application. There are still lots of hardcoded variables used.
#!/bin/bash
# specify paths to tinydtls and RIOT repo
TINYDTLS_REPO=~/git/tinydtls
RIOT_REPO=~/git/RIOT-OS/RIOT
# get all commits FROM tinydtls repo since last known good commit
cd $TINYDTLS_REPO
git checkout develop &> /dev/null
hashes=$(git rev-list --reverse dcac93f1b38e74f0a57b5df47647943f3df005c2^1..HEAD)