2 * Copyright (C) 2008 Tobias Brunner
3 * Copyright (C) 2006-2009 Martin Willi
4 * Hochschule fuer Technik Rapperswil
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>.
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
18 * @defgroup pubkey_authenticator pubkey_authenticator
19 * @{ @ingroup authenticators
22 #ifndef PUBKEY_AUTHENTICATOR_H_
23 #define PUBKEY_AUTHENTICATOR_H_
25 typedef struct pubkey_authenticator_t pubkey_authenticator_t
;
27 #include <sa/authenticators/authenticator.h>
30 * Implementation of authenticator_t using public key authenitcation.
32 struct pubkey_authenticator_t
{
35 * Implemented authenticator_t interface.
37 authenticator_t authenticator
;
41 * Create an authenticator to build public key signatures.
43 * @param ike_sa associated ike_sa
44 * @param received_nonce nonce received in IKE_SA_INIT
45 * @param sent_init sent IKE_SA_INIT message data
46 * @return public key authenticator
48 pubkey_authenticator_t
*pubkey_authenticator_create_builder(ike_sa_t
*ike_sa
,
49 chunk_t received_nonce
, chunk_t sent_init
);
52 * Create an authenticator to verify public key signatures.
54 * @param ike_sa associated ike_sa
55 * @param sent_nonce nonce sent in IKE_SA_INIT
56 * @param received_init received IKE_SA_INIT message data
57 * @return public key authenticator
59 pubkey_authenticator_t
*pubkey_authenticator_create_verifier(ike_sa_t
*ike_sa
,
60 chunk_t sent_nonce
, chunk_t received_init
);
62 #endif /** PUBKEY_AUTHENTICATOR_H_ @}*/