@gjsify/tls-native 0.52.0 → 0.54.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/lib/esm/index.js +1 -1
- package/lib/types/index.d.ts +6 -0
- package/meson.build +7 -1
- package/package.json +12 -11
- package/src/vala/tls.vala +1 -1
package/lib/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./_virtual/_rolldown/runtime.js";const
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{loadOptionalNativeModule as e}from"@gjsify/utils/core";const t={TLS_UNIQUE:0,TLS_SERVER_END_POINT:1,TLS_EXPORTER:2},n=e(`GjsifyTls`,[`Tls`,`SessionAccess`]),r=n.module,i=r;function hasNativeTls(){return r!==null}function getNativeTlsLoadError(){return n.error}function parseOcspResponse(e){if(!r)throw Error(`@gjsify/tls-native: native typelib not loaded. Check hasNativeTls() first.`);return r.Tls.parse_ocsp_response(e)}const a={GOOD:0,REVOKED:1,UNKNOWN:2},o={SUCCESSFUL:0,MALFORMED_REQUEST:1,INTERNAL_ERROR:2,TRY_LATER:3,SIG_REQUIRED:5,UNAUTHORIZED:6};function hasTlsSessionAccess(){if(!r)return!1;try{return r.SessionAccess.is_supported()}catch{return!1}}function createSessionAccess(e){return r?r.SessionAccess.for_connection(e):null}export{a as OcspCertStatus,o as OcspResponseStatus,t as TlsChannelBindingType,createSessionAccess,getNativeTlsLoadError,hasNativeTls,hasTlsSessionAccess,i as nativeTls,parseOcspResponse};
|
package/lib/types/index.d.ts
CHANGED
|
@@ -82,6 +82,12 @@ export interface GjsifyTlsModule {
|
|
|
82
82
|
export declare const nativeTls: GjsifyTlsModule | null;
|
|
83
83
|
/** Returns `true` when the GjsifyTls native library is available. */
|
|
84
84
|
export declare function hasNativeTls(): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Why {@link nativeTls} is `null`: girepository's "not found" when the prebuild
|
|
87
|
+
* is not installed, a `NativeLibraryLoadError` naming the missing dependency
|
|
88
|
+
* when it is installed but its library will not open.
|
|
89
|
+
*/
|
|
90
|
+
export declare function getNativeTlsLoadError(): Error | null;
|
|
85
91
|
/**
|
|
86
92
|
* Parse a DER-encoded OCSPResponse (RFC 6960) — typically the body of a POST to
|
|
87
93
|
* the cert's AIA responder URL. `null` when the bytes do not parse.
|
package/meson.build
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
# `buildtype=plain` = NO `-g`. ld64 emits a DEBUG MAP into any image whose objects
|
|
2
|
+
# carry DWARF — one `N_OSO` stab per object, holding its MTIME — so with `-g` every
|
|
3
|
+
# rebuild of this commit differed in bytes (plus the `LC_UUID` and the ad-hoc signature
|
|
4
|
+
# computed over them) and `commit-prebuilds` re-committed all 16 darwin dylibs. That map
|
|
5
|
+
# names intermediate `.o` files no consumer can have. Why: docs/prebuilds.md.
|
|
6
|
+
project('GjsifyTls', ['c', 'vala'], version: '1.0',
|
|
7
|
+
default_options: ['buildtype=plain'])
|
|
2
8
|
|
|
3
9
|
root_dir = meson.current_source_dir()
|
|
4
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/tls-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.54.0",
|
|
4
4
|
"description": "Optional Vala/GObject bridge providing GnuTLS capabilities not exposed by Gio.TlsConnection — OCSP-response parsing (RFC 6960), session resumption data extraction, channel binding (tls-finished bytes for SCRAM-SHA-*). Enhances @gjsify/tls when installed.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/esm/index.js",
|
|
@@ -64,11 +64,12 @@
|
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@girs/glib-2.0": "5.4.0",
|
|
67
|
-
"@girs/gobject-2.0": "5.4.0"
|
|
67
|
+
"@girs/gobject-2.0": "5.4.0",
|
|
68
|
+
"@gjsify/utils": "^0.54.0"
|
|
68
69
|
},
|
|
69
70
|
"devDependencies": {
|
|
70
|
-
"@gjsify/cli": "^0.
|
|
71
|
-
"@gjsify/unit": "^0.
|
|
71
|
+
"@gjsify/cli": "^0.54.0",
|
|
72
|
+
"@gjsify/unit": "^0.54.0",
|
|
72
73
|
"@ts-for-gir/cli": "^4.1.0",
|
|
73
74
|
"@types/node": "^25.9.2",
|
|
74
75
|
"typescript": "^6.0.3"
|
|
@@ -84,12 +85,12 @@
|
|
|
84
85
|
},
|
|
85
86
|
"homepage": "https://github.com/gjsify/gjsify/tree/main/packages/node/tls-native#readme",
|
|
86
87
|
"optionalDependencies": {
|
|
87
|
-
"@gjsify/tls-native-darwin-arm64": "0.
|
|
88
|
-
"@gjsify/tls-native-darwin-x64": "0.
|
|
89
|
-
"@gjsify/tls-native-linux-arm64": "0.
|
|
90
|
-
"@gjsify/tls-native-linux-ppc64": "0.
|
|
91
|
-
"@gjsify/tls-native-linux-riscv64": "0.
|
|
92
|
-
"@gjsify/tls-native-linux-s390x": "0.
|
|
93
|
-
"@gjsify/tls-native-linux-x64": "0.
|
|
88
|
+
"@gjsify/tls-native-darwin-arm64": "0.54.0",
|
|
89
|
+
"@gjsify/tls-native-darwin-x64": "0.54.0",
|
|
90
|
+
"@gjsify/tls-native-linux-arm64": "0.54.0",
|
|
91
|
+
"@gjsify/tls-native-linux-ppc64": "0.54.0",
|
|
92
|
+
"@gjsify/tls-native-linux-riscv64": "0.54.0",
|
|
93
|
+
"@gjsify/tls-native-linux-s390x": "0.54.0",
|
|
94
|
+
"@gjsify/tls-native-linux-x64": "0.54.0"
|
|
94
95
|
}
|
|
95
96
|
}
|
package/src/vala/tls.vala
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* Future scope (not in this file yet):
|
|
17
17
|
* - Session resumption: `gnutls_session_get_data2` / `set_data` —
|
|
18
18
|
* blocked on extracting the live `gnutls_session_t` from
|
|
19
|
-
* `Gio.TlsConnection`. Tracked in status/open-todos.md.
|
|
19
|
+
* `Gio.TlsConnection`. Tracked in status/open-todos/README.md.
|
|
20
20
|
* - Channel binding: `gnutls_session_channel_binding` (TLS-Finished bytes
|
|
21
21
|
* for SCRAM-SHA-* SASL). Same gnutls_session_t blocker.
|
|
22
22
|
*
|