command line - SSL error curl/wget unknown protocol/wrong version number

25
2014-07
  • Fábio Silva

    I've been trying to use local hosted https urls in command line/cron jobs and i get those errors. curl output is similar. The same commands, when used in other servers works perfectly.

    Default

    [root@tejon ~]# wget -O /dev/null https://www.domain.com/cron/notification.php
    --2013-05-27 10:33:38--  https://www.domain.com/cron/notification.php
    Resolving www.domain.com... 173.45.38.60
    Connecting to www.domain.com|173.45.38.60|:443... connected.
    OpenSSL: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
    Unable to establish SSL connection.
    

    TLSv1

    [root@tejon ~]# wget --secure-protocol=TLSv1 -O /dev/null https://www.domain.com/cron/notification.php
    --2013-05-27 10:45:59--  https://www.domain.com/cron/notification.php
    Resolving www.domain.com... 173.45.38.60
    Connecting to www.domain.com|173.45.38.60|:443... connected.
    OpenSSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
    Unable to establish SSL connection.
    

    SSLv2

    [root@tejon ~]# wget --secure-protocol=SSLv2 -O /dev/null https://www.domain.com/cron/notification.php
    --2013-05-27 10:47:18--  https://www.domain.com/cron/notification.php
    Resolving www.domain.com... 173.45.38.60
    Connecting to www.domain.com|173.45.38.60|:443... connected.
    

    and it blocks the input, but the file is not executed.

    SSLv3

    [root@tejon ~]# wget --secure-protocol=SSLv3 -O /dev/null https://www.domain.com/cron/notification.php
    --2013-05-27 10:43:23--  https://www.domain.com/cron/notification.php
    Resolving www.domain.com... 173.45.38.60
    Connecting to www.domain.com|173.45.38.60|:443... connected.
    OpenSSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
    Unable to establish SSL connection.
    
  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    is there a problem in disabling curl and wget?
  • Alaa Alomari

    Is it recommended to disable curl and wget to disallow anyone from accessing my websites using those commands?

    Or is it needed for some search engines to access my websites?

    What are your recommendations regarding curl and wget?


  • Related Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.