diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-11-29 23:18:21 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-11-30 00:42:35 +0100 |
commit | 1111dc8e5e9e78254c1a7a891d961713e1be9db0 (patch) | |
tree | 3490dad7d1c43d32a9c5d362d6f03bb17cb5408a /src/crypto/cipher/ciphers.c.in | |
parent | a09d04a02231964fa5a8f0113e9909cfb140fe4e (diff) | |
download | fastd-1111dc8e5e9e78254c1a7a891d961713e1be9db0.tar fastd-1111dc8e5e9e78254c1a7a891d961713e1be9db0.zip |
Remove cipher and MAC contexts
Not a single implementation was using them...
Diffstat (limited to 'src/crypto/cipher/ciphers.c.in')
-rw-r--r-- | src/crypto/cipher/ciphers.c.in | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/src/crypto/cipher/ciphers.c.in b/src/crypto/cipher/ciphers.c.in index b3c6b1b..72ea3d2 100644 --- a/src/crypto/cipher/ciphers.c.in +++ b/src/crypto/cipher/ciphers.c.in @@ -89,24 +89,6 @@ bool fastd_cipher_config(const fastd_cipher_t **cipher_conf, const char *name, c return false; } -void fastd_cipher_init(fastd_context_t *ctx) { - ctx->cipher_contexts = calloc(array_size(ciphers), sizeof(fastd_cipher_context_t*)); - - size_t i; - for (i = 0; i < array_size(ciphers); i++) { - if (ctx->conf->ciphers[i]) - ctx->cipher_contexts[i] = ctx->conf->ciphers[i]->initialize(ctx); - } -} - -void fastd_cipher_free(fastd_context_t *ctx) { - size_t i; - for (i = 0; i < array_size(ciphers); i++) - ctx->conf->ciphers[i]->free(ctx, ctx->cipher_contexts[i]); - - free(ctx->cipher_contexts); -} - const fastd_cipher_info_t* fastd_cipher_info_get_by_name(const char *name) { size_t i, j; for (i = 0; i < array_size(ciphers); i++) { @@ -124,16 +106,13 @@ const fastd_cipher_info_t* fastd_cipher_info_get_by_name(const char *name) { return NULL; } -const fastd_cipher_t* fastd_cipher_get_by_name(fastd_context_t *ctx, const char *name, const fastd_cipher_info_t **info, const fastd_cipher_context_t **cctx) { +const fastd_cipher_t* fastd_cipher_get_by_name(fastd_context_t *ctx, const char *name, const fastd_cipher_info_t **info) { size_t i; for (i = 0; i < array_size(ciphers); i++) { if (!strcmp(ciphers[i].name, name)) { if (info) *info = ciphers[i].info; - if (cctx) - *cctx = ctx->cipher_contexts[i]; - return ctx->conf->ciphers[i]; } } |