ID: 26664 Updated by: [EMAIL PROTECTED] Reported By: fch at hexanet dot fr -Status: Open +Status: Feedback Bug Type: OpenSSL related Operating System: windows 98 and FreeBSD 4.9 PHP Version: 4.3.3 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Previous Comments: ------------------------------------------------------------------------ [2003-12-19 04:36:09] fch at hexanet dot fr Description: ------------ openssl_encrypt function refuse to encrypt data larger than key size. Then I try, open_ssl_encrypt say : > error:0406C06E:rsa routines:RSA_padding_add_PKCS1_type_1:data too large for key size Openssl support is enabled and I am using OpenSSL 0.9.7c 30 Sep 2003. Reproduce code: --------------- #GET PRIVATE KEY PREVIOUSLY GENERATED $private_key = openssl_get_privatekey('file:///var/tmp/pkey.pem','r0bert'); $data = "abcdefghijiklmnopqrstuvwxyzabcdefghijiklmnopqrstuvwxyzabcdefghijiklmnopqrstuvwxyzabcdefghijiklmnopqrstuvwxyzabcdefghijiklmnopqrstuv"; openssl_private_encrypt($data, $crypted_text, $private_key); Expected result: ---------------- I expect crypted data in $crypted_text. Actual result: -------------- error:0406C06E:rsa routines:RSA_padding_add_PKCS1_type_1:data too large for key size ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26664&edit=1
