i cannot handle the CRL Distribution Points with the following code:

#include "openssl\x509.h"
#include "openssl\x509v3.h"

X509_EXTENSION*ext=NULL;
ASN1_OCTET_STRING*extValue=NULL;
STACK_OF(DIST_POINT)*crlDPStack=NULL;   

X509 *x509=...a valid X509v3 certificate

extIndex=X509_get_ext_by_NID(x509,NID_crl_distribution_points,0);
ext=X509_get_ext(x509,extIndex);
extValue=X509_EXTENSION_get_data(ext);

now, to fill the

STACK_OF(DIST_POINT)*crlDPStack

variable starting from 

X509_EXTENSION*ext
or
ASN1_OCTET_STRING*extValue

what function should I use?

i've tried with 

crlDPStack=CRL_DIST_POINTS_new();
d2i_CRL_DIST_POINTS(&crlDPStack, X , Xlength);

without success: there are no elements inside the array after the call.

for X i've tried both the DER encoding of ASN1_OCTET_STRING*extValue and the
X509_EXTENSION*ext.

Where's the mistake?
Is there any FAQ or documentation on these functions?

Thanks in advance
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to