merged the modularization branch (credentials) back to trunk
This commit is contained in:
@@ -1,10 +1,3 @@
|
||||
/**
|
||||
* @file authenticator.h
|
||||
*
|
||||
* @brief Interface of authenticator_t.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2005-2006 Martin Willi
|
||||
* Copyright (C) 2005 Jan Hutter
|
||||
@@ -19,6 +12,13 @@
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup authenticator authenticator
|
||||
* @{ @ingroup authenticators
|
||||
*/
|
||||
|
||||
#ifndef AUTHENTICATOR_H_
|
||||
@@ -33,8 +33,6 @@ typedef struct authenticator_t authenticator_t;
|
||||
|
||||
/**
|
||||
* Method to use for authentication.
|
||||
*
|
||||
* @ingroup authenticators
|
||||
*/
|
||||
enum auth_method_t {
|
||||
/**
|
||||
@@ -65,29 +63,21 @@ enum auth_method_t {
|
||||
|
||||
/**
|
||||
* enum names for auth_method_t.
|
||||
*
|
||||
* @ingroup authenticators
|
||||
*/
|
||||
extern enum_name_t *auth_method_names;
|
||||
|
||||
/**
|
||||
* @brief Authenticator interface implemented by the various authenticators.
|
||||
* Authenticator interface implemented by the various authenticators.
|
||||
*
|
||||
* Currently the following two AUTH methods are supported:
|
||||
* - shared key message integrity code (AUTH_PSK)
|
||||
* - RSA digital signature (AUTH_RSA)
|
||||
*
|
||||
* @b Constructors:
|
||||
* - authenticator_create()
|
||||
*
|
||||
* @ingroup authenticators
|
||||
*/
|
||||
struct authenticator_t {
|
||||
|
||||
/**
|
||||
* @brief Verify a received authentication payload.
|
||||
* Verify a received authentication payload.
|
||||
*
|
||||
* @param this calling object
|
||||
* @param ike_sa_init binary representation of received ike_sa_init
|
||||
* @param my_nonce the sent nonce
|
||||
* @param auth_payload authentication payload to verify
|
||||
@@ -102,9 +92,8 @@ struct authenticator_t {
|
||||
chunk_t my_nonce, auth_payload_t *auth_payload);
|
||||
|
||||
/**
|
||||
* @brief Build an authentication payload to send to the other peer.
|
||||
* Build an authentication payload to send to the other peer.
|
||||
*
|
||||
* @param this calling object
|
||||
* @param ike_sa_init binary representation of sent ike_sa_init
|
||||
* @param other_nonce the received nonce
|
||||
* @param[out] auth_payload the resulting authentication payload
|
||||
@@ -117,23 +106,19 @@ struct authenticator_t {
|
||||
chunk_t other_nonce, auth_payload_t **auth_payload);
|
||||
|
||||
/**
|
||||
* @brief Destroys a authenticator_t object.
|
||||
*
|
||||
* @param this calling object
|
||||
* Destroys a authenticator_t object.
|
||||
*/
|
||||
void (*destroy) (authenticator_t *this);
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Creates an authenticator for the specified auth method.
|
||||
* Creates an authenticator for the specified auth method.
|
||||
*
|
||||
* @param ike_sa associated ike_sa
|
||||
* @param auth_method authentication method to use for build()/verify()
|
||||
*
|
||||
* @return authenticator_t object
|
||||
*
|
||||
* @ingroup authenticators
|
||||
*/
|
||||
authenticator_t *authenticator_create(ike_sa_t *ike_sa, auth_method_t auth_method);
|
||||
|
||||
#endif /* AUTHENTICATOR_H_ */
|
||||
#endif /* AUTHENTICATOR_H_ @} */
|
||||
|
||||
Reference in New Issue
Block a user