aboutsummaryrefslogtreecommitdiffstats
path: root/src/pluto/ca.c
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2009-04-17 16:11:33 +0000
committerAndreas Steffen <andreas.steffen@strongswan.org>2009-04-17 16:11:33 +0000
commit9b91b81870d4b792c9e826349c34d98b7a835e20 (patch)
tree44283bfd7b9167bccd3e02dbff1cf192b7b3df58 /src/pluto/ca.c
parentc04e75487ffab245d35461b1d84eddd1e1408ba8 (diff)
downloadstrongswan-9b91b81870d4b792c9e826349c34d98b7a835e20.tar.bz2
strongswan-9b91b81870d4b792c9e826349c34d98b7a835e20.tar.xz
ported most of the libstrongswan chunk_t macros to pluto
Diffstat (limited to 'src/pluto/ca.c')
-rw-r--r--src/pluto/ca.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/pluto/ca.c b/src/pluto/ca.c
index 85f31c0bd..0c070823d 100644
--- a/src/pluto/ca.c
+++ b/src/pluto/ca.c
@@ -452,11 +452,9 @@ free_ca_info(ca_info_t* ca_info)
free(ca_info->ldaphost);
free(ca_info->ldapbase);
free(ca_info->ocspuri);
-
- freeanychunk(ca_info->authName);
- freeanychunk(ca_info->authKeyID);
- freeanychunk(ca_info->authKeySerialNumber);
-
+ free(ca_info->authName.ptr);
+ free(ca_info->authKeyID.ptr);
+ free(ca_info->authKeySerialNumber.ptr);
free_generalNames(ca_info->crluri, TRUE);
free(ca_info);
}
@@ -564,21 +562,19 @@ add_ca_info(const whack_message_t *msg)
ca->name = clone_str(msg->name);
/* authName */
- clonetochunk(ca->authName, cacert->subject.ptr, cacert->subject.len);
+ ca->authName = chunk_clone(cacert->subject);
dntoa(buf, BUF_LEN, ca->authName);
DBG(DBG_CONTROL,
DBG_log("authname: '%s'", buf)
)
/* authSerialNumber */
- clonetochunk(ca->authKeySerialNumber, cacert->serialNumber.ptr,
- cacert->serialNumber.len);
+ ca->authKeySerialNumber = chunk_clone(cacert->serialNumber);
/* authKeyID */
if (cacert->subjectKeyID.ptr != NULL)
{
- clonetochunk(ca->authKeyID, cacert->subjectKeyID.ptr,
- cacert->subjectKeyID.len);
+ ca->authKeyID = chunk_clone(cacert->subjectKeyID);
datatot(cacert->subjectKeyID.ptr, cacert->subjectKeyID.len, ':'
, buf, BUF_LEN);
DBG(DBG_CONTROL | DBG_PARSING ,