Blame lib/tls-sig.h

Packit aea12f
/*
Packit aea12f
 * Copyright (C) 2000-2012 Free Software Foundation, Inc.
Packit aea12f
 *
Packit aea12f
 * Author: Nikos Mavrogiannopoulos
Packit aea12f
 *
Packit aea12f
 * This file is part of GnuTLS.
Packit aea12f
 *
Packit aea12f
 * The GnuTLS is free software; you can redistribute it and/or
Packit aea12f
 * modify it under the terms of the GNU Lesser General Public License
Packit aea12f
 * as published by the Free Software Foundation; either version 2.1 of
Packit aea12f
 * the License, or (at your option) any later version.
Packit aea12f
 *
Packit aea12f
 * This library is distributed in the hope that it will be useful, but
Packit aea12f
 * WITHOUT ANY WARRANTY; without even the implied warranty of
Packit aea12f
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit aea12f
 * Lesser General Public License for more details.
Packit aea12f
 *
Packit aea12f
 * You should have received a copy of the GNU Lesser General Public License
Packit aea12f
 * along with this program.  If not, see <https://www.gnu.org/licenses/>
Packit aea12f
 *
Packit aea12f
 */
Packit aea12f
Packit aea12f
#ifndef GNUTLS_LIB_TLS_SIG_H
Packit aea12f
#define GNUTLS_LIB_TLS_SIG_H
Packit aea12f
Packit aea12f
#include <gnutls/abstract.h>
Packit aea12f
Packit aea12f
/* While this is currently equal to the length of RSA/SHA512
Packit aea12f
 * signature, it should also be sufficient for DSS signature and any
Packit aea12f
 * other RSA signatures including one with the old MD5/SHA1-combined
Packit aea12f
 * format.
Packit aea12f
 */
Packit aea12f
#define MAX_SIG_SIZE (19 + MAX_HASH_SIZE)
Packit aea12f
Packit aea12f
int _gnutls_check_key_usage_for_sig(gnutls_session_t session, unsigned key_usage,
Packit aea12f
				    unsigned our_cert);
Packit aea12f
Packit aea12f
int _gnutls_handshake_sign_crt_vrfy(gnutls_session_t session,
Packit aea12f
				    gnutls_pcert_st * cert,
Packit aea12f
				    gnutls_privkey_t pkey,
Packit aea12f
				    gnutls_datum_t * signature);
Packit aea12f
Packit aea12f
int _gnutls_handshake_sign_data(gnutls_session_t session,
Packit aea12f
				gnutls_pcert_st * cert,
Packit aea12f
				gnutls_privkey_t pkey,
Packit aea12f
				gnutls_datum_t * params,
Packit aea12f
				gnutls_datum_t * signature,
Packit aea12f
				gnutls_sign_algorithm_t * algo);
Packit aea12f
Packit aea12f
int _gnutls_handshake_verify_crt_vrfy(gnutls_session_t session,
Packit aea12f
				      unsigned verify_flags,
Packit aea12f
				      gnutls_pcert_st * cert,
Packit aea12f
				      gnutls_datum_t * signature,
Packit aea12f
				      gnutls_sign_algorithm_t);
Packit aea12f
Packit aea12f
int _gnutls_handshake_verify_data(gnutls_session_t session,
Packit aea12f
				  unsigned verify_flags,
Packit aea12f
				  gnutls_pcert_st * cert,
Packit aea12f
				  const gnutls_datum_t * params,
Packit aea12f
				  gnutls_datum_t * signature,
Packit aea12f
				  gnutls_sign_algorithm_t algo);
Packit aea12f
Packit aea12f
#endif /* GNUTLS_LIB_TLS_SIG_H */