All Classes Files Functions Variables Pages
Certificates.idl
Go to the documentation of this file.
1 /**
2  * @file Certificates.idl
3  * @brief API for certificate handling
4  * @version 3
5  */
6 
7 #import <kerio/web/idl/SharedStructures.idl>
8 #import <kerio/web/idl/Certificates.idl>
9 #import <common.idl>
10 
11 module webadmin {
12 
13 interface Certificates : kerio::web::Certificates {
14 
15  /**
16  * Generate certificate.
17  *
18  * @param id - ID of generated certificate
19  * @param subject - properties specified by user
20  * @param name - name of the new certificate
21  * @param type - type of certificate to be generated, valid input is one of: InactiveCertificate/CertificateRequest/LocalAuthority
22  * @param period - time properties specified by user, not relevant for CertificateRequest
23  * @param subjectAlternativeNameList - Lists of subject alternative names in certificate. Key is similar to openSSL subj. alt. name type (see http://www.openssl.org/docs/apps/x509v3_config.html)
24  * @throws kerio::web::ApiException \n
25  * -32001 Session expired. - "The user is not logged in." \n
26  * 1004 Access denied. - "Insufficient rights to perform the requested operation." \n
27  * Invalid params. - "Unable to generate certificate, expiration date has already passed." \n
28  * Invalid params. - "Unable to generate certificate, properties are invalid."
29  */
30  void generateEx(out kerio::web::KId id, in kerio::web::NamedValueList subject, in string name, in kerio::web::CertificateType type, in kerio::web::ValidPeriod period, in kerio::web::NamedMultiValueList subjectAlternativeNameList);
31 
32  /**
33  * Detect certificate of given VPN host.
34  *
35  * @param certificate - detected properties
36  * @param host - the host certificate of which will be detected
37  * @throws kerio::web::ApiException \n
38  * -32001 Session expired. - "The user is not logged in." \n
39  * 1000 Operation failed. - "Unable to detect the remote endpoint's certificate." \n
40  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
41  */
42  void detect(out kerio::web::Certificate certificate, in string host);
43 
44  /**
45  * write changes cached in manager to configuration
46  * @param errors - list of errors \n
47  * @throws kerio::web::ApiException \n
48  * -32001 Session expired. - "The user is not logged in." \n
49  * 1004 Access denied. - "Insufficient rights to perform the requested operation." \n
50  * 8001 Invalid params. - "Unable to add/modify certificate %1, wrong parameters." \n
51  * 8002 Database error. - "Unable to add/modify certificate %1." \n
52  * 8002 Database error. - "Unable to delete certificate."
53  */
54  void apply(out kerio::web::ErrorList errors);
55 
56  /**
57  * discard changes cached in manager
58  * @throws kerio::web::ApiException \n
59  * -32001 Session expired. - "The user is not logged in." \n
60  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
61  */
62  void reset();
63 
64  /**
65  * Import certificate in PKCS #12 format
66  *
67  * @param id - ID of generated certificate
68  * @param fileId - id of uploaded file
69  * @param name - name of the new certificate
70  * @param type - type of certificate to be imported, valid input is one of: InactiveCertificate/LocalAuthority
71  * @param password - password needed to decode certificate
72  * @throws kerio::web::ApiException \n
73  * -32001 Session expired. - "The user is not logged in." \n
74  * 1000 OperationFailed - "Unable to import certificate, password is not valid." \n
75  * 1002 No such entity. - "Uploaded file does not exist." \n
76  * 1002 No such entity. - "Unable to import certificate, it doesn't match imported private key!" \n
77  * 1004 Access denied. - "Insufficient rights to perform the requested operation." \n
78  * Invalid params. - "Unable to import certificate, the content is invalid!"
79  */
80  void importCertificateP12(out kerio::web::KId id, in string fileId, in string name, in kerio::web::CertificateType type, in string password);
81 
82  /**
83  * Export certificate in PKCS #12 format
84  *
85  * @param fileDownload - description of the output file
86  * @param id - ID of the certificate or certificate request
87  * @param password - password, which will be used to encrypt output certificate
88  * @param includeCa - if true, engine will include whole certificate chain up to highest CA (only if all parents are present)
89  * @throws kerio::web::ApiException \n
90  * -32001 Session expired. - "The user is not logged in." \n
91  * 1002 No such entity. - "Certificate not found." \n
92  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
93  */
94  void exportCertificateP12(out kerio::web::Download fileDownload, in kerio::web::KId id, in string password, in boolean includeCa);
95 
96  /**
97  * Import certificate from url
98  *
99  * @param url - url, where will be certificate downloaded from
100  * @throws kerio::web::ApiException \n
101  * -32001 Session expired. - "The user is not logged in." \n
102  * 1000 OperationFailed - "Unable to download certificate." \n
103  * 1004 Access denied. - "Insufficient rights to perform the requested operation." \n
104  * Invalid params. - "Unable to import certificate, the content is invalid!"
105  */
106 
107  void importCertificateUrl(in string url);
108 
109  /**
110  * Distrust list of certificate records
111  *
112  * @param errors - error message list
113  * @param ids - list of identifiers of deleted user templates
114  * @throws kerio::web::ApiException on error:
115  * -32001 Session expired. - "The user is not logged in."
116  * 1002 No such entity. - "Certificate not found."
117  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
118  */
119  void setDistrusted(out kerio::web::ErrorList errors, in kerio::web::KIdList ids);
120 };
121 
122 }; //webadmin
Common Kerio Control structures, enums and types.
Definition: SharedStructures.idl:342
Definition: Certificates.idl:13
Definition: Accounting.idl:11