Unable to establish SSL connection, how do I fix my SSL cert?

后端 未结 9 988
醉话见心
醉话见心 2020-11-27 14:17

I\'m trying to wget to my own box, and it can\'t be an internal address in the wget (so says another developer).

When I wget, I get this:



        
相关标签:
9条回答
  • 2020-11-27 14:50

    For me a DNS name of my server was added to /etc/hosts and it was mapped to 127.0.0.1 which resulted in

    SL23_GET_SERVER_HELLO:unknown protocol

    Removing mapping of my real DNS name to 127.0.0.1 resolved the problem.

    0 讨论(0)
  • 2020-11-27 14:51

    Just a quick note (and possible cause).

    You can have a perfectly correct VirtualHost setup with _default_:443 etc. in your Apache .conf file.

    But... If there is even one .conf file enabled with incorrect settings that also listens to port 443, then it will bring the whole SSL system down.

    Therefore, if you are sure your .conf file is correct, try disabling the other site .conf files in sites-enabled.

    0 讨论(0)
  • 2020-11-27 14:54

    I had this problem when setting up a new EC2 instance. I had not added HTTPS to my security group, and so port 443 was not open.

    0 讨论(0)
  • 2020-11-27 15:01

    This problem happened for me only in special cases, when I called website from some internet providers,

    I've configured only ip v4 in VirtualHost configuration of apache, but some of router use ip v6, and when I added ip v6 to apache config the problem solved.

    0 讨论(0)
  • 2020-11-27 15:03

    SSL23_GET_SERVER_HELLO:unknown protocol

    This error happens when OpenSSL receives something other than a ServerHello in a protocol version it understands from the server. It can happen if the server answers with a plain (unencrypted) HTTP. It can also happen if the server only supports e.g. TLS 1.2 and the client does not understand that protocol version. Normally, servers are backwards compatible to at least SSL 3.0 / TLS 1.0, but maybe this specific server isn't (by implementation or configuration).

    It is unclear whether you attempted to pass --no-check-certificate or not. I would be rather surprised if that would work.

    A simple test is to use wget (or a browser) to request http://example.com:443 (note the http://, not https://); if it works, SSL is not enabled on port 443. To further debug this, use openssl s_client with the -debug option, which right before the error message dumps the first few bytes of the server response which OpenSSL was unable to parse. This may help to identify the problem, especially if the server does not answer with a ServerHello message. To see what exactly OpenSSL is expecting, check the source: look for SSL_R_UNKNOWN_PROTOCOL in ssl/s23_clnt.c.

    In any case, looking at the apache error log may provide some insight too.

    0 讨论(0)
  • 2020-11-27 15:04

    The problem I faced was in client server environment. The client was trying to connect over http port 80 but wanted the server proxy to redirect the request to some other port and data was https. So basically asking secure information over http. So server should have http port 80 as well as the port client is requesting, let's say urla:1111\subB.

    The issue was server was hosting this on some other port e,g urla:2222\subB; so the client was trying to access over 1111 was receiving the error. Correcting the port number should fix this issue. In this case to port number 1111.

    0 讨论(0)
提交回复
热议问题