Open elt4n0 opened 2 years ago
Hi @elt4n0, thanks for opening this issue. I have reproduced the reported behavior and indeed the issue is coming from openssl library. I am going to leave this issue under review so we can address this further, and will provide updates accordingly.
Thanks!
Describe the bug
When using S3EncryptionMultipartUploaderV2 with a file larger than 4GB a warning is thrown during encryption, and an exception is thrown during upload. This does not happen with smaller files.
Expected Behavior
Success on S3EncryptionMultipartUploaderV2::upload()
Current Behavior
When using S3EncryptionMultipartUploaderV2 with a file larger than 4GB this message appears:
PHP Warning: openssl_encrypt(): data is too long in libs\aws\aws-sdk-php\src\Crypto\AesGcmEncryptingStream.php on line 108
After a while, exception is thrown:
Reproduction Steps
Possible Solution
openssl_encrypt is know have trouble with large files. Maybe include a mechanism to encode by chunks.
Additional Information/Context
No response
SDK version used
"aws/aws-sdk-php": "^3.147"
Environment details (Version of PHP (
php -v
)? OS name and version, etc.)PHP 7.4.30 (cli) (built: Jun 7 2022 15:36:03) ( NTS Visual C++ 2017 x64 )