"Hellan,Kim KHE" wrote:
> 
> 
> Thanks!
> But this function doesn't seem to return the correct pointer.
> I have the following code:
> 
> int iCrit;
> POLICYINFO* pinfo;
> pinfo = (POLICYINFO*) X509_get_ext_d2i(pCert, NID_certificate_policies,
> &iCrit, NULL);
> 
> BIO* bioID = BIO_new( BIO_s_mem() );
> int iSize = i2a_ASN1_OBJECT(bioID, pinfo->policyid);
> 
> pinfo does contain a valid pointer and iCrit is set to 0, but when
> i2a_ASN1_OBJECT() is called, my application crashes with an Access
> Violation.
> When debugging I can see, that whatever pinfo is pointing at, doesn't seem
> to be a POLICYINFO structure.
> 

It doesn't return a POLICYINFO pointer. It returns a
STACK_OF(POLICYINFO) pointer. 

Steve.
-- 
Dr Stephen N. Henson.   http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED] 
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the   OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.

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

Reply via email to