summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-11-02 16:07:12 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-11-02 16:07:12 +0100
commit0eeac967a3294e6a1718efbd1252433dc76a7684 (patch)
treeec826ea8a80c3ba14bd40f037cecbdc682f4d386 /src
parent4496be6e29732189769b78f63e491dacb23c961b (diff)
downloadfastd-0eeac967a3294e6a1718efbd1252433dc76a7684.tar
fastd-0eeac967a3294e6a1718efbd1252433dc76a7684.zip
Algorithms without implementation aren't available
Diffstat (limited to 'src')
-rw-r--r--src/crypto/cipher/ciphers.c.in5
-rw-r--r--src/crypto/mac/macs.c.in5
2 files changed, 4 insertions, 6 deletions
diff --git a/src/crypto/cipher/ciphers.c.in b/src/crypto/cipher/ciphers.c.in
index 6ff058f..37de211 100644
--- a/src/crypto/cipher/ciphers.c.in
+++ b/src/crypto/cipher/ciphers.c.in
@@ -94,9 +94,8 @@ void fastd_cipher_free(fastd_context_t *ctx) {
bool fastd_cipher_available(const char *name) {
size_t i;
for (i = 0; i < array_size(ciphers); i++) {
- if (!strcmp(ciphers[i].name, name)) {
- return true;
- }
+ if (!strcmp(ciphers[i].name, name))
+ return ciphers[i].impls[0];
}
return false;
diff --git a/src/crypto/mac/macs.c.in b/src/crypto/mac/macs.c.in
index e591935..5a4e1fb 100644
--- a/src/crypto/mac/macs.c.in
+++ b/src/crypto/mac/macs.c.in
@@ -94,9 +94,8 @@ void fastd_mac_free(fastd_context_t *ctx) {
bool fastd_mac_available(const char *name) {
size_t i;
for (i = 0; i < array_size(macs); i++) {
- if (!strcmp(macs[i].name, name)) {
- return true;
- }
+ if (!strcmp(macs[i].name, name))
+ return macs[i].impls[0];
}
return false;