Corrected SRP-RSA ciphersuites when used under TLS 1.2.
[gnutls.git] / lib / gnutls_buffers.h
blob3dfad550fe50c2d3296aa793a2b42dfe1060a89a
1 /*
2 * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2010 Free
3 * 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
25 #ifndef GNUTLS_BUFFERS_H
26 #define GNUTLS_BUFFERS_H
28 #define MBUFFER_FLUSH 1
30 int _gnutls_record_buffer_put (content_type_t type,
31 gnutls_session_t session, opaque * data,
32 size_t length);
33 int _gnutls_record_buffer_get_size (content_type_t type,
34 gnutls_session_t session);
35 int _gnutls_record_buffer_get (content_type_t type,
36 gnutls_session_t session, opaque * data,
37 size_t length);
38 ssize_t _gnutls_io_read_buffered (gnutls_session_t, size_t n, content_type_t);
39 int _gnutls_io_clear_peeked_data (gnutls_session_t session);
41 ssize_t _gnutls_io_write_buffered (gnutls_session_t session,
42 mbuffer_st * bufel, unsigned int mflag);
44 int _gnutls_handshake_buffer_get_size (gnutls_session_t session);
45 int _gnutls_handshake_buffer_put (gnutls_session_t session, opaque * data,
46 size_t length);
47 int _gnutls_handshake_buffer_clear (gnutls_session_t session);
48 int _gnutls_handshake_buffer_empty (gnutls_session_t session);
49 int _gnutls_handshake_buffer_get_ptr (gnutls_session_t session,
50 opaque ** data_ptr, size_t * length);
52 #define _gnutls_handshake_io_buffer_clear( session) \
53 _mbuffer_clear( &session->internals.handshake_send_buffer); \
54 _gnutls_buffer_clear( &session->internals.handshake_recv_buffer);
56 ssize_t _gnutls_handshake_io_recv_int (gnutls_session_t, content_type_t,
57 gnutls_handshake_description_t, void *,
58 size_t);
59 void _gnutls_handshake_io_cache_int (gnutls_session_t,
60 gnutls_handshake_description_t,
61 mbuffer_st * bufel);
62 ssize_t _gnutls_io_write_flush (gnutls_session_t session);
63 ssize_t _gnutls_handshake_io_write_flush (gnutls_session_t session);
65 #endif