DEV Community

Cover image for Certificate Create - SSL/TLS
Ibrahim S
Ibrahim S

Posted on

1

Certificate Create - SSL/TLS

SSL is a protocol that encrypts and secures communication happening over the internet.

TLS Stands for Transport Layer Security. It is just an update of SSL. It is more secure.

Multi-domain certificates, also called SAN (Subject Alternative Name) certificates, secure multiple domains (or) subdomains under a single SSL installation.

Usually, a multi-domain certificate will include 3 domains by default, but you can add up to 250 SANs for an additional fee.

Wildcard certificates secure unlimited subdomains and the main domain under a single installation. If you use multiple subdomains and just one main domain, they are the best encryption option.

Create the Certificate

Create /certificate directory

mkdir /certificate 
cd certificate
Enter fullscreen mode Exit fullscreen mode

Image description

Create the certificate

openssl req -new -newkey rsa:2048 -x509 -sha256 -days 365 -nodes -out MyCertificate.crt -keyout MyKey.key
Enter fullscreen mode Exit fullscreen mode

Image description

newkey rsa:2048: RSA 2048 is the default on more recent versions of OpenSSL but to be sure of the key size, you should specify it during creation.

x509: Create a self-signed certificate.

sha256: Generate the certificate request using 265-bit SHA (Secure Hash Algorithm)

days: Determines the length of time in days that the certificate is being issued. For a self-signed certificate, this value can be increased as necessary.

nodes: Create a certificate that does not require a passphrase. If this option is excluded, you will be required to enter the passphrase in the console each time the application using it is restarted.

Image description

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs