corrected copyright notices
[gnutls.git] / lib / ext / signature.h
blob40a54217e196fbe03973363db72b684740230ac5
1 /*
2 * Copyright (C) 2002-2012 Free Software Foundation, Inc.
4 * Author: Nikos Mavrogiannopoulos
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 /* signature algorithms extension
25 #ifndef EXT_SIGNATURE_H
26 #define EXT_SIGNATURE_H
28 #include <gnutls_extensions.h>
30 extern extension_entry_st ext_mod_sig;
32 gnutls_sign_algorithm_t
33 _gnutls_session_get_sign_algo (gnutls_session_t session, gnutls_pcert_st* cert);
34 int _gnutls_sign_algorithm_parse_data (gnutls_session_t session,
35 const uint8_t * data, size_t data_size);
36 int _gnutls_sign_algorithm_write_params (gnutls_session_t session,
37 uint8_t * data, size_t max_data_size);
38 int _gnutls_session_sign_algo_enabled (gnutls_session_t session,
39 gnutls_sign_algorithm_t sig);
41 static inline void
42 gnutls_sign_algorithm_set (gnutls_session_t session, gnutls_sign_algorithm_t sign)
44 session->security_parameters.sign_algo = sign;
46 #endif