diff options
Diffstat (limited to 'core/Service/LoginFlowV2Service.php')
-rw-r--r-- | core/Service/LoginFlowV2Service.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/Service/LoginFlowV2Service.php b/core/Service/LoginFlowV2Service.php index a58a6531723..6f8c7966e27 100644 --- a/core/Service/LoginFlowV2Service.php +++ b/core/Service/LoginFlowV2Service.php @@ -5,6 +5,7 @@ declare(strict_types=1); /** * @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl> * + * @author Daniel Kesselberg <mail@danielkesselberg.de> * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license GNU AGPL version 3 or any later version @@ -16,14 +17,13 @@ declare(strict_types=1); * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ - namespace OC\Core\Service; use OC\Authentication\Exceptions\InvalidTokenException; @@ -225,7 +225,10 @@ class LoginFlowV2Service { throw new \RuntimeException('Could not initialize keys'); } - openssl_pkey_export($res, $privateKey); + if (openssl_pkey_export($res, $privateKey, null, $config) === false) { + $this->logOpensslError(); + throw new \RuntimeException('OpenSSL reported a problem'); + } // Extract the public key from $res to $pubKey $publicKey = openssl_pkey_get_details($res); |