Debian Codegraph @

pkcs11/ssh-store/gkm-ssh-private-key.h

raw
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_SSH_PRIVATE_KEY_H__
22 #define __GKM_SSH_PRIVATE_KEY_H__
23
24 #include <glib-object.h>
25
26 #include "gkm-ssh-public-key.h"
27
28 #include "gkm/gkm-private-xsa-key.h"
29
30 #define GKM_TYPE_SSH_PRIVATE_KEY (gkm_ssh_private_key_get_type ())
31 #define GKM_SSH_PRIVATE_KEY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GKM_TYPE_SSH_PRIVATE_KEY, GkmSshPrivateKey))
32 #define GKM_SSH_PRIVATE_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GKM_TYPE_SSH_PRIVATE_KEY, GkmSshPrivateKeyClass))
33 #define GKM_IS_SSH_PRIVATE_KEY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GKM_TYPE_SSH_PRIVATE_KEY))
34 #define GKM_IS_SSH_PRIVATE_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GKM_TYPE_SSH_PRIVATE_KEY))
35 #define GKM_SSH_PRIVATE_KEY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GKM_TYPE_SSH_PRIVATE_KEY, GkmSshPrivateKeyClass))
36
37 typedef struct _GkmSshPrivateKey GkmSshPrivateKey;
38 typedef struct _GkmSshPrivateKeyClass GkmSshPrivateKeyClass;
39
40 struct _GkmSshPrivateKeyClass {
41 GkmPrivateXsaKeyClass parent_class;
42 };
43
44 GType gkm_ssh_private_key_get_type (void);
45
46 GkmSshPrivateKey* gkm_ssh_private_key_new (GkmModule *module,
47 const gchar *unique);
48
49 gboolean gkm_ssh_private_key_parse (GkmSshPrivateKey *self,
50 const gchar *public_path,
51 const gchar *private_path,
52 GError **error);
53
54 const gchar* gkm_ssh_private_key_get_label (GkmSshPrivateKey *key);
55
56 void gkm_ssh_private_key_set_label (GkmSshPrivateKey *key,
57 const gchar *label);
58
59 GkmSshPublicKey* gkm_ssh_private_key_get_public_key (GkmSshPrivateKey *self);
60
61 #endif /* __GKM_SSH_PRIVATE_KEY_H__ */