summaryrefslogtreecommitdiff
path: root/src/libtls/tls_crypto.c
diff options
context:
space:
mode:
authorRené Mayrhofer <rene@mayrhofer.eu.org>2011-03-05 09:20:09 +0100
committerRené Mayrhofer <rene@mayrhofer.eu.org>2011-03-05 09:20:09 +0100
commit568905f488e63e28778f87ac0e38d845f45bae79 (patch)
treed9969a147e36413583ff4bc75542d34c955f8823 /src/libtls/tls_crypto.c
parentf73fba54dc8b30c6482e1e8abf15bbf455592fcd (diff)
downloadvyos-strongswan-568905f488e63e28778f87ac0e38d845f45bae79.tar.gz
vyos-strongswan-568905f488e63e28778f87ac0e38d845f45bae79.zip
Imported Upstream version 4.5.1
Diffstat (limited to 'src/libtls/tls_crypto.c')
-rw-r--r--src/libtls/tls_crypto.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libtls/tls_crypto.c b/src/libtls/tls_crypto.c
index 78f2a796d..b4eaf4d79 100644
--- a/src/libtls/tls_crypto.c
+++ b/src/libtls/tls_crypto.c
@@ -626,15 +626,18 @@ static void filter_suite(private_tls_crypto_t *this,
suite_algs_t suites[], int *count, int offset,
enumerator_t*(*create_enumerator)(crypto_factory_t*))
{
+ const char *plugin_name;
suite_algs_t current;
- int i, remaining = 0;
+ int *current_alg, i, remaining = 0;
enumerator_t *enumerator;
memset(&current, 0, sizeof(current));
+ current_alg = (int*)((char*)&current + offset);
+
for (i = 0; i < *count; i++)
{
enumerator = create_enumerator(lib->crypto);
- while (enumerator->enumerate(enumerator, ((char*)&current) + offset))
+ while (enumerator->enumerate(enumerator, current_alg, &plugin_name))
{
if ((suites[i].encr == ENCR_NULL ||
!current.encr || current.encr == suites[i].encr) &&
@@ -1060,10 +1063,11 @@ METHOD(tls_crypto_t, get_signature_algorithms, void,
enumerator_t *enumerator;
hash_algorithm_t alg;
tls_hash_algorithm_t hash;
+ const char *plugin_name;
supported = tls_writer_create(32);
enumerator = lib->crypto->create_hasher_enumerator(lib->crypto);
- while (enumerator->enumerate(enumerator, &alg))
+ while (enumerator->enumerate(enumerator, &alg, &plugin_name))
{
switch (alg)
{