On Tue, Dec 05, 2000 at 05:18:47PM +0100, Colin Chalmers wrote:
> Hi,
> 
> Since there was no response on the earlier posting here's a second chance
> perhaps explaining the problem better.
> 
> The code at the bottom works for me when used within the same program
> however when I pass the (vtrCertStatus) structure to a DLL, although I can
> access the memory using other *means*, I cannot init a cert.
> I 've looked in the list server and see possible problems with multithreaded
> apps. however if that was the case here surely I wouldn't be able to access
> the memory at all. Or am I missing something?
> 
> Any help much appreciated.
> 
> /colin
> 
> 
>  X509 *cert = NULL;
> 
>  SSLeay_add_all_algorithms();
>  ERR_load_crypto_strings();
> 
> cert = d2i_X509(NULL, (unsigned char
> **)&vtrCertStatus[0].cs_entityCert.b_data ,
> (long)vtrCertStatus[0].cs_entityCert.b_size );

Disclaimer: I don't have the slightest idea about DLLs (Windows).

You are passing data to the d2i_X509() function. d2i_X509() returns NULL.
This at least means, that d2i_X509() received some useful point, so that
it could return "failure". (Otherwise you might have faced a segmentation
fault.)
Did you check out the error stack?

Best regards,
        Lutz
-- 
Lutz Jaenicke                             [EMAIL PROTECTED]
BTU Cottbus               http://www.aet.TU-Cottbus.DE/personen/jaenicke/
Lehrstuhl Allgemeine Elektrotechnik                  Tel. +49 355 69-4129
Universitaetsplatz 3-4, D-03044 Cottbus              Fax. +49 355 69-4153
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to