What I usually do in these situations is pepper the
openssl functions of interest with printf("%s %d\n", __FILE__, __LINE__);
and rebuild openssl.
That usually brackets the error fairly rapidly;
once you see the line where it's happening in the source,
you know a lot more about the problem...
- Dan
Aslam wrote:
> Nope I'm sure about the fopen call, the problem is with the macro.
>
> Thanks
> Aslam
>
> -----Original Message-----
> From: Dan Kegel [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 09, 2001 10:09 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Filling a X509 structure from a der certificate file
>
> Aslam wrote:
> > Following code is giving me a null pointer access ...
> > #include "x509.h"
> > int main(int argc, char* argv[])
> > {
> > X509* pX509 = 0;
> > FILE* fp = 0;
> >
> > fp = fopen( "d:\\temp\\microsoft user 6.cer", "rb" );
> > d2i_X509_fp( fp, &pX509 );
> > return 0;
> > }
> > I'm using openssl-0.9.6 and trying to fill the x509 structure from a der
> > cert file,
>
> How about checking the result of fopen to make sure it's not NULL?
> ______________________________________________________________________
> OpenSSL Project http://www.openssl.org
> User Support Mailing List [EMAIL PROTECTED]
> Automated List Manager [EMAIL PROTECTED]
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]