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

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay