From 2af4115937630662fa9287126005477f13ea8c04 Mon Sep 17 00:00:00 2001 From: Raymond Nook <59678453+developStorm@users.noreply.github.com> Date: Wed, 22 Jan 2025 08:23:21 -0800 Subject: [PATCH] fix: server hello zschema (#401) --- zcrypto_schemas/zcrypto.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/zcrypto_schemas/zcrypto.py b/zcrypto_schemas/zcrypto.py index 7794eced..c5dded23 100644 --- a/zcrypto_schemas/zcrypto.py +++ b/zcrypto_schemas/zcrypto.py @@ -606,7 +606,7 @@ def getUnknowns(known, range, unknown="unknown"): "heartbeat": Boolean(doc="This is true if the client has the Heartbeat Supported extension (see https://tools.ietf.org/html/rfc6520)."), "extended_random": Binary(doc="The value of the Extended Random extension, if present (see https://tools.ietf.org/html/draft-rescorla-tls-extended-random-02)."), "extended_master_secret": Boolean(doc="This is true if the client has the Extended Master Secret extension (see https://tools.ietf.org/html/rfc7627)."), - "next_protocol_negotiation": Boolean(doc="This is true if the client has the Next Protocol Negotiation extension (see https://tools.ietf.org/id/draft-agl-tls-nextprotoneg-03.html)."), + "next_protocol_negotiation": Boolean(doc="This is true if the client has the Next Protocol Negotiation extension (see https://datatracker.ietf.org/doc/html/draft-agl-tls-nextprotoneg-04)."), "server_name": String(doc="This contains the server name from the Server Name Identification (SNI) extension, if present (see https://tools.ietf.org/html/rfc6066#section-3)."), "scts": Boolean(doc="This is true if the client has the Signed Certificate Timestamp extension, if present (see https://tools.ietf.org/html/rfc6962#section-3.3.1)"), "supported_curves": ListOf(CurveID(), doc="The list of supported curves in the Supported Elliptic Curves extension, if present (see https://tools.ietf.org/html/rfc4492#section-5.1.1)"), @@ -624,18 +624,20 @@ def getUnknowns(known, range, unknown="unknown"): "random": Binary(doc="This structure is generated by the server and MUST be independently generated from the ClientHello.random."), "session_id": Binary(doc="This is the identity of the session corresponding to this connection."), "cipher_suite": CipherSuite(doc="The single cipher suite selected by the server from the list in ClientHello.cipher_suites."), - # TODO FIXME: This is a uint8 in the go code, but it should probably be a CompressionMethod...? - "compression_method": Unsigned8BitInteger(doc="The single compression algorithm selected by the server from the list in ClientHello.compression_methods."), + "compression_method": CompressionMethod(doc="The single compression algorithm selected by the server from the list in ClientHello.compression_methods."), "ocsp_stapling": Boolean(doc="This is true if the OCSP Stapling extension is set (see https://www.ietf.org/rfc/rfc6961.txt for details)."), "ticket": Boolean(doc="This is true if the server has the Session Ticket extension (see https://tools.ietf.org/html/rfc5077)."), "secure_renegotiation": Boolean(doc="This is true if the client has the Secure Renegotiation extension (see https://tools.ietf.org/html/rfc5746)."), "heartbeat": Boolean(doc="This is true if the client has the Heartbeat Supported extension (see https://tools.ietf.org/html/rfc6520)."), "extended_random": Binary(doc="The value of the Extended Random extension, if present (see https://tools.ietf.org/html/draft-rescorla-tls-extended-random-02)."), + "next_protocol_negotiation": Boolean(doc="This is true if the server has the Next Protocol Negotiation extension (see https://datatracker.ietf.org/doc/html/draft-agl-tls-nextprotoneg-04)."), "extended_master_secret": Boolean(doc="This is true if the server has the Extended Master Secret extension (see https://tools.ietf.org/html/rfc7627)."), "scts": ListOf(SubRecord({ "parsed": SCTRecord(), "raw": Binary(), }), doc="The values in the SignedCertificateTimestampList of the Signed Certificate Timestamp, if present."), + "alpn_protocol": String(doc="This contains the selected protocol from the Application-Layer Protocol Negotiation extension, if present (see https://tools.ietf.org/html/rfc7301)."), + "unknown_extensions": ListOf(Binary(), doc="A list of any unrecognized extensions in raw form."), }, doc="The Server Hello message (see https://tools.ietf.org/html/rfc5246#section-7.4.1.3).") # tls/tls_handshake.go: ServerKeyExchange