updated makefiles
[gnutls.git] / lib / gnutls_sig.h
blobcd4981d945e22c1d331593849cb588ceac095f07
1 /*
2 * Copyright (C) 2000-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 #ifndef GNUTLS_SIG_H
24 #define GNUTLS_SIG_H
26 #include <gnutls/abstract.h>
28 int _gnutls_handshake_sign_crt_vrfy (gnutls_session_t session,
29 gnutls_pcert_st* cert,
30 gnutls_privkey_t pkey,
31 gnutls_datum_t * signature);
33 int _gnutls_handshake_sign_data (gnutls_session_t session,
34 gnutls_pcert_st* cert,
35 gnutls_privkey_t pkey,
36 gnutls_datum_t * params,
37 gnutls_datum_t * signature,
38 gnutls_sign_algorithm_t * algo);
40 int _gnutls_handshake_verify_crt_vrfy (gnutls_session_t session,
41 gnutls_pcert_st* cert,
42 gnutls_datum_t * signature,
43 gnutls_sign_algorithm_t);
45 int _gnutls_handshake_verify_data (gnutls_session_t session,
46 gnutls_pcert_st* cert,
47 const gnutls_datum_t * params,
48 gnutls_datum_t * signature,
49 gnutls_sign_algorithm_t algo);
51 int _gnutls_soft_sign (gnutls_pk_algorithm_t algo,
52 gnutls_pk_params_st* params,
53 const gnutls_datum_t * data,
54 gnutls_datum_t * signature);
56 int pk_prepare_hash (gnutls_pk_algorithm_t pk, gnutls_digest_algorithm_t hash,
57 gnutls_datum_t * output);
58 int pk_hash_data (gnutls_pk_algorithm_t pk, gnutls_digest_algorithm_t hash,
59 gnutls_pk_params_st * params, const gnutls_datum_t * data,
60 gnutls_datum_t * digest);
62 int
63 _gnutls_privkey_sign_hash (gnutls_privkey_t key,
64 const gnutls_datum_t * hash,
65 gnutls_datum_t * signature);
67 int
68 decode_ber_digest_info (const gnutls_datum_t * info,
69 gnutls_digest_algorithm_t * hash,
70 uint8_t * digest, unsigned int *digest_size);
72 #endif