variable TLS_VERSION

Version values used in the TLS record header's legacyVersion field and, historically, in the handshake's own version negotiation (RFC 8446 section 5.1, RFC 8446 appendix D).

Examples

Example 1

import { assertEquals } from "@std/assert";
import { TLS_VERSION } from "@binstruct/tls-record";

assertEquals(TLS_VERSION.TLS1_2, 0x0303);
assertEquals(TLS_VERSION.TLS1_3, 0x0304);

Properties

TLS1_0: number

TLS 1.0 — the record-layer value a ClientHello record uses.

TLS1_1: number

TLS 1.1.

TLS1_2: number

TLS 1.2 — the record-layer value nearly every post-handshake record uses, including under TLS 1.3.

TLS1_3: number

TLS 1.3 — never appears in legacyVersion; negotiated via the supported_versions extension instead.

Usage

import { TLS_VERSION } from ".";