Create production-ready OpenSSL req.conf configuration files, generate 2048/4096-bit RSA or ECDSA private keys and Certificate Signing Requests (CSR) for single hostnames and wildcard domains (*.domain.com) with Subject Alternative Name (SAN) extensions.
Generate SAN & Wildcard (*.domain.com) OpenSSL configuration files (req.conf).
Choose between a Direct URL / Multi-Domain SAN configuration (e.g., demo.com, app.demo.com) or a Wildcard Domain configuration (*.demo.com) to cover all 1st-level subdomains under a single SSL certificate.
Fill in your Organization (O), Organizational Unit (OU), Country Code (C), State (ST), Locality (L), Common Name (CN), and list all Subject Alternative Names (SANs) under alt_names.
Select your public key algorithm (RSA 2048-bit, RSA 4096-bit, or ECDSA P-256 / P-384), signature hash digest (SHA-256), and optional key encryption passphrase.
Copy or download the generated OpenSSL req.conf configuration file and execute the generated one-liner OpenSSL CLI command in your terminal to create your .key and .csr files.
Submit the generated .csr text to your Certificate Authority (DigiCert, Sectigo, Let's Encrypt, GlobalSign, or AWS ACM) for signing and validation.
Secure an unlimited number of customer subdomains (tenant1.demo.com, tenant2.demo.com) using a single wildcard certificate and single private key pair deployed on your API gateway or ingress controller.
Generate SAN-enabled CSRs containing root (demo.com) and wildcard (*.demo.com) hostnames for deployment on AWS Application Load Balancers (ALB), Nginx Ingress Controllers, and Traefik.
Utilize non-interactive req.conf configuration files (prompt = no) in Ansible, Terraform, Puppet, and Bash scripts to generate keys and CSRs automatically without human intervention.
Generate high-security Elliptic Curve Cryptography (ECDSA) or 4096-bit RSA private keys for zero-trust internal microservices and financial transaction systems requiring maximum cryptographic protection.
Public Key Infrastructure (PKI) forms the foundation of modern web security, enabling encrypted, authenticated communication between web browsers, API clients, and cloud servers via TLS/SSL certificates. A Certificate Signing Request (CSR) is an encoded block of text in PEM/DER format containing a server's public key and organizational identification details. A system administrator submits the CSR to a trusted Certificate Authority (CA) (such as Let's Encrypt, DigiCert, Sectigo, GlobalSign, or AWS Certificate Manager) to receive a digitally signed X.509 SSL/TLS certificate.
When requesting an SSL/TLS certificate, two cryptographic files are created as a matched keypair:
req.conf File Architecture ExplainedThe OpenSSL command-line tool utilizes configuration files (.conf or .cnf) to automate key and CSR generation. Using an explicit configuration file is the enterprise industry standard because it allows version controlling your CSR settings and prevents typos during manual interactive CLI prompts.
req.conf Sections[req] Initialization SectionsubjectAltName and keyUsage) directly inside the generated CSR.prompt = no instructs OpenSSL to read all values strictly from the configuration file rather than prompting the user on the command line. This allows seamless integration into CI/CD pipelines (e.g. Azure DevOps, GitHub Actions, Ansible, Terraform, Jenkins).[req_distinguished_name] Identity SectionIN for India, US for United States, GB for United Kingdom).PY or Pudhucherry, California, London).IT, DevOps, Cloud Infrastructure).demo.com or app.demo.com. For wildcard certificates, use *.demo.com or demo.com.[v3_req] and [alt_names] Extension Sections[alt_names]. Modern web browsers (Google Chrome, Mozilla Firefox, Apple Safari, Microsoft Edge) enforce SAN validation and ignore the legacy `CN` field.DNS.1 = demo.com & DNS.2 = *.demo.com**: Lists explicit domain names. Combining demo.com and *.demo.com ensures that both the root domain and all first-level subdomains are covered by a single certificate.*.demo.com) vs. Direct URL SAN Certificates: Architectural ComparisonA Wildcard SSL Certificate utilizes an asterisk wildcard character (*) in the host portion of the domain name (e.g. *.demo.com) to secure an unlimited number of first-level subdomains under the same parent domain using a single SSL certificate and private key pair.
| Feature / Attribute | Direct URL / SAN Certificate (demo.com) | Wildcard SSL Certificate (*.demo.com) |
|---|---|---|
| Subdomain Scope | Only explicitly listed hostnames (demo.com, app.demo.com) | Unlimited 1st-level subdomains (app.demo.com, api.demo.com, dev.demo.com) |
| Root Domain Coverage | Covers root demo.com directly | Requires explicit DNS.1 = demo.com entry in SAN list |
| Multi-Level Subdomains | Secures explicitly listed deep hostnames (sub.app.demo.com) | Does NOT cover 2nd-level subdomains like deep.sub.demo.com (requires *.sub.demo.com) |
| Cost & Licensing | Pay per hostname or SAN slot | Single price for unlimited subdomains |
| Deployment Agility | Requires CA re-issuance for new subdomains | Instant launch of new subdomains without CA interaction |
| Security Blast Radius | Compromised key impacts only specified hosts | Compromised key impacts ALL subdomains sharing the key |
| ACME Validation Requirement | HTTP-01 or DNS-01 challenge | DNS-01 TXT Challenge ONLY (for automated ACME issuance) |
*.demo.com)?acme.demo.com, globex.demo.com). Using a wildcard certificate allows spinning up new tenant subdomains dynamically without requesting a new certificate from a CA.req.conf FileCreate a file named req.conf in your terminal workspace containing your identity and SAN definitions.
-new: Instructs OpenSSL to generate a new Certificate Signing Request.-newkey rsa:2048: Generates a new 2048-bit RSA private key simultaneously.-nodes: ("No DES") Keeps the private key unencrypted on disk (required for automatic web server restarts without prompting for a password).-keyout demo.com.key: Specifies the output filename for the private key.-out demo.com.csr: Specifies the output filename for the CSR.-config req.conf: Supplies the configuration file containing identity and SAN rules.Before submitting the CSR to your CA, inspect the encoded X.509 fields:
Ensure that the CSR public key matches the private key modulus:
*(If both MD5 hash outputs match exactly, the private key and CSR are validly paired.)*
chmod 600 /etc/ssl/private/demo.com.key
openssl rsa -in demo.com.key -aes256 -out demo.com.secure.key
Decode, inspect, and verify JSON Web Tokens (JWT) client-side in your browser.
Inspect SSL/TLS certificates, domain expiration dates, chain of trust, and cipher suites.
Generate cryptographically secure passwords and memorable multi-word passphrases.