INNER CODE UNIT · Python

__init__

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

    def __init__(self):
        self.log = []
        self._orig = None

    def __enter__(self):
        self._orig = tlslite.recordlayer.RecordLayer.sendRecord
        log = self.log
        orig = self._orig

        def wrapper(self_rl, msg):
            data = msg.write()
            ct = msg.contentType
            encrypted = bool(self_rl._writeState
                             and self_rl._writeState.encContext)
            hs_msgs = []
            if ct == ContentType.handshake:
                hs_msgs = _parse_hs_types(data)
            log.append((ct, encrypted, len(data), hs_msgs))

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…