software:openssl:createca
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
software:openssl:createca [2025/10/19 03:49] – rodolico | software:openssl:createca [2025/10/20 00:01] (current) – rodolico | ||
---|---|---|---|
Line 20: | Line 20: | ||
<code bash> | <code bash> | ||
- | # create a little directory tree. | ||
- | # Not required, but allows the certs to be kept organized | ||
- | mkdir -p / | ||
- | mkdir -p / | ||
- | # this will store the indicies. Again, not required | ||
- | touch / | ||
- | cd / | ||
# create a random rsa key pair of 2048 bits and ask for encryption passphrase (min 8 char) | # create a random rsa key pair of 2048 bits and ask for encryption passphrase (min 8 char) | ||
openssl genpkey -algorithm RSA --outform PEM --des3 --out DailyDataCA.key --pkeyopt rsa_keygen_bits: | openssl genpkey -algorithm RSA --outform PEM --des3 --out DailyDataCA.key --pkeyopt rsa_keygen_bits: | ||
Line 67: | Line 60: | ||
<code conf openssl.cnf> | <code conf openssl.cnf> | ||
+ | RANDFILE = ./.rnd # Used as a seed for random number generation for key files | ||
# this section is for requests | # this section is for requests | ||
[ req ] | [ req ] | ||
Line 72: | Line 66: | ||
default_md | default_md | ||
prompt | prompt | ||
+ | # override with -reqexts command line switch | ||
+ | req_extensions | ||
+ | man x509v3_config | ||
+ | |||
+ | # override with the -extensions command line switch | ||
distinguished_name | distinguished_name | ||
Line 121: | Line 120: | ||
* //-out// - name of the output file. | * //-out// - name of the output file. | ||
+ | ==== View Cert ==== | ||
+ | You can view the certificate you created using the -text. With this, you can see the issuer (itself, self signed), the Signature Algorithm, the DN (Distinguished Name, the line starting with Subject:) and information about the public key and signature. | ||
- | Country Name (2 letter | + | <code bash> |
- | State or Province Name (full name) [Some-State]: | + | openssl x509 -in ca.pem -text -noout |
- | Locality Name (eg, city) []:Dallas | + | </ |
- | Organization Name (eg, company) [Internet Widgits Pty Ltd]:Daily Data | + | |
- | Organizational Unit Name (eg, section) []:Home Office | + | |
- | Common Name (e.g. server FQDN or YOUR name) []:Rod | + | |
- | Email Address []: | + | |
+ | ==== Modify openssl.cnf ==== | ||
+ | |||
+ | <code conf> | ||
+ | [ ca ] | ||
+ | default_ca = CA_default | ||
+ | |||
+ | [ CA_default ] | ||
+ | dir = ./ | ||
+ | database | ||
+ | new_certs_dir | ||
+ | certificate | ||
+ | private_key | ||
+ | default_md | ||
+ | preserve | ||
+ | policy | ||
+ | |||
+ | [ policy_any ] | ||
+ | countryName | ||
+ | stateOrProvinceName | ||
+ | organizationName | ||
+ | organizationalUnitName | ||
+ | commonName | ||
+ | emailAddress | ||
+ | </ |
software/openssl/createca.1760863792.txt.gz · Last modified: 2025/10/19 03:49 by rodolico