@gjsify/tls 0.35.0 → 0.37.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.
|
@@ -2,37 +2,19 @@ import { TlsChannelBindingType as _TlsChannelBindingType, type NativeSessionAcce
|
|
|
2
2
|
export { TlsChannelBindingType } from '@gjsify/tls-native';
|
|
3
3
|
export type { NativeSessionAccess, TlsConnectionHandle } from '@gjsify/tls-native';
|
|
4
4
|
/**
|
|
5
|
-
* Returns `true` when the
|
|
6
|
-
*
|
|
7
|
-
* on
|
|
8
|
-
*
|
|
9
|
-
* (
|
|
10
|
-
*
|
|
11
|
-
* Use this predicate to detect "session-resumption / channel-binding
|
|
12
|
-
* available on this runtime" without triggering a thrown error. When
|
|
13
|
-
* it returns `false`:
|
|
14
|
-
*
|
|
15
|
-
* - `TLSSocket.getFinished()` / `getPeerFinished()` return `undefined`.
|
|
16
|
-
* - `TLSSocket.getSession()` returns `undefined`.
|
|
17
|
-
* - `TLSSocket.setSession()` / `tls.connect({session})` silently
|
|
18
|
-
* skip the resumption attempt (full handshake instead).
|
|
19
|
-
* - The `'session'` event never fires.
|
|
20
|
-
*
|
|
21
|
-
* This matches Node's behavior on a build without OpenSSL session
|
|
22
|
-
* support — present API surface, no-op when unavailable.
|
|
5
|
+
* Returns `true` when the native bridge is loaded AND the GIO TLS backend is
|
|
6
|
+
* GnuTLS, whose private `gnutls_session_t` the shim reads. `false` on Node and
|
|
7
|
+
* on any other backend, where the surface degrades exactly as Node's does
|
|
8
|
+
* without OpenSSL session support: `getFinished`/`getPeerFinished`/`getSession`
|
|
9
|
+
* return `undefined`, `setSession`/`connect({session})` skip the resumption
|
|
10
|
+
* attempt, and `'session'` never fires.
|
|
23
11
|
*/
|
|
24
12
|
export declare function hasTlsSessionAccess(): boolean;
|
|
25
13
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* loaded OR @connection is `null`. The returned wrapper's methods
|
|
29
|
-
* may throw — callers must wrap in `try/catch` AND check
|
|
30
|
-
* `hasTlsSessionAccess()` first.
|
|
14
|
+
* `null` when the native typelib isn't loaded or @connection is `null`. The
|
|
15
|
+
* wrapper's methods may throw — check `hasTlsSessionAccess()` AND catch.
|
|
31
16
|
*
|
|
32
|
-
* @internal —
|
|
33
|
-
* should rely on the Node-shaped getters/setters on `TLSSocket`.
|
|
17
|
+
* @internal — public consumers use the Node-shaped `TLSSocket` accessors.
|
|
34
18
|
*/
|
|
35
19
|
export declare function createSessionAccess(connection: _TlsConnectionHandle | null): _NativeSessionAccess | null;
|
|
36
|
-
/** Re-export for code that wants the channel-binding type constants
|
|
37
|
-
* without importing through the native package directly. */
|
|
38
20
|
export { _TlsChannelBindingType };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/tls",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.0",
|
|
4
4
|
"description": "Node.js tls module for Gjs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -37,17 +37,17 @@
|
|
|
37
37
|
"tls"
|
|
38
38
|
],
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@gjsify/cli": "^0.
|
|
41
|
-
"@gjsify/unit": "^0.
|
|
40
|
+
"@gjsify/cli": "^0.37.0",
|
|
41
|
+
"@gjsify/unit": "^0.37.0",
|
|
42
42
|
"@types/node": "^25.9.2",
|
|
43
43
|
"typescript": "^6.0.3"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@girs/gio-2.0": "^4.1.0",
|
|
47
47
|
"@girs/glib-2.0": "^4.1.0",
|
|
48
|
-
"@gjsify/net": "^0.
|
|
49
|
-
"@gjsify/tls-native": "^0.
|
|
50
|
-
"@gjsify/utils": "^0.
|
|
48
|
+
"@gjsify/net": "^0.37.0",
|
|
49
|
+
"@gjsify/tls-native": "^0.37.0",
|
|
50
|
+
"@gjsify/utils": "^0.37.0"
|
|
51
51
|
},
|
|
52
52
|
"gjsify": {
|
|
53
53
|
"runtimes": {
|