ECDSA with OpenSSL
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008 Tobias Brunner
|
||||
* Copyright (C) 2005-2006 Martin Willi
|
||||
* Copyright (C) 2005 Jan Hutter
|
||||
* Hochschule fuer Technik Rapperswil
|
||||
@@ -29,6 +30,7 @@ typedef struct authenticator_t authenticator_t;
|
||||
|
||||
#include <library.h>
|
||||
#include <sa/ike_sa.h>
|
||||
#include <config/peer_cfg.h>
|
||||
#include <encoding/payloads/auth_payload.h>
|
||||
|
||||
/**
|
||||
@@ -54,6 +56,21 @@ enum auth_method_t {
|
||||
*/
|
||||
AUTH_DSS = 3,
|
||||
|
||||
/**
|
||||
* ECDSA with SHA-256 on the P-256 curve as specified in RFC 4754
|
||||
*/
|
||||
AUTH_ECDSA_256 = 9,
|
||||
|
||||
/**
|
||||
* ECDSA with SHA-384 on the P-384 curve as specified in RFC 4754
|
||||
*/
|
||||
AUTH_ECDSA_384 = 10,
|
||||
|
||||
/**
|
||||
* ECDSA with SHA-512 on the P-521 curve as specified in RFC 4754
|
||||
*/
|
||||
AUTH_ECDSA_521 = 11,
|
||||
|
||||
/**
|
||||
* EAP authentication. This value is never negotiated and therefore
|
||||
* a value from private use.
|
||||
@@ -70,8 +87,9 @@ extern enum_name_t *auth_method_names;
|
||||
* 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)
|
||||
* - shared key message integrity code
|
||||
* - RSA digital signature
|
||||
* - ECDSA is supported using OpenSSL
|
||||
*/
|
||||
struct authenticator_t {
|
||||
|
||||
@@ -112,13 +130,23 @@ struct authenticator_t {
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates an authenticator for the specified auth method.
|
||||
* Creates an authenticator for the specified auth method (as configured).
|
||||
*
|
||||
* @param ike_sa associated ike_sa
|
||||
* @param auth_method authentication method to use for build()/verify()
|
||||
*
|
||||
* @return authenticator_t object
|
||||
*/
|
||||
authenticator_t *authenticator_create(ike_sa_t *ike_sa, auth_method_t auth_method);
|
||||
authenticator_t *authenticator_create(ike_sa_t *ike_sa, config_auth_method_t auth_method);
|
||||
|
||||
/**
|
||||
* Creates an authenticator from the given auth payload.
|
||||
*
|
||||
* @param ike_sa associated ike_sa
|
||||
* @param auth_payload auth payload
|
||||
*
|
||||
* @return authenticator_t object
|
||||
*/
|
||||
authenticator_t *authenticator_create_from_auth_payload(ike_sa_t *ike_sa, auth_payload_t *auth_payload);
|
||||
|
||||
#endif /* AUTHENTICATOR_H_ @} */
|
||||
|
||||
Reference in New Issue
Block a user