File tree 2 files changed +7
-0
lines changed
2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -468,6 +468,8 @@ void X509Certificate::Verify(const FunctionCallbackInfo<Value>& args) {
468
468
ASSIGN_OR_RETURN_UNWRAP (&key, args[0 ]);
469
469
CHECK_EQ (key->Data ()->GetKeyType (), kKeyTypePublic );
470
470
471
+ ClearErrorOnReturn clear_error_on_return;
472
+
471
473
args.GetReturnValue ().Set (
472
474
X509_verify (
473
475
cert->get (),
Original file line number Diff line number Diff line change @@ -187,6 +187,11 @@ const der = Buffer.from(
187
187
code : 'ERR_INVALID_ARG_VALUE'
188
188
} ) ;
189
189
190
+ // Confirm failure of X509Certificate:verify() doesn't affect other functions that use OpenSSL.
191
+ assert ( ! x509 . verify ( x509 . publicKey ) ) ;
192
+ // This call should not throw.
193
+ createPrivateKey ( key ) ;
194
+
190
195
// X509Certificate can be cloned via MessageChannel/MessagePort
191
196
const mc = new MessageChannel ( ) ;
192
197
mc . port1 . onmessage = common . mustCall ( ( { data } ) => {
You can’t perform that action at this time.
0 commit comments