我尝试通过连接fsockopen到sendm.cert.legalmail.it的465端口,是在意大利被称为PEC SMTPS服务.
使用任何版本的PHP我都试过这个片段工作:
<?php
fsockopen('tls://sendm.cert.legalmail.it', 465);
Run Code Online (Sandbox Code Playgroud)
一切都没问题OpenSSL 1.0.2h,如果我升级到OpenSSL 1.0.2j这个片段失败并出现此错误:
PHP Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages:
error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure in ~/Development/experimental/php-handshake/connect.php on line 3
PHP Warning: fsockopen(): Failed to enable crypto in ~/Development/experimental/php-handshake/connect.php on line 3
PHP Warning: fsockopen(): unable to connect to tls://sendm.cert.legalmail.it:465 (Unknown error) in ~/Development/experimental/php-handshake/connect.php on line 3
Run Code Online (Sandbox Code Playgroud)
所以OpenSSL 1.0.2j我尝试通过命令行连接:
openssl s_client -connect sendm.cert.legalmail.it:465
Run Code Online (Sandbox Code Playgroud)
它完美地运作.
我尝试使用testssl在服务器上检查SSL …