Add some additional IKEv1 notify types
authorMartin Willi <martin@revosec.ch>
Thu, 15 Dec 2011 16:04:29 +0000 (17:04 +0100)
committerMartin Willi <martin@revosec.ch>
Tue, 20 Mar 2012 16:31:23 +0000 (17:31 +0100)
src/libcharon/encoding/payloads/notify_payload.c
src/libcharon/encoding/payloads/notify_payload.h

index 6b6c28d..c3d1deb 100644 (file)
@@ -38,10 +38,14 @@ ENUM_NEXT(notify_type_names, INVALID_SPI, INVALID_SPI, INVALID_MESSAGE_ID,
        "INVALID_SPI");
 ENUM_NEXT(notify_type_names, NO_PROPOSAL_CHOSEN, NO_PROPOSAL_CHOSEN, INVALID_SPI,
        "NO_PROPOSAL_CHOSEN");
        "INVALID_SPI");
 ENUM_NEXT(notify_type_names, NO_PROPOSAL_CHOSEN, NO_PROPOSAL_CHOSEN, INVALID_SPI,
        "NO_PROPOSAL_CHOSEN");
-ENUM_NEXT(notify_type_names, PAYLOAD_MALFORMED, INVALID_KE_PAYLOAD, NO_PROPOSAL_CHOSEN,
+ENUM_NEXT(notify_type_names, PAYLOAD_MALFORMED, AUTHENTICATION_FAILED, NO_PROPOSAL_CHOSEN,
        "PAYLOAD_MALFORMED",
        "PAYLOAD_MALFORMED",
-       "INVALID_KE_PAYLOAD");
-ENUM_NEXT(notify_type_names, AUTHENTICATION_FAILED, AUTHENTICATION_FAILED, INVALID_KE_PAYLOAD,
+       "INVALID_KE_PAYLOAD"
+       "INVALID_ID_INFORMATION",
+       "INVALID_CERT_ENCODING",
+       "INVALID_CERTIFICATE",
+       "CERT_TYPE_UNSUPPORTED",
+       "INVALID_CERT_AUTHORITY",
        "AUTHENTICATION_FAILED");
 ENUM_NEXT(notify_type_names, SINGLE_PAIR_REQUIRED, CHILD_SA_NOT_FOUND, AUTHENTICATION_FAILED,
        "SINGLE_PAIR_REQUIRED",
        "AUTHENTICATION_FAILED");
 ENUM_NEXT(notify_type_names, SINGLE_PAIR_REQUIRED, CHILD_SA_NOT_FOUND, AUTHENTICATION_FAILED,
        "SINGLE_PAIR_REQUIRED",
@@ -128,10 +132,14 @@ ENUM_NEXT(notify_type_short_names, INVALID_SPI, INVALID_SPI, INVALID_MESSAGE_ID,
        "INVAL_SPI");
 ENUM_NEXT(notify_type_short_names, NO_PROPOSAL_CHOSEN, NO_PROPOSAL_CHOSEN, INVALID_SPI,
        "NO_PROP");
        "INVAL_SPI");
 ENUM_NEXT(notify_type_short_names, NO_PROPOSAL_CHOSEN, NO_PROPOSAL_CHOSEN, INVALID_SPI,
        "NO_PROP");
-ENUM_NEXT(notify_type_short_names, PAYLOAD_MALFORMED, INVALID_KE_PAYLOAD, NO_PROPOSAL_CHOSEN,
+ENUM_NEXT(notify_type_short_names, PAYLOAD_MALFORMED, AUTHENTICATION_FAILED, NO_PROPOSAL_CHOSEN,
        "PLD_MAL",
        "PLD_MAL",
-       "INVAL_KE");
-ENUM_NEXT(notify_type_short_names, AUTHENTICATION_FAILED, AUTHENTICATION_FAILED, INVALID_KE_PAYLOAD,
+       "INVAL_KE",
+       "INVAL_ID",
+       "INVAL_CERTEN",
+       "INVAL_CERT",
+       "CERT_UNSUP",
+       "INVAL_CA",
        "AUTH_FAILED");
 ENUM_NEXT(notify_type_short_names, SINGLE_PAIR_REQUIRED, CHILD_SA_NOT_FOUND, AUTHENTICATION_FAILED,
        "SINGLE_PAIR",
        "AUTH_FAILED");
 ENUM_NEXT(notify_type_short_names, SINGLE_PAIR_REQUIRED, CHILD_SA_NOT_FOUND, AUTHENTICATION_FAILED,
        "SINGLE_PAIR",
index 2f5294e..214a6b7 100644 (file)
@@ -51,7 +51,14 @@ enum notify_type_t {
        /* IKEv1 only */
        PAYLOAD_MALFORMED = 16,
        INVALID_KE_PAYLOAD = 17,
        /* IKEv1 only */
        PAYLOAD_MALFORMED = 16,
        INVALID_KE_PAYLOAD = 17,
+       /* IKEv1 alias */
+       INVALID_KEY_INFORMATION = 17,
        /* IKEv1 only */
        /* 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,
        INVALID_HASH_INFORMATION = 23,
        AUTHENTICATION_FAILED = 24,
        SINGLE_PAIR_REQUIRED = 34,