微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

当REST API服务器发布自签名证书时,如何通过https从Node API与REST API通信

如何解决当REST API服务器发布自签名证书时,如何通过https从Node API与REST API通信

我们有一个Node JS API客户端连接到基于Java的REST API服务器。服务器发布自签名证书。目前,我们设置:

  rejectUnauthorized: false
});```
So this basically doesn’t care if the server’s identity cannot be verified. And it can’t be verified as it is self-signed and it won’t match the built-in CA’s.

Now I have the Root CA and the intermediate certs in the key-chain. Is there any configuration I can use in Node to verify the certificate that the server returns if I have the Root CA's and relevant certs on File.

Also,do I need the intermediate certs in the Key chain for this?
I am not well versed in https and any help is appreciated.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。