4 * Copyright (C) 2010 Stefan Walter
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as
8 * published by the Free Software Foundation; either version 2.1 of
9 * the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
22 #ifndef __GCR_TRUST_H__
23 #define __GCR_TRUST_H__
25 #include "gcr-types.h"
29 typedef enum _GcrTrust {
30 GCR_TRUST_UNTRUSTED = -1,
31 GCR_TRUST_UNKNOWN = 0,
35 typedef enum _GcrPurpose {
36 GCR_PURPOSE_SERVER_AUTH = 1,
37 GCR_PURPOSE_CLIENT_AUTH,
38 GCR_PURPOSE_CODE_SIGNING,
40 GCR_PURPOSE_TIME_STAMPING,
41 GCR_PURPOSE_IPSEC_ENDPOINT,
42 GCR_PURPOSE_IPSEC_TUNNEL,
43 GCR_PURPOSE_IPSEC_USER,
44 GCR_PURPOSE_IKE_INTERMEDIATE,
47 GcrTrust gcr_trust_get_certificate_exception (GcrCertificate *cert,
52 void gcr_trust_get_certificate_exception_async (GcrCertificate *cert,
55 GAsyncReadyCallback callback,
58 GcrTrust gcr_trust_get_certificate_exception_finish (GAsyncResult *res,
61 gboolean gcr_trust_set_certificate_exception (GcrCertificate *cert,
67 void gcr_trust_set_certificate_exception_async (GcrCertificate *cert,
71 GAsyncReadyCallback callback,
74 gboolean gcr_trust_set_certificate_exception_finish (GAsyncResult *res,
77 gboolean gcr_trust_is_certificate_root (GcrCertificate *cert,
82 void gcr_trust_is_certificate_root_async (GcrCertificate *cert,
85 GAsyncReadyCallback callback,
88 gboolean gcr_trust_is_certificate_root_finish (GAsyncResult *res,
93 #endif /* __GCR_TOKEN_MANAGER_H__ */