documented fix
[gnutls.git] / lib / gnutls_state.h
blob2112cd596f2717f772f122ac837fce13ea526e59
1 /*
2 * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2010
3 * Free Software Foundation, 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 GNUTLS_STATE_H
27 #define GNUTLS_STATE_H
29 #include <gnutls_int.h>
31 void _gnutls_session_cert_type_set (gnutls_session_t session,
32 gnutls_certificate_type_t);
33 void
34 _gnutls_record_set_default_version (gnutls_session_t session,
35 unsigned char major, unsigned char minor);
37 #include <gnutls_auth.h>
39 #define CHECK_AUTH(auth, ret) if (gnutls_auth_get_type(session) != auth) { \
40 gnutls_assert(); \
41 return ret; \
44 #endif
46 int _gnutls_session_cert_type_supported (gnutls_session_t,
47 gnutls_certificate_type_t);
48 int _gnutls_dh_set_secret_bits (gnutls_session_t session, unsigned bits);
50 int _gnutls_dh_set_peer_public (gnutls_session_t session, bigint_t public);
51 int _gnutls_dh_set_group (gnutls_session_t session, bigint_t gen,
52 bigint_t prime);
54 int _gnutls_dh_get_allowed_prime_bits (gnutls_session_t session);
55 void _gnutls_handshake_internal_state_clear (gnutls_session_t);
57 int _gnutls_rsa_export_set_pubkey (gnutls_session_t session,
58 bigint_t exponent, bigint_t modulus);
60 int _gnutls_session_is_resumable (gnutls_session_t session);
61 int _gnutls_session_is_export (gnutls_session_t session);
63 int _gnutls_session_is_psk (gnutls_session_t session);
65 int _gnutls_openpgp_send_fingerprint (gnutls_session_t session);
67 int _gnutls_PRF (gnutls_session_t session,
68 const opaque * secret, int secret_size,
69 const char *label, int label_size,
70 const opaque * seed, int seed_size,
71 int total_bytes, void *ret);
73 #define DEFAULT_CERT_TYPE GNUTLS_CRT_X509