Slow SSL / TLS

In the Ubuntu / Apache2 / PHP / cURL settings, I make a SOAP request to the remote server via https. It turns out that the first of these queries always takes at least 2 seconds, while usually it usually has a rounding time of 0.4 s. I did some logging and as it turned out, shaking hands consumes a lot of time with several callbacks. Is there something wrong with my setup? See the following screenshot for a typical handshake.

Wireshark screenshots

In addition, the team

openssl s_client -connect cs17-was.my.salesforce.com:443 -state -nbio 2>&1 | grep "^SSL" 

gives the following result:

 SSL_connect:before/connect initialization SSL_connect:unknown state SSL_connect:error in unknown state SSL_connect:SSLv3 read server hello A SSL_connect:error in SSLv3 read server certificate A SSL_connect:error in SSLv3 read server certificate A SSL_connect:SSLv3 read server certificate A SSL_connect:SSLv3 read server done A SSL_connect:SSLv3 write client key exchange A SSL_connect:SSLv3 write change cipher spec A SSL_connect:SSLv3 write finished A SSL_connect:SSLv3 flush data SSL_connect:error in SSLv3 read finished A SSL_connect:SSLv3 read finished A SSL handshake has read 4332 bytes and written 647 bytes 

Anyone have an idea where the problem is?

+6
source share

Source: https://habr.com/ru/post/975424/


All Articles