Skip to content

Commit afaf889

Browse files
richardlaumarco-ippolito
authored andcommitted
test: skip test for dynamically linked OpenSSL
As a temporary measure to unblock the CI, skip the RSA implicit rejection test when Node.js is built against a dynamically linked OpenSSL. PR-URL: #52542 Refs: #52537 Refs: nodejs-private/node-private#525 Refs: https://hackerone.com/reports/2269177 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
1 parent 204018b commit afaf889

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

test/parallel/test-crypto-rsa-dsa.js

+18-14
Original file line numberDiff line numberDiff line change
@@ -223,20 +223,24 @@ function test_rsa(padding, encryptOaepHash, decryptOaepHash) {
223223

224224

225225
if (padding === constants.RSA_PKCS1_PADDING) {
226-
assert.throws(() => {
227-
crypto.privateDecrypt({
228-
key: rsaKeyPem,
229-
padding: padding,
230-
oaepHash: decryptOaepHash
231-
}, encryptedBuffer);
232-
}, { code: 'ERR_INVALID_ARG_VALUE' });
233-
assert.throws(() => {
234-
crypto.privateDecrypt({
235-
key: rsaPkcs8KeyPem,
236-
padding: padding,
237-
oaepHash: decryptOaepHash
238-
}, encryptedBuffer);
239-
}, { code: 'ERR_INVALID_ARG_VALUE' });
226+
// TODO(richardlau): see if it's possible to determine implicit rejection
227+
// support when dynamically linked against OpenSSL.
228+
if (!process.config.variables.node_shared_openssl) {
229+
assert.throws(() => {
230+
crypto.privateDecrypt({
231+
key: rsaKeyPem,
232+
padding: padding,
233+
oaepHash: decryptOaepHash
234+
}, encryptedBuffer);
235+
}, { code: 'ERR_INVALID_ARG_VALUE' });
236+
assert.throws(() => {
237+
crypto.privateDecrypt({
238+
key: rsaPkcs8KeyPem,
239+
padding: padding,
240+
oaepHash: decryptOaepHash
241+
}, encryptedBuffer);
242+
}, { code: 'ERR_INVALID_ARG_VALUE' });
243+
}
240244
} else {
241245
let decryptedBuffer = crypto.privateDecrypt({
242246
key: rsaKeyPem,

0 commit comments

Comments
 (0)