Add `gnutls/dtls.h' to the distribution.
[gnutls.git] / lib / auth_dh_common.h
blob9c528f10814c0d1b6882fb09b5b37a2d8ea40ef2
1 /*
2 * Copyright (C) 2002, 2003, 2004, 2005, 2010 Free Software Foundation,
3 * Inc.
5 * Author: Nikos Mavrogiannopoulos
7 * This file is part of GnuTLS.
9 * The GnuTLS is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License
11 * as published by the Free Software Foundation; either version 2.1 of
12 * the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22 * USA
26 #ifndef AUTH_DH_COMMON
27 #define AUTH_DH_COMMON
29 #include <gnutls_auth.h>
31 typedef struct
33 int secret_bits;
35 gnutls_datum_t prime;
36 gnutls_datum_t generator;
37 gnutls_datum_t public_key;
38 } dh_info_st;
40 void _gnutls_free_dh_info (dh_info_st * dh);
41 int _gnutls_gen_dh_common_client_kx_int (gnutls_session_t, gnutls_buffer_st*, gnutls_datum_t *pskkey);
42 int _gnutls_gen_dh_common_client_kx (gnutls_session_t, gnutls_buffer_st*);
43 int _gnutls_proc_dh_common_client_kx (gnutls_session_t session,
44 opaque * data, size_t _data_size,
45 bigint_t p, bigint_t g);
46 int _gnutls_dh_common_print_server_kx (gnutls_session_t, bigint_t g,
47 bigint_t p, gnutls_buffer_st* data, int psk);
48 int _gnutls_proc_dh_common_server_kx (gnutls_session_t session, opaque * data,
49 size_t _data_size, int psk);
51 #endif