| 1 |
# SPDX-License-Identifier: MPL-2.0 |
| 2 |
|
| 3 |
from cryptoparser.tls.extension import TlsExtensionUnusedData, TlsExtensionType |
| 4 |
from cryptoparser.tls.subprotocol import TlsSubprotocolMessageBase, TlsHandshakeMessage, TlsHandshakeType |
| 5 |
|
| 6 |
|
| 7 |
class TestMessage(TlsSubprotocolMessageBase): |
| 8 |
@classmethod |
| 9 |
def get_handshake_type(cls): |
| 10 |
raise NotImplementedError |
| 11 |
|
| 12 |
|
| 13 |
class TestVariantMessage(TlsHandshakeMessage): |
| 14 |
@classmethod |
| 15 |
def get_handshake_type(cls): |
| 16 |
return TlsHandshakeType.SERVER_HELLO_DONE |
| 17 |
|
| 18 |
@classmethod |
| 19 |
def _parse(cls, parsable): |
| 20 |
raise NotImplementedError |
| 21 |
|
| 22 |
def compose(self): |
| 23 |
raise NotImplementedError |
| 24 |
|
| 25 |
|
| 26 |
class TestUnusedDataExtension(TlsExtensionUnusedData): |
| 27 |
@classmethod |
| 28 |
def get_extension_type(cls): |
| 29 |
return TlsExtensionType.RENEGOTIATION_INFO |