diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-03-04 15:33:38 +0100 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-03-04 15:33:38 +0100 |
commit | e65e6a12f1270faec377363f02f27ddd7d68b8e9 (patch) | |
tree | bfbc48e4a9f29a11723c49bebf57f5a6f223e937 | |
parent | 0bc7d3bcf833e257fa4b2ae3b74d60bef63218b8 (diff) | |
download | nextcloud-server-e65e6a12f1270faec377363f02f27ddd7d68b8e9.tar.gz nextcloud-server-e65e6a12f1270faec377363f02f27ddd7d68b8e9.zip |
define key size in constructor, otherwise the key size will depend on the servers openssl conf
-rwxr-xr-x | apps/files_encryption/lib/crypt.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php index a138f5f3cb0..2be6e3ae5d9 100755 --- a/apps/files_encryption/lib/crypt.php +++ b/apps/files_encryption/lib/crypt.php @@ -56,7 +56,7 @@ class Crypt { */
public static function createKeypair() {
- $res = openssl_pkey_new();
+ $res = openssl_pkey_new(array('private_key_bits' => 4096));
// Get private key
openssl_pkey_export( $res, $privateKey );
@@ -450,7 +450,7 @@ class Crypt { * @returns encrypted file
*/
public static function keyEncrypt( $plainContent, $publicKey ) {
-
+
openssl_public_encrypt( $plainContent, $encryptedContent, $publicKey );
return $encryptedContent;
|