INNER CODE UNIT · Python

_load_key

wolfSSL/wolfssl · scripts/multi-msg-record.py:179

def _load_key(key_file):
    with open(key_file) as f:
        return parsePEMKey(f.read(), private=True)


def _parse_hs_types(data):
    """Parse handshake message types from raw handshake content."""
    msgs = []
    off = 0
    while off + 4 <= len(data):
        ht = data[off]
        hl = struct.unpack("!I", b"\x00" + bytes(data[off + 1 : off + 4]))[0]
        msgs.append(HS_NAMES.get(ht, f"T{ht}"))
        off += 4 + hl
    return msgs


def _listen_socket():

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…