From a09d04a02231964fa5a8f0113e9909cfb140fe4e Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 29 Nov 2013 22:24:02 +0100 Subject: Revert "crypto: separate cipher/MAC availability check from information request" This reverts commit d0707b161d10cf79242d40b24853988c89c7604a. --- src/crypto/mac/macs.c.in | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/crypto/mac') diff --git a/src/crypto/mac/macs.c.in b/src/crypto/mac/macs.c.in index c38e190..3587322 100644 --- a/src/crypto/mac/macs.c.in +++ b/src/crypto/mac/macs.c.in @@ -107,7 +107,7 @@ void fastd_mac_free(fastd_context_t *ctx) { free(ctx->mac_contexts); } -bool fastd_mac_is_available(const char *name) { +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++) { if (strcmp(macs[i].name, name)) @@ -115,22 +115,12 @@ bool fastd_mac_is_available(const char *name) { for (j = 0; macs[i].impls[j].impl; j++) { if (macs[i].impls[j].impl->available()) - return true; + return macs[i].info; } break; } - return false; -} - -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++) { - if (!strcmp(macs[i].name, name)) - return macs[i].info; - } - return NULL; } -- cgit v1.2.3