|
Packit Service |
4684c1 |
/*
|
|
Packit Service |
4684c1 |
* Copyright (C) 2000-2012 Free Software Foundation, 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_TLS_SIG_H
|
|
Packit Service |
4684c1 |
#define GNUTLS_LIB_TLS_SIG_H
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
#include <gnutls/abstract.h>
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
/* While this is currently equal to the length of RSA/SHA512
|
|
Packit Service |
4684c1 |
* signature, it should also be sufficient for DSS signature and any
|
|
Packit Service |
4684c1 |
* other RSA signatures including one with the old MD5/SHA1-combined
|
|
Packit Service |
4684c1 |
* format.
|
|
Packit Service |
4684c1 |
*/
|
|
Packit Service |
4684c1 |
#define MAX_SIG_SIZE (19 + MAX_HASH_SIZE)
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int _gnutls_check_key_usage_for_sig(gnutls_session_t session, unsigned key_usage,
|
|
Packit Service |
4684c1 |
unsigned our_cert);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int _gnutls_handshake_sign_crt_vrfy(gnutls_session_t session,
|
|
Packit Service |
4684c1 |
gnutls_pcert_st * cert,
|
|
Packit Service |
4684c1 |
gnutls_privkey_t pkey,
|
|
Packit Service |
4684c1 |
gnutls_datum_t * signature);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int _gnutls_handshake_sign_data(gnutls_session_t session,
|
|
Packit Service |
4684c1 |
gnutls_pcert_st * cert,
|
|
Packit Service |
4684c1 |
gnutls_privkey_t pkey,
|
|
Packit Service |
4684c1 |
gnutls_datum_t * params,
|
|
Packit Service |
4684c1 |
gnutls_datum_t * signature,
|
|
Packit Service |
4684c1 |
gnutls_sign_algorithm_t * algo);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int _gnutls_handshake_verify_crt_vrfy(gnutls_session_t session,
|
|
Packit Service |
4684c1 |
unsigned verify_flags,
|
|
Packit Service |
4684c1 |
gnutls_pcert_st * cert,
|
|
Packit Service |
4684c1 |
gnutls_datum_t * signature,
|
|
Packit Service |
4684c1 |
gnutls_sign_algorithm_t);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int _gnutls_handshake_verify_data(gnutls_session_t session,
|
|
Packit Service |
4684c1 |
unsigned verify_flags,
|
|
Packit Service |
4684c1 |
gnutls_pcert_st * cert,
|
|
Packit Service |
4684c1 |
const gnutls_datum_t * params,
|
|
Packit Service |
4684c1 |
gnutls_datum_t * signature,
|
|
Packit Service |
4684c1 |
gnutls_sign_algorithm_t algo);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
#endif /* GNUTLS_LIB_TLS_SIG_H */
|