1 /*
2  * Copyright (C) 2001-2012 Free Software Foundation, Inc.
3  *
4  * Author: Nikos Mavrogiannopoulos
5  *
6  * This file is part of GnuTLS.
7  *
8  * The GnuTLS is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation; either version 2.1 of
11  * the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this program.  If not, see <https://www.gnu.org/licenses/>
20  *
21  */
22 
23 #ifndef GNUTLS_LIB_AUTH_ANON_H
24 #define GNUTLS_LIB_AUTH_ANON_H
25 
26 /* this is not to be included by gnutls_anon.c */
27 #include <auth.h>
28 #include <auth/dh_common.h>
29 
30 typedef struct gnutls_anon_server_credentials_st {
31 	gnutls_dh_params_t dh_params;
32 	unsigned deinit_dh_params;
33 	gnutls_sec_param_t dh_sec_param;
34 
35 	/* this callback is used to retrieve the DH or RSA
36 	 * parameters.
37 	 */
38 	gnutls_params_function *params_func;
39 } anon_server_credentials_st;
40 
41 typedef struct gnutls_anon_client_credentials_st {
42 	int dummy;
43 } anon_client_credentials_st;
44 
45 typedef struct anon_auth_info_st {
46 	dh_info_st dh;
47 	gnutls_ecc_curve_t curve;
48 } *anon_auth_info_t;
49 
50 typedef struct anon_auth_info_st anon_auth_info_st;
51 
52 #endif /* GNUTLS_LIB_AUTH_ANON_H */
53