Add context id getter to TKM DH implementation
[strongswan.git] / src / charon-tkm / src / tkm / tkm_diffie_hellman.c
index 21378da..9a38c16 100644 (file)
@@ -103,6 +103,12 @@ METHOD(diffie_hellman_t, destroy, void,
        free(this);
 }
 
        free(this);
 }
 
+METHOD(tkm_diffie_hellman_t, get_id, dh_id_type,
+       private_tkm_diffie_hellman_t *this)
+{
+       return this->context_id;
+}
+
 /*
  * Described in header.
  */
 /*
  * Described in header.
  */
@@ -119,6 +125,7 @@ tkm_diffie_hellman_t *tkm_diffie_hellman_create(diffie_hellman_group_t group)
                                .get_dh_group = _get_dh_group,
                                .destroy = _destroy,
                        },
                                .get_dh_group = _get_dh_group,
                                .destroy = _destroy,
                        },
+                       .get_id = _get_id,
                },
                .group = group,
                .context_id = tkm->idmgr->acquire_id(tkm->idmgr, TKM_CTX_DH),
                },
                .group = group,
                .context_id = tkm->idmgr->acquire_id(tkm->idmgr, TKM_CTX_DH),