root/trunk/src/charon/plugins/nm/nm_creds.h

Revision 4326, 1.9 kB (checked in by martin, 4 months ago)

implemented NetworkManager certificate/private key authentication using ssh-agent

Line 
1 /*
2  * Copyright (C) 2008 Martin Willi
3  * Hochschule fuer Technik Rapperswil
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License as published by the
7  * Free Software Foundation; either version 2 of the License, or (at your
8  * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
13  * for more details.
14  *
15  * $Id$
16  */
17
18 /**
19  * @defgroup nm_creds nm_creds
20  * @{ @ingroup nm
21  */
22
23 #ifndef NM_CREDS_H_
24 #define NM_CREDS_H_
25
26 #include <credentials/credential_set.h>
27
28 typedef struct nm_creds_t nm_creds_t;
29
30 /**
31  * NetworkManager credentials helper.
32  */
33 struct nm_creds_t {
34
35     /**
36      * Implements credential_set_t
37      */
38     credential_set_t set;
39    
40     /**
41      * Set the trusted gateway certificate to serve by this set.
42      *
43      * @param cert      certificate to serve
44      */
45     void (*set_certificate)(nm_creds_t *this, certificate_t *cert);
46    
47     /**
48      * Set the username/password for authentication.
49      *
50      * @param id        ID of the user
51      * @param password  password to use for authentication
52      */
53     void (*set_username_password)(nm_creds_t *this, identification_t *id,
54                                   char *password);
55     /**
56      * Set the certificate and private key to use for client authentication.
57      *
58      * @param cert      client certificate
59      * @param key       associated private key
60      */
61     void (*set_cert_and_key)(nm_creds_t *this, certificate_t *cert,
62                              private_key_t *key);
63     /**
64      * Clear the stored credentials.
65      */
66     void (*clear)(nm_creds_t *this);
67
68     /**
69      * Destroy a nm_creds instance.
70      */
71     void (*destroy)(nm_creds_t *this);
72 };
73
74 /**
75  * Create a nm_creds instance.
76  */
77 nm_creds_t *nm_creds_create();
78
79 #endif /* NM_CREDS_H_ @}*/
Note: See TracBrowser for help on using the browser.