Add TKM_CTX_ESA (ESP SA context id)
authorAdrian-Ken Rueegsegger <ken@codelabs.ch>
Fri, 14 Sep 2012 08:29:38 +0000 (10:29 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 19 Mar 2013 14:23:48 +0000 (15:23 +0100)
src/charon-tkm/src/tkm/tkm.c
src/charon-tkm/src/tkm/tkm_id_manager.c
src/charon-tkm/src/tkm/tkm_id_manager.h
src/charon-tkm/tests/id_manager_tests.c

index f2ffd28..5fc554e 100644 (file)
@@ -75,7 +75,7 @@ bool tkm_init()
                return FALSE;
        }
 
-       const tkm_limits_t limits = {nc, dh, isa, ae};
+       const tkm_limits_t limits = {nc, dh, isa, ae, esa};
 
        INIT(this,
                .public = {
index 6120c32..24513eb 100644 (file)
 
 #define TKM_LIMIT 100
 
-ENUM_BEGIN(tkm_context_kind_names, TKM_CTX_NONCE, TKM_CTX_AE,
+ENUM_BEGIN(tkm_context_kind_names, TKM_CTX_NONCE, TKM_CTX_ESA,
        "NONCE_CONTEXT",
        "DH_CONTEXT",
        "ISA_CONTEXT",
-       "AE_CONTEXT");
-ENUM_END(tkm_context_kind_names, TKM_CTX_AE);
+       "AE_CONTEXT",
+       "ESA_CONTEXT");
+ENUM_END(tkm_context_kind_names, TKM_CTX_ESA);
 
 typedef struct private_tkm_id_manager_t private_tkm_id_manager_t;
 
index 17ca017..716e91d 100644 (file)
@@ -34,6 +34,8 @@ enum tkm_context_kind_t {
        TKM_CTX_ISA,
        /** Authenticated Endpoint context */
        TKM_CTX_AE,
+       /** ESP SA context */
+       TKM_CTX_ESA,
 
        /** helper to determine the number of elements in this enum */
        TKM_CTX_MAX,
index c4d5366..fd34bf9 100644 (file)
@@ -18,7 +18,7 @@
 
 #include "tkm_id_manager.h"
 
-static const tkm_limits_t limits = {125, 100, 30, 200};
+static const tkm_limits_t limits = {125, 100, 30, 200, 42};
 
 START_TEST(test_id_mgr_creation)
 {