diff options
Diffstat (limited to 'src/lib/libcrypto/x509v3/v3_crld.c')
| -rw-r--r-- | src/lib/libcrypto/x509v3/v3_crld.c | 106 |
1 files changed, 101 insertions, 5 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_crld.c b/src/lib/libcrypto/x509v3/v3_crld.c index 9586401da6..2201b61264 100644 --- a/src/lib/libcrypto/x509v3/v3_crld.c +++ b/src/lib/libcrypto/x509v3/v3_crld.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: v3_crld.c,v 1.13 2014/10/05 18:27:58 miod Exp $ */ | 1 | /* $OpenBSD: v3_crld.c,v 1.14 2015/02/09 16:03:11 jsing Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| @@ -383,7 +383,31 @@ ASN1_CHOICE_cb(DIST_POINT_NAME, dpn_cb) = { | |||
| 383 | } ASN1_CHOICE_END_cb(DIST_POINT_NAME, DIST_POINT_NAME, type) | 383 | } ASN1_CHOICE_END_cb(DIST_POINT_NAME, DIST_POINT_NAME, type) |
| 384 | 384 | ||
| 385 | 385 | ||
| 386 | IMPLEMENT_ASN1_FUNCTIONS(DIST_POINT_NAME) | 386 | |
| 387 | DIST_POINT_NAME * | ||
| 388 | d2i_DIST_POINT_NAME(DIST_POINT_NAME **a, const unsigned char **in, long len) | ||
| 389 | { | ||
| 390 | return (DIST_POINT_NAME *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | ||
| 391 | &DIST_POINT_NAME_it); | ||
| 392 | } | ||
| 393 | |||
| 394 | int | ||
| 395 | i2d_DIST_POINT_NAME(DIST_POINT_NAME *a, unsigned char **out) | ||
| 396 | { | ||
| 397 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &DIST_POINT_NAME_it); | ||
| 398 | } | ||
| 399 | |||
| 400 | DIST_POINT_NAME * | ||
| 401 | DIST_POINT_NAME_new(void) | ||
| 402 | { | ||
| 403 | return (DIST_POINT_NAME *)ASN1_item_new(&DIST_POINT_NAME_it); | ||
| 404 | } | ||
| 405 | |||
| 406 | void | ||
| 407 | DIST_POINT_NAME_free(DIST_POINT_NAME *a) | ||
| 408 | { | ||
| 409 | ASN1_item_free((ASN1_VALUE *)a, &DIST_POINT_NAME_it); | ||
| 410 | } | ||
| 387 | 411 | ||
| 388 | ASN1_SEQUENCE(DIST_POINT) = { | 412 | ASN1_SEQUENCE(DIST_POINT) = { |
| 389 | ASN1_EXP_OPT(DIST_POINT, distpoint, DIST_POINT_NAME, 0), | 413 | ASN1_EXP_OPT(DIST_POINT, distpoint, DIST_POINT_NAME, 0), |
| @@ -391,14 +415,62 @@ ASN1_SEQUENCE(DIST_POINT) = { | |||
| 391 | ASN1_IMP_SEQUENCE_OF_OPT(DIST_POINT, CRLissuer, GENERAL_NAME, 2) | 415 | ASN1_IMP_SEQUENCE_OF_OPT(DIST_POINT, CRLissuer, GENERAL_NAME, 2) |
| 392 | } ASN1_SEQUENCE_END(DIST_POINT) | 416 | } ASN1_SEQUENCE_END(DIST_POINT) |
| 393 | 417 | ||
| 394 | IMPLEMENT_ASN1_FUNCTIONS(DIST_POINT) | 418 | |
| 419 | DIST_POINT * | ||
| 420 | d2i_DIST_POINT(DIST_POINT **a, const unsigned char **in, long len) | ||
| 421 | { | ||
| 422 | return (DIST_POINT *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | ||
| 423 | &DIST_POINT_it); | ||
| 424 | } | ||
| 425 | |||
| 426 | int | ||
| 427 | i2d_DIST_POINT(DIST_POINT *a, unsigned char **out) | ||
| 428 | { | ||
| 429 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &DIST_POINT_it); | ||
| 430 | } | ||
| 431 | |||
| 432 | DIST_POINT * | ||
| 433 | DIST_POINT_new(void) | ||
| 434 | { | ||
| 435 | return (DIST_POINT *)ASN1_item_new(&DIST_POINT_it); | ||
| 436 | } | ||
| 437 | |||
| 438 | void | ||
| 439 | DIST_POINT_free(DIST_POINT *a) | ||
| 440 | { | ||
| 441 | ASN1_item_free((ASN1_VALUE *)a, &DIST_POINT_it); | ||
| 442 | } | ||
| 395 | 443 | ||
| 396 | ASN1_ITEM_TEMPLATE(CRL_DIST_POINTS) = | 444 | ASN1_ITEM_TEMPLATE(CRL_DIST_POINTS) = |
| 397 | ASN1_EX_TEMPLATE_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, CRLDistributionPoints, | 445 | ASN1_EX_TEMPLATE_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, CRLDistributionPoints, |
| 398 | DIST_POINT) | 446 | DIST_POINT) |
| 399 | ASN1_ITEM_TEMPLATE_END(CRL_DIST_POINTS) | 447 | ASN1_ITEM_TEMPLATE_END(CRL_DIST_POINTS) |
| 400 | 448 | ||
| 401 | IMPLEMENT_ASN1_FUNCTIONS(CRL_DIST_POINTS) | 449 | |
| 450 | CRL_DIST_POINTS * | ||
| 451 | d2i_CRL_DIST_POINTS(CRL_DIST_POINTS **a, const unsigned char **in, long len) | ||
| 452 | { | ||
| 453 | return (CRL_DIST_POINTS *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | ||
| 454 | &CRL_DIST_POINTS_it); | ||
| 455 | } | ||
| 456 | |||
| 457 | int | ||
| 458 | i2d_CRL_DIST_POINTS(CRL_DIST_POINTS *a, unsigned char **out) | ||
| 459 | { | ||
| 460 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &CRL_DIST_POINTS_it); | ||
| 461 | } | ||
| 462 | |||
| 463 | CRL_DIST_POINTS * | ||
| 464 | CRL_DIST_POINTS_new(void) | ||
| 465 | { | ||
| 466 | return (CRL_DIST_POINTS *)ASN1_item_new(&CRL_DIST_POINTS_it); | ||
| 467 | } | ||
| 468 | |||
| 469 | void | ||
| 470 | CRL_DIST_POINTS_free(CRL_DIST_POINTS *a) | ||
| 471 | { | ||
| 472 | ASN1_item_free((ASN1_VALUE *)a, &CRL_DIST_POINTS_it); | ||
| 473 | } | ||
| 402 | 474 | ||
| 403 | ASN1_SEQUENCE(ISSUING_DIST_POINT) = { | 475 | ASN1_SEQUENCE(ISSUING_DIST_POINT) = { |
| 404 | ASN1_EXP_OPT(ISSUING_DIST_POINT, distpoint, DIST_POINT_NAME, 0), | 476 | ASN1_EXP_OPT(ISSUING_DIST_POINT, distpoint, DIST_POINT_NAME, 0), |
| @@ -409,7 +481,31 @@ ASN1_SEQUENCE(ISSUING_DIST_POINT) = { | |||
| 409 | ASN1_IMP_OPT(ISSUING_DIST_POINT, onlyattr, ASN1_FBOOLEAN, 5) | 481 | ASN1_IMP_OPT(ISSUING_DIST_POINT, onlyattr, ASN1_FBOOLEAN, 5) |
| 410 | } ASN1_SEQUENCE_END(ISSUING_DIST_POINT) | 482 | } ASN1_SEQUENCE_END(ISSUING_DIST_POINT) |
| 411 | 483 | ||
| 412 | IMPLEMENT_ASN1_FUNCTIONS(ISSUING_DIST_POINT) | 484 | |
| 485 | ISSUING_DIST_POINT * | ||
| 486 | d2i_ISSUING_DIST_POINT(ISSUING_DIST_POINT **a, const unsigned char **in, long len) | ||
| 487 | { | ||
| 488 | return (ISSUING_DIST_POINT *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | ||
| 489 | &ISSUING_DIST_POINT_it); | ||
| 490 | } | ||
| 491 | |||
| 492 | int | ||
| 493 | i2d_ISSUING_DIST_POINT(ISSUING_DIST_POINT *a, unsigned char **out) | ||
| 494 | { | ||
| 495 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &ISSUING_DIST_POINT_it); | ||
| 496 | } | ||
| 497 | |||
| 498 | ISSUING_DIST_POINT * | ||
| 499 | ISSUING_DIST_POINT_new(void) | ||
| 500 | { | ||
| 501 | return (ISSUING_DIST_POINT *)ASN1_item_new(&ISSUING_DIST_POINT_it); | ||
| 502 | } | ||
| 503 | |||
| 504 | void | ||
| 505 | ISSUING_DIST_POINT_free(ISSUING_DIST_POINT *a) | ||
| 506 | { | ||
| 507 | ASN1_item_free((ASN1_VALUE *)a, &ISSUING_DIST_POINT_it); | ||
| 508 | } | ||
| 413 | 509 | ||
| 414 | static int i2r_idp(const X509V3_EXT_METHOD *method, void *pidp, BIO *out, | 510 | static int i2r_idp(const X509V3_EXT_METHOD *method, void *pidp, BIO *out, |
| 415 | int indent); | 511 | int indent); |
