Re: problems storing a P12 in base64 format

2004-09-09 Thread Dr. Stephen Henson
On Thu, Sep 09, 2004, Smith Baylor wrote: > Changed code to: > > bio = BIO_new(BIO_f_base64()); > BIO_push(bio, mbio); > int bytes_stored = i2d_PKCS12_bio(bio, p12); > BIO_flush(bio); > > No effect still. I was also searching the archives and found this: > http://www.mai

Re: problems storing a P12 in base64 format

2004-09-09 Thread Smith Baylor
Changed code to: bio = BIO_new(BIO_f_base64()); BIO_push(bio, mbio); int bytes_stored = i2d_PKCS12_bio(bio, p12); BIO_flush(bio); No effect still. I was also searching the archives and found this: http://www.mail-archive.com/[EMAIL PROTECTED]/msg36055.html This person was

Re: problems storing a P12 in base64 format

2004-09-09 Thread Dr. Stephen Henson
On Thu, Sep 09, 2004, Smith Baylor wrote: > A PKCS12 object is encrypted with a shared secret. When I use the > function i2d_PKCS12_fp() to write to a file, it works, but, when I use > this to store in a BIO and convert this into base64, it does only > 2/3rds of it. Why is this? Any thoughts o

Re: problems storing a P12 in base64 format

2004-09-09 Thread Smith Baylor
A PKCS12 object is encrypted with a shared secret. When I use the function i2d_PKCS12_fp() to write to a file, it works, but, when I use this to store in a BIO and convert this into base64, it does only 2/3rds of it. Why is this? Any thoughts or pointers? Thanks On Thu, 9 Sep 2004 08:32:36

problems storing a P12 in base64 format

2004-09-09 Thread Smith Baylor
BIO *mbio, *b64bio, *bio; mbio = BIO_new(BIO_s_mem()); b64bio = BIO_new(BIO_f_base64()); bio = BIO_push(b64bio, mbio); int bytes_stored = i2d_PKCS12_bio(bio, p12); BIO_flush(mbio2); BIO_get_mem_data(mbio, (unsigned char *)&p12_data_tmp);