-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathgencsr.1
151 lines (151 loc) · 3.78 KB
/
gencsr.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
.\" Automatically generated by Pandoc 1.16.0.2
.\"
.TH "gencsr" "1" "August 25, 2017" "gencsr user manual" ""
.hy
.SH NAME
.PP
\f[B]gencsr\f[] \-\- Simple CSR generator
.SH SYNOPSIS
.PP
\f[B]gencsr\f[] [ options ]
.SH DEPENDENCIES
.IP "1." 3
Bash
.IP "2." 3
openssl
.SH USAGE
.PP
\f[B]\f[C]gencsr\f[] expects a dom.list and gencsr.conf file under
current directory if not specified specifically\f[]
.IP "1." 3
Create a \f[B]dom.list\f[] file in the working directory with domain and
subdomain names (one per line, both www and non\-www versions).
The top entry is taken as CN (Common Name).
.IP "2." 3
Edit the \f[B]gencsr.conf\f[] file under current working directory (you
may copy it from \f[I]/etc/gencsr.conf\f[] if \f[C]gencsr\f[] is
indtalled) and put necessary information (country code, state,
organization name etc ...).
.IP "3." 3
Run \f[C]gencsr\f[].
.SH OPTIONS
.TP
.B \-df, \-\-dom\-file \f[I]dom_file_path\f[]
File containing domain per line [dom.list]
.RS
.RE
.TP
.B \-k, \-\-key \f[I]key_file_path\f[]
Private key file (existing or to be created) [dom.key]
.RS
.RE
.TP
.B \-ks, \-\-key\-size \f[I]key_size\f[]
Key size if key is to be created a\-new.
[4096]
.RS
.RE
.TP
.B \-csr, \-\-csr \f[I]csr_file_path\f[]
CSR file to be created [dom.csr]
.RS
.RE
.TP
.B \-c, \-\-conf \f[I]config_file_path\f[]
\f[B]gencsr\f[] configuration file [gencsr.conf]
.RS
.RE
.TP
.B \-oc, \-\-openssl\-conf \f[I]openssl_config_file\f[]
OpenSSL config file (use this if \f[C]gencsr\f[] can\[aq]t find it).
By default, it is searched as \f[C]/etc/ssl/openssl.cnf\f[] or
\f[C]/etc/pki/tls/openssl.cnf\f[] or \f[C]\&./openssl.cnf\f[].
.RS
.RE
.TP
.B \-n, \-\-new
Always create new [false]
.RS
.RE
.TP
.B \-h, \-\-help
Show help
.RS
.RE
.TP
.B \-v, \-\-version
Show version info
.RS
.RE
.SH Examples
.PP
The following creates a new 2048 bit key and saves it into
\f[I]kfile\f[], takes necessary information from \f[I]cfile\f[], takes
the domain list from \f[I]dfile\f[] and creates a CSR file named
\f[I]csrfile.csr\f[]:
.IP
.nf
\f[C]
gencsr\ \-n\ \-ks\ 2048\ \-k\ kfile\ \-df\ dfile\ \-c\ cfile\ \-csr\ csrfile.csr
\f[]
.fi
.PP
The following creates CSR using the existing kfile:
.IP
.nf
\f[C]
gencsr\ \-k\ kfile\ \-df\ dfile\ \-c\ cfile\ \-csr\ csrfile.csr
\f[]
.fi
.SH CONFIGURATION FILE
.PP
This file is parsed by gencsr to get various information.
Path to this file can be given by the \f[C]\-c\f[] or \f[C]\-\-conf\f[]
options.
If no path is given, the path is defaulted to \f[C]\&./gencsr.conf\f[].
.PP
This is how a typical configuration file for gencsr looks like:
.IP
.nf
\f[C]
#############\ gencsr\ config\ file\ #####################
#\ Do\ not\ use\ quotation\ marks\ (\[aq],\ "")
#\ To\ prevent\ any\ entry\ being\ included,\ comment\ them
#\ by\ adding\ a\ #\ at\ the\ beginning
######################################################
CountryCode=US\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
State=My\ state\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
Locality=My\ city\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
Oraganization=My\ organization\ \ \ \ \ \ \ \ \ \ \ \ \ \ \
OraganizationUnit=Technology\ or\ whatever\ \ \
Email=mymail\@somedomain.com\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\f[]
.fi
.SH DOMAIN FILE
.PP
This is a file containing domain names per line.
Put both www and non\-www versions.
Put the CN (root domain) at top.
Path to this file can be provided by the \f[C]\-df\f[] or
\f[C]\-\-dom\-file\f[] options.
If no path is given, it\[aq]s defaulted to \f[C]\&./dom.list\f[].
.PP
This is how a domain file looks like:
.IP
.nf
\f[C]
example.org
www.example.org
docs.example.org
www.docs.example.org
api.example.org
www.api.example.org
forums.example.org
www.forums.example.org
\f[]
.fi
.SH BUG REPORT
.PP
<https://github.com/neurobin/gencsr/issues>
.SH AUTHORS
Md. Jahidul Hamid <https://github.com/neurobin>.