From 70b8b37b4ba7c9aad345a3543c169cc73b8d3117 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Thu, 2 Apr 2015 09:51:03 +0100 Subject: [PATCH 1/2] Fix portability issue in Makefile The == test operator is not defined by POSIX --- tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile b/tests/Makefile index 180da87da..25b704a5f 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -433,7 +433,7 @@ ifndef WINDOWS RESULT=`$(CHECK_PRELOAD) ./$${i} | grep -v 'PASS$$' | grep -v -- '----' | grep -v '^$$'`; \ PASSED=`echo $$RESULT |grep PASSED`; \ echo " $$RESULT"; \ - if [ "$$PASSED" = "" ]; \ + if [ "x$$PASSED" = "x" ]; \ then \ echo "**** Failed ***************"; \ RETURN=1; \ From cf201201e6bb9f660ca74df728f2315c4c5cdd17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Thu, 2 Apr 2015 10:46:55 +0100 Subject: [PATCH 2/2] Fix bug in Via Padlock support --- ChangeLog | 1 + library/padlock.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 353b26269..a8758f64a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -25,6 +25,7 @@ Features errors on use of deprecated functions. Bugfix + * Fix bug in Via Padlock support (found by Nikos Mavrogiannopoulos). * Fix thread safety bug in RSA operations (found by Fredrik Axelsson). * Fix hardclock() (only used in the benchmarking program) with some versions of mingw64 (found by kxjhlele). diff --git a/library/padlock.c b/library/padlock.c index f4d95fdf2..d83f76c4e 100644 --- a/library/padlock.c +++ b/library/padlock.c @@ -104,7 +104,7 @@ int padlock_xcryptecb( aes_context *ctx, "movl %1, %%ebx \n\t" : "=m" (ebx) : "m" (ebx), "m" (ctrl), "m" (rk), "m" (blk) - : "ecx", "edx", "esi", "edi" ); + : "memory", "ecx", "edx", "esi", "edi" ); memcpy( output, blk, 16 ); @@ -155,7 +155,7 @@ int padlock_xcryptcbc( aes_context *ctx, : "=m" (ebx) : "m" (ebx), "m" (count), "m" (ctrl), "m" (rk), "m" (input), "m" (output), "m" (iw) - : "eax", "ecx", "edx", "esi", "edi" ); + : "memory", "eax", "ecx", "edx", "esi", "edi" ); memcpy( iv, iw, 16 );