How to create self-signed certificate
certificate ssl localhost debug windows osx english
Intro
Based on experience in some scenarios you would debug your applications with certificate using https on your localhost.
If you are using latest version of react-script
you are good, since its automatically creates self-signed certificate. But in another scenarios you would want to install it manually. Please read my tutorial below if you want to generate and install cert for Windows/OSX.
To debug your app locally for web client/desktop environments using secure protocol https you will need to add a certificate for localhost to Trusted Root Certification Authorities
catalog.
Trusting the SSL certificate
- Open the Chrome Developer Tools window (
ctrl + shift + i
/cmd + option + i
). - Click on the
Security
tab - Click on
View certificate
and you’ll have the option to download the certificate — either by dragging it to your desktop in OS X, or by clicking on theDetails
tab in Windows and clickingCopy to File…
Install/trust certificate on Windows
- Choose the
DER encoded binary X.509 (.CER)
option (the first one) and save it. - Double click on the certificate and install it.
- Choose
Local Machine
- Select
Place all certificates in the following store
- Choose
Trusted Root Certification Authorities
- Confirm your installation
Install/trust certificate on Mac OS X
- On OS X, open the Keychain Access utility and select
System
from the menu on the left. Click the lock icon to enable changes. - Click the plus button near the bottom to add a new certificate, and select the
localhost.cer
file you dragged to the desktop. ClickAlways Trust
in the dialog that appears. - After adding the certificate to the system keychain, double-click the certificate and expand the
Trust
section of the certificate details. SelectAlways Trust
for every option.
P.S. if you still have certificate warning issue in browser, you should to reboot your machine.
Happy creating self-signed certificate! :)