ubuntu:certificates:create_a_self-signed_certificate
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ubuntu:certificates:create_a_self-signed_certificate [2023/06/09 16:19] – peter | ubuntu:certificates:create_a_self-signed_certificate [2023/06/09 16:26] (current) – peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Ubuntu - Certificates - Create a self-signed certificate ====== | ====== Ubuntu - Certificates - Create a self-signed certificate ====== | ||
+ | |||
+ | A self-signed certificate made in this way is sufficient for testing, but should not be used in a production environment. | ||
+ | |||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | * Many clients require that the certificate presented by the server be a user (also called “leaf” or “site”) certificate, | ||
+ | * In this situation, the self-signed certificate must be installed on the client host as a trusted root certification authority (CA), and the certificate used must be a user certificate signed with that self-signed certificate. | ||
+ | |||
+ | * For information on creating self-signed CA certificates and using them to sign user certificates, | ||
+ | |||
+ | </ | ||
+ | |||
+ | ---- | ||
===== Prerequisites ===== | ===== Prerequisites ===== | ||
Line 27: | Line 42: | ||
openssl req -x509 -newkey rsa:2048 -keyout file1.key -out file2.crt -days 9999 -nodes | openssl req -x509 -newkey rsa:2048 -keyout file1.key -out file2.crt -days 9999 -nodes | ||
</ | </ | ||
+ | |||
+ | or | ||
+ | |||
+ | <code bash> | ||
+ | openssl req -new -x509 -days 9999 -nodes -out file1.pem -keyout file2.key | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | * You could, in **/ | ||
+ | |||
+ | </ | ||
+ | |||
This will prompt with a number of questions. | This will prompt with a number of questions. | ||
Line 53: | Line 82: | ||
- | <WRAP info> | ||
- | **NOTE: | ||
- | |||
- | * You could, in **/ | ||
- | |||
- | </ | ||
Line 85: | Line 108: | ||
</ | </ | ||
- | <WRAP info> | ||
- | **NOTE: | ||
- | * However, many clients require that the certificate presented by the server be a user (also called “leaf” or “site”) certificate, | ||
- | * In this situation, the self-signed certificate described above must be installed on the client host as a trusted root certification authority (CA), and the certificate used by Exim must be a user certificate signed with that self-signed certificate. | ||
- | |||
- | * For information on creating self-signed CA certificates and using them to sign user certificates, | ||
- | |||
- | </ | ||
---- | ---- | ||
Line 116: | Line 131: | ||
-out test.crt \ | -out test.crt \ | ||
-subj '/ | -subj '/ | ||
+ | </ | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Set Permissions for the certificate files ===== | ||
+ | |||
+ | <code bash> | ||
+ | chmod 600 file1* | ||
+ | chmod 600 file2* | ||
</ | </ | ||
Line 122: | Line 147: | ||
===== References ===== | ===== References ===== | ||
- | http://ospkibook.sourceforge.net/ | + | https://wiki.debian.org/Self-Signed_Certificate |
+ | http:// | ||
+ | |||
+ | http:// | ||
+ | |||
+ | http:// |
ubuntu/certificates/create_a_self-signed_certificate.1686327542.txt.gz · Last modified: 2023/06/09 16:19 by peter