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

httpclient连接自签名服务器失败 #114

Closed
windflee opened this issue Sep 25, 2023 · 2 comments
Closed

httpclient连接自签名服务器失败 #114

windflee opened this issue Sep 25, 2023 · 2 comments

Comments

@windflee
Copy link

httpclient不能连接自签名的服务器,可否添加一个忽略证书检查的属性了?类似于自带的TNetHTTPclient组件,都有OnValidateServerCertificate之类的事件可以忽略服务器证书检查的。

@winddriver
Copy link
Owner

肯定是支持自签名证书的,demo里带的证书就是我自己生成的,你检查下你的证书是不是老版本openssl生成的,需要用openssl 1.1以上的版本生成证书,Tools目录里带了OpenSSL 3

源代码里(Net.CrossSslSocket.OpenSSL.pas)这一行就是用来支持自签名证书的
SSL_CTX_set_verify(FSslCtx, SSL_VERIFY_NONE, nil);

@windflee
Copy link
Author

确实是。

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

2 participants