diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2018-12-06 21:27:57 +0100 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2018-12-06 21:27:57 +0100 |
commit | ec8aefc7621fd81fab02184a29d7f13c71ba4c65 (patch) | |
tree | c685c186a3ede895b7958ed4938f30431e10ae28 /lib/private/Authentication | |
parent | bc35bf14f08f6b91065377d4741762ccfba63814 (diff) | |
download | nextcloud-server-ec8aefc7621fd81fab02184a29d7f13c71ba4c65.tar.gz nextcloud-server-ec8aefc7621fd81fab02184a29d7f13c71ba4c65.zip |
Read openssl error and log
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'lib/private/Authentication')
-rw-r--r-- | lib/private/Authentication/Token/PublicKeyTokenProvider.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/private/Authentication/Token/PublicKeyTokenProvider.php b/lib/private/Authentication/Token/PublicKeyTokenProvider.php index 9f596ac4568..fa9f11a65ab 100644 --- a/lib/private/Authentication/Token/PublicKeyTokenProvider.php +++ b/lib/private/Authentication/Token/PublicKeyTokenProvider.php @@ -295,6 +295,10 @@ class PublicKeyTokenProvider implements IProvider { // Generate new key $res = openssl_pkey_new($config); + if ($res === false) { + $this->logOpensslError(); + } + openssl_pkey_export($res, $privateKey); // Extract the public key from $res to $pubKey @@ -343,5 +347,11 @@ class PublicKeyTokenProvider implements IProvider { } } - + private function logOpensslError() { + $errors = []; + while ($error = openssl_error_string()) { + $errors[] = $error; + } + $this->logger->critical('Something is wrong with your openssl setup: ' . implode(', ', $errors)); + } } |