Merge branch 'ikev1'
Conflicts: configure.in man/ipsec.conf.5.in src/libcharon/encoding/generator.c src/libcharon/encoding/payloads/notify_payload.c src/libcharon/encoding/payloads/notify_payload.h src/libcharon/encoding/payloads/payload.c src/libcharon/network/receiver.c src/libcharon/sa/authenticator.c src/libcharon/sa/authenticator.h src/libcharon/sa/ikev2/tasks/ike_init.c src/libcharon/sa/task_manager.c src/libstrongswan/credentials/auth_cfg.c
This commit is contained in:
Regular → Executable
+50
-12
@@ -33,25 +33,36 @@ typedef struct notify_payload_t notify_payload_t;
|
||||
#include <utils/linked_list.h>
|
||||
|
||||
/**
|
||||
* Notify payload length in bytes without any spi and notification data.
|
||||
*/
|
||||
#define NOTIFY_PAYLOAD_HEADER_LENGTH 8
|
||||
|
||||
/**
|
||||
* Notify message types.
|
||||
*
|
||||
* See IKEv2 RFC 3.10.1.
|
||||
* Notify message types for IKEv2, and a subset for IKEv1.
|
||||
*/
|
||||
enum notify_type_t {
|
||||
/* notify error messages */
|
||||
UNSUPPORTED_CRITICAL_PAYLOAD = 1,
|
||||
/* IKEv1 alias */
|
||||
INVALID_PAYLOAD_TYPE = 1,
|
||||
INVALID_IKE_SPI = 4,
|
||||
INVALID_MAJOR_VERSION = 5,
|
||||
INVALID_SYNTAX = 7,
|
||||
/* IKEv1 alias */
|
||||
INVALID_EXCHANGE_TYPE = 7,
|
||||
INVALID_MESSAGE_ID = 9,
|
||||
INVALID_SPI = 11,
|
||||
/* IKEv1 only */
|
||||
ATTRIBUTES_NOT_SUPPORTED = 13,
|
||||
/* IKEv1 alias */
|
||||
NO_PROPOSAL_CHOSEN = 14,
|
||||
/* IKEv1 only */
|
||||
PAYLOAD_MALFORMED = 16,
|
||||
INVALID_KE_PAYLOAD = 17,
|
||||
/* IKEv1 alias */
|
||||
INVALID_KEY_INFORMATION = 17,
|
||||
/* IKEv1 only */
|
||||
INVALID_ID_INFORMATION = 18,
|
||||
INVALID_CERT_ENCODING = 19,
|
||||
INVALID_CERTIFICATE = 20,
|
||||
CERT_TYPE_UNSUPPORTED = 21,
|
||||
INVALID_CERT_AUTHORITY = 22,
|
||||
INVALID_HASH_INFORMATION = 23,
|
||||
AUTHENTICATION_FAILED = 24,
|
||||
SINGLE_PAIR_REQUIRED = 34,
|
||||
NO_ADDITIONAL_SAS = 35,
|
||||
@@ -132,6 +143,13 @@ enum notify_type_t {
|
||||
/* PACE - draft-kuegler-ipsecme-pace-ikev2 */
|
||||
PSK_PERSIST = 16425,
|
||||
PSK_CONFIRM = 16426,
|
||||
/* IKEv1 initial contact */
|
||||
INITIAL_CONTACT_IKEV1 = 24578,
|
||||
/* IKEv1 DPD */
|
||||
DPD_R_U_THERE = 36136,
|
||||
DPD_R_U_THERE_ACK = 36137,
|
||||
/* IKEv1 Cisco High Availability */
|
||||
UNITY_LOAD_BALANCE = 40501,
|
||||
/* BEET mode, not even a draft yet. private use */
|
||||
USE_BEET_MODE = 40961,
|
||||
/* IKE-ME, private use */
|
||||
@@ -213,6 +231,24 @@ struct notify_payload_t {
|
||||
*/
|
||||
void (*set_spi) (notify_payload_t *this, u_int32_t spi);
|
||||
|
||||
/**
|
||||
* Returns the currently set spi of this payload.
|
||||
*
|
||||
* This is only valid for notifys with protocol ISAKMP
|
||||
*
|
||||
* @return SPI value
|
||||
*/
|
||||
chunk_t (*get_spi_data) (notify_payload_t *this);
|
||||
|
||||
/**
|
||||
* Sets the spi of this payload.
|
||||
*
|
||||
* This is only valid for notifys with protocol ISAKMP
|
||||
*
|
||||
* @param spi SPI value
|
||||
*/
|
||||
void (*set_spi_data) (notify_payload_t *this, chunk_t spi);
|
||||
|
||||
/**
|
||||
* Returns the currently set notification data of payload.
|
||||
*
|
||||
@@ -241,18 +277,20 @@ struct notify_payload_t {
|
||||
/**
|
||||
* Creates an empty notify_payload_t object
|
||||
*
|
||||
* @param type payload type, NOTIFY or NOTIFY_V1
|
||||
* @return created notify_payload_t object
|
||||
*/
|
||||
notify_payload_t *notify_payload_create(void);
|
||||
notify_payload_t *notify_payload_create(payload_type_t type);
|
||||
|
||||
/**
|
||||
* Creates an notify_payload_t object of specific type for specific protocol id.
|
||||
*
|
||||
* @param protocol_id protocol id (IKE, AH or ESP)
|
||||
* @param type notify type (see notify_type_t)
|
||||
* @param type payload type, NOTIFY or NOTIFY_V1
|
||||
* @param protocol protocol id (IKE, AH or ESP)
|
||||
* @param notify type of notify
|
||||
* @return notify_payload_t object
|
||||
*/
|
||||
notify_payload_t *notify_payload_create_from_protocol_and_type(
|
||||
protocol_id_t protocol_id, notify_type_t type);
|
||||
payload_type_t type, protocol_id_t protocol, notify_type_t notify);
|
||||
|
||||
#endif /** NOTIFY_PAYLOAD_H_ @}*/
|
||||
|
||||
Reference in New Issue
Block a user