It typically OpenSSL comes pre-installed on macOS
- Open Terminal
macOS includes OpenSSL, so you can run the commands directly from the terminal. - Generate the Private Key
openssl genrsa -out myprivatekey.key 2048 - Create the Certificate Signing Request (CSR)
openssl req -new -key myprivatekey.key -out myrequest.csr
Fill in the requested information. - Generate the Self-Signed Certificate
openssl x509 -req -days 365 -in myrequest.csr -signkey myprivatekey.key -out mycertificate.crt - Verify
The certificate (mycertificate.crt
) and private key (myprivatekey.key
) are now available.