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 #if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
23 #error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
26 #ifndef __GCR_TRUST_H__
27 #define __GCR_TRUST_H__
29 #include "gcr-certificate.h"
30 #include "gcr-types.h"
34 #define GCR_PURPOSE_SERVER_AUTH "1.3.6.1.5.5.7.3.1"
35 #define GCR_PURPOSE_CLIENT_AUTH "1.3.6.1.5.5.7.3.2"
36 #define GCR_PURPOSE_CODE_SIGNING "1.3.6.1.5.5.7.3.3"
37 #define GCR_PURPOSE_EMAIL "1.3.6.1.5.5.7.3.4"
39 gboolean gcr_trust_is_certificate_pinned (GcrCertificate *certificate,
42 GCancellable *cancellable,
45 void gcr_trust_is_certificate_pinned_async (GcrCertificate *certificate,
48 GCancellable *cancellable,
49 GAsyncReadyCallback callback,
52 gboolean gcr_trust_is_certificate_pinned_finish (GAsyncResult *result,
55 gboolean gcr_trust_add_pinned_certificate (GcrCertificate *certificate,
58 GCancellable *cancellable,
61 void gcr_trust_add_pinned_certificate_async (GcrCertificate *certificate,
64 GCancellable *cancellable,
65 GAsyncReadyCallback callback,
68 gboolean gcr_trust_add_pinned_certificate_finish (GAsyncResult *result,
71 gboolean gcr_trust_remove_pinned_certificate (GcrCertificate *certificate,
74 GCancellable *cancellable,
77 void gcr_trust_remove_pinned_certificate_async (GcrCertificate *certificate,
80 GCancellable *cancellable,
81 GAsyncReadyCallback callback,
84 gboolean gcr_trust_remove_pinned_certificate_finish (GAsyncResult *result,
87 gboolean gcr_trust_is_certificate_anchored (GcrCertificate *certificate,
89 GCancellable *cancellable,
92 void gcr_trust_is_certificate_anchored_async (GcrCertificate *certificate,
94 GCancellable *cancellable,
95 GAsyncReadyCallback callback,
98 gboolean gcr_trust_is_certificate_anchored_finish (GAsyncResult *result,
103 #endif /* __GCR_TOKEN_MANAGER_H__ */