aboutsummaryrefslogtreecommitdiffstats
path: root/src/libtls
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2010-08-21 12:51:54 +0200
committerAndreas Steffen <andreas.steffen@strongswan.org>2010-08-21 12:52:55 +0200
commit56a1167b0788b59687970c10fd1a2891b33c5858 (patch)
treea6a2dc74ae0018972630a480228c53b74a4db747 /src/libtls
parent96b2fbcc2cf403b964f51d26fecb92758baa3657 (diff)
downloadstrongswan-56a1167b0788b59687970c10fd1a2891b33c5858.tar.bz2
strongswan-56a1167b0788b59687970c10fd1a2891b33c5858.tar.xz
fixed build_cipher_suite_list()
Diffstat (limited to 'src/libtls')
-rw-r--r--src/libtls/tls_crypto.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libtls/tls_crypto.c b/src/libtls/tls_crypto.c
index 801a12772..f3df4970f 100644
--- a/src/libtls/tls_crypto.c
+++ b/src/libtls/tls_crypto.c
@@ -486,16 +486,16 @@ static void build_cipher_suite_list(private_tls_crypto_t *this,
filter_suite(this, suites, &count, offsetof(suite_algs_t, hash),
lib->crypto->create_hasher_enumerator);
+ free(this->suites);
+ this->suite_count = count;
+ this->suites = malloc(sizeof(tls_cipher_suite_t) * count);
+
DBG2(DBG_CFG, "%d supported TLS cipher suites:", count);
for (i = 0; i < count; i++)
{
- DBG2(DBG_CFG, " %N", tls_cipher_suite_names, suites[i]);
+ DBG2(DBG_CFG, " %N", tls_cipher_suite_names, suites[i].suite);
+ this->suites[i] = suites[i].suite;
}
-
- free(this->suites);
- this->suite_count = count;
- this->suites = malloc(sizeof(tls_cipher_suite_t) * count);
- memcpy(this->suites, suites, sizeof(tls_cipher_suite_t) * this->suite_count);
}
METHOD(tls_crypto_t, get_cipher_suites, int,