d2i_X509.pod (205128) | d2i_X509.pod (280297) |
---|---|
1=pod 2 3=head1 NAME 4 5d2i_X509, i2d_X509, d2i_X509_bio, d2i_X509_fp, i2d_X509_bio, 6i2d_X509_fp - X509 encode and decode functions 7 8=head1 SYNOPSIS --- 14 unchanged lines hidden (view full) --- 23The X509 encode and decode routines encode and parse an 24B<X509> structure, which represents an X509 certificate. 25 26d2i_X509() attempts to decode B<len> bytes at B<*in>. If 27successful a pointer to the B<X509> structure is returned. If an error 28occurred then B<NULL> is returned. If B<px> is not B<NULL> then the 29returned structure is written to B<*px>. If B<*px> is not B<NULL> 30then it is assumed that B<*px> contains a valid B<X509> | 1=pod 2 3=head1 NAME 4 5d2i_X509, i2d_X509, d2i_X509_bio, d2i_X509_fp, i2d_X509_bio, 6i2d_X509_fp - X509 encode and decode functions 7 8=head1 SYNOPSIS --- 14 unchanged lines hidden (view full) --- 23The X509 encode and decode routines encode and parse an 24B<X509> structure, which represents an X509 certificate. 25 26d2i_X509() attempts to decode B<len> bytes at B<*in>. If 27successful a pointer to the B<X509> structure is returned. If an error 28occurred then B<NULL> is returned. If B<px> is not B<NULL> then the 29returned structure is written to B<*px>. If B<*px> is not B<NULL> 30then it is assumed that B<*px> contains a valid B<X509> |
31structure and an attempt is made to reuse it. If the call is 32successful B<*in> is incremented to the byte following the | 31structure and an attempt is made to reuse it. This "reuse" capability is present 32for historical compatibility but its use is B<strongly discouraged> (see BUGS 33below, and the discussion in the RETURN VALUES section). 34 35If the call is successful B<*in> is incremented to the byte following the |
33parsed data. 34 35i2d_X509() encodes the structure pointed to by B<x> into DER format. 36If B<out> is not B<NULL> is writes the DER encoded data to the buffer 37at B<*out>, and increments it to point after the data just written. 38If the return value is negative an error occurred, otherwise it 39returns the length of the encoded data. 40 --- 164 unchanged lines hidden (view full) --- 205fields entirely and will not be parsed by d2i_X509(). This may be 206fixed in future so code should not assume that i2d_X509() will 207always succeed. 208 209=head1 RETURN VALUES 210 211d2i_X509(), d2i_X509_bio() and d2i_X509_fp() return a valid B<X509> structure 212or B<NULL> if an error occurs. The error code that can be obtained by | 36parsed data. 37 38i2d_X509() encodes the structure pointed to by B<x> into DER format. 39If B<out> is not B<NULL> is writes the DER encoded data to the buffer 40at B<*out>, and increments it to point after the data just written. 41If the return value is negative an error occurred, otherwise it 42returns the length of the encoded data. 43 --- 164 unchanged lines hidden (view full) --- 208fields entirely and will not be parsed by d2i_X509(). This may be 209fixed in future so code should not assume that i2d_X509() will 210always succeed. 211 212=head1 RETURN VALUES 213 214d2i_X509(), d2i_X509_bio() and d2i_X509_fp() return a valid B<X509> structure 215or B<NULL> if an error occurs. The error code that can be obtained by |
213L | 216L<ERR_get_error(3)|ERR_get_error(3)>. If the "reuse" capability has been used 217with a valid X509 structure being passed in via B<px> then the object is not 218freed in the event of error but may be in a potentially invalid or inconsistent 219state. |
214 215i2d_X509() returns the number of bytes successfully encoded or a negative 216value if an error occurs. The error code can be obtained by 217L<ERR_get_error(3)|ERR_get_error(3)>. 218 219i2d_X509_bio() and i2d_X509_fp() return 1 for success and 0 if an error 220occurs The error code can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>. 221 222=head1 SEE ALSO 223 224L<ERR_get_error(3)|ERR_get_error(3)> 225 226=head1 HISTORY 227 228d2i_X509, i2d_X509, d2i_X509_bio, d2i_X509_fp, i2d_X509_bio and i2d_X509_fp 229are available in all versions of SSLeay and OpenSSL. 230 231=cut | 220 221i2d_X509() returns the number of bytes successfully encoded or a negative 222value if an error occurs. The error code can be obtained by 223L<ERR_get_error(3)|ERR_get_error(3)>. 224 225i2d_X509_bio() and i2d_X509_fp() return 1 for success and 0 if an error 226occurs The error code can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>. 227 228=head1 SEE ALSO 229 230L<ERR_get_error(3)|ERR_get_error(3)> 231 232=head1 HISTORY 233 234d2i_X509, i2d_X509, d2i_X509_bio, d2i_X509_fp, i2d_X509_bio and i2d_X509_fp 235are available in all versions of SSLeay and OpenSSL. 236 237=cut |