summaryrefslogtreecommitdiffstats
path: root/apps/encryption/lib/keymanager.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-04-01 16:36:08 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-07 13:30:30 +0200
commit664b2bb7af2c8253aa0bbade42531ad4a3ef6bab (patch)
tree1f6da0f4a10dbc9345a8dd1716986c16c237f3d9 /apps/encryption/lib/keymanager.php
parentc9d6ed3d7d04412b721745f61402ff1400c59aeb (diff)
downloadnextcloud-server-664b2bb7af2c8253aa0bbade42531ad4a3ef6bab.tar.gz
nextcloud-server-664b2bb7af2c8253aa0bbade42531ad4a3ef6bab.zip
cleaning up exception mess
Diffstat (limited to 'apps/encryption/lib/keymanager.php')
-rw-r--r--apps/encryption/lib/keymanager.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/encryption/lib/keymanager.php b/apps/encryption/lib/keymanager.php
index c7e0f2617f5..d2659f55a77 100644
--- a/apps/encryption/lib/keymanager.php
+++ b/apps/encryption/lib/keymanager.php
@@ -4,7 +4,7 @@ namespace OCA\Encryption;
use OC\Encryption\Exceptions\DecryptionFailedException;
use OCA\Encryption\Exceptions\PrivateKeyMissingException;
-use OC\Encryption\Exceptions\PublicKeyMissingException;
+use OCA\Encryption\Exceptions\PublicKeyMissingException;
use OCA\Encryption\Crypto\Crypt;
use OCP\Encryption\Keys\IStorage;
use OCP\IConfig;
@@ -301,7 +301,7 @@ class KeyManager {
if (strlen($privateKey) !== 0) {
return $privateKey;
}
- throw new PrivateKeyMissingException();
+ throw new PrivateKeyMissingException($userId);
}
/**
@@ -393,7 +393,7 @@ class KeyManager {
if (strlen($publicKey) !== 0) {
return $publicKey;
}
- throw new PublicKeyMissingException();
+ throw new PublicKeyMissingException($userId);
}
public function getPublicShareKeyId() {
@@ -496,7 +496,7 @@ class KeyManager {
if (!empty($accessList['public'])) {
$publicShareKey = $this->getPublicShareKey();
if (empty($publicShareKey)) {
- throw new PublicKeyMissingException();
+ throw new PublicKeyMissingException($this->getPublicShareKeyId());
}
$publicKeys[$this->getPublicShareKeyId()] = $publicShareKey;
}