The issue was introduced in
75ca26f83471 (0.8.10).
The QuickJS WebCrypto implementation called BN_bn2binpad() and
ECDSA_SIG_set0() directly, although compatibility wrappers were already
used by the njs implementation. It also referenced an njs-only
string_info variable when HKDF was unavailable.
Use the shared OpenSSL compatibility wrappers and remove the stale
reference.
#else
(void) pctx;
(void) olen;
- (void) &string_info;
(void) &info;
#endif
s = ec_sig->s;
#endif
- if (BN_bn2binpad(r, data, n) <= 0) {
+ if (njs_bn_bn2binpad(r, data, n) <= 0) {
goto fail;
}
- if (BN_bn2binpad(s, &data[n], n) <= 0) {
+ if (njs_bn_bn2binpad(s, &data[n], n) <= 0) {
goto fail;
}
goto fail;
}
- if (ECDSA_SIG_set0(ec_sig, r, s) != 1) {
+ if (njs_ecdsa_sig_set0(ec_sig, r, s) != 1) {
BN_free(r);
BN_free(s);
JS_ThrowOutOfMemory(cx);