]> git.ipfire.org Git - thirdparty/strongswan.git/blame - src/libstrongswan/plugins/agent/agent_private_key.h
Update copyright headers after acquisition by secunet
[thirdparty/strongswan.git] / src / libstrongswan / plugins / agent / agent_private_key.h
CommitLineData
21c95463 1/*
0a139eea 2 * Copyright (C) 2008-2009 Martin Willi
19ef2aec
TB
3 *
4 * Copyright (C) secunet Security Networks AG
21c95463
MW
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
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 MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
15 */
16
17/**
18 * @defgroup agent_private_key agent_private_key
19 * @{ @ingroup agent_p
20 */
21
22#ifndef AGENT_PRIVATE_KEY_H_
23#define AGENT_PRIVATE_KEY_H_
24
0a139eea 25#include <credentials/builder.h>
21c95463
MW
26#include <credentials/keys/private_key.h>
27
28typedef struct agent_private_key_t agent_private_key_t;
29
30/**
31 * private_key_t implementation using an ssh-agent.
32 */
33struct agent_private_key_t {
34
35 /**
36 * Implements private_key_t interface
37 */
3547a9b8 38 private_key_t key;
21c95463
MW
39};
40
41/**
0a139eea 42 * Open connection to a private key stored in a SSH agent.
21c95463 43 *
0a139eea
MW
44 * The function takes BUILD_AGENT_SOCKET and optionally a BUILD_PUBLIC_KEY
45 * to select a specific key loaded in ssh-agent.
46 *
47 * @param type type of the key, must be KEY_RSA
48 * @param args builder_part_t argument list
49 * @return built key, NULL on failure
21c95463 50 */
0a139eea 51agent_private_key_t *agent_private_key_open(key_type_t type, va_list args);
21c95463 52
1490ff4d 53#endif /** AGENT_PRIVATE_KEY_H_ @}*/
21c95463 54