2 * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008 Free Software Foundation
4 * Author: Nikos Mavrogiannopoulos
6 * This file is part of GNUTLS.
8 * The GNUTLS library 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.
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.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
25 #ifndef GNUTLS_STATE_H
26 # define GNUTLS_STATE_H
28 #include <gnutls_int.h>
30 void _gnutls_session_cert_type_set (gnutls_session_t session
,
31 gnutls_certificate_type_t
);
33 #include <gnutls_auth.h>
35 #define CHECK_AUTH(auth, ret) if (gnutls_auth_get_type(session) != auth) { \
42 int _gnutls_session_cert_type_supported (gnutls_session_t
,
43 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