Don't use self-signed SSL certificates, but install a rootCA certificate #974
Replies: 13 comments
-
Thanks @CryptoVaraan 👍 |
Beta Was this translation helpful? Give feedback.
-
@CryptoVaraan Can you explain in more detail on how you get all local dev sites to have SSL? |
Beta Was this translation helpful? Give feedback.
-
@daugaard47 The code is intended to illustrate what i did to @leokhoa, in the hope he will pick it up and put it in.. If you use it manually then you need to run the second batch file on every change to your hosted projects-directories. Before you run it you need to pick the DNS settings from the file "D:\laragon\etc\ssl\auto.openssl.conf" and copy those into the file "v3.ext" (replacing the settings that are there. After you run it you need to copy the resulting files "laragon.crt" & "laragon.key" over the original files in "D:\laragon\etc\ssl". The certificate from the first batch file needs to be added to the trusted root CA's. Do not run the first batch file after you added the certificate, as it will generate an equally named but new, different one. If you use Firefox, keep in mind that this uses it's own certificate store, so you need to add the root CA there (and enable trust for it) OR you can tell Firefox to use the windows certifcate store. Hope that helps. |
Beta Was this translation helpful? Give feedback.
-
@CryptoVaraan Can you please give a step by step information about how to do it? |
Beta Was this translation helpful? Give feedback.
-
@leokhoa can you add this feature in next release?? |
Beta Was this translation helpful? Give feedback.
-
@krishnaguragain : I will consider it. |
Beta Was this translation helpful? Give feedback.
-
@leokhoa still not integrated into Laragon? |
Beta Was this translation helpful? Give feedback.
-
@leokhoa Anyone can help me? I have the problem ERR_CERT_AUTHORITY_INVALID with SSL when access laragon by another computer. In my computer, where laragon is running works fine. I'm running laragon Portable |
Beta Was this translation helpful? Give feedback.
-
@andersonbravo85 You have to generate a selfsigned SAN certificate with IP-address. It can also be done with CryptoVaraans package. Unfortunately the Laragon routine 'Menu > Apache > SSL > Add Laragon.crt to TrustStore' automatically deletes the IP-address entry when adding it to TrustStore. |
Beta Was this translation helpful? Give feedback.
-
@nefzger: I can improve the behavior but first can you provide more details? |
Beta Was this translation helpful? Give feedback.
-
@leokhoa For internal web development testing purposes it is convenient to have SSL not only on localhost but also within an internal network. For this reason I have added in the httpd-ssl.conf:
So I can reach the site via WLAN with a smartphone that is part of the internal network, or via NAT with a "native" Safari Browser running on MacOS on a virtual machine. I tried to edit the hosts file on MacOS: The 'only Chrome'-issue is solved. Certificate export via Windows certmgr seems to work not properly. After I exported with Windows Chrome the Laragon certificate as certificate chain it works in Chrome on MacOS too. Nevertheless the Laragon certificate must be set to 'Always Trust' in the keychain access app on MacOS first. |
Beta Was this translation helpful? Give feedback.
-
Hi I just wanted to say, I came across today and boy , thank you so much. I am not the most professional dev, but struggled to get certificates to work firefox and I came across your, post and boy it works really well. I also incorporated it with the The fix for me was follow instructions here: https://superuser.com/questions/1451895/err-ssl-key-usage-incompatible-solution basically: Changing the following line in keyUsage = keyEncipherment, dataEncipherment But thanks for the easy batch files made it a walk in the park ! |
Beta Was this translation helpful? Give feedback.
-
@CryptoVaraan Tried the steps mentioned by @spamhater-grav (the Superuser link), changing the keyUsage values and running OpenSSL command line to regenerate cert, added laragon.crt to trust store, no joy. Ran your two batch files and they worked perfectly to immediately fix SSL errors. Will make note of your instructions on running them for next time! Thanks for taking the time to post this excellent solution. |
Beta Was this translation helpful? Give feedback.
-
Firefox issues a warning when using self-signed certificates. You need to add exceptions for every site to allow them and there will be NO green padlock. The green padlock can be there when using non-self-signed certificates.
I just replaced the local generated certificate & key in "laragon/etc/ssl" with my own generated ones, added my rootCA to the store and voila, green padlock on all sites.
NOT having this is a pain at times, all sites need valid SSL nowadays.
Added my files to generate this FYI (updated):
_OpenSSL_Create_Certificates.zip
Beta Was this translation helpful? Give feedback.
All reactions