File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ export interface VerifyOptions {
53
53
* has been performed on the peer certificate.
54
54
*/
55
55
checkServerIdentity ?: CheckServerIdentityCallback ;
56
+ rejectUnauthorized ?: boolean ;
56
57
}
57
58
58
59
/**
@@ -198,6 +199,11 @@ class SecureChannelCredentialsImpl extends ChannelCredentials {
198
199
this . connectionOptions . checkServerIdentity =
199
200
verifyOptions . checkServerIdentity ;
200
201
}
202
+
203
+ if ( verifyOptions ?. rejectUnauthorized ) {
204
+ this . connectionOptions . rejectUnauthorized =
205
+ verifyOptions . rejectUnauthorized ;
206
+ }
201
207
}
202
208
203
209
compose ( callCredentials : CallCredentials ) : ChannelCredentials {
Original file line number Diff line number Diff line change @@ -743,7 +743,6 @@ export class Http2SubchannelConnector implements SubchannelConnector {
743
743
...connectionOptions ,
744
744
...address ,
745
745
enableTrace : options [ 'grpc-node.tls_enable_trace' ] === 1 ,
746
- rejectUnauthorized : options [ 'grpc-node.tls_reject_unauthorized' ] ?? true ,
747
746
} ;
748
747
749
748
/* http2.connect uses the options here:
@@ -838,9 +837,6 @@ export class Http2SubchannelConnector implements SubchannelConnector {
838
837
if ( options [ 'grpc-node.tls_enable_trace' ] ) {
839
838
connectionOptions . enableTrace = true ;
840
839
}
841
- if ( options [ 'grpc-node.tls_reject_unauthorized' ] ) {
842
- connectionOptions . rejectUnauthorized = options [ 'grpc-node.tls_reject_unauthorized' ] ;
843
- }
844
840
}
845
841
846
842
return getProxiedConnection ( address , options , connectionOptions ) . then (
You can’t perform that action at this time.
0 commit comments