]> source.dussan.org Git - nextcloud-server.git/commitdiff
Merge branch 'master' into files_encryption_check_private_key
authorBjörn Schießle <schiessle@owncloud.com>
Tue, 11 Jun 2013 13:19:02 +0000 (15:19 +0200)
committerBjörn Schießle <schiessle@owncloud.com>
Tue, 11 Jun 2013 13:19:02 +0000 (15:19 +0200)
Conflicts:
apps/files_encryption/tests/crypt.php

1  2 
apps/files_encryption/lib/util.php
apps/files_encryption/tests/crypt.php
apps/files_encryption/tests/share.php

Simple merge
index d856e5d59b513494483d228c1dcd05efa75c7cd3,341904b1189e172beaad069556c12ce8d7aa1b6b..e6ea3bcd6b395ed77ea2b3b0cb20bed304f41b19
@@@ -225,22 -240,9 +239,26 @@@ class Test_Encryption_Crypt extends \PH
  
        }
  
 +      function testDecryptPrivateKey() {
 +
 +              // test successful decrypt
 +              $crypted = Encryption\Crypt::symmetricEncryptFileContent($this->genPrivateKey, 'hat');
 +
 +              $decrypted = Encryption\Crypt::decryptPrivateKey($crypted, 'hat');
 +
 +              $this->assertEquals($this->genPrivateKey, $decrypted);
 +
 +              //test private key decrypt with wrong password
 +              $wrongPasswd = Encryption\Crypt::decryptPrivateKey($crypted, 'hat2');
 +
 +              $this->assertEquals(false, $wrongPasswd);
 +
 +      }
 +
++
+       /**
+        * @medium
+        */
        function testSymmetricEncryptFileContent() {
  
                # TODO: search in keyfile for actual content as IV will ensure this test always passes
Simple merge