How do I generate an SSL certificate? How to access a page with invalid certificate in FF3?

StackOverflow https://stackoverflow.com/questions/264482

  •  06-07-2019
  •  | 
  •  

Question

I am not able to access localhost https pages in firefox3. It gave the error

'Can't connect securely because the SSL protocol has been disabled. (Error code: ssl_error_ssl_disabled)'

I enabled all the SSL2 related preferences through about:config and the error changed to

'Data Transfer Error The browser connected successfully, but the connection was interrupted while transferring information. Please try again.'

The first error seems most likely due to a invalid certificate but can't figure out the second...

Was it helpful?

Solution

Quick way to create a self-signed certificate using openssl:

openssl req -new -x509 -days 365 -nodes -out /etc/apache2/cert.pem -keyout /etc/apache2/cert.pem -subj '/C=US/ST=Yourstate/L=Yourcity/O=Your Company, Inc./OU=Development/CN=your.vhostname.com/emailAddress=youremail@example.com'

(It's better to create a CA certificate separately and use that to create a certificate to use; apache complains to the error log when you use a self-signed certificate like above. But I don't have a recipe handy for doing that.)

Then in your apache configuration (separately for each virtual host if needed), say:

SSLEngine on
SSLCertificateFile /etc/apache2/cert.pem

and make sure mod_ssl is enabled.

You may be able to debug your problems using curl:

$ curl -sSvk https://your.vhostname.com 2>&1 | less

OTHER TIPS

What web server serves the pages? Is it IIS or Apache? Did you try to access these pages with other browsers? Answering the questions will give a clue if problems is in browser or web server.

Here is good link how to create SSL ceritificates

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top