lemon-tls 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +168 -41
- package/index.cjs +9 -7
- package/index.d.ts +626 -30
- package/package.json +45 -7
- package/src/ca_store.js +31 -0
- package/src/compat.js +76 -116
- package/src/crypto.js +21 -114
- package/src/dtls_session.js +1284 -390
- package/src/dtls_socket.js +318 -96
- package/src/node_options.js +154 -17
- package/src/record.js +355 -191
- package/src/secure_context.js +97 -39
- package/src/session/ecdh.js +140 -122
- package/src/session/ech.js +92 -32
- package/src/session/hpke.js +12 -44
- package/src/session/message.js +29 -9
- package/src/session/signing.js +80 -22
- package/src/session/ticket.js +5 -3
- package/src/session/x509.js +385 -0
- package/src/tls_session.js +2221 -902
- package/src/tls_socket.js +451 -452
- package/src/wire.js +271 -158
- package/types/crypto.d.ts +40 -0
- package/types/record.d.ts +40 -0
- package/types/session.d.ts +3 -0
- package/types/wire.d.ts +62 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// lemon-tls/crypto — Key schedule primitives: HKDF, the TLS 1.3 secrets, exporters, cipher-suite tables.
|
|
2
|
+
// Low-level: typed loosely; see the source for each signature.
|
|
3
|
+
|
|
4
|
+
export declare const DEFAULT_CIPHER_SUITES_TLS12: any;
|
|
5
|
+
export declare const DEFAULT_CIPHER_SUITES_TLS13: any;
|
|
6
|
+
export declare const LABEL_PREFIX_DTLS13: string;
|
|
7
|
+
export declare const LABEL_PREFIX_TLS13: string;
|
|
8
|
+
export declare const TLS_CIPHER_SUITES: any;
|
|
9
|
+
export declare function build_cert_verify_tbs(...args: any[]): any;
|
|
10
|
+
export declare function build_cert_verify_tbs_with_hash(...args: any[]): any;
|
|
11
|
+
export declare function build_hkdf_label(...args: any[]): any;
|
|
12
|
+
export declare function compute_psk_binder(...args: any[]): any;
|
|
13
|
+
export declare function default_cipher_suites(...args: any[]): any;
|
|
14
|
+
export declare function derive_app_traffic_secrets(...args: any[]): any;
|
|
15
|
+
export declare function derive_app_traffic_secrets_with_hash(...args: any[]): any;
|
|
16
|
+
export declare function derive_binder_key(...args: any[]): any;
|
|
17
|
+
export declare function derive_client_early_traffic_secret(...args: any[]): any;
|
|
18
|
+
export declare function derive_exporter_master_secret_with_hash(...args: any[]): any;
|
|
19
|
+
export declare function derive_handshake_traffic_secrets(...args: any[]): any;
|
|
20
|
+
export declare function derive_handshake_traffic_secrets_psk(...args: any[]): any;
|
|
21
|
+
export declare function derive_handshake_traffic_secrets_psk_with_hash(...args: any[]): any;
|
|
22
|
+
export declare function derive_handshake_traffic_secrets_with_hash(...args: any[]): any;
|
|
23
|
+
export declare function derive_psk(...args: any[]): any;
|
|
24
|
+
export declare function derive_resumption_master_secret(...args: any[]): any;
|
|
25
|
+
export declare function derive_resumption_master_secret_with_hash(...args: any[]): any;
|
|
26
|
+
export declare function derive_sn_key(...args: any[]): any;
|
|
27
|
+
export declare function getHashFn(...args: any[]): any;
|
|
28
|
+
export declare function getHashLen(...args: any[]): any;
|
|
29
|
+
export declare function get_handshake_finished(...args: any[]): any;
|
|
30
|
+
export declare function get_handshake_finished_with_hash(...args: any[]): any;
|
|
31
|
+
export declare function hkdf_expand(...args: any[]): any;
|
|
32
|
+
export declare function hkdf_expand_label(...args: any[]): any;
|
|
33
|
+
export declare function hkdf_extract(...args: any[]): any;
|
|
34
|
+
export declare function hmac(...args: any[]): any;
|
|
35
|
+
export declare function is_usable_cipher_suite(...args: any[]): any;
|
|
36
|
+
export declare function suite_matches_version(...args: any[]): any;
|
|
37
|
+
export declare function tls12_exporter(...args: any[]): any;
|
|
38
|
+
export declare function tls12_prf(...args: any[]): any;
|
|
39
|
+
export declare function tls13_exporter(...args: any[]): any;
|
|
40
|
+
export declare function tls_derive_from_master_secret_tls12(...args: any[]): any;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// lemon-tls/record — The record layer: AEAD keys and nonces, encrypt/decrypt for TLS and DTLS records.
|
|
2
|
+
// Low-level: typed loosely; see the source for each signature.
|
|
3
|
+
|
|
4
|
+
export declare const CT: any;
|
|
5
|
+
export declare function aesEcbEncrypt(...args: any[]): any;
|
|
6
|
+
export declare function buildAad12(...args: any[]): any;
|
|
7
|
+
export declare function buildDtlsAad12(...args: any[]): any;
|
|
8
|
+
export declare function buildDtlsAck(...args: any[]): any;
|
|
9
|
+
export declare function buildDtlsPlaintext(...args: any[]): any;
|
|
10
|
+
export declare function buildEncryptedDtls12(...args: any[]): any;
|
|
11
|
+
export declare function buildEncryptedDtls13(...args: any[]): any;
|
|
12
|
+
export declare function buildUnifiedHdr(...args: any[]): any;
|
|
13
|
+
export declare function decrypt12(...args: any[]): any;
|
|
14
|
+
export declare function decryptDtls12(...args: any[]): any;
|
|
15
|
+
export declare function decryptEncryptedDtls13(...args: any[]): any;
|
|
16
|
+
export declare function decryptRecord(...args: any[]): any;
|
|
17
|
+
export declare function decryptRecordWithAadView(...args: any[]): any;
|
|
18
|
+
export declare function deriveKeys(...args: any[]): any;
|
|
19
|
+
export declare function deriveKeys12(...args: any[]): any;
|
|
20
|
+
export declare function encrypt12(...args: any[]): any;
|
|
21
|
+
export declare function encryptCompleteRecord12(...args: any[]): any;
|
|
22
|
+
export declare function encryptCompleteRecord13(...args: any[]): any;
|
|
23
|
+
export declare function encryptDtls12(...args: any[]): any;
|
|
24
|
+
export declare function encryptRecord(...args: any[]): any;
|
|
25
|
+
export declare function getAeadAlgo(...args: any[]): any;
|
|
26
|
+
export declare function getChachaNonce12(...args: any[]): any;
|
|
27
|
+
export declare function getNonce(...args: any[]): any;
|
|
28
|
+
export declare function getNonce12(...args: any[]): any;
|
|
29
|
+
export declare function getNonceInto(...args: any[]): any;
|
|
30
|
+
export declare function isUnifiedHdr(...args: any[]): any;
|
|
31
|
+
export declare function maskRecordNumber(...args: any[]): any;
|
|
32
|
+
export declare function parseDtlsAck(...args: any[]): any;
|
|
33
|
+
export declare function parseDtlsDatagram(...args: any[]): any;
|
|
34
|
+
export declare function parseDtlsPlaintext(...args: any[]): any;
|
|
35
|
+
export declare function parseInnerPlaintext(...args: any[]): any;
|
|
36
|
+
export declare function parseUnifiedHdr(...args: any[]): any;
|
|
37
|
+
export declare function reconstructDtlsSeq(...args: any[]): any;
|
|
38
|
+
export declare function resolveReadEpoch(...args: any[]): any;
|
|
39
|
+
export declare function seqToBytes(...args: any[]): any;
|
|
40
|
+
export declare function writeRecord(...args: any[]): any;
|
package/types/wire.d.ts
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// lemon-tls/wire — TLS and DTLS messages: parse_* and build_* for each handshake message, and the codes (TLS_EXT, TLS_ALERT, …).
|
|
2
|
+
// Low-level: typed loosely; see the source for each signature.
|
|
3
|
+
|
|
4
|
+
export declare const DTLS_VERSION: any;
|
|
5
|
+
export declare const HANDSHAKE_MESSAGE_MAX: number;
|
|
6
|
+
export declare const TLS13_HRR_RANDOM: any;
|
|
7
|
+
export declare const TLS_ALERT: any;
|
|
8
|
+
export declare const TLS_ALERT_LEVEL: any;
|
|
9
|
+
export declare const TLS_CONTENT_TYPE: any;
|
|
10
|
+
export declare const TLS_EXT: any;
|
|
11
|
+
export declare const TLS_MESSAGE_TYPE: any;
|
|
12
|
+
export declare const TLS_VERSION: any;
|
|
13
|
+
export declare function build_certificate(...args: any[]): any;
|
|
14
|
+
export declare function build_certificate_request(...args: any[]): any;
|
|
15
|
+
export declare function build_certificate_status(...args: any[]): any;
|
|
16
|
+
export declare function build_certificate_verify(...args: any[]): any;
|
|
17
|
+
export declare function build_client_key_exchange_ecdhe(...args: any[]): any;
|
|
18
|
+
export declare function build_client_key_exchange_rsa(...args: any[]): any;
|
|
19
|
+
export declare function build_compressed_certificate(...args: any[]): any;
|
|
20
|
+
export declare function build_dtls_handshake(...args: any[]): any;
|
|
21
|
+
export declare function build_extensions(...args: any[]): any;
|
|
22
|
+
export declare function build_hello(...args: any[]): any;
|
|
23
|
+
export declare function build_hello_retry_request(...args: any[]): any;
|
|
24
|
+
export declare function build_hello_verify_request(...args: any[]): any;
|
|
25
|
+
export declare function build_key_update(...args: any[]): any;
|
|
26
|
+
export declare function build_message(...args: any[]): any;
|
|
27
|
+
export declare function build_new_session_ticket(...args: any[]): any;
|
|
28
|
+
export declare function build_new_session_ticket_tls12(...args: any[]): any;
|
|
29
|
+
export declare function build_server_ecdh_params(...args: any[]): any;
|
|
30
|
+
export declare function build_server_key_exchange_ecdhe(...args: any[]): any;
|
|
31
|
+
export declare const exts: any;
|
|
32
|
+
export declare function is_tls12_wire(...args: any[]): any;
|
|
33
|
+
export declare function is_tls13_wire(...args: any[]): any;
|
|
34
|
+
export declare function parse_certificate(...args: any[]): any;
|
|
35
|
+
export declare function parse_certificate_request(...args: any[]): any;
|
|
36
|
+
export declare function parse_certificate_status(...args: any[]): any;
|
|
37
|
+
export declare function parse_certificate_verify(...args: any[]): any;
|
|
38
|
+
export declare function parse_client_key_exchange_ecdhe(...args: any[]): any;
|
|
39
|
+
export declare function parse_client_key_exchange_rsa(...args: any[]): any;
|
|
40
|
+
export declare function parse_compressed_certificate(...args: any[]): any;
|
|
41
|
+
export declare function parse_dtls_handshake(...args: any[]): any;
|
|
42
|
+
export declare function parse_extension_list(...args: any[]): any;
|
|
43
|
+
export declare function parse_extensions(...args: any[]): any;
|
|
44
|
+
export declare function parse_hello(...args: any[]): any;
|
|
45
|
+
export declare function parse_hello_verify_request(...args: any[]): any;
|
|
46
|
+
export declare function parse_key_update(...args: any[]): any;
|
|
47
|
+
export declare function parse_message(...args: any[]): any;
|
|
48
|
+
export declare function parse_new_session_ticket(...args: any[]): any;
|
|
49
|
+
export declare function parse_new_session_ticket_tls12(...args: any[]): any;
|
|
50
|
+
export declare function parse_server_key_exchange(...args: any[]): any;
|
|
51
|
+
export declare function r_bytes(...args: any[]): any;
|
|
52
|
+
export declare function r_u16(...args: any[]): any;
|
|
53
|
+
export declare function r_u24(...args: any[]): any;
|
|
54
|
+
export declare function r_u8(...args: any[]): any;
|
|
55
|
+
export declare function readVec(...args: any[]): any;
|
|
56
|
+
export declare function veclen(...args: any[]): any;
|
|
57
|
+
export declare function w_bytes(...args: any[]): any;
|
|
58
|
+
export declare function w_u16(...args: any[]): any;
|
|
59
|
+
export declare function w_u24(...args: any[]): any;
|
|
60
|
+
export declare function w_u48(...args: any[]): any;
|
|
61
|
+
export declare function w_u64(...args: any[]): any;
|
|
62
|
+
export declare function w_u8(...args: any[]): any;
|