I have a php document repository application running on windows apache, this application will aes-encrypt any uploaded document with the following command:
echo MyPass34 | openssl.exe aes-256-cbc -pass stdin -salt -in somefile.pdf -out somefile.pdf
and also decrypt them when they are downloaded, with the following command:
echo MyPass34 | openssl.exe aes-256-cbc -pass stdin -d -in somefile.pdf -out decriptedfile.pdf
the application has been working fine so far, people are uploading and downloading their files while they are kept encrypted on the server, the problem now is this application has been moved to an apache linux server, and now the files that where encrypted on windows are not correctly decrypted on linux.
Why is this? Is there a possible tweak to the decryption command so it correctly decrypt that files again?
PS: New files that are encrypted on linux are correctly decrypted, same as in windows, is the encoded-on-windows decoded-on-linux case that is failing.