drogon icon indicating copy to clipboard operation
drogon copied to clipboard

https使用ca证书出现请求收不到

Open TYUTthelastone opened this issue 2 years ago • 12 comments
trafficstars

https直接使用ca证书小请求没有问题,大数据的请求(1M以上?)会收不到也不会回复,但是使用server证书就没有问题,这是什么情况?

TYUTthelastone avatar Oct 17 '23 02:10 TYUTthelastone

你说的server证书是自签名证书吗?按说证书只影响ssl建立过程,不应该在大请求上有差别,看看两种实验还有其他变量变化吗?比如网络环境之类的。

an-tao avatar Oct 17 '23 02:10 an-tao

无论是自签署证书还是正常的CA证书,直接使用都有这个问题,抓包时观察到数据确实是发送到端口上了,但是controller层接收不到,网络本地和跨网段都有这个问题

TYUTthelastone avatar Oct 17 '23 03:10 TYUTthelastone

无论是自签署证书还是正常的CA证书,直接使用都有这个问题,抓包时观察到数据确实是发送到端口上了,但是controller层接收不到,网络本地和跨网段都有这个问题

能详细说下环境吗?(OS,openssl版本,编译器,drogon版本)我看看能不能复现。

an-tao avatar Oct 17 '23 03:10 an-tao

应该和操作系统无关,windows,linux都有,drogon 1.8.6,msvc,现在第一个问题是数据量大于ClientMaxBodySize时(设置的16M,发送的32M),没有能够自动回复413,然后是https没有回复的问题,应该不是证书的问题,我还在排查

TYUTthelastone avatar Oct 17 '23 07:10 TYUTthelastone

应该和操作系统无关,windows,linux都有,drogon 1.8.6,msvc,现在第一个问题是数据量大于ClientMaxBodySize时(设置的16M,发送的32M),没有能够自动回复413,然后是https没有回复的问题,应该不是证书的问题,我还在排查

客户端是浏览器还是程序,看看发了content-length头了么,另外不走https直接走http端口正常吗?

an-tao avatar Oct 17 '23 08:10 an-tao

我想加点打印调试一下,怎么在release下输出日志?

TYUTthelastone avatar Oct 18 '23 01:10 TYUTthelastone

我想加点打印调试一下,怎么在release下输出日志?

只有TRACE日志release会屏蔽,其它的只要高于你设置的level都会输出。

an-tao avatar Oct 18 '23 02:10 an-tao

但是我没有输出任何日志文件,是哪里没设置吗

TYUTthelastone avatar Oct 18 '23 02:10 TYUTthelastone

但是我没有输出任何日志文件,是哪里没设置吗

你看看你的配置文件里,log部分怎么设的,如果log_path没有设置,日志会输出到标准输出

an-tao avatar Oct 18 '23 02:10 an-tao

没有读配置,在代码里设置了loglevel和logpath

TYUTthelastone avatar Oct 18 '23 02:10 TYUTthelastone

没有读配置,在代码里设置了loglevel和logpath

应该是等效的

an-tao avatar Oct 18 '23 02:10 an-tao

问题解决了,是之前的c++14的版本在opensslprovider的processApplicationData方法接收ssl数据逻辑存在问题,最新的版本没有这个问题

TYUTthelastone avatar Oct 20 '23 08:10 TYUTthelastone