我正在尝试使用STARTTLS发送带有php和swiftmailer的电子邮件,但我收到了证书错误.我具有SMTP服务器的root访问权限,并且使用的证书是自签名的.我在两台机器上使用Debian(Web服务器和smtp服务器)
PHP message: PHP Warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in [..]/lib/classes/Swift/Transport/StreamBuffer.php on line 97
PHP message: PHP Fatal error: Uncaught exception 'Swift_TransportException' with message 'Unable to connect with TLS encryption' in [..]/lib/classes/Swift/Transport/EsmtpTransport.php:294
我是否需要在某个地方添加自己的证书才能接受它?或者这是一些OpenSSL配置错误?