certtool is able to set certificate policies via a template
[gnutls.git] / lib / gnutls_sig.h
blob25ef26a5c20954a59528f9e306a550da43fdbbcd
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 pk_prepare_hash (gnutls_pk_algorithm_t pk, gnutls_digest_algorithm_t hash,
52 gnutls_datum_t * output);
53 int pk_hash_data (gnutls_pk_algorithm_t pk, gnutls_digest_algorithm_t hash,
54 gnutls_pk_params_st * params, const gnutls_datum_t * data,
55 gnutls_datum_t * digest);
57 int
58 _gnutls_privkey_sign_hash (gnutls_privkey_t key,
59 const gnutls_datum_t * hash,
60 gnutls_datum_t * signature);
63 #endif