Corrected bugs in record parsing.
[gnutls.git] / lib / ext / safe_renegotiation.h
blob977e24067f9d1f9290ad2c91422abf5837dbc37c
1 /*
2 * Copyright (C) 2009-2012 Free Software Foundation, Inc.
4 * Author: Steve Dispensa (<dispensa@phonefactor.com>)
6 * This file is part of GnuTLS.
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 3 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 License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>
23 #ifndef EXT_SAFE_RENEGOTIATION_H
24 #define EXT_SAFE_RENEGOTIATION_H
26 #include <gnutls_extensions.h>
28 typedef struct
30 uint8_t client_verify_data[MAX_VERIFY_DATA_SIZE];
31 size_t client_verify_data_len;
32 uint8_t server_verify_data[MAX_VERIFY_DATA_SIZE];
33 size_t server_verify_data_len;
34 uint8_t ri_extension_data[MAX_VERIFY_DATA_SIZE * 2]; /* max signal is 72 bytes in s->c sslv3 */
35 size_t ri_extension_data_len;
37 unsigned int safe_renegotiation_received:1;
38 unsigned int initial_negotiation_completed:1;
39 unsigned int connection_using_safe_renegotiation:1;
40 } sr_ext_st;
42 extern extension_entry_st ext_mod_sr;
44 int _gnutls_ext_sr_finished (gnutls_session_t session, void *vdata,
45 size_t vdata_size, int dir);
46 int _gnutls_ext_sr_recv_cs (gnutls_session_t session);
47 int _gnutls_ext_sr_verify (gnutls_session_t session);
48 int _gnutls_ext_sr_send_cs (gnutls_session_t);
50 #endif /* EXT_SAFE_RENEGOTIATION_H */