Hi

I'm having a strange problem with PEM_X509_INFO_read_bio().
I using the some code in apps.c ( load_certs() ) to load a list of
certificates.
At some points in load_certs() there is the line:
  allcerts = PEM_X509_INFO_read_bio(bioCerts, NULL, NULL, NULL);

Until recently this has all worked just fine, but now I have added some
OpenSSL code a completely different place in my application. Like this:
  X509* pCert = d2i_X509_bio(spBio, NULL);

If the d2i_X509_bio() call FAILS (returns NULL), then much later in my
application, the PEM_X509_INFO_read_bio() will also return NULL ???

In fact, I have tried adding 2 dummy lines just before
PEM_X509_INFO_read_bio() and then this call always fail, like this:

BIO* spBio = BIO_new_file("C:\\xxx.txt", "rb");     /* Added dummy - not an
X.509 file */
X509* pCert = d2i_X509_bio(spBio, NULL);       /* Added dummy */
allcerts = PEM_X509_INFO_read_bio(bioCerts, NULL, NULL, NULL);    /* Now
always return NULL */

Now PEM_X509_INFO_read_bio() always return NULL......WHY?

How is d2i_X509_bio() "connected" to PEM_X509_INFO_read_bio() ?


Med venlig hilsen / Best regards

Kim Hellan
KMD / KMD-CA
http://www.kmd-ca.dk
Mailto:[EMAIL PROTECTED]

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

Reply via email to