On Tue, May 14, 2002, Girish Venkatachalam wrote:

> Hi everyone, 
> Openssl smime is not able to handle big files ( We tried with a 500MB file). It 
>doesn't report any error message. 
> 
> On stepping through the source, we found that it's failing in OPENSSL_malloc.
> 

That's not surprising. The ASN1 routines currently are purely
memory based. That is you need to have the whole structure in
memory for it to work. Trying to allocate 500Mb of memory is
probably producing a malloc failure. It should however give
an error message.

> However openssl enc works fine with files larger than 2 GB. 
> 

The 'enc' command streams data in chunks and never needs to
have the whole file in memory.

> There is a bug in one of those pkcs7_ routines. Is there a workaround for this 
>problem? 
> 

The fix is to add ASN1 routines that are I/O based 
instead of memory based. In 0.9.6 you'd have to
rewrite almost all the ASN1 code, in 0.9.7 and later
it is less difficult and will need a new or additional
BIO based ASN1 encoder and decoder.

This is still a big job though. Handling non blocking
I/O is particylarly messy, but blocking I/O is somewhat
easier.

Steve.
--
Dr. Stephen Henson      [EMAIL PROTECTED]            
OpenSSL Project         http://www.openssl.org/~steve/
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to