| 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_PUBLIC_XSA_KEY_H__ |
| 22 |
#define __GKM_PUBLIC_XSA_KEY_H__ |
| 23 |
|
| 24 |
#include <glib-object.h> |
| 25 |
|
| 26 |
#include "gkm-sexp-key.h" |
| 27 |
#include "gkm-types.h" |
| 28 |
|
| 29 |
#define GKM_FACTORY_PUBLIC_XSA_KEY (gkm_public_xsa_key_get_factory ()) |
| 30 |
|
| 31 |
#define GKM_TYPE_PUBLIC_XSA_KEY (gkm_public_xsa_key_get_type ()) |
| 32 |
#define GKM_PUBLIC_XSA_KEY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GKM_TYPE_PUBLIC_XSA_KEY, GkmPublicXsaKey)) |
| 33 |
#define GKM_PUBLIC_XSA_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GKM_TYPE_PUBLIC_XSA_KEY, GkmPublicXsaKeyClass)) |
| 34 |
#define GKM_IS_PUBLIC_XSA_KEY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GKM_TYPE_PUBLIC_XSA_KEY)) |
| 35 |
#define GKM_IS_PUBLIC_XSA_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GKM_TYPE_PUBLIC_XSA_KEY)) |
| 36 |
#define GKM_PUBLIC_XSA_KEY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GKM_TYPE_PUBLIC_XSA_KEY, GkmPublicXsaKeyClass)) |
| 37 |
|
| 38 |
typedef struct _GkmPublicXsaKeyClass GkmPublicXsaKeyClass; |
| 39 |
typedef struct _GkmPublicXsaKeyPrivate GkmPublicXsaKeyPrivate; |
| 40 |
|
| 41 |
struct _GkmPublicXsaKey { |
| 42 |
GkmSexpKey parent; |
| 43 |
GkmPublicXsaKeyPrivate *pv; |
| 44 |
}; |
| 45 |
|
| 46 |
struct _GkmPublicXsaKeyClass { |
| 47 |
GkmSexpKeyClass parent_class; |
| 48 |
}; |
| 49 |
|
| 50 |
GType gkm_public_xsa_key_get_type (void); |
| 51 |
|
| 52 |
GkmFactory* gkm_public_xsa_key_get_factory (void); |
| 53 |
|
| 54 |
GkmSexp* gkm_public_xsa_key_create_sexp (GkmSession *session, |
| 55 |
GkmTransaction *transaction, |
| 56 |
CK_ATTRIBUTE_PTR attrs, |
| 57 |
CK_ULONG n_attrs); |
| 58 |
|
| 59 |
extern gboolean gkm_attributes_find_ecc_oid (CK_ATTRIBUTE_PTR attrs, |
| 60 |
CK_ULONG n_attrs, |
| 61 |
GQuark *value); |
| 62 |
|
| 63 |
extern gboolean gkm_attributes_find_ecc_q (CK_ATTRIBUTE_PTR attrs, |
| 64 |
CK_ULONG n_attrs, |
| 65 |
CK_ATTRIBUTE_TYPE type, |
| 66 |
GBytes **value); |
| 67 |
|
| 68 |
#endif /* __GKM_PUBLIC_XSA_KEY_H__ */ |