info > openssl-x509(1)

Not found locally for openssl-x509. Try Google search

🔖 NAME

openssl-x509 - Certificate display and signing command

🚀 Quick Reference

Use CaseCommandDescription
📄 Print certificate contentsopenssl x509 -in cert.pem -noout -textDisplay full certificate details in text form
🔑 Print subject alternative namesopenssl x509 -in cert.pem -noout -ext subjectAltNameShow SAN extension(s)
đŸ”ĸ Print serial numberopenssl x509 -in cert.pem -noout -serialDisplay certificate serial number
👤 Print subject nameopenssl x509 -in cert.pem -noout -subjectShow certificate subject
đŸ–ī¸ Print SHA1 fingerprintopenssl x509 -sha1 -in cert.pem -noout -fingerprintDisplay SHA1 digest of DER-encoded certificate
🔄 Convert PEM to DERopenssl x509 -in cert.pem -inform PEM -out cert.der -outform DERChange certificate format
📝 Convert certificate to requestopenssl x509 -x509toreq -in cert.pem -out req.pem -key key.pemGenerate PKCS#10 CSR from certificate
đŸ›ī¸ Sign a request with CAopenssl x509 -req -in req.pem -CA cacert.pem -CAkey key.pem -CAcreateserialMicro-CA signing of a CSR
🔐 Self-sign a requestopenssl x509 -req -in careq.pem -extfile openssl.cnf -extensions v3_ca -key key.pem -out cacert.pemCreate self-signed certificate with extensions
✅ Check expirationopenssl x509 -in cert.pem -checkend 86400Check if certificate expires within 86400 seconds (1 day)

📋 SYNOPSIS

openssl x509 [-help] [-in filename|uri] [-passin arg] [-new]
[-x509toreq] [-req] [-copy_extensions arg] [-inform DER|PEM] [-vfyopt
nm:v] [-key filename|uri] [-keyform DER|PEM|P12|ENGINE] [-signkey
filename|uri] [-out filename] [-outform DER|PEM] [-nocert] [-noout]
[-dateopt] [-text] [-certopt option] [-fingerprint] [-alias] [-serial]
[-startdate] [-enddate] [-dates] [-subject] [-issuer] [-nameopt option]
[-email] [-hash] [-subject_hash] [-subject_hash_old] [-issuer_hash]
[-issuer_hash_old] [-ext extensions] [-ocspid] [-ocsp_uri] [-purpose]
[-pubkey] [-modulus] [-checkend num] [-checkhost host] [-checkemail
host] [-checkip ipaddr] [-set_serial n] [-next_serial] [-days arg]
[-preserve_dates] [-subj arg] [-force_pubkey filename] [-clrext]
[-extfile filename] [-extensions section] [-sigopt nm:v] [-badsig]
[-digest] [-CA filename|uri] [-CAform DER|PEM|P12] [-CAkey
filename|uri] [-CAkeyform DER|PEM|P12|ENGINE] [-CAserial filename]
[-CAcreateserial] [-trustout] [-setalias arg] [-clrtrust] [-addtrust
arg] [-clrreject] [-addreject arg] [-rand files] [-writerand file]
[-engine id] [-provider name] [-provider-path path] [-propquery propq]

📝 DESCRIPTION

This command is a multi-purposes certificate handling command. It can be used to print certificate information, convert certificates to various forms, edit certificate trust settings, generate certificates from scratch or from certificate requests and then self-signing them or signing them like a "micro CA".

Since there are a large number of options they will split up into various sections.

âš™ī¸ OPTIONS

đŸ“Ĩ Input, Output, and General Purpose Options

đŸ–¨ī¸ Certificate Printing Options

Note: -alias and -purpose are described in "Trust Settings" section.

✅ Certificate Checking Options

📤 Certificate Output Options

đŸ›ī¸ Micro-CA Options

🔐 Trust Settings

A trusted certificate is an ordinary certificate with additional information: permitted/prohibited uses and an alias. Trust settings are currently only used with root CAs.

🔧 Generic Options

📄 Text Printing Flags

These options customise the -text output using -certopt:

📚 EXAMPLES

Note: In these examples, the '\' means the example should be all on one line.

📄 Print the contents of a certificate:

openssl x509 -in cert.pem -noout -text

🔑 Print the "Subject Alternative Name" extension:

openssl x509 -in cert.pem -noout -ext subjectAltName

📜 Print more extensions:

openssl x509 -in cert.pem -noout -ext subjectAltName,nsCertType

đŸ”ĸ Print the certificate serial number:

openssl x509 -in cert.pem -noout -serial

👤 Print the subject name:

openssl x509 -in cert.pem -noout -subject

đŸˇī¸ Print subject name in RFC2253 form:

openssl x509 -in cert.pem -noout -subject -nameopt RFC2253

🌐 Print subject name in oneline form on a UTF8 terminal:

openssl x509 -in cert.pem -noout -subject -nameopt oneline,-esc_msb

đŸ–ī¸ Print SHA1 fingerprint:

openssl x509 -sha1 -in cert.pem -noout -fingerprint

🔄 Convert PEM to DER:

openssl x509 -in cert.pem -inform PEM -out cert.der -outform DER

📝 Convert certificate to request:

openssl x509 -x509toreq -in cert.pem -out req.pem -key key.pem

đŸ›ī¸ Convert a certificate request into a self-signed CA certificate:

openssl x509 -req -in careq.pem -extfile openssl.cnf -extensions v3_ca \
       -key key.pem -out cacert.pem

🔐 Sign a request using a CA certificate and add user extensions:

openssl x509 -req -in req.pem -extfile openssl.cnf -extensions v3_usr \
       -CA cacert.pem -CAkey key.pem -CAcreateserial

🔒 Set certificate to be trusted for SSL client use and set alias:

openssl x509 -in cert.pem -addtrust clientAuth \
       -setalias "Steve's Class 1 CA" -out trust.pem

📝 NOTES

🐛 BUGS

🔗 SEE ALSO

📜 HISTORY

ÂŠī¸ COPYRIGHT

Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at https://www.openssl.org/source/license.html.

openssl-x509(1)
🔖 NAME 🚀 Quick Reference 📋 SYNOPSIS 📝 DESCRIPTION âš™ī¸ OPTIONS
đŸ“Ĩ Input, Output, and General Purpose Options đŸ–¨ī¸ Certificate Printing Options ✅ Certificate Checking Options 📤 Certificate Output Options đŸ›ī¸ Micro-CA Options 🔐 Trust Settings 🔧 Generic Options 📄 Text Printing Flags
📚 EXAMPLES 📝 NOTES 🐛 BUGS 🔗 SEE ALSO 📜 HISTORY ÂŠī¸ COPYRIGHT

Generated by phpman v4.10.0-7-g98e9fd5 Author: Che Dong Under GNU General Public License
2026-09-08 23:12 @2600:1f28:365:80b0:8430:39a8:2b19:a7ca
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Valid XHTML 1.0 Transitional!Valid CSS!