]> source.dussan.org Git - nextcloud-server.git/commitdiff
refined name of getOpenSSLEncryptedAndPrivateKey 25575/head
authorKonrad Abicht <hi@inspirito.de>
Fri, 12 Feb 2021 12:01:37 +0000 (13:01 +0100)
committerKonrad Abicht <hi@inspirito.de>
Fri, 12 Feb 2021 12:01:37 +0000 (13:01 +0100)
Signed-off-by: Konrad Abicht <hi@inspirito.de>
tests/Core/Service/LoginFlowV2ServiceUnitTest.php

index ba0a3130af7ce157b66c8a21ed795217d3ed5e2b..233960ea97a52f7ccd544692e30f3b86a0afae91 100644 (file)
@@ -116,7 +116,7 @@ class LoginFlowV2ServiceUnitTest extends TestCase {
         *
         * @return array Array contains encrypted password, private key and public key.
         */
-       private function getOpenSSLEncryptedAndPrivateKey(string $appPassword): array {
+       private function getOpenSSLEncryptedPublicAndPrivateKey(string $appPassword): array {
                // Create the private and public key
                $res = openssl_pkey_new([
                        'digest_alg' => 'md5', // take fast algorithm for testing purposes
@@ -181,7 +181,7 @@ class LoginFlowV2ServiceUnitTest extends TestCase {
        }
 
        public function testPollRemoveDataFromDb() {
-               list($encrypted, $privateKey) = $this->getOpenSSLEncryptedAndPrivateKey('test_pass');
+               list($encrypted, $privateKey) = $this->getOpenSSLEncryptedPublicAndPrivateKey('test_pass');
 
                $this->crypto->expects($this->once())
                        ->method('decrypt')
@@ -295,7 +295,7 @@ class LoginFlowV2ServiceUnitTest extends TestCase {
         */
 
        public function testFlowDone() {
-               list(,, $publicKey) = $this->getOpenSSLEncryptedAndPrivateKey('test_pass');
+               list(,, $publicKey) = $this->getOpenSSLEncryptedPublicAndPrivateKey('test_pass');
 
                $loginFlowV2 = new LoginFlowV2();
                $loginFlowV2->setPublicKey($publicKey);