|
Packit Service |
4684c1 |
/*
|
|
Packit Service |
4684c1 |
* Copyright (C) 2017 Red Hat, Inc.
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
* Author: Nikos Mavrogiannopoulos
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
* This file is part of GnuTLS.
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
* The GnuTLS is free software; you can redistribute it and/or
|
|
Packit Service |
4684c1 |
* modify it under the terms of the GNU Lesser General Public License
|
|
Packit Service |
4684c1 |
* as published by the Free Software Foundation; either version 2.1 of
|
|
Packit Service |
4684c1 |
* the License, or (at your option) any later version.
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
* This library is distributed in the hope that it will be useful, but
|
|
Packit Service |
4684c1 |
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
4684c1 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
4684c1 |
* Lesser General Public License for more details.
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
* You should have received a copy of the GNU Lesser General Public License
|
|
Packit Service |
4684c1 |
* along with this program. If not, see <https://www.gnu.org/licenses/>
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
*/
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
#ifndef GNUTLS_LIB_HELLO_EXT_LIB_H
|
|
Packit Service |
4684c1 |
#define GNUTLS_LIB_HELLO_EXT_LIB_H
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
#include <gnutls/gnutls.h>
|
|
Packit Service |
4684c1 |
#include "hello_ext.h"
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
/* Functions to use at the send() or recv() extension function to temporarily
|
|
Packit Service |
4684c1 |
* store and retrieve data related to the extension.
|
|
Packit Service |
4684c1 |
*/
|
|
Packit Service |
4684c1 |
int
|
|
Packit Service |
4684c1 |
_gnutls_hello_ext_set_datum(gnutls_session_t session,
|
|
Packit Service |
4684c1 |
extensions_t id, const gnutls_datum_t *data);
|
|
Packit Service |
4684c1 |
int
|
|
Packit Service |
4684c1 |
_gnutls_hello_ext_get_datum(gnutls_session_t session,
|
|
Packit Service |
4684c1 |
extensions_t id, gnutls_datum_t *data /* constant contents */);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int
|
|
Packit Service |
4684c1 |
_gnutls_hello_ext_get_resumed_datum(gnutls_session_t session,
|
|
Packit Service |
4684c1 |
extensions_t id, gnutls_datum_t *data /* constant contents */);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
/* clear up any set data for the extension */
|
|
Packit Service |
4684c1 |
#if 0 /* defined in hello_ext.h */
|
|
Packit Service |
4684c1 |
void
|
|
Packit Service |
4684c1 |
_gnutls_hello_ext_unset_priv(gnutls_session_t session,
|
|
Packit Service |
4684c1 |
extensions_t id);
|
|
Packit Service |
4684c1 |
#endif
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
/* Function that will deinitialize the temporal data. Must be set
|
|
Packit Service |
4684c1 |
* as the deinit_func in the hello_ext_entry_st if the functions above
|
|
Packit Service |
4684c1 |
* are used.
|
|
Packit Service |
4684c1 |
*/
|
|
Packit Service |
4684c1 |
void _gnutls_hello_ext_default_deinit(gnutls_ext_priv_data_t priv);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
/* Functions to pack and unpack data if they need to be stored at
|
|
Packit Service |
4684c1 |
* session resumption data. Must be set as the pack_func and unpack_func
|
|
Packit Service |
4684c1 |
* of hello_ext_entry_st if the set and get functions above are used,
|
|
Packit Service |
4684c1 |
* and data must be accessible on resumed sessions.
|
|
Packit Service |
4684c1 |
*/
|
|
Packit Service |
4684c1 |
int
|
|
Packit Service |
4684c1 |
_gnutls_hello_ext_default_pack(gnutls_ext_priv_data_t epriv, gnutls_buffer_st *ps);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int
|
|
Packit Service |
4684c1 |
_gnutls_hello_ext_default_unpack(gnutls_buffer_st *ps, gnutls_ext_priv_data_t *epriv);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
#endif /* GNUTLS_LIB_HELLO_EXT_LIB_H */
|