summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2015-03-18 05:26:10 +0000
committermiod <miod@openbsd.org>2015-03-18 05:26:10 +0000
commitaa11dfc3eb22d757e0d9c150a76a30b7656f0a42 (patch)
tree0db833a2fd54aed805997738a7b8bd40ba00a6c9
parentKRL support doesn't need OpenSSL anymore, remove #ifdefs (diff)
downloadwireguard-openbsd-aa11dfc3eb22d757e0d9c150a76a30b7656f0a42.tar.xz
wireguard-openbsd-aa11dfc3eb22d757e0d9c150a76a30b7656f0a42.zip
In the neverending saga of enabling and disabling assembler code for sha
routines on hppa, the cause for sha512-parisc subtly misbehaving has been found: despite having fallback pa1.1 code when running on a 32-bit cpu, the shift constants used in the sigma computations in sha512 are >= 32 and are silently truncated to 5 bits by the assembler, so there is no chance of getting this code to work on a non-pa2.0 processor. However, the pa1.1 fallback code for sha256 is safe, as it never attempts to shift by more than 31, so reenable it again.
-rw-r--r--lib/libcrypto/arch/hppa/Makefile.inc6
-rw-r--r--lib/libcrypto/crypto/arch/hppa/Makefile.inc6
2 files changed, 2 insertions, 10 deletions
diff --git a/lib/libcrypto/arch/hppa/Makefile.inc b/lib/libcrypto/arch/hppa/Makefile.inc
index d8ca1065d67..0e18de20746 100644
--- a/lib/libcrypto/arch/hppa/Makefile.inc
+++ b/lib/libcrypto/arch/hppa/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.8 2015/03/05 20:35:28 miod Exp $
+# $OpenBSD: Makefile.inc,v 1.9 2015/03/18 05:26:10 miod Exp $
# hppa-specific libcrypto build rules
@@ -30,12 +30,8 @@ SRCS+= rc4_enc.c rc4_skey.c
# sha
CFLAGS+= -DSHA1_ASM
SSLASM+= sha sha1-parisc sha1-parisc
-.if 0 # sha512 subtly broken, sha256 probably as well
CFLAGS+= -DSHA256_ASM
SSLASM+= sha sha512-parisc sha256-parisc
-CFLAGS+= -DSHA512_ASM
-SSLASM+= sha sha512-parisc sha512-parisc
-.endif
# whrlpool
SRCS+= wp_block.c
diff --git a/lib/libcrypto/crypto/arch/hppa/Makefile.inc b/lib/libcrypto/crypto/arch/hppa/Makefile.inc
index d8ca1065d67..0e18de20746 100644
--- a/lib/libcrypto/crypto/arch/hppa/Makefile.inc
+++ b/lib/libcrypto/crypto/arch/hppa/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.8 2015/03/05 20:35:28 miod Exp $
+# $OpenBSD: Makefile.inc,v 1.9 2015/03/18 05:26:10 miod Exp $
# hppa-specific libcrypto build rules
@@ -30,12 +30,8 @@ SRCS+= rc4_enc.c rc4_skey.c
# sha
CFLAGS+= -DSHA1_ASM
SSLASM+= sha sha1-parisc sha1-parisc
-.if 0 # sha512 subtly broken, sha256 probably as well
CFLAGS+= -DSHA256_ASM
SSLASM+= sha sha512-parisc sha256-parisc
-CFLAGS+= -DSHA512_ASM
-SSLASM+= sha sha512-parisc sha512-parisc
-.endif
# whrlpool
SRCS+= wp_block.c