Richard Brown 2021-03-02 13:41:52 +00:00 committed by Git OBS Bridge
commit 0efe825476
3 changed files with 34 additions and 4 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Feb 22 10:40:53 UTC 2021 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- Revert last commit and fix bug boo#1181402 with a proper patch:
* fix-aliasing-aarch64.patch
-------------------------------------------------------------------
Thu Jan 28 22:41:26 UTC 2021 - Dirk Müller <dmueller@suse.com>

View File

@ -36,6 +36,8 @@ Patch2: ddr_1998-check-nofail-noxattr.diff
Patch3: ddr_1998-sysrandom.diff
Patch4: ddr_1998-testhole.diff
Patch5: ddr_1998-ossl11-warn.diff
# boo#1181402
Patch6: fix-aliasing-aarch64.patch
BuildRequires: autoconf
BuildRequires: libattr-devel
BuildRequires: libopenssl-devel
@ -131,10 +133,6 @@ autoconf
touch .dep
OPT_FLAGS="%{optflags}"
%ifarch aarch64
OPT_FLAGS+=" -fno-strict-aliasing"
%endif
%make_build RPM_OPT_FLAGS="$OPT_FLAGS" LIBDIR=%{_libdir} LIB=%{_lib}
%install

View File

@ -0,0 +1,26 @@
--- a/aes_arm64.c
+++ a/aes_arm64.c
@@ -158,8 +158,8 @@ inline void AES_ARM8_EKey_DKey(const u32* ekey,
int AES_ARM8_KeySetupDec(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits, int rounds)
{
/* expand the cipher key: */
- int Nr = AES_ARM8_KeySetupEnc((u32*)crypto->xkeys, cipherKey, keyBits, rounds);
- AES_ARM8_EKey_DKey((u32*)crypto->xkeys, rk, Nr);
+ int Nr = AES_ARM8_KeySetupEnc(crypto->xkeys->data32, cipherKey, keyBits, rounds);
+ AES_ARM8_EKey_DKey(crypto->xkeys->data32, rk, Nr);
return Nr;
}
--- a/secmem.h
+++ a/secmem.h
@@ -10,8 +10,9 @@
# include "config.h"
#endif
-typedef struct _roundkey {
+typedef union _roundkey {
unsigned char data[16];
+ unsigned int data32[4];
} roundkey;
typedef struct _ciphblk {