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.
  • Loading branch information
Vardhan Thigle authored and raoulstrackx committed Apr 7, 2021
1 parent 4e4a404 commit d2317b0
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 @@ -42,6 +42,7 @@

#if defined(MBEDTLS_HAVE_X86_64)

#if !defined(MBEDTLS_CUSTOM_HAS_AESNI)
/*
* AES-NI support detection routine
*/
Expand All @@ -62,6 +63,7 @@ int mbedtls_aesni_has_support( unsigned int what )

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

/*
* Binutils needs to be at least 2.19 to support AES-NI instructions.
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 @@ -37,6 +37,7 @@

#if defined(MBEDTLS_HAVE_X86)

#if !defined(MBEDTLS_CUSTOM_HAS_PADLOCK)
/*
* PadLock detection routine
*/
Expand Down Expand Up @@ -67,6 +68,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 d2317b0

Please sign in to comment.