14

I need to see how a web application will work with HTTPS. But I can't really find much information around about it. I tried to set up my local Apache but I can't find a CA autorithy to sign my certificate... Hints? Suggestions?

Neil Aitken
  • 7,856
  • 3
  • 41
  • 40
gotch4
  • 13,093
  • 29
  • 107
  • 170
  • If it’s really just for local testing purposes, the easiest is to create a self-signed certificate. – Gumbo Jul 02 '10 at 10:24

2 Answers2

12

The possibilities to consider are:

  1. Generate your own certificate (self-signed certificate)
  2. Get a certificate issued by a known issuer
  3. Get a certificate issued by an issuer not recognised by the browser

Nr. 1 is probably the most widely used solution. You can find instructions here. The only disadvantage is that browsers will complaint about the unknown CA. In Firefox, you can just add a permanent exception and get rid of the warning. (Neither Chrome nor Internet Explorer seem to provide such option.)

Nr. 2 normally costs money so it isn't a popular choice for dev environments.

Nr. 3 can be obtained for free (see https://www.cacert.org/) but they also trigger a browser warning. A difference with nr. 1 is that you have the possibility of adding the CA to your browser's trusted authorities; however, that's a serious decision that requires serious consideration because of its security implications. In general, I would not recommend it for mere testing.

Álvaro González
  • 142,137
  • 41
  • 261
  • 360
  • Thank you for the first link, it works with some perseverance, do not forget to uncomment "LoadModule ssl_module libexec/apache2/mod_ssl.so" in httpd.conf. Safari provides the option to remember the exception through Keychain. – Liviu Sep 26 '17 at 17:36
2

Self-signed certificates (as already mentioned) are probably the easiest option for a single host.

If there are a few hosts, you could create a mini CA of your own. There are tools for this, for example:

  • CA.pl: a script provided with OpenSSL.
  • TinyCA: a tool with a GUI.
Lord Loh.
  • 2,437
  • 7
  • 39
  • 64
Bruno
  • 119,590
  • 31
  • 270
  • 376