MAN page from RedHat EL 5 openssl10-1.0.1j-1.el5.pp.x86_64.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"
file in the specified directory list and creates symbolic linksfor each file, where the name of the link is the hash value.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.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 .pem 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 FFFFFF $OPENSSL crl -hash -fingerprint -noout -in FFFFFF
where FFFFFF 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.
- 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.