[yeqiang@localhost openssl-1.0.2k]$ ./config -shared --prefix=/usr/local/ssl [yeqiang@localhost openssl-1.0.2k]$ make -j4 [yeqiang@localhost openssl-1.0.2k]$ sudo make install
/usr/local/ssl/ssl/man
配置man_db.conf
[yeqiang@localhost openssl-1.0.2k]$ sudo vim /etc/man_db.conf
MANDATORY_MANPATH /usr/local/ssl/ssl/man MANPATH_MAP /usr/local/ssl/bin /usr/local/ssl/ssl/man
保存退出。
测试:
[yeqiang@localhost openssl-1.0.2k]$ man i2d_X509d2i_X509(3) OpenSSL d2i_X509(3) NAME d2i_X509, i2d_X509, d2i_X509_bio, d2i_X509_fp, i2d_X509_bio, i2d_X509_fp - X509 encode and decode functions SYNOPSIS #include <openssl/x509.h> X509 *d2i_X509(X509 **px, const unsigned char **in, long len); X509 *d2i_X509_AUX(X509 **px, const unsigned char **in, long len); int i2d_X509(X509 *x, unsigned char **out); int i2d_X509_AUX(X509 *x, unsigned char **out); X509 *d2i_X509_bio(BIO *bp, X509 **x); X509 *d2i_X509_fp(FILE *fp, X509 **x); int i2d_X509_bio(BIO *bp, X509 *x); int i2d_X509_fp(FILE *fp, X509 *x); int i2d_re_X509_tbs(X509 *x, unsigned char **out); DESCRIPTION The X509 encode and decode routines encode and parse an X509 structure, which represents an X509 certificate. d2i_X509() attempts to decode len bytes at *in. If successful a pointer to the X509 structure is returned. If an error occurred then NULL is returned. If px is not NULL then the returned structure is written to *px. If *px is not NULL then it is assumed that *px contains a valid X509 structure and an attempt is made to reuse it. This "reuse" capability is present for historical compatibility but its use is strongly discouraged (see BUGS below, and the discussion in the RETURN VALUES section). If the call is successful *in is incremented to the byte following the parsed data. d2i_X509_AUX() is similar to d2i_X509() but the input is expected to consist of an X509 certificate followed by auxiliary trust information. This is used by the PEM routines to read "TRUSTED CERTIFICATE" objects. This function should not be called on untrusted input. i2d_X509() encodes the structure pointed to by x into DER format. If out is not NULL is writes the DER encoded data to the buffer at *out, and increments it to point after the data just written. If the return value is negative an error occurred, otherwise it returns the length of the encoded data. For OpenSSL 0.9.7 and later if *out is NULL memory will be allocated for a buffer and the encoded data written to it. In this case *out is not incremented and it points to the start of the data just written. i2d_X509_AUX() is similar to i2d_X509(), but the encoded output contains both the certificate and any auxiliary trust information. This is used by the PEM routines to write "TRUSTED CERTIFICATE" objects. Note, this is a non-standard OpenSSL-specific data format. d2i_X509_bio() is similar to d2i_X509() except it attempts to parse data from BIO bp. d2i_X509_fp() is similar to d2i_X509() except it attempts to parse data from FILE pointer fp. i2d_X509_bio() is similar to i2d_X509() except it writes the encoding of the structure x to BIO bp and it returns 1 for success and 0 for failure. i2d_X509_fp() is similar to i2d_X509() except it writes the encoding of the structure x to BIO bp and it returns 1 for success and 0 for failure. i2d_re_X509_tbs() is similar to i2d_X509() except it encodes only the TBSCertificate portion of the certificate.