diff options
Diffstat (limited to 'secure/lib/libcrypto/man/d2i_X509.3')
-rw-r--r-- | secure/lib/libcrypto/man/d2i_X509.3 | 70 |
1 files changed, 37 insertions, 33 deletions
diff --git a/secure/lib/libcrypto/man/d2i_X509.3 b/secure/lib/libcrypto/man/d2i_X509.3 index 0f9e840e9f46a..23f845b5358c4 100644 --- a/secure/lib/libcrypto/man/d2i_X509.3 +++ b/secure/lib/libcrypto/man/d2i_X509.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) +.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== @@ -54,16 +54,20 @@ .\" Avoid warning from groff about undefined register 'F'. .de IX .. -.if !\nF .nr F 0 -.if \nF>0 \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{\ +. if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" .. -. if !\nF==2 \{\ -. nr % 0 -. nr F 2 +. if !\nF==2 \{\ +. nr % 0 +. nr F 2 +. \} . \} .\} +.rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. @@ -129,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "D2I_X509 3" -.TH D2I_X509 3 "2018-11-20" "1.1.1a" "OpenSSL" +.TH D2I_X509 3 "2019-02-26" "1.1.1b" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -159,7 +163,7 @@ encoding. Unlike the C structures which can have pointers to sub-objects within, the \s-1DER\s0 is a serialized encoding, suitable for sending over the network, writing to a file, and so on. .PP -\&\fId2i_TYPE()\fR attempts to decode \fBlen\fR bytes at \fB*ppin\fR. If successful a +\&\fBd2i_TYPE()\fR attempts to decode \fBlen\fR bytes at \fB*ppin\fR. If successful a pointer to the \fB\s-1TYPE\s0\fR structure is returned and \fB*ppin\fR is incremented to the byte following the parsed data. If \fBa\fR is not \fB\s-1NULL\s0\fR then a pointer to the returned structure is also written to \fB*a\fR. If an error occurred @@ -171,13 +175,13 @@ contains a valid \fB\s-1TYPE\s0\fR structure and an attempt is made to reuse it. \&\fBstrongly discouraged\fR (see \s-1BUGS\s0 below, and the discussion in the \s-1RETURN VALUES\s0 section). .PP -\&\fId2i_TYPE_bio()\fR is similar to \fId2i_TYPE()\fR except it attempts +\&\fBd2i_TYPE_bio()\fR is similar to \fBd2i_TYPE()\fR except it attempts to parse data from \s-1BIO\s0 \fBbp\fR. .PP -\&\fId2i_TYPE_fp()\fR is similar to \fId2i_TYPE()\fR except it attempts +\&\fBd2i_TYPE_fp()\fR is similar to \fBd2i_TYPE()\fR except it attempts to parse data from \s-1FILE\s0 pointer \fBfp\fR. .PP -\&\fIi2d_TYPE()\fR encodes the structure pointed to by \fBa\fR into \s-1DER\s0 format. +\&\fBi2d_TYPE()\fR encodes the structure pointed to by \fBa\fR into \s-1DER\s0 format. If \fBppout\fR is not \fB\s-1NULL\s0\fR, it writes the \s-1DER\s0 encoded data to the buffer at \fB*ppout\fR, and increments it to point after the data just written. If the return value is negative an error occurred, otherwise it @@ -187,16 +191,16 @@ If \fB*ppout\fR is \fB\s-1NULL\s0\fR memory will be allocated for a buffer and t data written to it. In this case \fB*ppout\fR is not incremented and it points to the start of the data just written. .PP -\&\fIi2d_TYPE_bio()\fR is similar to \fIi2d_TYPE()\fR except it writes +\&\fBi2d_TYPE_bio()\fR is similar to \fBi2d_TYPE()\fR except it writes the encoding of the structure \fBa\fR to \s-1BIO\s0 \fBbp\fR and it returns 1 for success and 0 for failure. .PP -\&\fIi2d_TYPE_fp()\fR is similar to \fIi2d_TYPE()\fR except it writes +\&\fBi2d_TYPE_fp()\fR is similar to \fBi2d_TYPE()\fR except it writes the encoding of the structure \fBa\fR to \s-1BIO\s0 \fBbp\fR and it returns 1 for success and 0 for failure. .PP These routines do not encrypt private keys and therefore offer no -security; use \fIPEM_write_PrivateKey\fR\|(3) or similar for writing to files. +security; use \fBPEM_write_PrivateKey\fR\|(3) or similar for writing to files. .SH "NOTES" .IX Header "NOTES" The letters \fBi\fR and \fBd\fR in \fBi2d_TYPE\fR stand for @@ -205,13 +209,13 @@ So \fBi2d_TYPE\fR converts from internal to \s-1DER.\s0 .PP The functions can also understand \fB\s-1BER\s0\fR forms. .PP -The actual \s-1TYPE\s0 structure passed to \fIi2d_TYPE()\fR must be a valid +The actual \s-1TYPE\s0 structure passed to \fBi2d_TYPE()\fR must be a valid populated \fB\s-1TYPE\s0\fR structure \*(-- it \fBcannot\fR simply be fed with an -empty structure such as that returned by \fITYPE_new()\fR. +empty structure such as that returned by \fBTYPE_new()\fR. .PP The encoded data is in binary form and may contain embedded zeroes. Therefore any \s-1FILE\s0 pointers or BIOs should be opened in binary mode. -Functions such as \fIstrlen()\fR will \fBnot\fR return the correct length +Functions such as \fBstrlen()\fR will \fBnot\fR return the correct length of the encoded structure. .PP The ways that \fB*ppin\fR and \fB*ppout\fR are incremented after the operation @@ -237,7 +241,7 @@ Represents a \s-1DSA\s0 public key using a \fBSubjectPublicKeyInfo\fR structure. .IP "\fBDSAPublicKey, DSAPrivateKey\fR" 4 .IX Item "DSAPublicKey, DSAPrivateKey" Use a non-standard OpenSSL format and should be avoided; use \fB\s-1DSA_PUBKEY\s0\fR, -\&\fB\f(BIPEM_write_PrivateKey\fB\|(3)\fR, or similar instead. +\&\fB\fBPEM_write_PrivateKey\fB\|(3)\fR, or similar instead. .IP "\fBRSAPublicKey\fR" 4 .IX Item "RSAPublicKey" Represents a PKCS#1 \s-1RSA\s0 public key structure. @@ -316,10 +320,10 @@ mistake is to attempt to use a buffer directly as follows: .PP This code will result in \fBbuf\fR apparently containing garbage because it was incremented after the call to point after the data just written. -Also \fBbuf\fR will no longer contain the pointer allocated by \fIOPENSSL_malloc()\fR -and the subsequent call to \fIOPENSSL_free()\fR is likely to crash. +Also \fBbuf\fR will no longer contain the pointer allocated by \fBOPENSSL_malloc()\fR +and the subsequent call to \fBOPENSSL_free()\fR is likely to crash. .PP -Another trap to avoid is misuse of the \fBa\fR argument to \fId2i_TYPE()\fR: +Another trap to avoid is misuse of the \fBa\fR argument to \fBd2i_TYPE()\fR: .PP .Vb 1 \& X509 *x; @@ -328,41 +332,41 @@ Another trap to avoid is misuse of the \fBa\fR argument to \fId2i_TYPE()\fR: \& /* error */ .Ve .PP -This will probably crash somewhere in \fId2i_X509()\fR. The reason for this +This will probably crash somewhere in \fBd2i_X509()\fR. The reason for this is that the variable \fBx\fR is uninitialized and an attempt will be made to interpret its (invalid) value as an \fBX509\fR structure, typically causing a segmentation violation. If \fBx\fR is set to \s-1NULL\s0 first then this will not happen. .SH "BUGS" .IX Header "BUGS" -In some versions of OpenSSL the \*(L"reuse\*(R" behaviour of \fId2i_TYPE()\fR when +In some versions of OpenSSL the \*(L"reuse\*(R" behaviour of \fBd2i_TYPE()\fR when \&\fB*px\fR is valid is broken and some parts of the reused structure may persist if they are not present in the new one. As a result the use of this \*(L"reuse\*(R" behaviour is strongly discouraged. .PP -\&\fIi2d_TYPE()\fR will not return an error in many versions of OpenSSL, +\&\fBi2d_TYPE()\fR will not return an error in many versions of OpenSSL, if mandatory fields are not initialized due to a programming error then the encoded structure may contain invalid data or omit the -fields entirely and will not be parsed by \fId2i_TYPE()\fR. This may be -fixed in future so code should not assume that \fIi2d_TYPE()\fR will +fields entirely and will not be parsed by \fBd2i_TYPE()\fR. This may be +fixed in future so code should not assume that \fBi2d_TYPE()\fR will always succeed. .PP -Any function which encodes a structure (\fIi2d_TYPE()\fR, -\&\fIi2d_TYPE()\fR or \fIi2d_TYPE()\fR) may return a stale encoding if the +Any function which encodes a structure (\fBi2d_TYPE()\fR, +\&\fBi2d_TYPE()\fR or \fBi2d_TYPE()\fR) may return a stale encoding if the structure has been modified after deserialization or previous serialization. This is because some objects cache the encoding for efficiency reasons. .SH "RETURN VALUES" .IX Header "RETURN VALUES" -\&\fId2i_TYPE()\fR, \fId2i_TYPE_bio()\fR and \fId2i_TYPE_fp()\fR return a valid \fB\s-1TYPE\s0\fR structure +\&\fBd2i_TYPE()\fR, \fBd2i_TYPE_bio()\fR and \fBd2i_TYPE_fp()\fR return a valid \fB\s-1TYPE\s0\fR structure or \fB\s-1NULL\s0\fR if an error occurs. If the \*(L"reuse\*(R" capability has been used with a valid structure being passed in via \fBa\fR, then the object is not freed in the event of error but may be in a potentially invalid or inconsistent state. .PP -\&\fIi2d_TYPE()\fR returns the number of bytes successfully encoded or a negative +\&\fBi2d_TYPE()\fR returns the number of bytes successfully encoded or a negative value if an error occurs. .PP -\&\fIi2d_TYPE_bio()\fR and \fIi2d_TYPE_fp()\fR return 1 for success and 0 if an error +\&\fBi2d_TYPE_bio()\fR and \fBi2d_TYPE_fp()\fR return 1 for success and 0 if an error occurs. .SH "COPYRIGHT" .IX Header "COPYRIGHT" |