Imported Upstream version 2.34.0
[platform/upstream/glib-networking.git] / tls / gnutls / gnutls-module.c
1 /* GIO - GLib Input, Output and Streaming Library
2  *
3  * Copyright 2010 Red Hat, Inc.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General
16  * Public License along with this library; if not, see
17  * <http://www.gnu.org/licenses/>.
18  */
19
20 #include "config.h"
21
22 #include <gio/gio.h>
23
24 #include "gtlsbackend-gnutls.h"
25 #include "gtlsbackend-gnutls-pkcs11.h"
26
27
28 void
29 g_io_module_load (GIOModule *module)
30 {
31   g_tls_backend_gnutls_register (module);
32 #ifdef HAVE_PKCS11
33   g_tls_backend_gnutls_pkcs11_register (module);
34 #endif
35 }
36
37 void
38 g_io_module_unload (GIOModule *module)
39 {
40 }
41
42 gchar **
43 g_io_module_query (void)
44 {
45   gchar *eps[] = {
46     G_TLS_BACKEND_EXTENSION_POINT_NAME,
47     NULL
48   };
49   return g_strdupv (eps);
50 }