1 /* 2 * gnome-keyring 3 * 4 * Copyright (C) 2008 Stefan Walter 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU Lesser General Public License as 8 * published by the Free Software Foundation; either version 2.1 of 9 * the License, or (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, but 12 * WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this program; if not, see 18 * <http://www.gnu.org/licenses/>. 19 */ 20 21 #ifndef GKM_DH_MECHANISM_H_ 22 #define GKM_DH_MECHANISM_H_ 23 24 #include "gkm-types.h" 25 26 #include "pkcs11/pkcs11.h" 27 28 #include <glib.h> 29 30 #include <gcrypt.h> 31 32 static const CK_MECHANISM_TYPE GKM_DH_MECHANISMS[] = { 33 CKM_DH_PKCS_DERIVE 34 }; 35 36 CK_RV gkm_dh_mechanism_generate (GkmSession *session, 37 CK_ATTRIBUTE_PTR pub_atts, 38 CK_ULONG n_pub_atts, 39 CK_ATTRIBUTE_PTR priv_atts, 40 CK_ULONG n_priv_atts, 41 GkmObject **pub_key, 42 GkmObject **priv_key); 43 44 CK_RV gkm_dh_mechanism_derive (GkmSession *session, 45 CK_MECHANISM_PTR mech, 46 GkmObject *base, 47 CK_ATTRIBUTE_PTR attrs, 48 CK_ULONG n_attrs, 49 GkmObject **derived); 50 51 #endif /* GKM_DH_MECHANISM_H_ */ 52