Hello,
> Hey guys.  :)
> 
> I'm getting an error with PHP 5.1.6 that I've compiled against OpenSSL
> 0.9.8c...
> 
> Here's the code.  Pretty simple:
> 
> <?
> $mysock = fsockopen("tls://smtp.gmail.com", 587, $errno, $errstr, 30);
> ?>
> 
> However, I get the following error:
> 
> ----
> Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error
> messages:
> error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number in
> /root/test.php on line 2
> 
> Warning: fsockopen(): Failed to enable crypto in /root/test.php on line 2
> 
> Warning: fsockopen(): unable to connect to tls://smtp.gmail.com:587 (Unknown
> error) in /root/test.php on line 2
> ----
This error is returned when SSL version number in peer record can not
be recognized (not 20, 30, 31).
This may happen when peer does not speak SSL, for example:
        $ telnet smtp.gmail.com 587
        Trying...
        Connected to gmail-smtp.l.google.com.
        Escape character is '^]'.
        220 mx.gmail.com ESMTP x24sm17819505nfb
        quit
        221 2.0.0 mx.gmail.com closing connection x24sm17819505nfb
        Connection closed by foreign host.

Best regards,
-- 
Marek Marcola <[EMAIL PROTECTED]>

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to