Use libtasn1 v2.4.
[gnutls.git] / lib / gnutls_state.h
blob0b85ca41e3796d4289bd15e2d7f74d63d455f83f
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 library 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);
34 #include <gnutls_auth.h>
36 #define CHECK_AUTH(auth, ret) if (gnutls_auth_get_type(session) != auth) { \
37 gnutls_assert(); \
38 return ret; \
41 #endif
43 int _gnutls_session_cert_type_supported (gnutls_session_t,
44 gnutls_certificate_type_t);
45 int _gnutls_dh_set_secret_bits (gnutls_session_t session, unsigned bits);
47 int _gnutls_dh_set_peer_public (gnutls_session_t session, bigint_t public);
48 int _gnutls_dh_set_group (gnutls_session_t session, bigint_t gen, bigint_t prime);
50 int _gnutls_dh_get_allowed_prime_bits (gnutls_session_t session);
51 void _gnutls_handshake_internal_state_clear (gnutls_session_t);
53 int _gnutls_rsa_export_set_pubkey (gnutls_session_t session,
54 bigint_t exponent, bigint_t modulus);
56 int _gnutls_session_is_resumable (gnutls_session_t session);
57 int _gnutls_session_is_export (gnutls_session_t session);
59 int _gnutls_session_is_psk (gnutls_session_t session);
61 int _gnutls_openpgp_send_fingerprint (gnutls_session_t session);
63 int _gnutls_PRF (gnutls_session_t session,
64 const opaque * secret, int secret_size,
65 const char *label, int label_size,
66 const opaque * seed, int seed_size,
67 int total_bytes, void *ret);
69 #define DEFAULT_CERT_TYPE GNUTLS_CRT_X509