CMS decrypt using streams still gives malloc error

Patrick Herbst paherbst at gmail.com
Mon Apr 3 18:37:03 UTC 2023


I'm trying to decrypt a file that was encrypted with

openssl cms -encrypt -aes256 -binary -stream -outform DER ~/cert.pem

and decrypted with

openssl cms -decrypt -inform DER -stream -inkey ~/pkey.pem

the file is roughly 3.5 GB, and the decrypt fails with

140572959053120:error:07069041:memory buffer
routines:BUF_MEM_grow_clean:malloc
failure:../crypto/buffer/buffer.c:128:
140572959053120:error:0D06B041:asn1 encoding
routines:asn1_d2i_read_bio:malloc
failure:../crypto/asn1/a_d2i_fp.c:190:

I thought "stream" was suposed to allow bigger files.  Am i doing
something wrong?  or is decrypt broken?

Thanks.


More information about the openssl-users mailing list