Debian Codegraph @

pkcs11/gkm/gkm-ecdsa-mechanism.h

raw
1 /*
2 * gnome-keyring
3 *
4 * Copyright (C) 2017 Red Hat, Inc.
5 *
6 * Author: Jakub Jelen <[email protected]>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as
10 * published by the Free Software Foundation; either version 2.1 of
11 * the License, or (at your option) any later version.
12 *
13 * This program 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.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this program; if not, see
20 * <http://www.gnu.org/licenses/>.
21 */
22
23 #ifndef GKM_ECDSA_MECHANISM_H_
24 #define GKM_ECDSA_MECHANISM_H_
25
26 #include "gkm-types.h"
27
28 #include "pkcs11/pkcs11.h"
29
30 #include <glib.h>
31
32 #include <gcrypt.h>
33
34 static const CK_MECHANISM_TYPE GKM_ECDSA_MECHANISMS[] = {
35 CKM_ECDSA
36 };
37
38 CK_RV gkm_ecdsa_mechanism_sign (gcry_sexp_t sexp,
39 CK_BYTE_PTR data,
40 CK_ULONG n_data,
41 CK_BYTE_PTR signature,
42 CK_ULONG_PTR n_signature);
43
44 CK_RV gkm_ecdsa_mechanism_verify (gcry_sexp_t sexp,
45 CK_BYTE_PTR data,
46 CK_ULONG n_data,
47 CK_BYTE_PTR signature,
48 CK_ULONG n_signature);
49
50 #endif /* GKM_ECDSA_MECHANISM_H_ */