]> git.kaiwu.me - njs.git/commit
WebCrypto: clear OpenSSL errors after a signature mismatch
authorDmitry Volyntsev <xeioex@nginx.com>
Wed, 14 Oct 2026 05:18:37 +0000 (22:18 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Thu, 15 Oct 2026 14:42:10 +0000 (07:42 -0700)
commit7c00df7f49c9d8f32f509ea8ef8bcc1e729fea2a
tree894b2daa36f98850ffbff0cba828db85a9cc95cc
parent233509254cc86a8d6a5e703052e3a8b272604ea5
WebCrypto: clear OpenSSL errors after a signature mismatch

Previously, crypto.subtle.verify(false) could leave errors for an
unrelated TLS handshake or WebCrypto operation.

The fix is to clear the queue when returning false, while retaining
diagnostics for operation failures.

This fixes #1141.
external/njs_webcrypto_module.c
external/qjs_webcrypto_module.c
test/webcrypto/sign.t.mjs