What you can do with SSL & OpenSSL Setup Guide
- Set up lets encrypt certificate
- Generate certbot command
- Create self signed ssl command
How this security utility works
Build Certbot setup commands for a public Let's Encrypt certificate or OpenSSL commands and trust instructions for a local self-signed certificate.
Example input
OpenSSL mode: common name localhost, validity 365 days, SAN enabled, OS macOSExample output
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout localhost.key -out localhost.crt -subj "/CN=localhost" -addext "subjectAltName=DNS:localhost"Practical workflow
- Choose Certbot for a public domain certificate or OpenSSL Self-Signed for local development and internal testing.
- In Certbot mode, enter a domain and optional account email, select the server plugin and operating system, then review the generated command. The email argument is shell-quoted.
- In OpenSSL mode, enter a hostname and a whole-number validity from 1 to 3,650 days; SAN is enabled by default. Run the command locally to create the certificate and key.
- Use Certbot's dry-run renewal check for plugin-managed certificates. Manual mode needs authentication and cleanup hooks for unattended renewal; follow the separate trust steps for a self-signed certificate.
Common use cases
- Configure a public Nginx or Apache host to request and install a Let's Encrypt certificate with Certbot.
- Generate a SAN-enabled self-signed certificate for a local development hostname and trust it on a test device.
- Review Certbot plugin or manual ACME challenge commands before running them on a server you administer.
Important notes and limitations
- The browser generates instructions only. Certbot creates a public certificate and key on the target server; the OpenSSL command writes a self-signed certificate and private key where you run it.
- The OpenSSL command uses RSA 2048, validates the hostname, and includes a DNS Subject Alternative Name by default. The -addext option requires an OpenSSL version that supports it.
- Validity days are whole numbers from 1 through 3,650. Self-signed certificates are not publicly trusted; use a public certificate authority for an internet-facing site.
- Certbot manual mode does not renew unattended by itself. A working --manual-auth-hook is required to automate each DNS or HTTP challenge; --manual-cleanup-hook can remove temporary challenge records afterward.
OpenSSL local certificate generation commands
Generate self-signed certificate with SAN for localhost
openssl req -x509 -newkey rsa:2048 -nodes -days 365 -keyout localhost.key -out localhost.crt -subj '/CN=localhost' -addext 'subjectAltName=DNS:localhost,IP:127.0.0.1'Generates a 2048-bit RSA private key and self-signed X.509 certificate with Subject Alternative Names for local HTTPS development.
Inspect certificate expiration & SAN details
openssl x509 -in localhost.crt -text -noout | grep -A 2 'Subject Alternative Name'Decodes the X.509 certificate and prints the Subject Alternative Names and expiration dates.
Generate private key & CSR for production CA
openssl req -new -newkey rsa:2048 -nodes -keyout domain.key -out domain.csr -subj '/C=US/ST=State/L=City/O=Org/CN=example.com'Creates an unencrypted private key and Certificate Signing Request (CSR) to submit to a commercial Certificate Authority.
TLS/SSL Certificate Types & Security Specification
| Certificate Type | Validation Level | SAN Support | Browser Trust Level | Primary Use Case |
|---|---|---|---|---|
| Self-Signed (Development) | None (Locally generated) | Mandatory in modern browsers (DNS:localhost, IP:127.0.0.1) | Untrusted (Requires manual OS/browser trust store import) | Local HTTPS development, Docker container testing |
| Domain Validated (DV - Let's Encrypt) | Automated ACME challenge (HTTP-01 / DNS-01) | Up to 100 SANs per certificate | Globally Trusted across all modern browsers | Standard web apps, public APIs, SaaS production domains |
| Organization Validated (OV) | Manual business entity verification | Standard multi-domain SAN | Globally Trusted | Corporate intranets, business portals, enterprise compliance |
| Internal Root CA + Leaf Cert | Internal PKI infrastructure | Full wildcard and private SAN support | Trusted within corporate/fleet devices via MDM | Kubernetes service mesh, mutual TLS (mTLS) microservices |
SSL/TLS certificate & browser trust troubleshooting
NET::ERR_CERT_COMMON_NAME_INVALID
Cause: Chrome and Safari ignore the Common Name (CN) field and strictly enforce Subject Alternative Names (SAN). A certificate without 'subjectAltName=DNS:localhost' will be rejected.
Solution: Regenerate the certificate using the -addext flag: -addext 'subjectAltName=DNS:localhost,IP:127.0.0.1'.
SEC_ERROR_UNKNOWN_ISSUER / Certificate Authority Invalid
Cause: The certificate is self-signed and its root authority is not present in the operating system or browser trust store.
Solution: On macOS, drag the certificate into Keychain Access under System and set 'When using this certificate: Always Trust'. On Linux, copy to /usr/local/share/ca-certificates and run update-ca-certificates.
SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca
Cause: In mutual TLS (mTLS) or curl CLI, the client does not trust the self-signed server certificate.
Solution: Pass the custom CA certificate using curl --cacert localhost.crt https://localhost:3000, or use -k for local testing only.
Continue your workflow
- Crypto Utility — Generate secure cryptographic keys and inspect asymmetric encryption primitives.
- Hash Generator — Calculate SHA-256 certificate fingerprints and verify public key hashes.
- HTTP Headers Inspector — Check Strict-Transport-Security (HSTS) headers and TLS negotiation on live servers.
- DNS Lookup — Verify CAA records to ensure authorized Certificate Authorities can issue certificates.
Frequently asked questions
Does this tool create the certificate for me?
No. The browser shows Certbot setup steps or an OpenSSL command; you run them on the server or computer that should hold the key.
Why does my browser still show a warning after trusting the certificate?
The OpenSSL command includes a Subject Alternative Name matching the entered hostname by default. If your OpenSSL build does not recognize -addext, use a config file to add the SAN extension.
What does -nodes mean?
“No DES” — the private key is written unencrypted so your dev server can start without prompting for a passphrase. Do not use -nodes for keys that leave your machine.
Can I use this for a real website?
Self-signed certificates are not trusted by visitors' browsers. For a public domain use Let's Encrypt (free) or a commercial certificate authority.
Will Certbot manual mode renew certificates automatically?
Not by itself. A working --manual-auth-hook is required to answer each ACME challenge unattended. A --manual-cleanup-hook can remove temporary challenge records after validation; without an authentication hook, someone must complete each challenge manually.