Re: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version - Openssl

This is a discussion on Re: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version - Openssl ; 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); > ?> > ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Re: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version

  1. Re: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version

    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

    __________________________________________________ ____________________
    OpenSSL Project http://www.openssl.org
    User Support Mailing List openssl-users@openssl.org
    Automated List Manager majordomo@openssl.org

  2. Smile Re: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version

    solved: got the same message:

    curl -k -v --sslv3 ftps://:21 --user :
    * About to connect() to 21 (#0)
    * Trying IP.IP.IP.IP... connected
    * Connected to (IP.IP.IP.IP) port 21 (#0)
    * SSLv3, TLS handshake, Client hello (1):
    * SSLv3, TLS alert, Server hello (2):
    * error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
    * Closing connection #0
    curl: (35) error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number

    tried and it worked
    curl -k -v --ftp-ssl ftp://:21 --user :
    * About to connect() to port 21 (#0)
    * Trying 217.89.34.22... connected
    * Connected to (IP.IP.IP.IP) port 21 (#0)
    < 220 Microsoft FTP Service
    > AUTH SSL
    < 234 AUTH command ok. Expecting TLS Negotiation.
    * SSLv3, TLS handshake, Client hello (1):
    * SSLv3, TLS handshake, Server hello (2):
    * SSLv3, TLS handshake, CERT (11):
    * SSLv3, TLS handshake, Server finished (14):
    * SSLv3, TLS handshake, Client key exchange (16):
    * SSLv3, TLS change cipher, Client hello (1):
    * SSLv3, TLS handshake, Finished (20):
    * SSLv3, TLS change cipher, Client hello (1):
    * SSLv3, TLS handshake, Finished (20):
    * SSL connection using AES128-SHA

+ Reply to Thread