Return ENOTSUP if aes256gcm is not supported
Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
This commit is contained in:
6
mud.c
6
mud.c
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user