1GENKEY(1)                   Cryptography Utilities                   GENKEY(1)
2
3
4

NAME

6       genkey - generate SSL certificates and certificate requests
7

SYNOPSIS

9       genkey [--test] [--days count] [[--genreq] | [--makeca] | [--nss] |
10              [--renew] | [--cacert]] {hostname}
11

DESCRIPTION

13       genkey is an interactive command-line tool which can be used to
14       generate SSL certificates or Certificate Signing Requests (CSR).
15       Generated certificates are stored in the directory /etc/pki/tls/certs/,
16       and the corresponding private key in /etc/pki/tls/private/.
17
18       When using mod_nss the private key is stored in the nss database.
19       Consult the nss.conf file in /etc/httpd/conf.d/ for the location of the
20       database.
21
22       genkey will prompt for the size of key desired; whether or not to
23       generate a CSR; whether or not an encrypted private key is desired; the
24       certificate subject DN details.
25
26       genkey generates random data for the private key using the truerand
27       library and also by prompting the user for entry of random text.
28
29       nss indicates that mod_nss database should be used to store keys and
30       certificates.
31

OPTIONS

33       --makeca
34           Generate a Certificate Authority keypair and certificate.
35
36       --genreq
37           Generate a Certificate Signing Request for an existing private key,
38           which can be submitted to a CA (for example, for renewal).
39
40       --renew
41           Used with --genreq to indicate a renewal, the existing keypair will
42           be used. Certs and keys must reside in the nss database, therefore
43           --nss is also required. Pem file based cert renewal is not
44           currently supported.
45
46       --cacert
47           The certificate renewal is for a CA, needed for openssl certs only.
48
49       --days count
50           When generating a self-signed certificate, specify that the number
51           of days for which the certificate is valid be count rather than the
52           default value of 30.
53
54       --test
55           For test purposes only; omit the slow process of generating random
56           data.
57

EXAMPLES

59       The following example will create a self-signed certificate and private
60       key for the hostname www.example.com:
61
62                   # genkey --days 120 www.example.com
63
64
65       The following example will create a self-signed certificate and private
66       key for the hostname www.nssexample.com which will be stored in cert
67       and key in the nss database. If no nickname is given the tool will
68       extract it from mod_nss's nss configuration file.
69
70                   # genkey --days --nss 120 www.nssexample.com
71
72
73       The following example will generate a certificate signing request for a
74       new mod_nss style cert specified by its nickname, Server-Cert:
75
76                   # genkey --genreq --nss --days 120 Server-Cert
77
78
79       The following example will generate a certificate signing request for
80       the renewal of an existing mod_nss cert specified by its nickname,
81       Server-Cert:
82
83                   # genkey --genreq --renew --nss --days 120 Server-Cert
84
85
86

FILES

88       /etc/pki/tls/openssl.cnf
89

SEE ALSO

91       certwatch(1), keyrand(1)
92
93
94
95crypto-utils 2.5                 13 July 2018                        GENKEY(1)
Impressum