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 AssemblyAI

Automatic Speech Recognition with AssemblyAI

Experience near-human accuracy, low-latency performance, and advanced Speech AI capabilities with AssemblyAI's Speech-to-Text API. Sign up today and get $50 in API credit. No credit card required.

Try the API

Top comments (0)

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

👋 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