summaryrefslogtreecommitdiff
path: root/includes/gnutls/pkcs11.h
blob: 3027ed8e492f010f8565c889c5cad2fd5b51634b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
 * Copyright (C) 2007 Free Software Foundation
 *
 * Author: Simon Josefsson
 *
 * This file is part of GNUTLS-PKCS11.
 *
 * GNUTLS-PKCS11 is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * GNUTLS-PKCS11 is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with GNUTLS-PKCS11; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301, USA.
 *
 */

/* Note the libgnutls-extra is not a standalone library. It requires
 * to link also against libgnutls.
 */

#ifndef GNUTLS_PKCS11_H
# define GNUTLS_PKCS11_H

# include <gnutls/gnutls.h>

# ifdef __cplusplus
extern "C"
{
# endif

# define LIBGNUTLS_PKCS11_VERSION LIBGNUTLS_VERSION

  int gnutls_pkcs11_get_ca_certificates (gnutls_x509_crt_t ** cert_list,
					 unsigned int *ncerts);
  int gnutls_pkcs11_get_user_certificates (gnutls_x509_crt_t ** cert_list,
					   unsigned int *ncerts);

  int gnutls_pkcs11_sign (gnutls_datum_t * cert,
			  const gnutls_datum_t * hash,
			  gnutls_datum_t * signature);

# ifdef __cplusplus
}
# endif
#endif