File tree 3 files changed +8
-4
lines changed
3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
Mbed TLS ChangeLog (Sorted per branch, date)
2
2
3
+ Bugfix
4
+ * Fix compile errors in the AES-NI support functions when using clang or
5
+ clang-cl on Windows. Fixes #8372.
6
+
3
7
= Mbed TLS 2.28.5 branch released 2023-10-05
4
8
5
9
Features
Original file line number Diff line number Diff line change 58
58
* macros that may change in future releases.
59
59
*/
60
60
#undef MBEDTLS_AESNI_HAVE_INTRINSICS
61
- #if defined(_MSC_VER )
61
+ #if defined(_MSC_VER ) && !defined( __clang__ )
62
62
/* Visual Studio supports AESNI intrinsics since VS 2008 SP1. We only support
63
63
* VS 2013 and up for other reasons anyway, so no need to check the version. */
64
64
#define MBEDTLS_AESNI_HAVE_INTRINSICS
65
65
#endif
66
66
/* GCC-like compilers: currently, we only support intrinsics if the requisite
67
67
* target flag is enabled when building the library (e.g. `gcc -mpclmul -msse2`
68
68
* or `clang -maes -mpclmul`). */
69
- #if defined(__GNUC__ ) && defined(__AES__ ) && defined(__PCLMUL__ )
69
+ #if ( defined(__GNUC__ ) || defined( __clang__ ) ) && defined(__AES__ ) && defined(__PCLMUL__ )
70
70
#define MBEDTLS_AESNI_HAVE_INTRINSICS
71
71
#endif
72
72
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ int mbedtls_aesni_has_support(unsigned int what)
57
57
58
58
if (!done ) {
59
59
#if MBEDTLS_AESNI_HAVE_CODE == 2
60
- static unsigned info [4 ] = { 0 , 0 , 0 , 0 };
60
+ static int info [4 ] = { 0 , 0 , 0 , 0 };
61
61
#if defined(_MSC_VER )
62
62
__cpuid (info , 1 );
63
63
#else
@@ -191,7 +191,7 @@ void mbedtls_aesni_gcm_mult(unsigned char c[16],
191
191
const unsigned char a [16 ],
192
192
const unsigned char b [16 ])
193
193
{
194
- __m128i aa , bb , cc , dd ;
194
+ __m128i aa = { 0 } , bb = { 0 } , cc , dd ;
195
195
196
196
/* The inputs are in big-endian order, so byte-reverse them */
197
197
for (size_t i = 0 ; i < 16 ; i ++ ) {
You can’t perform that action at this time.
0 commit comments