>From: [email protected] On Behalf Of Sanjay Kumar (sanjaku5)
>Sent: Monday, 12 August, 2013 07:12

>I have function to convert certificate from DER to x509 as follow.
>In below function I able to see in GDB "cert_der and  cert_len" is currect
>But it crash on [d2i_x509]
<snip nearly reasonable code>

Aside: I would expect uint8_t is actually unsigned char, 
so you shouldn't need to cast, but it does no harm. 

That should work, and does for me in a simple test case. 
Even if you pass it data that isn't a good cert, it should 
return null and error-queue (as you handle) not crash.

What exactly is the crash (e.g. SIGSEGV or something else)?
What does gdb show for the call stack (bt)?

Does this occur with a minimal test program, i.e. just reading 
in a cert and calling the code you showed? If so, on what version 
and build of openssl, and on what platform using what compiler?


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

Reply via email to