correct DIST_POINT_NAME type value

pull/5721/head
jordan 2022-10-20 15:10:36 -05:00
parent 86605c92ce
commit bfe8b9b76c
2 changed files with 7 additions and 1 deletions

View File

@ -4118,8 +4118,9 @@ static WOLFSSL_DIST_POINT_NAME* wolfSSL_DIST_POINT_NAME_new(void)
}
gns->type = STACK_TYPE_GEN_NAME;
/* Setting type to 0 because this is fullname */
dpn->name.fullname = gns;
dpn->type = CRL_DIST_OID;
dpn->type = 0;
return dpn;
}

View File

@ -42524,6 +42524,7 @@ static int test_wolfSSL_sk_DIST_POINT(void)
int bytes, i, j;
XFILE f;
DIST_POINT* dp;
DIST_POINT_NAME* dpn;
GENERAL_NAME* gn;
ASN1_IA5STRING* uri;
STACK_OF(DIST_POINT)* dps;
@ -42546,6 +42547,10 @@ static int test_wolfSSL_sk_DIST_POINT(void)
AssertIntEQ(sk_DIST_POINT_num(dps), 1);
for (i = 0; i < sk_DIST_POINT_num(dps); i++) {
AssertNotNull(dp = sk_DIST_POINT_value(dps, i));
AssertNotNull(dpn = dp->distpoint);
/* this should be type 0, fullname */
AssertIntEQ(dpn->type, 0);
gns = dp->distpoint->name.fullname;
AssertNotNull(gns);