All Classes Files Functions Variables Enumerations Enumerator Groups Pages
ConnectCertificate.idl
Go to the documentation of this file.
1  /**
2  * @file ConnectCertificate.idl
3  * @brief Set security certificates. Methods specific for Kerio Connect.
4  *
5  * @author Dusan Juhas
6  *
7  * @copyright Copyright © 2017 Kerio Technologies s.r.o.
8  */
9 
10 #import <kerio/web/idl/SharedStructures.idl>
11 #include <kerio/web/idl/Certificates.idl>
12 
13 module kerio {
14 module jsonapi {
15 module admin {
16 
17 typedef sequence<kerio::web::Certificate> CertificateList;
18 
19 interface ConnectCertificate {
20 
21  /**
22  * Export of certificate or certificate request
23  * Note: "export" is a keyword in C++, so name of the method must be changed: exportCertificate
24  *
25  * @param id - ID of the certificate or certificate request
26  * @param fileDownload - description of the output file
27  */
28  void exportCertificate(out kerio::web::Download fileDownload, in kerio::web::KId id);
29 
30  /**
31  * Export of certificate or request privatekey
32  * Note: "export" is a keyword in C++, so the name of the method must be changed: exportPrivateKey
33  *
34  * @param id - ID of the certificate or certificate request
35  * @param fileDownload - description of the output file
36  */
37  void exportPrivateKey(out kerio::web::Download fileDownload, in kerio::web::KId id);
38 
39  /**
40  * Obtain a list of certificates
41  *
42  * @param certificates - current list of certificates
43  */
44  void get(out CertificateList certificates);
45 
46  /**
47  * Generate a self-signed certificate
48  *
49  * @param id - ID of the new generated certificate
50  * @param subject - information about subject
51  * @param valid - length of the certificate's validity (in years, max value is 10)
52  */
53  void generate(out kerio::web::KId id, in kerio::web::NamedValueList subject, in long valid);
54 
55  /**
56  * Generate certificate request
57  *
58  * @param id - ID of the new generated certificate request
59  * @param subject - information about subject
60  */
61  void generateRequest(out kerio::web::KId id, in kerio::web::NamedValueList subject);
62 
63  /**
64  * Import private key for the new certificate.
65  *
66  * @param needPassword - true if private key is encrypted with password
67  * @param id - ID of private key or certificate request which belongs to the certificate
68  * @param fileId - ID of the uploaded file
69  * @param password - certificate password, if it is set (use empty string if password is not set)
70  */
71  void importCertificate(in kerio::web::KId id, in string fileId, in string password);
72 
73  /**
74  * Import private key for the new certificate.
75  *
76  * @param needPassword - true if private key is encrypted with password
77  * @param id - temporary ID to assign certificate to private key
78  * @param fileId - ID of the uploaded file
79  */
80  void importPrivateKey(out boolean needPassword, out kerio::web::KId id, in string fileId);
81 
82  /**
83  * Remove list of certificate records
84  *
85  * @param errors - error message list
86  * @param ids - list of identifiers of deleted user templates
87  */
88  void remove(out kerio::web::ErrorList errors, in kerio::web::KIdList certificateIds);
89 
90  /**
91  * Set active certificate
92  *
93  * @param id - ID of the new active certificate
94  */
95  void setActive(in kerio::web::KId id);
96 
97  /**
98  * Obtain source (plain-text representation) of the certificate
99  *
100  * @param source - certificate in plain text
101  * @param id - global identifier
102  */
103  void toSource(out string source, in kerio::web::KId id);
104 };
105 
106 }; }; };//end of namespace