From f2c2f2926bce65c5c09d274c514d382ffd98f78c Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 2 Nov 2013 13:23:12 +0100 Subject: Correctly handle ciphers without implementation --- src/methods/aes128_gcm/aes128_gcm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/methods/aes128_gcm') 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); -- cgit v1.2.3