Self signed certificate in macOS Sierra

To add self signed certificates in macOS Sierra for testing, you need to create root CA certificate signed with SHA256

openssl req -x509 -nodes -sha256 -days 365 -newkey rsa:2048 -keyout localhost.key -out localhost.cert

and add it to System keychain using

sudo security add-trusted-cert -d -r trustAsRoot -k /Library/Keychains/System.keychain

Written by

Argumentative. Opinionated. Always right. . Drinker. love Fun, knowledge greedy .

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store