SSL (Secure Sockets Layer) is the historical name. TLS (Transport Layer Security) is the modern protocol that fixes many of SSL’s security problems. Many tools still use “SSL” in their names (for example, OpenSSL), but they work with TLS certificates and TLS connections.

What do certificates do?
TLS/X.509 certificates address two fundamental problems when sending sensitive data (passwords, credit cards) to a website:- Authentication — prove the website is the legitimate site (for example, kodekloud.com) and not an impostor.
- Encryption — ensure the connection between client and server is private and all data in transit is encrypted.

Tools on Linux: OpenSSL
OpenSSL is the de facto cryptography toolkit used on Linux for generating and inspecting TLS/X.509 certificates, private keys, and certificate signing requests (CSRs). Despite its name referencing “SSL”, OpenSSL fully supports modern TLS and X.509 certificates.
req (request, for CSRs), x509 (for certificates), rsa, genpkey, pkcs12, and many more. For subcommand-specific help, read the corresponding man page:
openssl <subcommand> -help for quick usage information.
When to use a CSR vs. a self-signed certificate
- CSR (Certificate Signing Request): generate a key + CSR and submit the CSR to a Certificate Authority (CA) to obtain a publicly trusted certificate.
- Self-signed certificate: create and sign the certificate yourself. Useful for development, testing, or closed environments where you control client trust stores.
Typical workflow at a glance
Working with certificate signing requests (CSRs)
When you want a publicly trusted certificate, you generate a CSR and send it to a CA. The CA validates your identity and signs the CSR, producing a certificate that browsers will trust.
-newkey rsa:2048— create a new RSA key (2048 bits) and a CSR.-keyout key.pem— save the private key tokey.pem.-out req.pem— save the CSR toreq.pem.
-nodes) and then prompt for Distinguished Name (DN) fields (Country, State, Locality, Organization, Common Name, etc.). Historically the Common Name (CN) indicated the hostname, but modern clients rely on the Subject Alternative Name (SAN) extension for hostname verification. Ensure the website hostname appears in SAN (and/or CN for compatibility), e.g., www.kodekloud.com.
A CSR file (PEM format) looks like this:
req.pem to your chosen CA; they will verify and return a signed certificate.
Generating a self-signed certificate
For internal or development use, create a self-signed X.509 certificate and (optionally) an unencrypted private key in one command:-x509— create a self-signed X.509 certificate instead of a CSR.-newkey rsa:4096— generate a new RSA key with 4096 bits.-nodes— do not encrypt the private key (no passphrase).-days 365— certificate validity length in days.-keyout/-out— file names for the private key and certificate.
Inspecting certificates (X.509)
Certificates in PEM form are base64 with header/footer and are not human-friendly to read directly. Useopenssl x509 to view certificate details:
openssl x509 printing options:
(See
openssl x509 -help for complete option list.)
Quick mental model
- Use
openssl reqto generate a new private key and CSR or to create a self-signed certificate (-x509). - Use
openssl x509to inspect or manipulate existing X.509 certificate files.
Common commands you’ll reuse
Also consult the manual pages regularly:
If you need certificates trusted by public browsers, generate a CSR (
openssl req -new ...) and submit it to a Certificate Authority. For internal/testing scenarios you can self-sign (openssl req -x509 ...) and add that certificate to your clients’ trust stores.Links and references
- OpenSSL project: https://www.openssl.org/
- X.509 certificate standard (RFC 5280): https://tools.ietf.org/html/rfc5280
- TLS overview: https://datatracker.ietf.org/doc/html/rfc8446
- Kubernetes Documentation — for TLS in cluster contexts
- Let’s Encrypt — free CA that issues publicly trusted TLS certificates
man openssl-req, man openssl-x509) and the -help flag for each subcommand to explore additional options and examples.