I'm working on a shell script that among other things encrypts some files with a public key--intending to be decrypted with a private one--using smime
command.
smime
works with small files but not with large (>4GB) ones.
openssl smime -aes-256-cbc -encrypt -in INPUT_FILE_NAME -binary -outform DEM -out OUTPUT_FILE_NAME PUBLIC_PEM_FILE
This line shows no error and the output file is created but remains empty after call finishes its execution.
How to encrypt both small and large files?
Edit 1: Found a comment on how to encrypt a large file in openssl using public key with the same problem but suggested solution didn't work.