summaryrefslogtreecommitdiffstats
path: root/src/crypto/cipher/ciphers.c.in
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-11-29 22:24:02 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-11-29 22:24:02 +0100
commita09d04a02231964fa5a8f0113e9909cfb140fe4e (patch)
tree2d3da68cf388d88ebff299f7c3866c608c847f40 /src/crypto/cipher/ciphers.c.in
parentd0707b161d10cf79242d40b24853988c89c7604a (diff)
downloadfastd-a09d04a02231964fa5a8f0113e9909cfb140fe4e.tar
fastd-a09d04a02231964fa5a8f0113e9909cfb140fe4e.zip
Revert "crypto: separate cipher/MAC availability check from information request"
This reverts commit d0707b161d10cf79242d40b24853988c89c7604a.
Diffstat (limited to 'src/crypto/cipher/ciphers.c.in')
-rw-r--r--src/crypto/cipher/ciphers.c.in14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/crypto/cipher/ciphers.c.in b/src/crypto/cipher/ciphers.c.in
index 84607a0..b3c6b1b 100644
--- a/src/crypto/cipher/ciphers.c.in
+++ b/src/crypto/cipher/ciphers.c.in
@@ -107,7 +107,7 @@ void fastd_cipher_free(fastd_context_t *ctx) {
free(ctx->cipher_contexts);
}
-bool fastd_cipher_is_available(const char *name) {
+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++) {
if (strcmp(ciphers[i].name, name))
@@ -115,22 +115,12 @@ bool fastd_cipher_is_available(const char *name) {
for (j = 0; ciphers[i].impls[j].impl; j++) {
if (ciphers[i].impls[j].impl->available())
- return true;
+ return ciphers[i].info;
}
break;
}
- return false;
-}
-
-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++) {
- if (!strcmp(ciphers[i].name, name))
- return ciphers[i].info;
- }
-
return NULL;
}