deced7110003cd8bb03183627aaee3962fea4b5f
[strongswan.git] / src / libstrongswan / plugins / af_alg / af_alg_signer.h
1 /*
2 * Copyright (C) 2010 Martin Willi
3 * Copyright (C) 2010 revosec AG
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
16 /**
17 * @defgroup af_alg_signer af_alg_signer
18 * @{ @ingroup af_alg
19 */
20
21 #ifndef AF_ALG_SIGNER_H_
22 #define AF_ALG_SIGNER_H_
23
24 typedef struct af_alg_signer_t af_alg_signer_t;
25
26 #include <plugins/plugin.h>
27 #include <crypto/signers/signer.h>
28
29 /** Number of signers */
30 #define AF_ALG_SIGNER 13
31
32 /**
33 * Implementation of signers using AF_ALG.
34 */
35 struct af_alg_signer_t {
36
37 /**
38 * Implements signer_t interface.
39 */
40 signer_t signer;
41 };
42
43 /**
44 * Creates a new af_alg_signer_t.
45 *
46 * @param algo algorithm to implement
47 * @return af_alg_signer_t, NULL if not supported
48 */
49 af_alg_signer_t *af_alg_signer_create(integrity_algorithm_t algo);
50
51 /**
52 * Probe algorithms and return plugin features.
53 *
54 * @param features plugin features to create
55 * @param pos current position in features
56 */
57 void af_alg_signer_probe(plugin_feature_t *features, int *pos);
58
59 #endif /** AF_ALG_SIGNER_H_ @}*/