Deleted Added
full compact
d2i_X509.pod (1.1.1.7) d2i_X509.pod (1.1.1.8)
1=pod
2
3=begin comment
4
5Any keypair function here that gets deprecated should be moved to
6d2i_RSAPrivateKey.pod.
7
8=end comment

--- 39 unchanged lines hidden (view full) ---

48d2i_CRL_DIST_POINTS,
49d2i_DHxparams,
50d2i_DIRECTORYSTRING,
51d2i_DISPLAYTEXT,
52d2i_DIST_POINT,
53d2i_DIST_POINT_NAME,
54d2i_DSA_SIG,
55d2i_ECDSA_SIG,
1=pod
2
3=begin comment
4
5Any keypair function here that gets deprecated should be moved to
6d2i_RSAPrivateKey.pod.
7
8=end comment

--- 39 unchanged lines hidden (view full) ---

48d2i_CRL_DIST_POINTS,
49d2i_DHxparams,
50d2i_DIRECTORYSTRING,
51d2i_DISPLAYTEXT,
52d2i_DIST_POINT,
53d2i_DIST_POINT_NAME,
54d2i_DSA_SIG,
55d2i_ECDSA_SIG,
56d2i_ECPKParameters,
56d2i_EDIPARTYNAME,
57d2i_ESS_CERT_ID,
58d2i_ESS_CERT_ID_V2,
59d2i_ESS_ISSUER_SERIAL,
60d2i_ESS_SIGNING_CERT,
61d2i_ESS_SIGNING_CERT_V2,
62d2i_EXTENDED_KEY_USAGE,
63d2i_GENERAL_NAME,

--- 154 unchanged lines hidden (view full) ---

218i2d_CRL_DIST_POINTS,
219i2d_DHxparams,
220i2d_DIRECTORYSTRING,
221i2d_DISPLAYTEXT,
222i2d_DIST_POINT,
223i2d_DIST_POINT_NAME,
224i2d_DSA_SIG,
225i2d_ECDSA_SIG,
57d2i_EDIPARTYNAME,
58d2i_ESS_CERT_ID,
59d2i_ESS_CERT_ID_V2,
60d2i_ESS_ISSUER_SERIAL,
61d2i_ESS_SIGNING_CERT,
62d2i_ESS_SIGNING_CERT_V2,
63d2i_EXTENDED_KEY_USAGE,
64d2i_GENERAL_NAME,

--- 154 unchanged lines hidden (view full) ---

219i2d_CRL_DIST_POINTS,
220i2d_DHxparams,
221i2d_DIRECTORYSTRING,
222i2d_DISPLAYTEXT,
223i2d_DIST_POINT,
224i2d_DIST_POINT_NAME,
225i2d_DSA_SIG,
226i2d_ECDSA_SIG,
227i2d_ECPKParameters,
226i2d_EDIPARTYNAME,
227i2d_ESS_CERT_ID,
228i2d_ESS_CERT_ID_V2,
229i2d_ESS_ISSUER_SERIAL,
230i2d_ESS_SIGNING_CERT,
231i2d_ESS_SIGNING_CERT_V2,
232i2d_EXTENDED_KEY_USAGE,
233i2d_GENERAL_NAME,

--- 149 unchanged lines hidden (view full) ---

383
384B<d2i_I<TYPE>>() attempts to decode I<len> bytes at I<*ppin>. If successful a
385pointer to the B<I<TYPE>> structure is returned and I<*ppin> is incremented to
386the byte following the parsed data. If I<a> is not NULL then a pointer
387to the returned structure is also written to I<*a>. If an error occurred
388then NULL is returned.
389
390On a successful return, if I<*a> is not NULL then it is assumed that I<*a>
228i2d_EDIPARTYNAME,
229i2d_ESS_CERT_ID,
230i2d_ESS_CERT_ID_V2,
231i2d_ESS_ISSUER_SERIAL,
232i2d_ESS_SIGNING_CERT,
233i2d_ESS_SIGNING_CERT_V2,
234i2d_EXTENDED_KEY_USAGE,
235i2d_GENERAL_NAME,

--- 149 unchanged lines hidden (view full) ---

385
386B<d2i_I<TYPE>>() attempts to decode I<len> bytes at I<*ppin>. If successful a
387pointer to the B<I<TYPE>> structure is returned and I<*ppin> is incremented to
388the byte following the parsed data. If I<a> is not NULL then a pointer
389to the returned structure is also written to I<*a>. If an error occurred
390then NULL is returned.
391
392On a successful return, if I<*a> is not NULL then it is assumed that I<*a>
391contains a valid B<I<TYPE>> structure and an attempt is made to reuse it. This
392"reuse" capability is present for historical compatibility but its use is
393B<strongly discouraged> (see BUGS below, and the discussion in the RETURN
394VALUES section).
393contains a valid B> structure and an attempt is made to reuse it.
394For B<I<TYPE>> structures where it matters it is possible to set up a library
395context on the decoded structure this way (see the B<EXAMPLES> section).
396However using the "reuse" capability for other purposes is B<strongly
397discouraged> (see B<BUGS> below, and the discussion in the B<RETURN VALUES>
398section).
395
396B<d2i_I<TYPE>_bio>() is similar to B<d2i_I<TYPE>>() except it attempts
397to parse data from BIO I<bp>.
398
399B<d2i_I<TYPE>_fp>() is similar to B<d2i_I<TYPE>>() except it attempts
400to parse data from FILE pointer I<fp>.
401
402B<i2d_I<TYPE>>() encodes the structure pointed to by I<a> into DER format.

--- 128 unchanged lines hidden (view full) ---

531
532 /* Set up buf and len to point to the input buffer. */
533 p = buf;
534 x = NULL;
535
536 if (d2i_X509(&x, &p, len) == NULL)
537 /* error */
538
399
400B<d2i_I<TYPE>_bio>() is similar to B<d2i_I<TYPE>>() except it attempts
401to parse data from BIO I<bp>.
402
403B<d2i_I<TYPE>_fp>() is similar to B<d2i_I<TYPE>>() except it attempts
404to parse data from FILE pointer I<fp>.
405
406B<i2d_I<TYPE>>() encodes the structure pointed to by I<a> into DER format.

--- 128 unchanged lines hidden (view full) ---

535
536 /* Set up buf and len to point to the input buffer. */
537 p = buf;
538 x = NULL;
539
540 if (d2i_X509(&x, &p, len) == NULL)
541 /* error */
542
543Setting up a library context and property query:
544
545 X509 *x;
546 unsigned char *buf;
547 const unsigned char *p;
548 int len;
549 OSSL_LIB_CTX *libctx = ....;
550 const char *propq = ....;
551
552 /* Set up buf and len to point to the input buffer. */
553 p = buf;
554 x = X509_new_ex(libctx, propq);
555
556 if (d2i_X509(&x, &p, len) == NULL)
557 /* error, x was freed and NULL assigned to it (see RETURN VALUES) */
558
539=head1 WARNINGS
540
541Using a temporary variable is mandatory. A common
542mistake is to attempt to use a buffer directly as follows:
543
544 int len;
545 unsigned char *buf;
546

--- 59 unchanged lines hidden ---
559=head1 WARNINGS
560
561Using a temporary variable is mandatory. A common
562mistake is to attempt to use a buffer directly as follows:
563
564 int len;
565 unsigned char *buf;
566

--- 59 unchanged lines hidden ---