Corrected functionality of gnutls_record_get_direction(). Reported by Philip Allison.
[gnutls.git] / lib / gnutls_sig.h
blobcce964faebbe00033774f203274d9732afa36f23
1 /*
2 * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2010 Free Software
3 * 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
26 #ifndef GNUTLS_SIG_H
27 #define GNUTLS_SIG_H
29 #include <gnutls/abstract.h>
31 int _gnutls_handshake_sign_cert_vrfy (gnutls_session_t session,
32 gnutls_cert * cert,
33 gnutls_privkey_t pkey,
34 gnutls_datum_t * signature);
36 int _gnutls_handshake_sign_data (gnutls_session_t session,
37 gnutls_cert * cert,
38 gnutls_privkey_t pkey,
39 gnutls_datum_t * params,
40 gnutls_datum_t * signature,
41 gnutls_sign_algorithm_t * algo);
43 int _gnutls_handshake_verify_cert_vrfy (gnutls_session_t session,
44 gnutls_cert * cert,
45 gnutls_datum_t * signature,
46 gnutls_sign_algorithm_t);
48 int _gnutls_handshake_verify_data (gnutls_session_t session,
49 gnutls_cert * cert,
50 const gnutls_datum_t * params,
51 gnutls_datum_t * signature,
52 gnutls_sign_algorithm_t algo);
54 int _gnutls_soft_sign (gnutls_pk_algorithm_t algo,
55 bigint_t * params, int params_size,
56 const gnutls_datum_t * data,
57 gnutls_datum_t * signature);
59 int pk_prepare_hash (gnutls_pk_algorithm_t pk, gnutls_digest_algorithm_t hash,
60 gnutls_datum_t * output);
61 int pk_hash_data (gnutls_pk_algorithm_t pk, gnutls_digest_algorithm_t hash,
62 bigint_t * params, const gnutls_datum_t * data,
63 gnutls_datum_t * digest);
65 int
66 _gnutls_privkey_sign_hash (gnutls_privkey_t key,
67 const gnutls_datum_t * hash,
68 gnutls_datum_t * signature);
70 #endif