Skip to content

Commit 3c9436b

Browse files
authored
Merge pull request #2812 from vinothsa4891/bugfix/support-reject-unauthorized
Adding fix to ignore self-signed certificates verification
2 parents 0430dc5 + 7121f27 commit 3c9436b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: packages/grpc-js/src/channel-credentials.ts

+6
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export interface VerifyOptions {
5454
* has been performed on the peer certificate.
5555
*/
5656
checkServerIdentity?: CheckServerIdentityCallback;
57+
rejectUnauthorized?: boolean;
5758
}
5859

5960
/**
@@ -207,6 +208,11 @@ class SecureChannelCredentialsImpl extends ChannelCredentials {
207208
this.connectionOptions.checkServerIdentity =
208209
verifyOptions.checkServerIdentity;
209210
}
211+
212+
if (verifyOptions?.rejectUnauthorized !== undefined) {
213+
this.connectionOptions.rejectUnauthorized =
214+
verifyOptions.rejectUnauthorized;
215+
}
210216
}
211217

212218
compose(callCredentials: CallCredentials): ChannelCredentials {

0 commit comments

Comments
 (0)