Hello

I am working on

1) Linux 2.6 OS
2) OpenSSL 0.9.8r 8 Feb 2011

Trying to import PKCS12 from the stdin (redirecting from a file), using

1) fread to a buffer (stack)
2) writing to a character array (character by character) (Heap)

BIO *bio = BIO_new_mem_buf((void *)buffer, len);
#buffer is the char* read from stdin
#len is total number of character read

and then

PKCS12 *p12 = d2i_PKCS12_bio(bio, NULL);
Error occurs here:

61225296:error:0D07809F:asn1 encoding routines:ASN1_ITEM_EX_D2I:unexpected
eoc:tasn_dec.c:426:Type=PKCS12

If i try to diff the buffer (fwrite to a file) and the original p12 file
input then both are the same.

I don't get why i am getting eoc error?

Any ideas?

Thanks
Anj


-- 
View this message in context: 
http://old.nabble.com/OpenSSL-PKCS12-%28ASN1_ITEM_EX_D2I%3Aunexpected-eoc%29-error-tp32018061p32018061.html
Sent from the OpenSSL - User mailing list archive at Nabble.com.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to