1 |
michael |
7105 |
/* |
2 |
|
|
* ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) |
3 |
|
|
* |
4 |
michael |
7164 |
* Copyright (c) 2015 Attila Molnar <attilamolnar@hush.com> |
5 |
|
|
* Copyright (c) 2015 Adam <Adam@anope.org> |
6 |
michael |
8752 |
* Copyright (c) 2015-2019 ircd-hybrid development team |
7 |
michael |
7105 |
* |
8 |
|
|
* This program is free software; you can redistribute it and/or modify |
9 |
|
|
* it under the terms of the GNU General Public License as published by |
10 |
|
|
* the Free Software Foundation; either version 2 of the License, or |
11 |
|
|
* (at your option) any later version. |
12 |
|
|
* |
13 |
|
|
* This program is distributed in the hope that it will be useful, |
14 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 |
|
|
* GNU General Public License for more details. |
17 |
|
|
* |
18 |
|
|
* You should have received a copy of the GNU General Public License |
19 |
|
|
* along with this program; if not, write to the Free Software |
20 |
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 |
21 |
|
|
* USA |
22 |
|
|
*/ |
23 |
|
|
|
24 |
|
|
/*! \file tls_gnutls.h |
25 |
|
|
* \brief GnuTLS-specific TLS types |
26 |
|
|
* \version $Id$ |
27 |
|
|
*/ |
28 |
|
|
|
29 |
|
|
|
30 |
|
|
#ifndef INCLUDED_tls_gnutls_h |
31 |
|
|
#define INCLUDED_tls_gnutls_h |
32 |
|
|
|
33 |
|
|
#if defined(HAVE_LIBGNUTLS) && !defined(HAVE_LIBCRYPTO) |
34 |
|
|
|
35 |
|
|
#define HAVE_TLS |
36 |
|
|
#define HAVE_TLS_GNUTLS |
37 |
|
|
|
38 |
|
|
#include <gnutls/gnutls.h> |
39 |
|
|
#include <gnutls/x509.h> |
40 |
|
|
|
41 |
michael |
7137 |
enum { TLS_GNUTLS_MAX_HASH_SIZE = 64 }; |
42 |
michael |
7134 |
|
43 |
michael |
7105 |
typedef gnutls_digest_algorithm_t tls_md_t; |
44 |
|
|
typedef struct gnutls_context * tls_context_t; |
45 |
|
|
|
46 |
|
|
struct gnutls_context |
47 |
|
|
{ |
48 |
|
|
gnutls_certificate_credentials_t x509_cred; |
49 |
|
|
gnutls_priority_t priorities; |
50 |
|
|
gnutls_dh_params_t dh_params; |
51 |
|
|
unsigned int refs; |
52 |
|
|
}; |
53 |
|
|
|
54 |
|
|
typedef struct |
55 |
|
|
{ |
56 |
|
|
gnutls_session_t session; |
57 |
|
|
tls_context_t context; |
58 |
|
|
} tls_data_t; |
59 |
|
|
|
60 |
|
|
#endif /* defined(HAVE_LIBGNUTLS) && !defined(HAVE_LIBCRYPTO) */ |
61 |
|
|
#endif /* INCLUDED_tls_openssl_h */ |