Return ENOTSUP if aes256gcm is not supported

Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
This commit is contained in:
Adrien Gallouët
2018-03-04 14:57:21 +00:00
parent 5aeb0a3cb2
commit c583e207c8

6
mud.c
View File

@@ -739,8 +739,10 @@ mud_keyx_init(struct mud *mud, uint64_t now)
int int
mud_set_aes(struct mud *mud) mud_set_aes(struct mud *mud)
{ {
if (!crypto_aead_aes256gcm_is_available()) if (!crypto_aead_aes256gcm_is_available()) {
return 1; errno = ENOTSUP;
return -1;
}
mud->crypto.aes = 1; mud->crypto.aes = 1;