aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/OCM/Model/OCMProvider.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/private/OCM/Model/OCMProvider.php b/lib/private/OCM/Model/OCMProvider.php
index 61005d3089d..7ae413fa136 100644
--- a/lib/private/OCM/Model/OCMProvider.php
+++ b/lib/private/OCM/Model/OCMProvider.php
@@ -182,12 +182,14 @@ class OCMProvider implements IOCMProvider {
}
$this->setResourceTypes($resources);
- // import details about the remote request signing public key, if available
- $signatory = new Signatory();
- $signatory->setKeyId($data['publicKey']['keyId'] ?? '');
- $signatory->setPublicKey($data['publicKey']['publicKeyPem'] ?? '');
- if ($signatory->getKeyId() !== '' && $signatory->getPublicKey() !== '') {
- $this->setSignatory($signatory);
+ if (isset($data['publicKey'])) {
+ // import details about the remote request signing public key, if available
+ $signatory = new Signatory();
+ $signatory->setKeyId($data['publicKey']['keyId'] ?? '');
+ $signatory->setPublicKey($data['publicKey']['publicKeyPem'] ?? '');
+ if ($signatory->getKeyId() !== '' && $signatory->getPublicKey() !== '') {
+ $this->setSignatory($signatory);
+ }
}
if (!$this->looksValid()) {