linux:verschluesselung:openssl
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
linux:verschluesselung:openssl [2025/03/19 17:10] – [Zertifikate konvertieren] gsys | linux:verschluesselung:openssl [2025/05/06 11:48] (current) – gsys | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== OpenSSL ====== | ====== OpenSSL ====== | ||
+ | |||
===== Nützliche Befehle ===== | ===== Nützliche Befehle ===== | ||
< | < | ||
Line 71: | Line 72: | ||
===== Zertifikate konvertieren ===== | ===== Zertifikate konvertieren ===== | ||
+ | |||
+ | ==== Reihenfolge einer Chain ==== | ||
+ | Optimal: | ||
+ | < | ||
+ | -----BEGIN CERTIFICATE----- | ||
+ | [Server Certificate] | ||
+ | -----END CERTIFICATE----- | ||
+ | -----BEGIN CERTIFICATE----- | ||
+ | [Intermediate certificate L1] | ||
+ | -----END CERTIFICATE----- | ||
+ | -----BEGIN CERTIFICATE----- | ||
+ | [Intermediate certificate L2] | ||
+ | -----END CERTIFICATE----- | ||
+ | </ | ||
+ | Unnötig da Root in Browser/OS Cert store bereits enthalten: | ||
+ | < | ||
+ | -----BEGIN CERTIFICATE----- | ||
+ | [Server Certificate] | ||
+ | -----END CERTIFICATE----- | ||
+ | -----BEGIN CERTIFICATE----- | ||
+ | [Intermediate certificate L1] | ||
+ | -----END CERTIFICATE----- | ||
+ | -----BEGIN CERTIFICATE----- | ||
+ | [Intermediate certificate L2] | ||
+ | -----END CERTIFICATE----- | ||
+ | -----BEGIN CERTIFICATE----- | ||
+ | [Root Certificate] | ||
+ | -----END CERTIFICATE----- | ||
+ | </ | ||
+ | https:// | ||
+ | https:// | ||
+ | |||
+ | ==== Befehle ==== | ||
+ | |||
+ | '' | ||
+ | |||
FIXME PEM vs CRT | FIXME PEM vs CRT | ||
< | < | ||
Line 77: | Line 114: | ||
cat root.pem intermediate.pem > ocsp-chain.pem | cat root.pem intermediate.pem > ocsp-chain.pem | ||
openssl pkcs12 -in cert_bundle.p12 -chain -nokeys -out cert_bundle.pem | openssl pkcs12 -in cert_bundle.p12 -chain -nokeys -out cert_bundle.pem | ||
- | openssl pkcs12 -in cert_bundle.p12 -cacerts -nokeys -out cert_cacerts | + | openssl pkcs12 -in cert_bundle.p12 -cacerts -nokeys -out cert_cacerts.pem |
openssl pkcs12 -in cert_bundle.p12 -clcerts -nokeys -out cert.pem | openssl pkcs12 -in cert_bundle.p12 -clcerts -nokeys -out cert.pem | ||
openssl pkcs12 -in cert_bundle.p12 -nocerts -out privkey_encr.key | openssl pkcs12 -in cert_bundle.p12 -nocerts -out privkey_encr.key | ||
Line 83: | Line 120: | ||
openssl x509 -inform der -in certificate.cer -out certificate.pem | openssl x509 -inform der -in certificate.cer -out certificate.pem | ||
openssl pkcs7 -inform der -in cacert.p7b -out cacert.pem | openssl pkcs7 -inform der -in cacert.p7b -out cacert.pem | ||
+ | </ | ||
+ | |||
+ | Permissions | ||
+ | < | ||
+ | chmod 700 private | ||
+ | chmod 600 private.key | ||
+ | chmod 755 certs #public certs folder | ||
+ | chmod 644 cert.pem | ||
</ | </ | ||
linux/verschluesselung/openssl.1742400645.txt.gz · Last modified: 2025/03/19 17:10 by gsys