1 .\" $NetBSD: openssl_c_rehash.1,v 1.3 2015/06/12 17:01:14 christos Exp $
3 .\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28)
6 .\" ========================================================================
7 .de Sp \" Vertical space (when we can't use .PP)
11 .de Vb \" Begin verbatim text
16 .de Ve \" End verbatim text
20 .\" Set up some character translations and predefined strings. \*(-- will
21 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
22 .\" double quote, and \*(R" will give a right double quote. \*(C+ will
23 .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
24 .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
25 .\" nothing in troff, for use with C<>.
27 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
31 . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
32 . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
47 .\" Escape single quotes in literal strings from groff's Unicode transform.
51 .\" If the F register is turned on, we'll generate index entries on stderr for
52 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
53 .\" entries marked with X<> in POD. Of course, you'll have to process the
54 .\" output yourself in some meaningful fashion.
56 .\" Avoid warning from groff about undefined register 'F'.
60 .if \n(.g .if rF .nr rF 1
61 .if (\n(rF:(\n(.g==0)) \{
64 . tm Index:\\$1\t\\n%\t"\\$2"
74 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
75 .\" Fear. Run. Save yourself. No user-serviceable parts.
76 . \" fudge factors for nroff and troff
85 . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
91 . \" simple accents for nroff and troff
101 . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
102 . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
103 . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
104 . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
105 . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
106 . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
108 . \" troff and (daisy-wheel) nroff accents
109 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
110 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
111 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
112 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
113 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
114 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
115 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
116 .ds ae a\h'-(\w'a'u*4/10)'e
117 .ds Ae A\h'-(\w'A'u*4/10)'E
118 . \" corrections for vroff
119 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
120 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
121 . \" for low resolution devices (crt and lpr)
122 .if \n(.H>23 .if \n(.V>19 \
135 .\" ========================================================================
137 .IX Title "C_REHASH 1"
138 .TH C_REHASH 1 "2015-01-13" "1.0.1n" "OpenSSL"
139 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
140 .\" way too many mistakes in technical documents.
144 c_rehash \- Create symbolic links to files named by the hash values
148 .IX Header "SYNOPSIS"
150 [ \fIdirectory\fR...]
152 .IX Header "DESCRIPTION"
153 \&\fBc_rehash\fR scans directories and calculates a hash value of each \f(CW\*(C`.pem\*(C'\fR
154 file in the specified directory list and creates symbolic links
155 for each file, where the name of the link is the hash value.
156 This utility is useful as many programs that use OpenSSL require
157 directories to be set up like this in order to find certificates.
159 If any directories are named on the command line, then those are
160 processed in turn. If not, then the \fB\s-1SSL_CERT_DIR\s0\fR environment variable
161 is consulted; this shold be a colon-separated list of directories,
162 like the Unix \fB\s-1PATH\s0\fR variable.
163 If that is not set then the default directory (installation-specific
164 but often \fB/usr/local/ssl/certs\fR) is processed.
166 In order for a directory to be processed, the user must have write
167 permissions on that directory, otherwise it will be skipped.
168 The links created are of the form \f(CW\*(C`HHHHHHHH.D\*(C'\fR, where each \fBH\fR
169 is a hexadecimal character and \fBD\fR is a single decimal digit.
170 When processing a directory, \fBc_rehash\fR will first remove all links
171 that have a name in that syntax. If you have links in that format
172 used for other purposes, they will be removed.
173 Hashes for \s-1CRL\s0's look similar except the letter \fBr\fR appears after
174 the period, like this: \f(CW\*(C`HHHHHHHH.rD\*(C'\fR.
176 Multiple objects may have the same hash; they will be indicated by
177 incrementing the \fBD\fR value. Duplicates are found by comparing the
178 full \s-1SHA\-1\s0 fingerprint. A warning will be displayed if a duplicate
181 A warning will also be displayed if there are \fB.pem\fR files that
182 cannot be parsed as either a certificate or a \s-1CRL.\s0
184 The program uses the \fBopenssl\fR program to compute the hashes and
185 fingerprints. If not found in the user's \fB\s-1PATH\s0\fR, then set the
186 \&\fB\s-1OPENSSL\s0\fR environment variable to the full pathname.
187 Any program can be used, it will be invoked as follows for either
188 a certificate or \s-1CRL:\s0
191 \& $OPENSSL x509 \-hash \-fingerprint \-noout \-in FFFFFF
192 \& $OPENSSL crl \-hash \-fingerprint \-noout \-in FFFFFF
195 where \fB\s-1FFFFFF\s0\fR is the filename. It must output the hash of the
196 file on the first line, and the fingerprint on the second,
197 optionally prefixed with some text and an equals sign.
199 .IX Header "ENVIRONMENT"
200 .IP "\fB\s-1OPENSSL\s0\fR" 4
202 The path to an executable to use to generate hashes and
203 fingerprints (see above).
204 .IP "\fB\s-1SSL_CERT_DIR\s0\fR" 4
205 .IX Item "SSL_CERT_DIR"
206 Colon separated list of directories to operate on.
207 Ignored if directories are listed on the command line.
209 .IX Header "SEE ALSO"
210 \&\fIopenssl\fR\|(1),
211 \&\fIopenssl_crl\fR\|(1).
212 \&\fIopenssl_x509\fR\|(1).