]> git.kaiwu.me - njs.git/commit
WebCrypto: fix algorithm availability in nginx modules
authorDmitry Volyntsev <xeioex@nginx.com>
Tue, 13 Oct 2026 05:37:30 +0000 (22:37 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Thu, 15 Oct 2026 14:42:10 +0000 (07:42 -0700)
commit233509254cc86a8d6a5e703052e3a8b272604ea5
treef856c08f9dd16ff12a5eb3f435d3a540cfb5a1ca
parent28977360766a96d183c61075a680ea527f44a598
WebCrypto: fix algorithm availability in nginx modules

Previously, configure probes disabled Ed25519, X25519, and AES-KW in
nginx modules because the engine is configured with --no-openssl,
although WebCrypto uses nginx's OpenSSL and these algorithms were
available.

The fix is to detect 25519 APIs from OpenSSL headers and look up AES-KW
ciphers at runtime, removing the dependency on engine configuration
and direct references to wrap functions absent in some OpenSSL flavors.

This fixes #1139.
12 files changed:
auto/openssl
external/njs_openssl.h
external/njs_webcrypto_module.c
external/qjs_webcrypto_module.c
nginx/t/js_webcrypto.t
nginx/t/stream_js_webcrypto.t
test/harness/compatWebcrypto.js
test/harness/runTsuite.js
test/webcrypto/aes_kw.t.mjs
test/webcrypto/ed25519.t.mjs
test/webcrypto/wrap.t.mjs
test/webcrypto/x25519.t.mjs