File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 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) {
468468 ASSIGN_OR_RETURN_UNWRAP (&key, args[0 ]);
469469 CHECK_EQ (key->Data ()->GetKeyType (), kKeyTypePublic );
470470
471+ ClearErrorOnReturn clear_error_on_return;
472+
471473 args.GetReturnValue ().Set (
472474 X509_verify (
473475 cert->get (),
Original file line number Diff line number Diff line change @@ -187,6 +187,11 @@ const der = Buffer.from(
187187 code : 'ERR_INVALID_ARG_VALUE'
188188 } ) ;
189189
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+
190195 // X509Certificate can be cloned via MessageChannel/MessagePort
191196 const mc = new MessageChannel ( ) ;
192197 mc . port1 . onmessage = common . mustCall ( ( { data } ) => {
You can’t perform that action at this time.
0 commit comments