diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-08-31 15:50:30 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-08-31 15:50:30 +0200 |
commit | 8009df0b60c71bac41e4ead9ec8e4e92812e0d75 (patch) | |
tree | a937e0948af28bffff46eb08f24c93712032d26a /lib/public | |
parent | 73685892ed6f255a916512863cd5549914d071e1 (diff) | |
parent | 3a85767182e04ac013f59d82cc3a8c4d08bab151 (diff) | |
download | nextcloud-server-8009df0b60c71bac41e4ead9ec8e4e92812e0d75.tar.gz nextcloud-server-8009df0b60c71bac41e4ead9ec8e4e92812e0d75.zip |
Merge pull request #10420 from owncloud/external-share-self-signed
Make external shares work with imported self signed certificates
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/icertificate.php | 56 | ||||
-rw-r--r-- | lib/public/icertificatemanager.php | 40 | ||||
-rw-r--r-- | lib/public/iservercontainer.php | 7 |
3 files changed, 103 insertions, 0 deletions
diff --git a/lib/public/icertificate.php b/lib/public/icertificate.php new file mode 100644 index 00000000000..013496cb373 --- /dev/null +++ b/lib/public/icertificate.php @@ -0,0 +1,56 @@ +<?php +/** + * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OCP; + +interface ICertificate { + /** + * @return string + */ + public function getName(); + + /** + * @return string + */ + public function getCommonName(); + + /** + * @return string + */ + public function getOrganization(); + + /** + * @return string + */ + public function getSerial(); + + /** + * @return \DateTime + */ + public function getIssueDate(); + + /** + * @return \DateTime + */ + public function getExpireDate(); + + /** + * @return bool + */ + public function isExpired(); + + /** + * @return string + */ + public function getIssuerName(); + + /** + * @return string + */ + public function getIssuerOrganization(); +} diff --git a/lib/public/icertificatemanager.php b/lib/public/icertificatemanager.php new file mode 100644 index 00000000000..24b8d123634 --- /dev/null +++ b/lib/public/icertificatemanager.php @@ -0,0 +1,40 @@ +<?php +/** + * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OCP; + +/** + * Manage trusted certificates for users + */ +interface ICertificateManager { + /** + * Returns all certificates trusted by the user + * + * @return \OCP\ICertificate[] + */ + public function listCertificates(); + + /** + * @param string $certificate the certificate data + * @param string $name the filename for the certificate + * @return bool | \OCP\ICertificate + */ + public function addCertificate($certificate, $name); + + /** + * @param string $name + */ + public function removeCertificate($name); + + /** + * Get the path to the certificate bundle for this user + * + * @return string + */ + public function getCertificateBundle(); +} diff --git a/lib/public/iservercontainer.php b/lib/public/iservercontainer.php index 64f5f350b1e..60b0b497c54 100644 --- a/lib/public/iservercontainer.php +++ b/lib/public/iservercontainer.php @@ -228,4 +228,11 @@ interface IServerContainer { */ function getSearch(); + /** + * Get the certificate manager for the user + * + * @param \OCP\IUser $user (optional) if not specified the current loggedin user is used + * @return \OCP\ICertificateManager + */ + function getCertificateManager($user = null); } |