On Monday 11 July 2011 01:18:22 Dr. Stephen Henson wrote:
> Is that big file base64 encoded? If so then the decode process can increase
> the memory considerably. I'd suggest you base64 decode it and then try the
> -inform DER option to the smime -decrypt command. It will still need the
> lot in memory but not as much.

Thank you for your prompt reply Steve, I've already tried to de-base64 first. 
The DER file is 3.6GB and it fails more or less the same (at least from my 
point of view):
140690942056104:error:0D06B041:asn1 encoding routines:ASN1_D2I_READ_BIO:malloc 
failure:a_d2i_fp.c:230:
my prinfs show the same numbers as with PEM:
asn1_d2i_read_bio is going to grow the buff to 2006569233
asn1_d2i_read_bio is going to grow the buff to 2006573333
asn1_d2i_read_bio is going to grow the buff to 2006577433
asn1_d2i_read_bio is going to grow the buff to 2006581533
ret=OPENSSL_realloc_clean num gets num  2675447504
Passed num == NULL, return the same

(double checked now to avoid 5am effects)

> If that doesn't help there are other things that can be done, one of which
> is to manually extract the decryption key and decrypt the content. A sort
> of horribly hacky streaming decrypt.

I would do any hack whatever horrible it is to get the file back, unfortunately 
I am not skilled enough and I can't understand what you suggest. Does pkcs7 
consists of "pieces" that can be decoded one by one?


-- 
Michael Tabolsky,
Independent IT Professional
Milan Area, Italy
Italy +393462223547,+3902320626558,
Israel +97239150702, UK +441422571312
msn/gtalk/jabber: gf...@gfdsa.org
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to