hi Kim, try setting it read-only before reset
good luck, Vadim On Thu, Oct 16, 2003 at 11:45:22AM +0200, Hellan.Kim KHE wrote: > Hi > > I have a BIO populated with a PKCS#10 request. At the time I am parsing it, it don't > know if it is DER or PEM encoded, so I use the following code: > > pReq = d2i_X509_REQ_bio(spBio, NULL); > if(!pReq) > { > BIO_reset(spBio); > pReq = PEM_read_bio_X509_REQ(spBio, NULL, NULL, NULL); > } > > This works fine if the "spBIO" is a BIO_new_file(), but for a BIO_new(BIO_s_mem()), > it does not work. > It seems that the BIO_reset() does nok work for the memory BIO, so I am never able > to load a PEM request, once I have tried loading it using the d2i_X509_REQ_bio() > funtion. > > Any ideas how to fix this? > > Thanks, > Kim Hellan > > ______________________________________________________________________ > 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]