Get the latest tech news

Setting up a trusted, self-signed SSL/TLS certificate authority in Linux


With OpenSSL, it’s pretty easy to generate a simple self-signed TLS certificate. Just run the following command: 1openssl req -x509 -newkey rsa:4096 -sha256 -days 365 -nodes -keyout cert.key -out cert.crt The files that this command generates, cert.key and cert.crt, could be passed to a web server, for example, and it will work fine; that is, all the connections made to that web server will be properly encrypted.

When you visit a website that uses a self-signed TLS certificate, the browser will block your request and tell you that it’s not safe to proceed. (If you have absolutely no idea how SSL/TLS works, you might want to either read this article or watch this video or consult some other source before continuing. The CN=localhost line specifies that we’re using this config file to obtain a certificate for the domain name localhost.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Linux

Linux

Photo of self

self

Photo of SSL

SSL

Related news:

News photo

I helped fix sleep-wake hangs on Linux with AMD GPUs

News photo

New "Faux Bus" API Merged For Linux 6.14 - Including Both Rust & C Bindings

News photo

The Doom-in-a-PDF dev is back – this time with Linux