Bug #690177 - Use trust-prompt for certificate verification in WebDAV backends
[platform/upstream/evolution-data-server.git] / modules / trust-prompt / trust-prompt.h
1 /*
2  * trust-prompt.h
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) version 3.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with the program; if not, see <http://www.gnu.org/licenses/>
16  *
17  */
18
19 #ifndef TRUST_PROMPT_H
20 #define TRUST_PROMPT_H
21
22 #include <cert.h>
23 #include <libebackend/libebackend.h>
24
25 /* This shows a trust-prompt. The function may not block and returns whether
26    showed a dialog or not. It calls e_user_prompter_server_extension_response()
27    when a user responded to the dialog with one of the TRUST_PROMPT_RESPONSE values.
28 */
29
30 #define TRUST_PROMPT_RESPONSE_UNKNOWN                   -1
31 #define TRUST_PROMPT_RESPONSE_REJECT                     0
32 #define TRUST_PROMPT_RESPONSE_ACCEPT_PERMANENTLY         1
33 #define TRUST_PROMPT_RESPONSE_ACCEPT_TEMPORARILY         2
34
35 gboolean
36 trust_prompt_show (EUserPrompterServerExtension *extension,
37                    gint prompt_id,
38                    const gchar *host,
39                    const gchar *markup,
40                    const CERTCertificate *pcert,
41                    const gchar *cert_fingerprint,
42                    const gchar *reason,
43                    const GSList *pissuers);
44
45 #endif /* TRUST_PROMPT_H */