@gjsify/tls-native 0.21.0 → 0.23.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 +27 -1
- package/meson.build +21 -1
- package/package.json +12 -4
package/README.md
CHANGED
|
@@ -36,7 +36,33 @@ if (hasNativeTls()) {
|
|
|
36
36
|
}
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
Requires `glib-networking` with a GnuTLS backend (the default on Fedora / GNOME platforms) for the Phase-2 session APIs. See [Platform coverage](#platform-coverage) for the prebuilt platforms.
|
|
40
|
+
|
|
41
|
+
## Platform coverage
|
|
42
|
+
|
|
43
|
+
| Platform | Prebuild | Built by |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| `linux-x86_64` | ✅ `.so` + `.gir` + `.typelib` | native runner |
|
|
46
|
+
| `linux-aarch64` | ✅ | native runner |
|
|
47
|
+
| `linux-ppc64`, `linux-s390x`, `linux-riscv64` | ✅ | QEMU emulation |
|
|
48
|
+
| `darwin-arm64` (macOS, Apple silicon) | ✅ `.dylib` + `.gir` + `.typelib` | `macos-latest` runner |
|
|
49
|
+
| `darwin-x64` (macOS, Intel) | ❌ | — no runner leg yet |
|
|
50
|
+
| Windows | ❌ | — no Vala/GI bridge in this repo targets Windows |
|
|
51
|
+
|
|
52
|
+
All prebuilds are produced by [`.github/workflows/prebuilds.yml`](../../../.github/workflows/prebuilds.yml)
|
|
53
|
+
and committed back to the repository.
|
|
54
|
+
|
|
55
|
+
The macOS prebuild links GnuTLS from Homebrew, so **Phase 1 (OCSP response parsing) is fully
|
|
56
|
+
functional there**. Phase 2 (`SessionAccess`, channel bindings, session resumption) additionally
|
|
57
|
+
requires `glib-networking` built with the GnuTLS backend at *runtime*; where that backend is
|
|
58
|
+
absent, `hasTlsSessionAccess()` reports `false` and the API degrades to the documented
|
|
59
|
+
`undefined` / `false` / no-op contract — exactly as Node behaves on a build without session
|
|
60
|
+
support. No runtime verification of Phase 2 on macOS has been done.
|
|
61
|
+
|
|
62
|
+
**Known gap — a `darwin-arm64` prebuild is built and shipped, but the CLI does not
|
|
63
|
+
load it yet.** `detectNativePackages()` (`packages/infra/cli/src/utils/detect-native-packages.ts`)
|
|
64
|
+
hardcodes a `linux-` directory prefix, and `buildNativeEnv()` exports `LD_LIBRARY_PATH`,
|
|
65
|
+
which macOS `dyld` ignores in favour of `DYLD_LIBRARY_PATH`.
|
|
40
66
|
|
|
41
67
|
## License
|
|
42
68
|
|
package/meson.build
CHANGED
|
@@ -45,12 +45,32 @@ libGjsifyTls = library('gjsifytls', sources,
|
|
|
45
45
|
install_dir: [true, true, true, true],
|
|
46
46
|
)
|
|
47
47
|
|
|
48
|
+
# ----------------------------------------------------------------------------
|
|
49
|
+
# Host-dependent shared-library leaf name.
|
|
50
|
+
#
|
|
51
|
+
# The typelib records the exact filename gjs' g_module_open() resolves at load
|
|
52
|
+
# time, and meson names the shared library per host convention: lib<name>.so on
|
|
53
|
+
# ELF hosts, lib<name>.dylib on macOS. Recording the wrong leaf yields a typelib
|
|
54
|
+
# that IS found via GI_TYPELIB_PATH but whose library never loads — a silent,
|
|
55
|
+
# confusing failure. Mirrors the branch in packages/napi/napi/meson.build.
|
|
56
|
+
#
|
|
57
|
+
# Windows is deliberately absent: this bridge has had no Windows portability
|
|
58
|
+
# work, so `else` (ELF naming) is the honest fallback rather than a .dll branch
|
|
59
|
+
# that would imply support which does not exist.
|
|
60
|
+
# ----------------------------------------------------------------------------
|
|
61
|
+
host_system = host_machine.system()
|
|
62
|
+
if host_system == 'darwin'
|
|
63
|
+
shared_lib_name = 'libgjsifytls.dylib'
|
|
64
|
+
else
|
|
65
|
+
shared_lib_name = 'libgjsifytls.so'
|
|
66
|
+
endif
|
|
67
|
+
|
|
48
68
|
g_ir_compiler = find_program('g-ir-compiler')
|
|
49
69
|
|
|
50
70
|
custom_target(meson.project_name() + '-1.0.typelib',
|
|
51
71
|
command: [
|
|
52
72
|
g_ir_compiler,
|
|
53
|
-
'--shared-library',
|
|
73
|
+
'--shared-library', shared_lib_name,
|
|
54
74
|
'--output', '@OUTPUT@',
|
|
55
75
|
meson.current_build_dir() / meson.project_name() + '-1.0.gir',
|
|
56
76
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/tls-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.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",
|
|
@@ -19,6 +19,14 @@
|
|
|
19
19
|
"src/vala"
|
|
20
20
|
],
|
|
21
21
|
"gjsify": {
|
|
22
|
+
"platforms": [
|
|
23
|
+
"linux-x86_64",
|
|
24
|
+
"linux-aarch64",
|
|
25
|
+
"linux-ppc64",
|
|
26
|
+
"linux-s390x",
|
|
27
|
+
"linux-riscv64",
|
|
28
|
+
"darwin-arm64"
|
|
29
|
+
],
|
|
22
30
|
"prebuilds": "prebuilds",
|
|
23
31
|
"runtimes": {
|
|
24
32
|
"gjs": "polyfill",
|
|
@@ -52,7 +60,7 @@
|
|
|
52
60
|
"init:meson": "meson setup build .",
|
|
53
61
|
"init:meson:wipe": "gjsify run init:meson --wipe",
|
|
54
62
|
"build:meson": "gjsify run init:meson && meson compile -C build",
|
|
55
|
-
"build:prebuilds": "gjsify run build:meson &&
|
|
63
|
+
"build:prebuilds": "gjsify run build:meson && node ../../../scripts/stage-prebuild.mjs .",
|
|
56
64
|
"build:gir-types": "ts-for-gir generate --externalDeps --allowMissingDeps --girDirectories=./prebuilds/linux-x86_64 --girDirectories=/usr/share/gir-1.0 --modules=GjsifyTls-1.0 --outdir=src/ts --npmScope=@girs --package=false --ignoreVersionConflicts=true"
|
|
57
65
|
},
|
|
58
66
|
"dependencies": {
|
|
@@ -60,8 +68,8 @@
|
|
|
60
68
|
"@girs/gobject-2.0": "^4.1.0"
|
|
61
69
|
},
|
|
62
70
|
"devDependencies": {
|
|
63
|
-
"@gjsify/cli": "^0.
|
|
64
|
-
"@gjsify/unit": "^0.
|
|
71
|
+
"@gjsify/cli": "^0.23.0",
|
|
72
|
+
"@gjsify/unit": "^0.23.0",
|
|
65
73
|
"@ts-for-gir/cli": "^4.1.0",
|
|
66
74
|
"@types/node": "^25.9.2",
|
|
67
75
|
"typescript": "^6.0.3"
|