File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -627,7 +627,8 @@ void SecureContext::Init(const FunctionCallbackInfo<Value>& args) {
627
627
max_version = TLS1_2_VERSION;
628
628
method = TLS_client_method ();
629
629
} else {
630
- THROW_ERR_TLS_INVALID_PROTOCOL_METHOD (env, " Unknown method" );
630
+ const std::string msg (" Unknown method: " );
631
+ THROW_ERR_TLS_INVALID_PROTOCOL_METHOD (env, (msg + * sslmethod).c_str ());
631
632
return ;
632
633
}
633
634
}
Original file line number Diff line number Diff line change @@ -8,7 +8,10 @@ const tls = require('tls');
8
8
9
9
assert . throws ( function ( ) {
10
10
tls . createSecureContext ( { secureProtocol : 'blargh' } ) ;
11
- } , / U n k n o w n m e t h o d / ) ;
11
+ } , {
12
+ code : 'ERR_TLS_INVALID_PROTOCOL_METHOD' ,
13
+ message : 'Unknown method: blargh' ,
14
+ } ) ;
12
15
13
16
const errMessageSSLv2 = / S S L v 2 m e t h o d s d i s a b l e d / ;
14
17
You can’t perform that action at this time.
0 commit comments