Re: S/MIME pkcs#7 read from membuf problem

2009-04-10 Thread Anton D Kachalov
Ger Hobbelt wrote: What may have impact here is that a memory s/s BIO does not act like a file BIO by default. To get the same behaviour (at end-of-data == End of File), you should add the call BIO_set_mem_eof_return(pio, 0); after the line pio = BIO_new(BIO_s_mem()) to ensure y

Re: S/MIME pkcs#7 read from membuf problem

2009-04-09 Thread Ger Hobbelt
What may have impact here is that a memory s/s BIO does not act like a file BIO by default. To get the same behaviour (at end-of-data == End of File), you should add the call BIO_set_mem_eof_return(pio, 0); after the line > pio = BIO_new(BIO_s_mem()) to ensure you'll get a regular EOF signa

S/MIME pkcs#7 read from membuf problem

2009-04-09 Thread Anton D Kachalov
Good day! I have problem with reading S/MIME PKCS#7 container from membuf. I've got "not enough data" error in ASN parsing routine (asn1_d2i_read_bio). I have sign & crypt zip file (430kb) with S/MIME PKCS#7 within PHP. Then I wrote a small application to decrypt & verify: /* Decrypt */ in = B