[ adaxx @ 02.11.2015. 12:31 ] @
Pozdrav svima,

u pianju je root server, linux, i problem sa SSL3_GET_SERVER_CERTIFICATE:certificate verify failed , php skripta mi ne salje mail, koristim remote smtp server od gugla odnosno gmail-a, izbacuje mi sledecu gresku:

Code:
Error
stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Error
stream_socket_client(): Failed to enable crypto
Error
stream_socket_client(): unable to connect to ssl://smtp.gmail.com:465 (Unknown error)

Malo sam guglao nasao kao nesto ali neuspesno, da li neko zna kako da resim ovo, ili jednostavno da iskljucim tu verifikaciju sertifikata ?

Hvala
[ Nemanja Avramović @ 03.11.2015. 11:17 ] @
Šta koristiš za slanje mejlova? Ako je phpmailer, pogledaj ovo: https://github.com/PHPMailer/P...rtificate-verification-failure

Ako nije, to rešenje može da se primeni i na druge skripte.

[ adaxx @ 03.11.2015. 14:09 ] @
Problem je resen.

Koristim SWIFT, pokupio sam na jednom forumu, a ovo je resenje:



If you are using PHP 5.6, the error does occur because of the "SSL context options" used for the stream context in swiftmailer. IN PHP 5.6 verify_peer and verify_peer_name the default was set to TRUE, so PHP checks the SSL certificate.
It is currently not possible to disable it in swiftmailer using some options.

You could disable the SSL check by modifying the function "_establishSocketConnection" in StreamBuffer.php.
Add these lines before stream_socket_client command:
Code:
$options['ssl']['verify_peer'] = FALSE;
$options['ssl']['verify_peer_name'] = FALSE;


It would be great if these options could be set without hacking the code.