icertificatemanager.php 847 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>
  4. * This file is licensed under the Affero General Public License version 3 or
  5. * later.
  6. * See the COPYING-README file.
  7. */
  8. namespace OCP;
  9. /**
  10. * Manage trusted certificates for users
  11. */
  12. interface ICertificateManager {
  13. /**
  14. * Returns all certificates trusted by the user
  15. *
  16. * @return \OCP\ICertificate[]
  17. */
  18. public function listCertificates();
  19. /**
  20. * @param string $certificate the certificate data
  21. * @param string $name the filename for the certificate
  22. * @return bool | \OCP\ICertificate
  23. */
  24. public function addCertificate($certificate, $name);
  25. /**
  26. * @param string $name
  27. */
  28. public function removeCertificate($name);
  29. /**
  30. * Get the path to the certificate bundle for this user
  31. *
  32. * @return string
  33. */
  34. public function getCertificateBundle();
  35. }