Skip to content

Commit

Permalink
Vendor Change:-
Browse files Browse the repository at this point in the history
1. Added conditional compilation flags "MBEDTLS_FORCE_AESNI" and "MBEDTLS_FORCE_PADLOCK"
2. This allows us to supress cpuid based feature detection on sgx platforms.
3. "MBEDTLS_FORCE_AESNI" gets set if "force_aesni_support" flag is enabled.
4. Please refer to the previous commit for rust side changes.

(cherry picked from commit d2317b0)
  • Loading branch information
Vardhan Thigle authored and Taowyoo committed Jan 27, 2024
1 parent 69f5de3 commit e304775
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mbedtls-sys/vendor/library/aesni.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <immintrin.h>
#endif

#if !defined(MBEDTLS_CUSTOM_HAS_AESNI)
/*
* AES-NI support detection routine
*/
Expand Down Expand Up @@ -64,6 +65,7 @@ int mbedtls_aesni_has_support(unsigned int what)

return (c & what) != 0;
}
#endif

#if MBEDTLS_AESNI_HAVE_CODE == 2

Expand Down
2 changes: 2 additions & 0 deletions mbedtls-sys/vendor/library/padlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#if defined(MBEDTLS_VIA_PADLOCK_HAVE_CODE)

#if !defined(MBEDTLS_CUSTOM_HAS_PADLOCK)
/*
* PadLock detection routine
*/
Expand Down Expand Up @@ -56,6 +57,7 @@ int mbedtls_padlock_has_support(int feature)

return flags & feature;
}
#endif

/*
* PadLock AES-ECB block en(de)cryption
Expand Down

0 comments on commit e304775

Please sign in to comment.