MAN page from RedHat EL 5 openssl10-1.0.2l-1.el5.pp.i386.rpm
Section: OpenSSL (1)
c_rehash - Create symbolic links to files named by the hash values
scans directories and calculates a hash value of each".pem"
, or ".crl"
file in the specified directory list and creates symbolic linksfor each file, where the name of the link is the hash value.(If the platform does not support symbolic links, a copy is made.)This utility is useful as many programs that use OpenSSL requiredirectories to be set up like this in order to find certificates.
If any directories are named on the command line, then those areprocessed in turn. If not, then the SSL_CERT_DIR environment variableis consulted; this shold be a colon-separated list of directories,like the Unix PATH variable.If that is not set then the default directory (installation-specificbut often /usr/local/ssl/certs) is processed.
In order for a directory to be processed, the user must have writepermissions on that directory, otherwise it will be skipped.The links created are of the form "HHHHHHHH.D", where each His a hexadecimal character and D is a single decimal digit.When processing a directory, c_rehash will first remove all linksthat have a name in that syntax. If you have links in that formatused for other purposes, they will be removed.To skip the removal step, use the -n flag.Hashes for CRL's look similar except the letter r appears afterthe period, like this: "HHHHHHHH.rD".
Multiple objects may have the same hash; they will be indicated byincrementing the D value. Duplicates are found by comparing thefull SHA-1 fingerprint. A warning will be displayed if a duplicateis found.
A warning will also be displayed if there are files thatcannot be parsed as either a certificate or a CRL.
The program uses the openssl program to compute the hashes andfingerprints. If not found in the user's PATH, then set theOPENSSL environment variable to the full pathname.Any program can be used, it will be invoked as follows for eithera certificate or CRL:
$OPENSSL x509 -hash -fingerprint -noout -in FILENAME $OPENSSL crl -hash -fingerprint -noout -in FILENAME
where FILENAME is the filename. It must output the hash of thefile on the first line, and the fingerprint on the second,optionally prefixed with some text and an equals sign.
- Use old-style hashing (MD5, as opposed to SHA-1) for generatinglinks for releases before 1.0.0. Note that current versions willnot use the old style.
- Display a brief usage message.
- Do not remove existing links.This is needed when keeping new and old-style links in the same directory.
- Print messages about old links removed and new links created.By default, c_rehash only lists each directory as it is processed.
- The path to an executable to use to generate hashes andfingerprints (see above).
- Colon separated list of directories to operate on.Ignored if directories are listed on the command line.
- SEE ALSO
This document was created byman2html,using the manual pages.