Skip to content

Commit

Permalink
Add error when no aes implementation provided
Browse files Browse the repository at this point in the history
Signed-off-by: Jerry Yu <[email protected]>
  • Loading branch information
yuhaoth committed Apr 18, 2023
1 parent 00b6589 commit 57d5262
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions library/aesce.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
#if defined(MBEDTLS_HAVE_ASM) && defined(__GNUC__) && \
defined(__aarch64__) && !defined(MBEDTLS_HAVE_ARM64)
#define MBEDTLS_HAVE_ARM64
#if !defined(MBEDTLS_AESCE_C) && !defined(MBEDTLS_AES_HAS_NO_BUILTIN)
#error "MBEDTLS_AESCE_C defined, but not all prerequisites"
#endif
#endif

#if defined(MBEDTLS_HAVE_ARM64)
Expand Down
3 changes: 3 additions & 0 deletions library/aesni.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
(defined(__amd64__) || defined(__x86_64__)) && \
!defined(MBEDTLS_HAVE_X86_64)
#define MBEDTLS_HAVE_X86_64
#if !defined(MBEDTLS_AESNI_C) && !defined(MBEDTLS_AES_HAS_NO_BUILTIN)
#error "MBEDTLS_AESCE_C defined, but not all prerequisites"
#endif
#endif

#if defined(MBEDTLS_AESNI_C)
Expand Down
4 changes: 4 additions & 0 deletions library/padlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@

#include <stdint.h>

#if !defined(MBEDTLS_PADLOCK_C) && !defined(MBEDTLS_AES_HAS_NO_BUILTIN)
#error "MBEDTLS_AESCE_C defined, but not all prerequisites"
#endif

#define MBEDTLS_PADLOCK_RNG 0x000C
#define MBEDTLS_PADLOCK_ACE 0x00C0
#define MBEDTLS_PADLOCK_PHE 0x0C00
Expand Down

0 comments on commit 57d5262

Please sign in to comment.