File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ export interface VerifyOptions {
5353 * has been performed on the peer certificate.
5454 */
5555 checkServerIdentity ?: CheckServerIdentityCallback ;
56+ rejectUnauthorized ?: boolean ;
5657}
5758
5859/**
@@ -198,6 +199,11 @@ class SecureChannelCredentialsImpl extends ChannelCredentials {
198199 this . connectionOptions . checkServerIdentity =
199200 verifyOptions . checkServerIdentity ;
200201 }
202+
203+ if ( verifyOptions ?. rejectUnauthorized ) {
204+ this . connectionOptions . rejectUnauthorized =
205+ verifyOptions . rejectUnauthorized ;
206+ }
201207 }
202208
203209 compose ( callCredentials : CallCredentials ) : ChannelCredentials {
Original file line number Diff line number Diff line change @@ -743,7 +743,6 @@ export class Http2SubchannelConnector implements SubchannelConnector {
743743 ...connectionOptions ,
744744 ...address ,
745745 enableTrace : options [ 'grpc-node.tls_enable_trace' ] === 1 ,
746- rejectUnauthorized : options [ 'grpc-node.tls_reject_unauthorized' ] ?? true ,
747746 } ;
748747
749748 /* http2.connect uses the options here:
@@ -838,9 +837,6 @@ export class Http2SubchannelConnector implements SubchannelConnector {
838837 if ( options [ 'grpc-node.tls_enable_trace' ] ) {
839838 connectionOptions . enableTrace = true ;
840839 }
841- if ( options [ 'grpc-node.tls_reject_unauthorized' ] ) {
842- connectionOptions . rejectUnauthorized = options [ 'grpc-node.tls_reject_unauthorized' ] ;
843- }
844840 }
845841
846842 return getProxiedConnection ( address , options , connectionOptions ) . then (
You can’t perform that action at this time.
0 commit comments