To extract the Delta crl's location (cdp of delta crl) from certificate.
Hi Team,
I am working on the CRL validation stuff. In that process, I need to
extract the cdp(crl distribution point).
I am a bit hazy about extracting the crl distribution point (cdp) from
the certificate.
I am following the below mentioned procedure to extract the cdp. I am
succeeded in getting the basecrl's cdp.Please have a look at the code
mentioned below.=0D
MY DOUBT: How to extract the delta crl's cdp? Can I use the
"NID_delta_crl" in the following API to extract the delta crl location
information?
pnt =3D X509_get_ext_d2i(x, NID_delta_crl, NULL, NULL);
Appreciate your thoughts on the same. THANKS A LOT IN ADVANCE.
*********CODE STARTS ******************
//Obtain CDP from the current certificate
X509 *curr_cert =3D NULL;
DIST_POINT *pnt, *pnt1;
pnt =3D X509_get_ext_d2i(x, NID_crl_distribution_points, NULL, NULL);
for (i =3D 0; i < sk_DIST_POINT_num(pnt); i++)
{
pnt1 =3D sk_DIST_POINT_value(pnt, i);
if(pnt1->distpoint)
{
if(pnt1->distpoint->type =3D=3D 0)
{
int j=3D0;
GENERAL_NAMES *gen;
GENERAL_NAME *gen1;
printf("In here: DELTA_CRL\n");
gen =3D pnt1->distpoint->name.fullname;
for(j =3D 0; j<sk_GENERAL_NAME_num(gen);j++)
{
gen1 =3D sk_GENERAL_NAME_value(gen, j);
printf("type is %d\n",gen1->type);
switch (gen1->type)
{
case GEN_DNS:
printf("DNS");
break;
case GEN_URI:
//ASN1_IA5STRING *nm =3D gen1->d.ia5;
printf("Here is the DELTA CDP\n");
printf("%s\n",gen1->d.ia5->data);
strcpy(delta_cdp, (char*)gen1->d.ia5->data);
break;
}
}
}
}
}
*********CODE ENDS ******************
=0D
With best regards,
-Surendra
The information contained in this electronic message and any attachments to=
this message are intended for the exclusive use of the addressee(s) and=
may contain proprietary, confidential or privileged information. If you=
are not the intended recipient, you should not disseminate, distribute or=
copy this e-mail. Please notify the sender immediately and destroy all=
copies of this message and any attachments.=0D
WARNING: Computer viruses can be transmitted via email. The recipient=
should check this email and any attachments for the presence of viruses.=
The company accepts no liability for any damage caused by any virus=
transmitted by this email.
=0D
[url]www.wipro.com[/url]
______________________________________________________________________
OpenSSL Project [url]http://www.openssl.org[/url]
User Support Mailing List [email]openssl-users@openssl.org[/email]
Automated List Manager [email]majordomo@openssl.org[/email]
______________________________________________________________________
OpenSSL Project [url]http://www.openssl.org[/url]
Development Mailing List [email]openssl-dev@openssl.org[/email]
Automated List Manager [email]majordomo@openssl.org[/email]