Imported Upstream version 2.72.alpha
[platform/upstream/glib-networking.git] / tls / openssl / gtlsdatabase-openssl.h
1 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3  * gtlsdatabase-openssl.h
4  *
5  * Copyright (C) 2015 NICE s.r.l.
6  *
7  * This file 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 file 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 Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  * In addition, when the library is used with OpenSSL, a special
21  * exception applies. Refer to the LICENSE_EXCEPTION file for details.
22  *
23  * Authors: Ignacio Casal Quinteiro
24  */
25
26 #pragma once
27
28 #include <gio/gio.h>
29
30 #include "gtlscertificate-openssl.h"
31
32 G_BEGIN_DECLS
33
34 #define G_TYPE_TLS_DATABASE_OPENSSL            (g_tls_database_openssl_get_type ())
35
36 G_DECLARE_DERIVABLE_TYPE (GTlsDatabaseOpenssl, g_tls_database_openssl, G, TLS_DATABASE_OPENSSL, GTlsDatabase)
37
38 struct _GTlsDatabaseOpensslClass
39 {
40   GTlsDatabaseClass parent_class;
41
42   gboolean  (*populate_trust_list)            (GTlsDatabaseOpenssl       *self,
43                                                X509_STORE                *store,
44                                                GError                   **error);
45 };
46
47 GTlsDatabaseOpenssl      *g_tls_database_openssl_new                      (GError **error);
48
49 GTlsCertificateFlags      g_tls_database_openssl_verify_ocsp_response     (GTlsDatabaseOpenssl *self,
50                                                                            GTlsCertificate     *chain,
51                                                                            OCSP_RESPONSE       *resp);
52
53 G_END_DECLS