From 67ca44ccbdf140ae354a62be29e09ae154d79729 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Fri, 23 Nov 2012 16:38:25 +0100 Subject: [PATCH] Rebuild PKCS#9 encoding after adding new attributes --- src/libstrongswan/crypto/pkcs9.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libstrongswan/crypto/pkcs9.c b/src/libstrongswan/crypto/pkcs9.c index 64567973b..b6bc7eba6 100644 --- a/src/libstrongswan/crypto/pkcs9.c +++ b/src/libstrongswan/crypto/pkcs9.c @@ -167,6 +167,9 @@ METHOD(pkcs9_t, add_attribute, void, this->attributes->insert_last(this->attributes, attribute_create(oid, value)); chunk_free(&value); + + /* rebuild encoding when adding attributes */ + chunk_free(&this->encoding); } METHOD(pkcs9_t, destroy, void,