summaryrefslogtreecommitdiffstats
path: root/src/crypto/mac/macs.c.in
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-11-29 23:18:21 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-11-30 00:42:35 +0100
commit1111dc8e5e9e78254c1a7a891d961713e1be9db0 (patch)
tree3490dad7d1c43d32a9c5d362d6f03bb17cb5408a /src/crypto/mac/macs.c.in
parenta09d04a02231964fa5a8f0113e9909cfb140fe4e (diff)
downloadfastd-1111dc8e5e9e78254c1a7a891d961713e1be9db0.tar
fastd-1111dc8e5e9e78254c1a7a891d961713e1be9db0.zip
Remove cipher and MAC contexts
Not a single implementation was using them...
Diffstat (limited to 'src/crypto/mac/macs.c.in')
-rw-r--r--src/crypto/mac/macs.c.in23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/crypto/mac/macs.c.in b/src/crypto/mac/macs.c.in
index 3587322..c70473b 100644
--- a/src/crypto/mac/macs.c.in
+++ b/src/crypto/mac/macs.c.in
@@ -89,24 +89,6 @@ bool fastd_mac_config(const fastd_mac_t **mac_conf, const char *name, const char
return false;
}
-void fastd_mac_init(fastd_context_t *ctx) {
- ctx->mac_contexts = calloc(array_size(macs), sizeof(fastd_mac_context_t*));
-
- size_t i;
- for (i = 0; i < array_size(macs); i++) {
- if (ctx->conf->macs[i])
- ctx->mac_contexts[i] = ctx->conf->macs[i]->initialize(ctx);
- }
-}
-
-void fastd_mac_free(fastd_context_t *ctx) {
- size_t i;
- for (i = 0; i < array_size(macs); i++)
- ctx->conf->macs[i]->free(ctx, ctx->mac_contexts[i]);
-
- free(ctx->mac_contexts);
-}
-
const fastd_mac_info_t* fastd_mac_info_get_by_name(const char *name) {
size_t i, j;
for (i = 0; i < array_size(macs); i++) {
@@ -124,16 +106,13 @@ const fastd_mac_info_t* fastd_mac_info_get_by_name(const char *name) {
return NULL;
}
-const fastd_mac_t* fastd_mac_get_by_name(fastd_context_t *ctx, const char *name, const fastd_mac_info_t **info, const fastd_mac_context_t **cctx) {
+const fastd_mac_t* fastd_mac_get_by_name(fastd_context_t *ctx, const char *name, const fastd_mac_info_t **info) {
size_t i;
for (i = 0; i < array_size(macs); i++) {
if (!strcmp(macs[i].name, name)) {
if (info)
*info = macs[i].info;
- if (cctx)
- *cctx = ctx->mac_contexts[i];
-
return ctx->conf->macs[i];
}
}