@gjsify/tls-native 0.51.1 → 0.53.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 CHANGED
@@ -1 +1 @@
1
- import"./_virtual/_rolldown/runtime.js";const e={TLS_UNIQUE:0,TLS_SERVER_END_POINT:1,TLS_EXPORTER:2};let t=null;const n=globalThis.imports?.gi;if(n)try{t=n.GjsifyTls}catch{}const r=t;function hasNativeTls(){return t!==null}function parseOcspResponse(e){if(!t)throw Error(`@gjsify/tls-native: native typelib not loaded. Check hasNativeTls() first.`);return t.Tls.parse_ocsp_response(e)}const i={GOOD:0,REVOKED:1,UNKNOWN:2},a={SUCCESSFUL:0,MALFORMED_REQUEST:1,INTERNAL_ERROR:2,TRY_LATER:3,SIG_REQUIRED:5,UNAUTHORIZED:6};function hasTlsSessionAccess(){if(!t)return!1;try{return t.SessionAccess.is_supported()}catch{return!1}}function createSessionAccess(e){return t?t.SessionAccess.for_connection(e):null}export{i as OcspCertStatus,a as OcspResponseStatus,e as TlsChannelBindingType,createSessionAccess,hasNativeTls,hasTlsSessionAccess,r as nativeTls,parseOcspResponse};
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};
@@ -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
- project('GjsifyTls', ['c', 'vala'], version: '1.0')
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.51.1",
3
+ "version": "0.53.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",
@@ -63,12 +63,13 @@
63
63
  "build:gir-types": "ts-for-gir generate --externalDeps --allowMissingDeps --girDirectories=../tls-native-linux-x64/prebuilds/linux-x64 --girDirectories=/usr/share/gir-1.0 --modules=GjsifyTls-1.0 --outdir=src/ts --npmScope=@girs --package=false --ignoreVersionConflicts=true"
64
64
  },
65
65
  "dependencies": {
66
- "@girs/glib-2.0": "5.0.0",
67
- "@girs/gobject-2.0": "5.0.0"
66
+ "@girs/glib-2.0": "5.4.0",
67
+ "@girs/gobject-2.0": "5.4.0",
68
+ "@gjsify/utils": "^0.53.0"
68
69
  },
69
70
  "devDependencies": {
70
- "@gjsify/cli": "^0.51.1",
71
- "@gjsify/unit": "^0.51.1",
71
+ "@gjsify/cli": "^0.53.0",
72
+ "@gjsify/unit": "^0.53.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.51.1",
88
- "@gjsify/tls-native-darwin-x64": "0.51.1",
89
- "@gjsify/tls-native-linux-arm64": "0.51.1",
90
- "@gjsify/tls-native-linux-ppc64": "0.51.1",
91
- "@gjsify/tls-native-linux-riscv64": "0.51.1",
92
- "@gjsify/tls-native-linux-s390x": "0.51.1",
93
- "@gjsify/tls-native-linux-x64": "0.51.1"
88
+ "@gjsify/tls-native-darwin-arm64": "0.53.0",
89
+ "@gjsify/tls-native-darwin-x64": "0.53.0",
90
+ "@gjsify/tls-native-linux-arm64": "0.53.0",
91
+ "@gjsify/tls-native-linux-ppc64": "0.53.0",
92
+ "@gjsify/tls-native-linux-riscv64": "0.53.0",
93
+ "@gjsify/tls-native-linux-s390x": "0.53.0",
94
+ "@gjsify/tls-native-linux-x64": "0.53.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
  *