diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-11-02 13:23:12 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-11-02 13:23:12 +0100 |
commit | f2c2f2926bce65c5c09d274c514d382ffd98f78c (patch) | |
tree | 582fa48dd067aebf851df20e765d114affc93528 /src/methods | |
parent | 20ee3b5a4f110f53a73746e18fc0eb0cbbb7845c (diff) | |
download | fastd-f2c2f2926bce65c5c09d274c514d382ffd98f78c.tar fastd-f2c2f2926bce65c5c09d274c514d382ffd98f78c.zip |
Correctly handle ciphers without implementation
Diffstat (limited to 'src/methods')
-rw-r--r-- | src/methods/aes128_gcm/aes128_gcm.c | 3 |
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); |