keys
Root CA
[!TIP|label:Criteria]
Subject==Issuer
Basic Constraints==CA:TRUE
Key Usage==Certificate Sign, CRL SignNo AKI ( Authority Key Identifier ) or
AKI==SKI( Subject Key Identifier )
$ key='Company Root CA.crt'
# subject == issuer
$ openssl x509 -in "${key}" -issuer -subject -noout
issuer=CN=Company Root CA V1
subject=CN=Company Root CA V
$ while read -r ext; do
openssl x509 -in "${key}" -noout -ext "${ext}";
done < <( xargs -n1 <<< "subjectKeyIdentifier authorityKeyIdentifier keyUsage basicConstraints")
X509v3 Subject Key Identifier:
D4:1B:61:8A:74:67:B9:DC:B4:42:B9:72:AD:49:73:BD:CC:51:C7:08
No extensions in certificate # no AKI
X509v3 Key Usage:
Digital Signature, Certificate Sign, CRL Sign
X509v3 Basic Constraints: critical
CA:TRUEIntermediate CA
check certificate chain
fetch cert file from chain
fetch the last certificate from chain ( root CA )
transform
PEM
DER encoded binary X.509 (.CER)
$ openssl x509 -outform PEM -in <NAME>.cer -out <NAME>.pem -inform DER
PEM
Base-64 encoded X.509 (.CER)
$ openssl x509 -outform PEM -in <NAME>.cer -out <NAME>.pem -inform PEM
PEM
Cryptographic Message Syntax Standard PKCS #7 Certificates (.P7B)
$ openssl pkcs7 -outform PEM -in <NAME>.p7b -out <NAME>.pem -inform DER
CRT
DER encoded binary X.509 (.CER)
$ openssl x509 -in <NAME>.cer -out <NAME>.crt -inform DER
CRT
Base-64 encoded X.509 (.CER)
$ openssl x509 -in <NAME>.cer -out <NAME>.crt -inform PEM
CRT
Cryptographic Message Syntax Standard PKCS #7 Certificates (.P7B)
$ openssl pkcs7 -in <NAME>.p7b -out <NAME>.crt -inform DER
PEM
DER encoded binary X.509 (.CER)
$ openssl x509 -in <NAME>.crt -out <NAME>.pem -outform PEM -inform DER
PEM
Base-64 encoded X.509 (.CER)
$ openssl x509 -in <NAME>.crt -out <NAME>.pem -outform PEM -inform PEM
PEM
Cryptographic Message Syntax Standard PKCS #7 Certificates (.P7B)
$ openssl pkcs7 -in <NAME>.p7b -out <NAME>.pem -outform PEM -inform DER
tips
using base64 to convert DER to PEM format:
keys
CRT
binary file
PEM
key type
CRT
DER
PEM
P7B
DER
Last updated
Was this helpful?