From 02ee40ad6aae6bf56b4204a3e09f6e48c77a7b59 Mon Sep 17 00:00:00 2001 From: Andreas Steffen Date: Wed, 23 May 2007 19:43:24 +0000 Subject: defined ietfAttr_t type and its destroy function --- src/libstrongswan/crypto/ac.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/libstrongswan/crypto/ac.c b/src/libstrongswan/crypto/ac.c index 3a9826772..0eccfa02b 100644 --- a/src/libstrongswan/crypto/ac.c +++ b/src/libstrongswan/crypto/ac.c @@ -149,15 +149,39 @@ typedef enum { /** * access structure for an ietfAttribute */ -typedef struct ietfAttr ietfAttr_t; +typedef struct ietfAttr_t ietfAttr_t; -struct ietfAttr { +struct ietfAttr_t { + /** + * Time when attribute was first installed + */ time_t installed; + + /** + * Reference count + */ int count; + + /** + * IETF attribute kind + */ ietfAttribute_t kind; + + /** + * IETF attribute valuse + */ chunk_t value; }; +/** + * Destroys an ietfAttribute_t object + */ +static void ietfAttr_destroy(ietfAttr_t *this) +{ + free(this->value.ptr); + free(this); +} + /** * ASN.1 definition of ietfAttrSyntax */ -- cgit v1.2.3