summaryrefslogtreecommitdiffstats
path: root/src/methods
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-11-02 13:23:12 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-11-02 13:23:12 +0100
commitf2c2f2926bce65c5c09d274c514d382ffd98f78c (patch)
tree582fa48dd067aebf851df20e765d114affc93528 /src/methods
parent20ee3b5a4f110f53a73746e18fc0eb0cbbb7845c (diff)
downloadfastd-f2c2f2926bce65c5c09d274c514d382ffd98f78c.tar
fastd-f2c2f2926bce65c5c09d274c514d382ffd98f78c.zip
Correctly handle ciphers without implementation
Diffstat (limited to 'src/methods')
-rw-r--r--src/methods/aes128_gcm/aes128_gcm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/methods/aes128_gcm/aes128_gcm.c b/src/methods/aes128_gcm/aes128_gcm.c
index 20f393f..59e6914 100644
--- a/src/methods/aes128_gcm/aes128_gcm.c
+++ b/src/methods/aes128_gcm/aes128_gcm.c
@@ -71,7 +71,8 @@ static fastd_method_session_state_t* method_session_init(fastd_context_t *ctx, c
fastd_method_common_init(ctx, &session->common, initiator);
- if (!fastd_cipher_get_by_name(ctx, "aes128-ctr", &session->aes128_ctr, &session->aes128_ctr_ctx))
+ session->aes128_ctr = fastd_cipher_get_by_name(ctx, "aes128-ctr", &session->aes128_ctr_ctx);
+ if (!session->aes128_ctr)
exit_bug(ctx, "aes128-gcm: can't instanciate aes128-ctr");
session->aes128_ctr_state = session->aes128_ctr->init_state(ctx, session->aes128_ctr_ctx, secret);