|
9 | 9 | namespace OCP; |
10 | 10 |
|
11 | 11 | /** |
12 | | - * Manage trusted certificates |
| 12 | + * Manage trusted certificates and the effective CA bundle used by Nextcloud. |
| 13 | + * |
| 14 | + * Implementations provide access to uploaded trusted certificates and the |
| 15 | + * generated bundle that is consumed by HTTP clients and external storage |
| 16 | + * integrations. |
| 17 | + * |
13 | 18 | * @since 8.0.0 |
14 | 19 | */ |
15 | 20 | interface ICertificateManager { |
16 | 21 | /** |
17 | | - * Returns all certificates trusted by the system |
| 22 | + * Returns all uploaded trusted certificates. |
| 23 | + * |
| 24 | + * This does not include the shipped default CA bundle or any system CA bundle |
| 25 | + * appended when building the effective bundle. |
18 | 26 | * |
19 | 27 | * @return \OCP\ICertificate[] |
20 | 28 | * @since 8.0.0 |
21 | 29 | */ |
22 | 30 | public function listCertificates(): array; |
23 | 31 |
|
24 | 32 | /** |
25 | | - * @param string $certificate the certificate data |
26 | | - * @param string $name the filename for the certificate |
| 33 | + * Add a trusted certificate to the certificate store. |
| 34 | + * |
| 35 | + * @param string $certificate The certificate data in PEM format |
| 36 | + * @param string $name The filename for the certificate |
27 | 37 | * @return \OCP\ICertificate |
28 | | - * @throws \Exception If the certificate could not get added |
| 38 | + * @throws \Exception If the certificate could not be added |
29 | 39 | * @since 8.0.0 - since 8.1.0 throws exception instead of returning false |
30 | 40 | */ |
31 | 41 | public function addCertificate(string $certificate, string $name): \OCP\ICertificate; |
32 | 42 |
|
33 | 43 | /** |
34 | | - * @param string $name |
| 44 | + * Remove a trusted certificate from the certificate store. |
| 45 | + * |
| 46 | + * @param string $name The filename for the certificate |
35 | 47 | * @return bool |
36 | 48 | * @since 8.0.0 |
37 | 49 | */ |
38 | 50 | public function removeCertificate(string $name): bool; |
39 | 51 |
|
40 | 52 | /** |
41 | | - * Get the path to the certificate bundle |
| 53 | + * Get the relative path to the generated certificate bundle. |
42 | 54 | * |
43 | 55 | * @return string |
44 | 56 | * @since 8.0.0 |
45 | 57 | */ |
46 | 58 | public function getCertificateBundle(): string; |
47 | 59 |
|
48 | 60 | /** |
49 | | - * Get the full local path to the certificate bundle |
| 61 | + * Get the full local path to the effective certificate bundle. |
| 62 | + * |
| 63 | + * Implementations should return the generated bundle path, but may log and fall back |
| 64 | + * to the shipped default CA bundle if resolution fails. |
50 | 65 | * |
51 | 66 | * @return string |
52 | 67 | * @since 9.0.0 |
53 | 68 | */ |
54 | 69 | public function getAbsoluteBundlePath(): string; |
55 | 70 |
|
56 | 71 | /** |
57 | | - * Get the path of the default certificates bundle. |
| 72 | + * Get the path of the shipped default certificates bundle. |
58 | 73 | * |
59 | 74 | * @since 33.0.0 |
60 | 75 | */ |
|
0 commit comments