Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change certificate in callback #1866

Closed
wants to merge 1 commit into from
Closed

Conversation

askidmobile
Copy link

On communicate module we need to verifity certificate on server.
For verifity we use fingerprint, subjectaltname.
But this grpc version callback only raw data.

For this way we use nodejs doc:
https://nodejs.org/api/tls.html#tls_certificate_object

I'm change file for coorect. Please apply pull request, so we can use them through npm. Thnk's.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jul 30, 2021

CLA Signed

The committers are authorized under a signed CLA.

@murgatroid99
Copy link
Member

Sorry for the delayed response. I think we can accept this, but you can simplify it further. With your change, now the checkServerIdentity function defined there is just passing its arguments through unchanged. So, we can just use the verifyOptions.checkServerIdentity function directly. In other word, you can replace line 191 with

this.connectionOptions = {
  secureContext,
  checkServerIdentity: verifyOptions?.checkServerIdentity
};

And remove the entire if block after that.

@murgatroid99
Copy link
Member

This was superseded by #1968.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants