Skip to content

Commit 3d903fa

Browse files
author
Mika Leppänen
committed
Corrected NIST AES KW flagging
1 parent 2f4e099 commit 3d903fa

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

source/Service_Libs/nist_aes_kw/nist_aes_kw.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@
2323
#include "mbedtls/nist_kw.h"
2424
#include "Service_Libs/nist_aes_kw/nist_aes_kw.h"
2525

26-
#if defined(HAVE_WS) && (defined(HAVE_PAE_SUPP) || defined(HAVE_PAE_AUTH))
26+
#ifdef HAVE_WS
2727

2828
#define TRACE_GROUP "naes"
2929

3030
int8_t nist_aes_key_wrap(uint8_t is_wrap, const uint8_t *key, int16_t key_bits, const uint8_t *input, size_t input_len, uint8_t *output, size_t *output_len)
3131
{
32+
#if defined(HAVE_PAE_SUPP) || defined(HAVE_PAE_AUTH)
33+
3234
int8_t ret_val = 0;
3335
mbedtls_nist_kw_context ctx;
3436

@@ -97,6 +99,16 @@ int8_t nist_aes_key_wrap(uint8_t is_wrap, const uint8_t *key, int16_t key_bits,
9799
mbedtls_nist_kw_free(&ctx);
98100

99101
return ret_val;
102+
#else
103+
(void) is_wrap;
104+
(void) key;
105+
(void) key_bits;
106+
(void) input;
107+
(void) input_len;
108+
(void) output;
109+
(void) output_len;
110+
return 0;
111+
#endif
100112
}
101113

102114
#endif

0 commit comments

Comments
 (0)