Skip to content

Commit 60d5c27

Browse files
Vardhan ThigleMihirLuthra
Vardhan Thigle
authored andcommitted
Vendor Change:-
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)
1 parent fceaf68 commit 60d5c27

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

mbedtls-sys/vendor/library/aesni.c

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242

4343
#if defined(MBEDTLS_HAVE_X86_64)
4444

45+
#if !defined(MBEDTLS_CUSTOM_HAS_AESNI)
4546
/*
4647
* AES-NI support detection routine
4748
*/
@@ -62,6 +63,7 @@ int mbedtls_aesni_has_support( unsigned int what )
6263

6364
return( ( c & what ) != 0 );
6465
}
66+
#endif
6567

6668
/*
6769
* Binutils needs to be at least 2.19 to support AES-NI instructions.

mbedtls-sys/vendor/library/padlock.c

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737

3838
#if defined(MBEDTLS_HAVE_X86)
3939

40+
#if !defined(MBEDTLS_CUSTOM_HAS_PADLOCK)
4041
/*
4142
* PadLock detection routine
4243
*/
@@ -67,6 +68,7 @@ int mbedtls_padlock_has_support( int feature )
6768

6869
return( flags & feature );
6970
}
71+
#endif
7072

7173
/*
7274
* PadLock AES-ECB block en(de)cryption

0 commit comments

Comments
 (0)