Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gtlsdatabase.h
Go to the documentation of this file.
1/* GIO - GLib Input, Output and Streaming Library
2 *
3 * Copyright (C) 2010 Collabora, Ltd.
4 *
5 * SPDX-License-Identifier: LGPL-2.1-or-later
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General
18 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
19 *
20 * Author: Stef Walter <stefw@collabora.co.uk>
21 */
22
23#ifndef __G_TLS_DATABASE_H__
24#define __G_TLS_DATABASE_H__
25
26#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
27#error "Only <gio/gio.h> can be included directly."
28#endif
29
30#include <gio/giotypes.h>
31
33
34#define G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER "1.3.6.1.5.5.7.3.1"
35#define G_TLS_DATABASE_PURPOSE_AUTHENTICATE_CLIENT "1.3.6.1.5.5.7.3.2"
36
37#define G_TYPE_TLS_DATABASE (g_tls_database_get_type ())
38#define G_TLS_DATABASE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_TLS_DATABASE, GTlsDatabase))
39#define G_TLS_DATABASE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_TLS_DATABASE, GTlsDatabaseClass))
40#define G_IS_TLS_DATABASE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_TLS_DATABASE))
41#define G_IS_TLS_DATABASE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_TLS_DATABASE))
42#define G_TLS_DATABASE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), G_TYPE_TLS_DATABASE, GTlsDatabaseClass))
43
45typedef struct _GTlsDatabasePrivate GTlsDatabasePrivate;
46
53
55{
57
58 /* virtual methods */
59
61 GTlsCertificate *chain,
62 const gchar *purpose,
63 GSocketConnectable *identity,
64 GTlsInteraction *interaction,
66 GCancellable *cancellable,
67 GError **error);
68
70 GTlsCertificate *chain,
71 const gchar *purpose,
72 GSocketConnectable *identity,
73 GTlsInteraction *interaction,
75 GCancellable *cancellable,
76 GAsyncReadyCallback callback,
77 gpointer user_data);
78
80 GAsyncResult *result,
81 GError **error);
82
83 gchar* (*create_certificate_handle) (GTlsDatabase *self,
84 GTlsCertificate *certificate);
85
86 GTlsCertificate* (*lookup_certificate_for_handle) (GTlsDatabase *self,
87 const gchar *handle,
88 GTlsInteraction *interaction,
90 GCancellable *cancellable,
91 GError **error);
92
94 const gchar *handle,
95 GTlsInteraction *interaction,
97 GCancellable *cancellable,
98 GAsyncReadyCallback callback,
99 gpointer user_data);
100
101 GTlsCertificate* (*lookup_certificate_for_handle_finish) (GTlsDatabase *self,
102 GAsyncResult *result,
103 GError **error);
104
105 GTlsCertificate* (*lookup_certificate_issuer) (GTlsDatabase *self,
106 GTlsCertificate *certificate,
107 GTlsInteraction *interaction,
109 GCancellable *cancellable,
110 GError **error);
111
113 GTlsCertificate *certificate,
114 GTlsInteraction *interaction,
116 GCancellable *cancellable,
117 GAsyncReadyCallback callback,
118 gpointer user_data);
119
120 GTlsCertificate* (*lookup_certificate_issuer_finish) (GTlsDatabase *self,
121 GAsyncResult *result,
122 GError **error);
123
124 GList* (*lookup_certificates_issued_by) (GTlsDatabase *self,
125 GByteArray *issuer_raw_dn,
126 GTlsInteraction *interaction,
128 GCancellable *cancellable,
129 GError **error);
130
132 GByteArray *issuer_raw_dn,
133 GTlsInteraction *interaction,
135 GCancellable *cancellable,
136 GAsyncReadyCallback callback,
137 gpointer user_data);
138
139 GList* (*lookup_certificates_issued_by_finish) (GTlsDatabase *self,
140 GAsyncResult *result,
141 GError **error);
142
143 /*< private >*/
144 /* Padding for future expansion */
146};
147
150
153 GTlsCertificate *chain,
154 const gchar *purpose,
155 GSocketConnectable *identity,
156 GTlsInteraction *interaction,
158 GCancellable *cancellable,
159 GError **error);
160
163 GTlsCertificate *chain,
164 const gchar *purpose,
165 GSocketConnectable *identity,
166 GTlsInteraction *interaction,
168 GCancellable *cancellable,
169 GAsyncReadyCallback callback,
170 gpointer user_data);
171
174 GAsyncResult *result,
175 GError **error);
176
179 GTlsCertificate *certificate);
180
183 const gchar *handle,
184 GTlsInteraction *interaction,
186 GCancellable *cancellable,
187 GError **error);
188
191 const gchar *handle,
192 GTlsInteraction *interaction,
194 GCancellable *cancellable,
195 GAsyncReadyCallback callback,
196 gpointer user_data);
197
200 GAsyncResult *result,
201 GError **error);
202
205 GTlsCertificate *certificate,
206 GTlsInteraction *interaction,
208 GCancellable *cancellable,
209 GError **error);
210
213 GTlsCertificate *certificate,
214 GTlsInteraction *interaction,
216 GCancellable *cancellable,
217 GAsyncReadyCallback callback,
218 gpointer user_data);
219
222 GAsyncResult *result,
223 GError **error);
224
227 GByteArray *issuer_raw_dn,
228 GTlsInteraction *interaction,
230 GCancellable *cancellable,
231 GError **error);
232
235 GByteArray *issuer_raw_dn,
236 GTlsInteraction *interaction,
238 GCancellable *cancellable,
239 GAsyncReadyCallback callback,
240 gpointer user_data);
241
244 GAsyncResult *result,
245 GError **error);
246
248
249#endif /* __G_TLS_DATABASE_H__ */
#define GIO_AVAILABLE_IN_ALL
GTlsCertificateFlags
Definition gioenums.h:1633
GTlsDatabaseVerifyFlags
Definition gioenums.h:1837
GTlsDatabaseLookupFlags
Definition gioenums.h:1853
struct _GSocketConnectable GSocketConnectable
Definition giotypes.h:143
struct _GAsyncResult GAsyncResult
Definition giotypes.h:36
void(* GAsyncReadyCallback)(GObject *source_object, GAsyncResult *res, gpointer data)
Definition giotypes.h:190
typedefG_BEGIN_DECLS struct _GList GList
Definition glist.h:39
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
#define G_GNUC_CONST
Definition gmacros.h:637
GIO_AVAILABLE_IN_ALL GTlsCertificate * g_tls_database_lookup_certificate_for_handle(GTlsDatabase *self, const gchar *handle, GTlsInteraction *interaction, GTlsDatabaseLookupFlags flags, GCancellable *cancellable, GError **error)
GIO_AVAILABLE_IN_ALL GType g_tls_database_get_type(void) G_GNUC_CONST
GIO_AVAILABLE_IN_ALL GTlsCertificate * g_tls_database_lookup_certificate_issuer_finish(GTlsDatabase *self, GAsyncResult *result, GError **error)
GIO_AVAILABLE_IN_ALL GTlsCertificateFlags g_tls_database_verify_chain_finish(GTlsDatabase *self, GAsyncResult *result, GError **error)
GIO_AVAILABLE_IN_ALL void g_tls_database_lookup_certificate_issuer_async(GTlsDatabase *self, GTlsCertificate *certificate, GTlsInteraction *interaction, GTlsDatabaseLookupFlags flags, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
GIO_AVAILABLE_IN_ALL void g_tls_database_lookup_certificates_issued_by_async(GTlsDatabase *self, GByteArray *issuer_raw_dn, GTlsInteraction *interaction, GTlsDatabaseLookupFlags flags, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
struct _GTlsDatabasePrivate GTlsDatabasePrivate
GIO_AVAILABLE_IN_ALL void g_tls_database_lookup_certificate_for_handle_async(GTlsDatabase *self, const gchar *handle, GTlsInteraction *interaction, GTlsDatabaseLookupFlags flags, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
GIO_AVAILABLE_IN_ALL GTlsCertificateFlags g_tls_database_verify_chain(GTlsDatabase *self, GTlsCertificate *chain, const gchar *purpose, GSocketConnectable *identity, GTlsInteraction *interaction, GTlsDatabaseVerifyFlags flags, GCancellable *cancellable, GError **error)
GIO_AVAILABLE_IN_ALL GTlsCertificate * g_tls_database_lookup_certificate_issuer(GTlsDatabase *self, GTlsCertificate *certificate, GTlsInteraction *interaction, GTlsDatabaseLookupFlags flags, GCancellable *cancellable, GError **error)
GIO_AVAILABLE_IN_ALL GList * g_tls_database_lookup_certificates_issued_by(GTlsDatabase *self, GByteArray *issuer_raw_dn, GTlsInteraction *interaction, GTlsDatabaseLookupFlags flags, GCancellable *cancellable, GError **error)
GIO_AVAILABLE_IN_ALL GList * g_tls_database_lookup_certificates_issued_by_finish(GTlsDatabase *self, GAsyncResult *result, GError **error)
GIO_AVAILABLE_IN_ALL void g_tls_database_verify_chain_async(GTlsDatabase *self, GTlsCertificate *chain, const gchar *purpose, GSocketConnectable *identity, GTlsInteraction *interaction, GTlsDatabaseVerifyFlags flags, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
GIO_AVAILABLE_IN_ALL GTlsCertificate * g_tls_database_lookup_certificate_for_handle_finish(GTlsDatabase *self, GAsyncResult *result, GError **error)
GIO_AVAILABLE_IN_ALL gchar * g_tls_database_create_certificate_handle(GTlsDatabase *self, GTlsCertificate *certificate)
gsize GType
Definition gtype.h:427
G_BEGIN_DECLS typedef char gchar
Definition gtypes.h:52
void * gpointer
Definition gtypes.h:109
static void error(LoadState *S, const char *why)
void(* verify_chain_async)(GTlsDatabase *self, GTlsCertificate *chain, const gchar *purpose, GSocketConnectable *identity, GTlsInteraction *interaction, GTlsDatabaseVerifyFlags flags, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
GTlsCertificateFlags(* verify_chain_finish)(GTlsDatabase *self, GAsyncResult *result, GError **error)
GObjectClass parent_class
GTlsCertificateFlags(* verify_chain)(GTlsDatabase *self, GTlsCertificate *chain, const gchar *purpose, GSocketConnectable *identity, GTlsInteraction *interaction, GTlsDatabaseVerifyFlags flags, GCancellable *cancellable, GError **error)
void(* lookup_certificates_issued_by_async)(GTlsDatabase *self, GByteArray *issuer_raw_dn, GTlsInteraction *interaction, GTlsDatabaseLookupFlags flags, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
void(* lookup_certificate_for_handle_async)(GTlsDatabase *self, const gchar *handle, GTlsInteraction *interaction, GTlsDatabaseLookupFlags flags, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
void(* lookup_certificate_issuer_async)(GTlsDatabase *self, GTlsCertificate *certificate, GTlsInteraction *interaction, GTlsDatabaseLookupFlags flags, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
gpointer padding[16]
GObject parent_instance
GTlsDatabasePrivate * priv