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) {
627627 max_version = TLS1_2_VERSION;
628628 method = TLS_client_method ();
629629 } 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 ());
631632 return ;
632633 }
633634 }
Original file line number Diff line number Diff line change @@ -8,7 +8,10 @@ const tls = require('tls');
88
99assert . throws ( function ( ) {
1010 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+ } ) ;
1215
1316const errMessageSSLv2 = / S S L v 2 m e t h o d s d i s a b l e d / ;
1417
You can’t perform that action at this time.
0 commit comments