summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509v3/v3_asid.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/x509v3/v3_asid.c')
-rw-r--r--src/lib/libcrypto/x509v3/v3_asid.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_asid.c b/src/lib/libcrypto/x509v3/v3_asid.c
index abd497ed1f..56702f86b9 100644
--- a/src/lib/libcrypto/x509v3/v3_asid.c
+++ b/src/lib/libcrypto/x509v3/v3_asid.c
@@ -152,7 +152,7 @@ static int i2r_ASIdentifierChoice(BIO *out,
152/* 152/*
153 * i2r method for an ASIdentifier extension. 153 * i2r method for an ASIdentifier extension.
154 */ 154 */
155static int i2r_ASIdentifiers(X509V3_EXT_METHOD *method, 155static int i2r_ASIdentifiers(const X509V3_EXT_METHOD *method,
156 void *ext, 156 void *ext,
157 BIO *out, 157 BIO *out,
158 int indent) 158 int indent)
@@ -466,7 +466,7 @@ static int ASIdentifierChoice_canonize(ASIdentifierChoice *choice)
466 break; 466 break;
467 } 467 }
468 ASIdOrRange_free(b); 468 ASIdOrRange_free(b);
469 (void)sk_ASIdOrRange_delete(choice->u.asIdsOrRanges, i + 1); 469 sk_ASIdOrRange_delete(choice->u.asIdsOrRanges, i + 1);
470 i--; 470 i--;
471 continue; 471 continue;
472 } 472 }
@@ -495,7 +495,7 @@ int v3_asid_canonize(ASIdentifiers *asid)
495/* 495/*
496 * v2i method for an ASIdentifier extension. 496 * v2i method for an ASIdentifier extension.
497 */ 497 */
498static void *v2i_ASIdentifiers(struct v3_ext_method *method, 498static void *v2i_ASIdentifiers(const struct v3_ext_method *method,
499 struct v3_ext_ctx *ctx, 499 struct v3_ext_ctx *ctx,
500 STACK_OF(CONF_VALUE) *values) 500 STACK_OF(CONF_VALUE) *values)
501{ 501{
@@ -707,7 +707,7 @@ static int v3_asid_validate_path_internal(X509_STORE_CTX *ctx,
707{ 707{
708 ASIdOrRanges *child_as = NULL, *child_rdi = NULL; 708 ASIdOrRanges *child_as = NULL, *child_rdi = NULL;
709 int i, ret = 1, inherit_as = 0, inherit_rdi = 0; 709 int i, ret = 1, inherit_as = 0, inherit_rdi = 0;
710 X509 *x = NULL; 710 X509 *x;
711 711
712 assert(chain != NULL && sk_X509_num(chain) > 0); 712 assert(chain != NULL && sk_X509_num(chain) > 0);
713 assert(ctx != NULL || ext != NULL); 713 assert(ctx != NULL || ext != NULL);
@@ -720,6 +720,7 @@ static int v3_asid_validate_path_internal(X509_STORE_CTX *ctx,
720 */ 720 */
721 if (ext != NULL) { 721 if (ext != NULL) {
722 i = -1; 722 i = -1;
723 x = NULL;
723 } else { 724 } else {
724 i = 0; 725 i = 0;
725 x = sk_X509_value(chain, i); 726 x = sk_X509_value(chain, i);
@@ -799,6 +800,7 @@ static int v3_asid_validate_path_internal(X509_STORE_CTX *ctx,
799 /* 800 /*
800 * Trust anchor can't inherit. 801 * Trust anchor can't inherit.
801 */ 802 */
803 assert(x != NULL);
802 if (x->rfc3779_asid != NULL) { 804 if (x->rfc3779_asid != NULL) {
803 if (x->rfc3779_asid->asnum != NULL && 805 if (x->rfc3779_asid->asnum != NULL &&
804 x->rfc3779_asid->asnum->type == ASIdentifierChoice_inherit) 806 x->rfc3779_asid->asnum->type == ASIdentifierChoice_inherit)