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

SSL Certificate Verification Fails For Remote RPC #20

Open
stonemelody opened this issue Nov 21, 2021 · 6 comments
Open

SSL Certificate Verification Fails For Remote RPC #20

stonemelody opened this issue Nov 21, 2021 · 6 comments

Comments

@stonemelody
Copy link

Using version v3.0.0, SSL certificate verification fails with a base error of ERR_TLS_CERT_ALTNAME_INVALID. This is caused by the default TLS checking code in node trying to verify the hostname on the cert. The chia code itself ignores these checks. From some searching around, adding checkServerIdentity: () => undefined as one of the options for the https rpc agent disables hostname checking

@ChiaMineJP
Copy link
Member

Thanks for reporting.

adding checkServerIdentity: () => undefined as one of the options for the https rpc agent disables hostname checking

Did you actually confirm this?
Skipping server hostname check seems to be insecure, and sounds like the cert/key you used were wrong.
Are you sure that cert/key you used valid?

@stonemelody
Copy link
Author

yes, I have confirmed this in the v1.2.11 chia code for both servers and clients that they use. Yes, the certificates that I used were valid :)

@1Megu
Copy link
Contributor

1Megu commented Dec 2, 2021

I've submitted a PR for this as its standard with the core Chia clients to skip hostname checking. #22

@ChiaMineJP
Copy link
Member

The PR has been merged. Thank you!

@ChiaMineJP
Copy link
Member

I'll release v3.0.1-beta in several days. Please test that version whether it resolves your problem. Thank you for patience!

@ChiaMineJP ChiaMineJP reopened this Dec 2, 2021
@ChiaMineJP
Copy link
Member

I've just release [email protected]
Could you install it by npm i [email protected] or yarn add [email protected] and check whether it works?

Please note that I added the option to control whether to skip hostname check or not.

const agent = new RPCAgent({service: "full_node", skip_hostname_verification: true});

Read more here: https://github.com/Chia-Mine/chia-agent/blob/v3.0.1/src/rpc/README.md

Thank you.

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

No branches or pull requests

3 participants