aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2017-09-23 15:22:52 +0200
committerAndreas Steffen <andreas.steffen@strongswan.org>2017-09-26 20:35:39 +0200
commitbe7020dacecb8cab492184d44e40ffa3ac3478b4 (patch)
treea16c90872fc22582f230494d645f951716cdfd19
parent039b85dd43b56e9a07958fc0e269a7182143b408 (diff)
downloadstrongswan-be7020dacecb8cab492184d44e40ffa3ac3478b4.tar.bz2
strongswan-be7020dacecb8cab492184d44e40ffa3ac3478b4.tar.xz
SWIMA attribute name changes
draft-ietf-sacm-nea-swima-patnc-01 changes some SWIMA attribute names.
-rw-r--r--src/libimcv/ietf/ietf_attr.c4
-rw-r--r--src/libimcv/ietf/ietf_attr.h2
-rw-r--r--src/libimcv/ietf/ietf_attr_pa_tnc_error.c16
-rw-r--r--src/libimcv/ietf/ietf_attr_pa_tnc_error.h20
-rw-r--r--src/libimcv/ietf/swima/ietf_swima_attr_req.c4
-rw-r--r--src/libimcv/plugins/imc_swima/imc_swima.c10
-rw-r--r--src/libimcv/plugins/imv_swima/imv_swima_agent.c4
-rw-r--r--src/libimcv/suites/test_imcv_swima.c2
-rw-r--r--src/libimcv/swima/swima_error.c2
-rw-r--r--src/libtncif/tncif_pa_subtypes.c6
-rw-r--r--src/libtncif/tncif_pa_subtypes.h2
11 files changed, 36 insertions, 36 deletions
diff --git a/src/libimcv/ietf/ietf_attr.c b/src/libimcv/ietf/ietf_attr.c
index 9e3e83d4d..f55884df3 100644
--- a/src/libimcv/ietf/ietf_attr.c
+++ b/src/libimcv/ietf/ietf_attr.c
@@ -47,7 +47,7 @@ ENUM_BEGIN(ietf_attr_names, IETF_ATTR_TESTING,
"Forwarding Enabled",
"Factory Default Password Enabled",
);
-ENUM_NEXT(ietf_attr_names, IETF_ATTR_SW_REQUEST,
+ENUM_NEXT(ietf_attr_names, IETF_ATTR_SWIMA_REQUEST,
IETF_ATTR_SRC_METADATA_RESP,
IETF_ATTR_FACTORY_DEFAULT_PWD_ENABLED,
"SW Request",
@@ -97,7 +97,7 @@ pa_tnc_attr_t* ietf_attr_create_from_data(uint32_t type, size_t length,
case IETF_ATTR_FACTORY_DEFAULT_PWD_ENABLED:
return generic_attr_bool_create_from_data(length, value,
pen_type_create(PEN_IETF, type));
- case IETF_ATTR_SW_REQUEST:
+ case IETF_ATTR_SWIMA_REQUEST:
return ietf_swima_attr_req_create_from_data(length, value);
case IETF_ATTR_SW_ID_INVENTORY:
return ietf_swima_attr_sw_inv_create_from_data(length, value, TRUE);
diff --git a/src/libimcv/ietf/ietf_attr.h b/src/libimcv/ietf/ietf_attr.h
index d2ea98201..cbf4a49a2 100644
--- a/src/libimcv/ietf/ietf_attr.h
+++ b/src/libimcv/ietf/ietf_attr.h
@@ -48,7 +48,7 @@ enum ietf_attr_t {
IETF_ATTR_FACTORY_DEFAULT_PWD_ENABLED = 12,
/* draft-ietf-sacm-nea-swid-patnc */
- IETF_ATTR_SW_REQUEST = 17,
+ IETF_ATTR_SWIMA_REQUEST = 17,
IETF_ATTR_SW_ID_INVENTORY = 18,
IETF_ATTR_SW_ID_EVENTS = 19,
IETF_ATTR_SW_INVENTORY = 20,
diff --git a/src/libimcv/ietf/ietf_attr_pa_tnc_error.c b/src/libimcv/ietf/ietf_attr_pa_tnc_error.c
index 966c095e2..75f279298 100644
--- a/src/libimcv/ietf/ietf_attr_pa_tnc_error.c
+++ b/src/libimcv/ietf/ietf_attr_pa_tnc_error.c
@@ -27,16 +27,16 @@ ENUM_BEGIN(pa_tnc_error_code_names, PA_ERROR_RESERVED,
"Version Not Supported",
"Attribute Type Not Supported"
);
-ENUM_NEXT(pa_tnc_error_code_names, PA_ERROR_SW,
- PA_ERROR_SW_SUBSCRIPTION_ID_REUSE,
+ENUM_NEXT(pa_tnc_error_code_names, PA_ERROR_SWIMA,
+ PA_ERROR_SWIMA_SUBSCRIPTION_ID_REUSE,
PA_ERROR_ATTR_TYPE_NOT_SUPPORTED,
- "SW Error",
- "SW Subscription Denied",
- "SW Response Too Large",
- "SW Subscription Fulfillment Error",
- "SW Subscription ID Reuse"
+ "SWIMA Error",
+ "SWIMA Subscription Denied",
+ "SWIMA Response Too Large",
+ "SWIMA Subscription Fulfillment Error",
+ "SWIMA Subscription ID Reuse"
);
-ENUM_END(pa_tnc_error_code_names, PA_ERROR_SW_SUBSCRIPTION_ID_REUSE);
+ENUM_END(pa_tnc_error_code_names, PA_ERROR_SWIMA_SUBSCRIPTION_ID_REUSE);
typedef struct private_ietf_attr_pa_tnc_error_t private_ietf_attr_pa_tnc_error_t;
diff --git a/src/libimcv/ietf/ietf_attr_pa_tnc_error.h b/src/libimcv/ietf/ietf_attr_pa_tnc_error.h
index 7dbc33828..dd0be72ff 100644
--- a/src/libimcv/ietf/ietf_attr_pa_tnc_error.h
+++ b/src/libimcv/ietf/ietf_attr_pa_tnc_error.h
@@ -33,18 +33,18 @@ typedef enum pa_tnc_error_code_t pa_tnc_error_code_t;
enum pa_tnc_error_code_t {
/* RFC 5792 PA-TNC */
- PA_ERROR_RESERVED = 0,
- PA_ERROR_INVALID_PARAMETER = 1,
- PA_ERROR_VERSION_NOT_SUPPORTED = 2,
- PA_ERROR_ATTR_TYPE_NOT_SUPPORTED = 3,
- PA_ERROR_PA_TNC_MSG_ROOF = 3,
+ PA_ERROR_RESERVED = 0,
+ PA_ERROR_INVALID_PARAMETER = 1,
+ PA_ERROR_VERSION_NOT_SUPPORTED = 2,
+ PA_ERROR_ATTR_TYPE_NOT_SUPPORTED = 3,
+ PA_ERROR_PA_TNC_MSG_ROOF = 3,
/* draft-ietf-sacm-nea-swid-patnc (SWIMA) */
- PA_ERROR_SW = 32,
- PA_ERROR_SW_SUBSCRIPTION_DENIED = 33,
- PA_ERROR_SW_RESPONSE_TOO_LARGE = 34,
- PA_ERROR_SW_SUBSCRIPTION_FULFILLMENT = 35,
- PA_ERROR_SW_SUBSCRIPTION_ID_REUSE = 36
+ PA_ERROR_SWIMA = 32,
+ PA_ERROR_SWIMA_SUBSCRIPTION_DENIED = 33,
+ PA_ERROR_SWIMA_RESPONSE_TOO_LARGE = 34,
+ PA_ERROR_SWIMA_SUBSCRIPTION_FULFILLMENT = 35,
+ PA_ERROR_SWIMA_SUBSCRIPTION_ID_REUSE = 36
};
/**
diff --git a/src/libimcv/ietf/swima/ietf_swima_attr_req.c b/src/libimcv/ietf/swima/ietf_swima_attr_req.c
index 07d0b0c5f..d67497373 100644
--- a/src/libimcv/ietf/swima/ietf_swima_attr_req.c
+++ b/src/libimcv/ietf/swima/ietf_swima_attr_req.c
@@ -274,7 +274,7 @@ pa_tnc_attr_t *ietf_swima_attr_req_create(uint8_t flags, uint32_t request_id)
.set_targets = _set_targets,
.get_targets = _get_targets,
},
- .type = { PEN_IETF, IETF_ATTR_SW_REQUEST },
+ .type = { PEN_IETF, IETF_ATTR_SWIMA_REQUEST },
.flags = flags & SW_REQ_RESERVED_MASK,
.request_id = request_id,
.targets = swima_inventory_create(),
@@ -309,7 +309,7 @@ pa_tnc_attr_t *ietf_swima_attr_req_create_from_data(size_t length, chunk_t data)
.set_targets = _set_targets,
.get_targets = _get_targets,
},
- .type = { PEN_IETF, IETF_ATTR_SW_REQUEST },
+ .type = { PEN_IETF, IETF_ATTR_SWIMA_REQUEST },
.length = length,
.value = chunk_clone(data),
.targets = swima_inventory_create(),
diff --git a/src/libimcv/plugins/imc_swima/imc_swima.c b/src/libimcv/plugins/imc_swima/imc_swima.c
index e120cf7fc..67080e050 100644
--- a/src/libimcv/plugins/imc_swima/imc_swima.c
+++ b/src/libimcv/plugins/imc_swima/imc_swima.c
@@ -35,7 +35,7 @@
static const char imc_name[] = "SWIMA";
static pen_type_t msg_types[] = {
- { PEN_IETF, PA_SUBTYPE_IETF_SW }
+ { PEN_IETF, PA_SUBTYPE_IETF_SWIMA }
};
static imc_agent_t *imc_swima;
@@ -180,7 +180,7 @@ static void fulfill_request(imc_state_t *state, imc_msg_t *msg,
{
snprintf(error_msg, msg_len, "failed to collect SW%s events, "
"fallback to SW%s inventory", id_str, id_str);
- attr = swima_error_create(PA_ERROR_SW, request_id, 0, error_msg);
+ attr = swima_error_create(PA_ERROR_SWIMA, request_id, 0, error_msg);
msg->add_attribute(msg, attr);
}
else {
@@ -207,7 +207,7 @@ static void fulfill_request(imc_state_t *state, imc_msg_t *msg,
{
snprintf(error_msg, msg_len, "failed to collect SW%s inventory",
id_str);
- attr = swima_error_create(PA_ERROR_SW, request_id, 0, error_msg);
+ attr = swima_error_create(PA_ERROR_SWIMA, request_id, 0, error_msg);
}
else
{
@@ -258,7 +258,7 @@ static TNC_Result receive_message(imc_state_t *state, imc_msg_t *in_msg)
type = attr->get_type(attr);
- if (type.vendor_id != PEN_IETF || type.type != IETF_ATTR_SW_REQUEST)
+ if (type.vendor_id != PEN_IETF || type.type != IETF_ATTR_SWIMA_REQUEST)
{
continue;
}
@@ -270,7 +270,7 @@ static TNC_Result receive_message(imc_state_t *state, imc_msg_t *in_msg)
if (flags & (IETF_SWIMA_ATTR_REQ_FLAG_S | IETF_SWIMA_ATTR_REQ_FLAG_C))
{
- attr = swima_error_create(PA_ERROR_SW_SUBSCRIPTION_DENIED,
+ attr = swima_error_create(PA_ERROR_SWIMA_SUBSCRIPTION_DENIED,
request_id, 0, "no subscription available yet");
out_msg->add_attribute(out_msg, attr);
break;
diff --git a/src/libimcv/plugins/imv_swima/imv_swima_agent.c b/src/libimcv/plugins/imv_swima/imv_swima_agent.c
index efa2b1105..1d9944200 100644
--- a/src/libimcv/plugins/imv_swima/imv_swima_agent.c
+++ b/src/libimcv/plugins/imv_swima/imv_swima_agent.c
@@ -44,7 +44,7 @@ typedef struct private_imv_swima_agent_t private_imv_swima_agent_t;
/* Subscribed PA-TNC message subtypes */
static pen_type_t msg_types[] = {
- { PEN_IETF, PA_SUBTYPE_IETF_SW }
+ { PEN_IETF, PA_SUBTYPE_IETF_SWIMA }
};
/**
@@ -175,7 +175,7 @@ static TNC_Result receive_msg(private_imv_swima_agent_t *this,
reader->destroy(reader);
continue;
}
- if (error_code.type == PA_ERROR_SW_RESPONSE_TOO_LARGE)
+ if (error_code.type == PA_ERROR_SWIMA_RESPONSE_TOO_LARGE)
{
if (!reader->read_uint32(reader, &max_attr_size))
{
diff --git a/src/libimcv/suites/test_imcv_swima.c b/src/libimcv/suites/test_imcv_swima.c
index c54669d1d..a579f7378 100644
--- a/src/libimcv/suites/test_imcv_swima.c
+++ b/src/libimcv/suites/test_imcv_swima.c
@@ -124,7 +124,7 @@ static req_data_t req_data[] = {
START_TEST(test_imcv_swima_sw_req)
{
pen_type_t type;
- pen_type_t pen_type = { PEN_IETF, IETF_ATTR_SW_REQUEST };
+ pen_type_t pen_type = { PEN_IETF, IETF_ATTR_SWIMA_REQUEST };
pa_tnc_attr_t *attr, *attr1, *attr2;
ietf_swima_attr_req_t *c_attr;
swima_record_t *target;
diff --git a/src/libimcv/swima/swima_error.c b/src/libimcv/swima/swima_error.c
index 2aed2966b..bce4645f0 100644
--- a/src/libimcv/swima/swima_error.c
+++ b/src/libimcv/swima/swima_error.c
@@ -59,7 +59,7 @@ pa_tnc_attr_t* swima_error_create(pa_tnc_error_code_t code, uint32_t request_id,
writer = bio_writer_create(4);
writer->write_uint32(writer, request_id);
- if (code == PA_ERROR_SW_RESPONSE_TOO_LARGE)
+ if (code == PA_ERROR_SWIMA_RESPONSE_TOO_LARGE)
{
writer->write_uint32(writer, max_attr_size);
}
diff --git a/src/libtncif/tncif_pa_subtypes.c b/src/libtncif/tncif_pa_subtypes.c
index 2789e7d3e..9c58944bb 100644
--- a/src/libtncif/tncif_pa_subtypes.c
+++ b/src/libtncif/tncif_pa_subtypes.c
@@ -16,7 +16,7 @@
#include "tncif_pa_subtypes.h"
/* IETF PA Subtype names */
-ENUM_BEGIN(pa_subtype_ietf_names, PA_SUBTYPE_IETF_TESTING, PA_SUBTYPE_IETF_SW,
+ENUM_BEGIN(pa_subtype_ietf_names, PA_SUBTYPE_IETF_TESTING, PA_SUBTYPE_IETF_SWIMA,
"Testing",
"Operating System",
"Anti-Virus",
@@ -26,10 +26,10 @@ ENUM_BEGIN(pa_subtype_ietf_names, PA_SUBTYPE_IETF_TESTING, PA_SUBTYPE_IETF_SW,
"IDPS",
"VPN",
"NEA Client",
- "Software"
+ "SWIMA"
);
ENUM_NEXT(pa_subtype_ietf_names, PA_SUBTYPE_IETF_ANY, PA_SUBTYPE_IETF_ANY,
- PA_SUBTYPE_IETF_SW,
+ PA_SUBTYPE_IETF_SWIMA,
"ANY"
);
ENUM_END(pa_subtype_ietf_names, PA_SUBTYPE_IETF_ANY);
diff --git a/src/libtncif/tncif_pa_subtypes.h b/src/libtncif/tncif_pa_subtypes.h
index 696441029..0eef4ad17 100644
--- a/src/libtncif/tncif_pa_subtypes.h
+++ b/src/libtncif/tncif_pa_subtypes.h
@@ -43,7 +43,7 @@ typedef enum pa_subtype_ita_t pa_subtype_ita_t;
PA_SUBTYPE_IETF_IDPS = 0x06,
PA_SUBTYPE_IETF_VPN = 0x07,
PA_SUBTYPE_IETF_NEA_CLIENT = 0x08,
- PA_SUBTYPE_IETF_SW = 0x09,
+ PA_SUBTYPE_IETF_SWIMA = 0x09,
PA_SUBTYPE_IETF_ANY = 0xff
};