openssl
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| openssl [2024/04/15 06:05] – A User Not Logged in | openssl [2025/04/08 12:41] (current) – [Trust self signed certs] ealmr | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Trust self signed certs ====== | ||
| + | |||
| + | Debian based: | ||
| + | |||
| + | cp $DOMAIN_CRT / | ||
| + | update-ca-certificates | ||
| + | |||
| + | Arch Linux: | ||
| + | |||
| + | trust anchor $DOMAIN_CRT | ||
| + | #to trust non CA cert, see https:// | ||
| + | sed -i ' | ||
| + | update-ca-trust | ||
| + | |||
| + | Alpine: | ||
| + | |||
| + | cp $DOMAIN_CRT / | ||
| + | update-ca-certificates | ||
| + | ls -la / | ||
| + | | ||
| ====== General commands ====== | ====== General commands ====== | ||
| Line 33: | Line 53: | ||
| creating root CSR from existing root cert: | creating root CSR from existing root cert: | ||
| - | openssl x509 -x509toreq -in root.crt | + | openssl x509 -x509toreq -in " |
| | | ||
| generate new root cert: | generate new root cert: | ||
| - | openssl x509 -req -in root.csr -out new-root.crt -signkey root.key -days 3650 -copy_extensions copyall | + | openssl x509 -req -in root.csr -out root.crt -signkey root.key -days 3650 -copy_extensions copyall |
| | | ||
| creating CSRs from existing intermediate cert: | creating CSRs from existing intermediate cert: | ||
| - | openssl x509 -x509toreq -in intermediate.crt | + | openssl x509 -x509toreq -in " |
| resign intermediate certificate from CSR with root CA: | resign intermediate certificate from CSR with root CA: | ||
| | | ||
| - | openssl x509 -req -in intermediate.csr -CA new-root.crt -CAkey root.key -CAcreateserial -out new-intermediate.crt -copy_extensions copyall -days 3650 | + | openssl x509 -req -in intermediate.csr -CA root.crt -CAkey root.key -CAcreateserial -out intermediate.crt -copy_extensions copyall -days 3650 |
| | | ||
| creating CSRs from existing domain cert: | creating CSRs from existing domain cert: | ||
| - | openssl x509 -x509toreq -in domain.crt | + | openssl x509 -x509toreq -in " |
| resign domain certificate from CSR with intermediate CA: | resign domain certificate from CSR with intermediate CA: | ||
| | | ||
| - | openssl x509 -req -in domain.csr -CA new-intermediate.crt -CAkey intermediate.key -CAcreateserial -out new-domain.crt -copy_extensions copyall -days 3650 | + | openssl x509 -req -in domain.csr -CA intermediate.crt -CAkey intermediate.key -CAcreateserial -out domain.crt |
| + | |||
| + | resign domain certificate from CSR directly with key: | ||
| + | |||
| + | openssl x509 -req -in domain.csr -key domain.key -out domain.crt -copy_extensions copyall -days 3650 | ||
| | | ||
| ====== Create cert for IP ====== | ====== Create cert for IP ====== | ||
openssl.1713161147.txt.gz · Last modified: by A User Not Logged in
