CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto

2021-08-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Aug 15 13:32:44 UTC 2021

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto: bn.inc

Log Message:
libcrypto: suppress irrelevant lint warnings

The conversion from 'unsigned long' to 'int' in line 805 is due to the
laziness of declaring a carry flag as BN_ULONG, to save an extra
line of declaration.

The constants in conditional context come from the macro 'bn_cp_32'.

The unconst cast is used for initializing local BIGNUM constants; the
struct member is declared as non-const pointer.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/crypto/external/bsd/openssl/lib/libcrypto/bn.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/bn.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/bn.inc:1.5 src/crypto/external/bsd/openssl/lib/libcrypto/bn.inc:1.6
--- src/crypto/external/bsd/openssl/lib/libcrypto/bn.inc:1.5	Fri Feb  9 13:35:45 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/bn.inc	Sun Aug 15 13:32:43 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: bn.inc,v 1.5 2018/02/09 13:35:45 christos Exp $
+#	$NetBSD: bn.inc,v 1.6 2021/08/15 13:32:43 rillig Exp $
 #
 #	@(#) Copyright (c) 1995 Simon J. Gerraty
 #
@@ -47,3 +47,7 @@ SRCS += ${BN_SRCS}
 .for cryptosrc in ${BN_SRCS}
 CPPFLAGS.${cryptosrc} = -I${OPENSSLSRC}/crypto/bn ${BNCPPFLAGS}
 .endfor
+
+LINTFLAGS.bn_nist.c+=	-X 132	# conversion from 'unsigned long' to 'int'
+LINTFLAGS.bn_nist.c+=	-X 161	# constant in conditional context
+LINTFLAGS.bn_nist.c+=	-X 275	# cast discards 'const' from type 'pointer to const unsigned long'



CVS commit: src/crypto/external/bsd/openssl/lib/libdes

2021-08-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Aug 15 12:58:02 UTC 2021

Modified Files:
src/crypto/external/bsd/openssl/lib/libdes: Makefile

Log Message:
libdes: suppress some selected lint warnings

The type widths are handled carefully, so even if there is some
conversion from 64-bit long to uint32_t, no value bits get lost.

The fallthrough case statements are a variant of Duff's Device.

The bitwise '>>' on signed value is actually on a value of type
'unsigned char', and since all platforms supported by lint have
sizeof(int) == 4, the behavior is well defined.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/crypto/external/bsd/openssl/lib/libdes/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libdes/Makefile
diff -u src/crypto/external/bsd/openssl/lib/libdes/Makefile:1.3 src/crypto/external/bsd/openssl/lib/libdes/Makefile:1.4
--- src/crypto/external/bsd/openssl/lib/libdes/Makefile:1.3	Thu Mar 15 18:40:16 2018
+++ src/crypto/external/bsd/openssl/lib/libdes/Makefile	Sun Aug 15 12:58:01 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2018/03/15 18:40:16 christos Exp $
+#	$NetBSD: Makefile,v 1.4 2021/08/15 12:58:01 rillig Exp $
 
 .include 
 
@@ -16,6 +16,9 @@ SRCS+=	ornd_keys.c
 
 CPPFLAGS+=-DOPENSSL_VERSION_PTEXT="\" based on OpenSSL 0.9.6j 10 Apr 2003\""
 CPPFLAGS+=-DOPENSSL_cleanse=bzero -DOPENSSL_malloc=malloc
+LINTFLAGS+=	-X 117	# bitwise '>>' on signed value possibly nonportable
+LINTFLAGS+=	-X 132	# conversion from 'long' to 'unsigned int'
+LINTFLAGS+=	-X 220	# fallthrough on case statement
 
 INCS=	des.h
 INCSDIR=/usr/include



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips

2021-08-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Aug 10 10:43:42 UTC 2021

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips: bn.inc

Log Message:
PR/56318: Izumi Tsutsui: Don't include mips.S for 32 bit mips because it
does not work for mips1


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc:1.7 src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc:1.8
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc:1.7	Mon Apr 26 14:06:09 2021
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc	Tue Aug 10 06:43:42 2021
@@ -1,6 +1,7 @@
 .include "mips.inc"
 
-.if ${MIPS_LE}
+# Don't include mips.S for 32 bit mips because it does not work for mips1
+.if ${MIPS_LE} && ${MIPS_64} == "64"
 .PATH.S: ${.PARSEDIR}
 
 BN_SRCS = mips${MIPS_64}.S



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc

2021-08-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Aug 10 10:38:42 UTC 2021

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc: bn.inc

Log Message:
PR/56318: Izumi Tsutsui: Limit bn-sparcv8.S to sparc64; breaks
on sparcstation 2 (sun4c)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc:1.3
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc:1.2	Sun Jun 21 18:16:08 2020
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc	Tue Aug 10 06:38:42 2021
@@ -1,5 +1,8 @@
 .PATH.S: ${.PARSEDIR}
+# Limit bn-sparcv8.S to sparc64; breaks on sparcstation 2 (sun4c)
+.if ${MACHINE} == "sparc64"
 # XXX bn-sparcv8plus.S doesn't work well. why?
 BN_SRCS = bn-sparcv8.S
 AFLAGS.bn-sparcv8.S+= -Wa,-Av9
+.endif
 .include "../../bn.inc"



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips

2021-04-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Apr 26 20:01:13 UTC 2021

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips: mips.inc

Log Message:
Handle the compat builds and both the n64 and non n64 variants


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc:1.1 src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc:1.2
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc:1.1	Mon Apr 26 14:06:09 2021
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc	Mon Apr 26 16:01:13 2021
@@ -1,4 +1,4 @@
-# $NetBSD: mips.inc,v 1.1 2021/04/26 18:06:09 christos Exp $
+# $NetBSD: mips.inc,v 1.2 2021/04/26 20:01:13 christos Exp $
 
 .ifndef MIPS_LE
 
@@ -8,10 +8,11 @@ MIPS_LE=0
 MIPS_LE=1
 .	endif
 
-.	if empty(MACHINE_ARCH:Mmips*64*)
-MIPS_64=
-.	else
+.	if (!empty(MACHINE_ARCH:Mmipsn64*) && empty(COPTS:M-mabi=*32*)) || \
+	   (!empty(MACHINE_ARCH:Mmips64*) && !empty(COPTS:M-mabi=*64*))
 MIPS_64=64
+.	else
+MIPS_64=
 .	endif
 
 .endif



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips

2021-04-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Apr 26 18:06:09 UTC 2021

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips: aes.inc bn.inc
crypto.inc poly1305.inc sha.inc
Added Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips: mips.inc

Log Message:
Centralize the logic for endian and 64 bit availability.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc
cvs rdiff -u -r1.6 -r1.7 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc
cvs rdiff -u -r1.7 -r1.8 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc
cvs rdiff -u -r0 -r1.1 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc:1.5 src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc:1.6
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc:1.5	Fri Mar  9 16:49:55 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/aes.inc	Mon Apr 26 14:06:09 2021
@@ -1,7 +1,8 @@
-.if empty(MACHINE_ARCH:M*eb)
+.include "mips.inc"
+.if ${MIPS_LE}
 .PATH.S: ${.PARSEDIR}
 
-#AES_SRCS = aes-mips${"${COPTS:M*-mabi=64*}" == "":?:64}.S
+#AES_SRCS = aes-mips${MIPS_64}.S
 #AESCPPFLAGS = -DAES_ASM
 .endif
 

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc:1.6 src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc:1.7
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc:1.6	Fri Mar  9 16:49:55 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/bn.inc	Mon Apr 26 14:06:09 2021
@@ -1,7 +1,9 @@
-.if empty(MACHINE_ARCH:M*eb)
+.include "mips.inc"
+
+.if ${MIPS_LE}
 .PATH.S: ${.PARSEDIR}
 
-BN_SRCS = mips${"${COPTS:M*-mabi=64*}" == "":?:64}.S
+BN_SRCS = mips${MIPS_64}.S
 .endif
 
 .include "../../bn.inc"
Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc:1.6 src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc:1.7
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc:1.6	Fri Mar  9 16:49:55 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/sha.inc	Mon Apr 26 14:06:09 2021
@@ -1,9 +1,12 @@
-.if empty(MACHINE_ARCH:M*eb)
+.include "mips.inc"
+
+.if ${MIPS_LE}
 .PATH.S: ${.PARSEDIR}
 
-SHA_SRCS += sha1-mips${"${COPTS:M*-mabi=64*}" == "":?:64}.S
-SHA_SRCS += sha512-mips${"${COPTS:M*-mabi=64*}" == "":?:64}.S
+SHA_SRCS += sha1-mips${MIPS_64}.S
+SHA_SRCS += sha512-mips${MIPS_64}.S
 
 SHACPPFLAGS = -DSHA1_ASM
 .endif
+
 .include "../../sha.inc"

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc:1.7 src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc:1.8
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc:1.7	Mon Sep 24 07:03:40 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc	Mon Apr 26 14:06:09 2021
@@ -1,7 +1,9 @@
-.if empty(MACHINE_ARCH:M*eb)
+.include "mips.inc"
+
+.if ${MIPS_LE}
 .PATH.S: ${.PARSEDIR}
 
-CRYPTO_SRCS += mips-mont${"${COPTS:M*-mabi=64*}" == "":?:64}.S
+CRYPTO_SRCS += mips-mont${MIPS_64}.S
 .endif
 
 .include "../../crypto.inc"

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc:1.4 src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc:1.5
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc:1.4	Fri Mar  9 16:49:55 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/poly1305.inc	Mon Apr 26 14:06:09 2021
@@ -1,5 +1,6 @@
-.if empty(MACHINE_ARCH:M*eb)
-.if !empty(MACHINE_ARCH:Mmips64*)
+.include "mips.inc"
+
+.if ${MIPS_LE} && ${MIPS_64} == "64"
 
 .PATH.S: ${.PARSEDIR}
 
@@ -7,6 +8,5 @@ POLY1305_SRCS = poly1305-mips64.S
 POLY1305_CPPFLAGS+=-DPOLY1305_ASM
 
 .endif
-.endif
 
 .include "../../poly1305.inc"

Added files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc
diff -u /dev/null src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc:1.1
--- /dev/null	Mon Apr 26 14:06:09 2021
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.inc	Mon Apr 26 14:06:09 2021
@@ -0,0 +1,17 @@
+# $NetBSD: mips.inc,v 1.1 2021/04/26 18:06:09 christos Exp $
+
+.ifndef MIPS_LE
+
+.	if 

CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc

2021-04-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Apr 11 16:21:05 UTC 2021

Added Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc: modes.inc

Log Message:
Restore r1.3 of modes.inc: we are using this directory for the
-m32 compat builds on sparc64, where the sparcv9 instructions
and the GHASH asm code are usefull.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.6 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/modes.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/modes.inc
diff -u /dev/null src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/modes.inc:1.6
--- /dev/null	Sun Apr 11 16:21:05 2021
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/modes.inc	Sun Apr 11 16:21:04 2021
@@ -0,0 +1,7 @@
+.if ${MACHINE} == "sparc64"
+.PATH.S: ${.PARSEDIR}
+MODES_SRCS = ghash-sparcv9.S
+MODESCPPFLAGS = -DGHASH_ASM
+AFLAGS.ghash-sparcv9.S+= -Wa,-Av9
+.endif
+.include "../../modes.inc"



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc

2021-04-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Apr  8 15:06:50 UTC 2021

Removed Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc: modes.inc

Log Message:
Do not pretend we have GHASH asm code


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r0 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/modes.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/modes

2021-04-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr  8 12:31:49 UTC 2021

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/modes: gcm128.c

Log Message:
Disable again the assembly version of gcm_ghash_4bit for the 32 bit sparc
since it uses ldx/stx.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 \
src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c:1.11 src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c:1.12
--- src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c:1.11	Thu Mar 25 14:51:19 2021
+++ src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c	Thu Apr  8 08:31:49 2021
@@ -689,13 +689,15 @@ void gcm_ghash_v8(u64 Xi[2], const u128 
 #  endif
 # elif defined(__sparc__) || defined(__sparc)
 #  include "sparc_arch.h"
-#  define GHASH_ASM_SPARC
-#  define GCM_FUNCREF_4BIT
+#  if defined(__arch64__)
+#   define GHASH_ASM_SPARC
+#   define GCM_FUNCREF_4BIT
 extern unsigned int OPENSSL_sparcv9cap_P[];
 void gcm_init_vis3(u128 Htable[16], const u64 Xi[2]);
 void gcm_gmult_vis3(u64 Xi[2], const u128 Htable[16]);
 void gcm_ghash_vis3(u64 Xi[2], const u128 Htable[16], const u8 *inp,
 size_t len);
+#  endif /* __arch64__ */
 # elif defined(OPENSSL_CPUID_OBJ) && (defined(__powerpc__) || defined(__ppc__) || defined(_ARCH_PPC))
 #  include "ppc_arch.h"
 #  define GHASH_ASM_PPC



CVS commit: src/crypto/external/bsd/openssl/dist

2021-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 25 18:51:19 UTC 2021

Modified Files:
src/crypto/external/bsd/openssl/dist: CHANGES NEWS README
src/crypto/external/bsd/openssl/dist/apps: s_time.c
src/crypto/external/bsd/openssl/dist/crypto/engine: eng_devcrypto.c
src/crypto/external/bsd/openssl/dist/crypto/evp: evp_enc.c
src/crypto/external/bsd/openssl/dist/crypto/modes: gcm128.c
src/crypto/external/bsd/openssl/dist/crypto/x509: x509_vfy.c
src/crypto/external/bsd/openssl/dist/ssl: s3_lib.c ssl_lib.c
src/crypto/external/bsd/openssl/dist/test: rsa_test.c

Log Message:
merge our changes between 1.1.1j and 1.1.1k


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/crypto/external/bsd/openssl/dist/CHANGES \
src/crypto/external/bsd/openssl/dist/NEWS \
src/crypto/external/bsd/openssl/dist/README
cvs rdiff -u -r1.11 -r1.12 src/crypto/external/bsd/openssl/dist/apps/s_time.c
cvs rdiff -u -r1.8 -r1.9 \
src/crypto/external/bsd/openssl/dist/crypto/engine/eng_devcrypto.c
cvs rdiff -u -r1.12 -r1.13 \
src/crypto/external/bsd/openssl/dist/crypto/evp/evp_enc.c
cvs rdiff -u -r1.10 -r1.11 \
src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c
cvs rdiff -u -r1.22 -r1.23 \
src/crypto/external/bsd/openssl/dist/crypto/x509/x509_vfy.c
cvs rdiff -u -r1.27 -r1.28 src/crypto/external/bsd/openssl/dist/ssl/s3_lib.c
cvs rdiff -u -r1.19 -r1.20 src/crypto/external/bsd/openssl/dist/ssl/ssl_lib.c
cvs rdiff -u -r1.7 -r1.8 src/crypto/external/bsd/openssl/dist/test/rsa_test.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/CHANGES
diff -u src/crypto/external/bsd/openssl/dist/CHANGES:1.26 src/crypto/external/bsd/openssl/dist/CHANGES:1.27
--- src/crypto/external/bsd/openssl/dist/CHANGES:1.26	Fri Feb 19 22:22:13 2021
+++ src/crypto/external/bsd/openssl/dist/CHANGES	Thu Mar 25 14:51:18 2021
@@ -7,6 +7,50 @@
  https://github.com/openssl/openssl/commits/ and pick the appropriate
  release branch.
 
+ Changes between 1.1.1j and 1.1.1k [25 Mar 2021]
+
+  *) Fixed a problem with verifying a certificate chain when using the
+ X509_V_FLAG_X509_STRICT flag. This flag enables additional security checks
+ of the certificates present in a certificate chain. It is not set by
+ default.
+
+ Starting from OpenSSL version 1.1.1h a check to disallow certificates in
+ the chain that have explicitly encoded elliptic curve parameters was added
+ as an additional strict check.
+
+ An error in the implementation of this check meant that the result of a
+ previous check to confirm that certificates in the chain are valid CA
+ certificates was overwritten. This effectively bypasses the check
+ that non-CA certificates must not be able to issue other certificates.
+
+ If a "purpose" has been configured then there is a subsequent opportunity
+ for checks that the certificate is a valid CA.  All of the named "purpose"
+ values implemented in libcrypto perform this check.  Therefore, where
+ a purpose is set the certificate chain will still be rejected even when the
+ strict flag has been used. A purpose is set by default in libssl client and
+ server certificate verification routines, but it can be overridden or
+ removed by an application.
+
+ In order to be affected, an application must explicitly set the
+ X509_V_FLAG_X509_STRICT verification flag and either not set a purpose
+ for the certificate verification or, in the case of TLS client or server
+ applications, override the default purpose.
+ (CVE-2021-3450)
+ [Tomáš Mráz]
+
+  *) Fixed an issue where an OpenSSL TLS server may crash if sent a maliciously
+ crafted renegotiation ClientHello message from a client. If a TLSv1.2
+ renegotiation ClientHello omits the signature_algorithms extension (where
+ it was present in the initial ClientHello), but includes a
+ signature_algorithms_cert extension then a NULL pointer dereference will
+ result, leading to a crash and a denial of service attack.
+
+ A server is only vulnerable if it has TLSv1.2 and renegotiation enabled
+ (which is the default configuration). OpenSSL TLS clients are not impacted
+ by this issue.
+ (CVE-2021-3449)
+ [Peter Kästle and Samuel Sapalski]
+
  Changes between 1.1.1i and 1.1.1j [16 Feb 2021]
 
   *) Fixed the X509_issuer_and_serial_hash() function. It attempts to
Index: src/crypto/external/bsd/openssl/dist/NEWS
diff -u src/crypto/external/bsd/openssl/dist/NEWS:1.26 src/crypto/external/bsd/openssl/dist/NEWS:1.27
--- src/crypto/external/bsd/openssl/dist/NEWS:1.26	Fri Feb 19 22:22:13 2021
+++ src/crypto/external/bsd/openssl/dist/NEWS	Thu Mar 25 14:51:18 2021
@@ -5,6 +5,14 @@
   This file gives a brief overview of the major changes between each OpenSSL
   release. 

CVS commit: src/crypto/external/bsd/openssl/dist

2021-02-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb 20 03:22:14 UTC 2021

Modified Files:
src/crypto/external/bsd/openssl/dist: CHANGES Configure NEWS README
src/crypto/external/bsd/openssl/dist/apps: ca.c
src/crypto/external/bsd/openssl/dist/crypto: armcap.c ppccap.c
src/crypto/external/bsd/openssl/dist/crypto/conf: conf_def.c
src/crypto/external/bsd/openssl/dist/crypto/evp: evp_enc.c
src/crypto/external/bsd/openssl/dist/crypto/x509: x509_vfy.c
src/crypto/external/bsd/openssl/dist/ssl: d1_lib.c
src/crypto/external/bsd/openssl/dist/test: rsa_test.c

Log Message:
merge conflicts


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/crypto/external/bsd/openssl/dist/CHANGES \
src/crypto/external/bsd/openssl/dist/NEWS \
src/crypto/external/bsd/openssl/dist/README
cvs rdiff -u -r1.27 -r1.28 src/crypto/external/bsd/openssl/dist/Configure
cvs rdiff -u -r1.20 -r1.21 src/crypto/external/bsd/openssl/dist/apps/ca.c
cvs rdiff -u -r1.12 -r1.13 \
src/crypto/external/bsd/openssl/dist/crypto/armcap.c
cvs rdiff -u -r1.18 -r1.19 \
src/crypto/external/bsd/openssl/dist/crypto/ppccap.c
cvs rdiff -u -r1.12 -r1.13 \
src/crypto/external/bsd/openssl/dist/crypto/conf/conf_def.c
cvs rdiff -u -r1.11 -r1.12 \
src/crypto/external/bsd/openssl/dist/crypto/evp/evp_enc.c
cvs rdiff -u -r1.21 -r1.22 \
src/crypto/external/bsd/openssl/dist/crypto/x509/x509_vfy.c
cvs rdiff -u -r1.10 -r1.11 src/crypto/external/bsd/openssl/dist/ssl/d1_lib.c
cvs rdiff -u -r1.6 -r1.7 src/crypto/external/bsd/openssl/dist/test/rsa_test.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/CHANGES
diff -u src/crypto/external/bsd/openssl/dist/CHANGES:1.25 src/crypto/external/bsd/openssl/dist/CHANGES:1.26
--- src/crypto/external/bsd/openssl/dist/CHANGES:1.25	Wed Dec  9 19:33:08 2020
+++ src/crypto/external/bsd/openssl/dist/CHANGES	Fri Feb 19 22:22:13 2021
@@ -7,6 +7,43 @@
  https://github.com/openssl/openssl/commits/ and pick the appropriate
  release branch.
 
+ Changes between 1.1.1i and 1.1.1j [16 Feb 2021]
+
+  *) Fixed the X509_issuer_and_serial_hash() function. It attempts to
+ create a unique hash value based on the issuer and serial number data
+ contained within an X509 certificate. However it was failing to correctly
+ handle any errors that may occur while parsing the issuer field (which might
+ occur if the issuer field is maliciously constructed). This may subsequently
+ result in a NULL pointer deref and a crash leading to a potential denial of
+ service attack.
+ (CVE-2021-23841)
+ [Matt Caswell]
+
+  *) Fixed the RSA_padding_check_SSLv23() function and the RSA_SSLV23_PADDING
+ padding mode to correctly check for rollback attacks. This is considered a
+ bug in OpenSSL 1.1.1 because it does not support SSLv2. In 1.0.2 this is
+ CVE-2021-23839.
+ [Matt Caswell]
+
+  *) Fixed the EVP_CipherUpdate, EVP_EncryptUpdate and EVP_DecryptUpdate
+ functions. Previously they could overflow the output length argument in some
+ cases where the input length is close to the maximum permissable length for
+ an integer on the platform. In such cases the return value from the function
+ call would be 1 (indicating success), but the output length value would be
+ negative. This could cause applications to behave incorrectly or crash.
+ (CVE-2021-23840)
+ [Matt Caswell]
+
+  *) Fixed SRP_Calc_client_key so that it runs in constant time. The previous
+ implementation called BN_mod_exp without setting BN_FLG_CONSTTIME. This
+ could be exploited in a side channel attack to recover the password. Since
+ the attack is local host only this is outside of the current OpenSSL
+ threat model and therefore no CVE is assigned.
+
+ Thanks to Mohammed Sabt and Daniel De Almeida Braga for reporting this
+ issue.
+ [Matt Caswell]
+
  Changes between 1.1.1h and 1.1.1i [8 Dec 2020]
 
   *) Fixed NULL pointer deref in the GENERAL_NAME_cmp function
Index: src/crypto/external/bsd/openssl/dist/NEWS
diff -u src/crypto/external/bsd/openssl/dist/NEWS:1.25 src/crypto/external/bsd/openssl/dist/NEWS:1.26
--- src/crypto/external/bsd/openssl/dist/NEWS:1.25	Wed Dec  9 19:33:08 2020
+++ src/crypto/external/bsd/openssl/dist/NEWS	Fri Feb 19 22:22:13 2021
@@ -5,6 +5,16 @@
   This file gives a brief overview of the major changes between each OpenSSL
   release. For more details please read the CHANGES file.
 
+  Major changes between OpenSSL 1.1.1i and OpenSSL 1.1.1j [16 Feb 2021]
+
+  o Fixed a NULL pointer deref in the X509_issuer_and_serial_hash()
+function (CVE-2021-23841)
+  o Fixed the RSA_padding_check_SSLv23() function and the RSA_SSLV23_PADDING
+padding mode to correctly check for rollback attacks
+  o Fixed an overflow in the 

CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc

2021-02-05 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Feb  5 21:43:21 UTC 2021

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc: aes.inc

Log Message:
Allow v9 assembly for AES code for 32bit compat build with clang.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes.inc:1.5 src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes.inc:1.6
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes.inc:1.5	Tue Sep 15 09:22:32 2020
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes.inc	Fri Feb  5 21:43:20 2021
@@ -4,5 +4,6 @@ AES_SRCS = aes_core.c aes_cbc.c aes-spar
 AESCPPFLAGS = -DAES_ASM
 AFLAGS.aes-sparcv9.S+= -Wa,-Av9
 AFLAGS.aest4-sparcv9.S+= -Wa,-Av9
+AFLAGS.aesfx-sparcv9.S+= -Wa,-Av9
 .endif
 .include "../../aes.inc"



CVS commit: src/crypto/external/bsd/openssl

2020-12-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Dec 10 00:33:14 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist: CHANGES Configure NEWS README
e_os.h
src/crypto/external/bsd/openssl/dist/apps: ca.c s_client.c
src/crypto/external/bsd/openssl/dist/crypto/aes/asm:
aesni-sha1-x86_64.pl
src/crypto/external/bsd/openssl/dist/crypto/asn1: tasn_dec.c tasn_enc.c
src/crypto/external/bsd/openssl/dist/crypto/bn: bn_lib.c
src/crypto/external/bsd/openssl/dist/crypto/conf: conf_def.c
src/crypto/external/bsd/openssl/dist/crypto/ec: ec_ameth.c ec_asn1.c
ec_key.c ec_lib.c
src/crypto/external/bsd/openssl/dist/crypto/engine: eng_lib.c
src/crypto/external/bsd/openssl/dist/crypto/evp: e_aes.c
src/crypto/external/bsd/openssl/dist/crypto/modes: gcm128.c
src/crypto/external/bsd/openssl/dist/crypto/rand: rand_unix.c
randfile.c
src/crypto/external/bsd/openssl/dist/crypto/sha/asm: sha1-x86_64.pl
src/crypto/external/bsd/openssl/dist/crypto/ui: ui_openssl.c
src/crypto/external/bsd/openssl/dist/crypto/x509: x509_vfy.c
src/crypto/external/bsd/openssl/dist/include/openssl: bn.h
src/crypto/external/bsd/openssl/dist/ssl: s3_lib.c ssl_lib.c ssl_sess.c
t1_lib.c
src/crypto/external/bsd/openssl/dist/test: ectest.c rsa_test.c
src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64:
aesv8-armx.S chacha-armv8.S poly1305-armv8.S sha1-armv8.S
sha512-armv8.S
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm: aesv8-armx.S
chacha-armv8.S ecp_nistz256-armv4.S poly1305-armv8.S sha1-armv8.S
sha512-armv8.S
src/crypto/external/bsd/openssl/lib/libcrypto/man: ADMISSIONS.3
ASN1_INTEGER_get_int64.3 ASN1_ITEM_lookup.3 ASN1_OBJECT_new.3
ASN1_STRING_TABLE_add.3 ASN1_STRING_length.3 ASN1_STRING_new.3
ASN1_STRING_print_ex.3 ASN1_TIME_set.3 ASN1_TYPE_get.3
ASN1_generate_nconf.3 ASYNC_WAIT_CTX_new.3 ASYNC_start_job.3
BF_encrypt.3 BIO_ADDR.3 BIO_ADDRINFO.3 BIO_connect.3 BIO_ctrl.3
BIO_f_base64.3 BIO_f_buffer.3 BIO_f_cipher.3 BIO_f_md.3
BIO_f_null.3 BIO_f_ssl.3 BIO_find_type.3 BIO_get_data.3
BIO_get_ex_new_index.3 BIO_meth_new.3 BIO_new.3 BIO_new_CMS.3
BIO_parse_hostserv.3 BIO_printf.3 BIO_push.3 BIO_read.3
BIO_s_accept.3 BIO_s_bio.3 BIO_s_connect.3 BIO_s_fd.3 BIO_s_file.3
BIO_s_mem.3 BIO_s_null.3 BIO_s_socket.3 BIO_set_callback.3
BIO_should_retry.3 BN_BLINDING_new.3 BN_CTX_new.3 BN_CTX_start.3
BN_add.3 BN_add_word.3 BN_bn2bin.3 BN_cmp.3 BN_copy.3
BN_generate_prime.3 BN_mod_inverse.3 BN_mod_mul_montgomery.3
BN_mod_mul_reciprocal.3 BN_new.3 BN_num_bytes.3 BN_rand.3
BN_security_bits.3 BN_set_bit.3 BN_swap.3 BN_zero.3 BUF_MEM_new.3
CMS_add0_cert.3 CMS_add1_recipient_cert.3 CMS_add1_signer.3
CMS_compress.3 CMS_decrypt.3 CMS_encrypt.3 CMS_final.3
CMS_get0_RecipientInfos.3 CMS_get0_SignerInfos.3 CMS_get0_type.3
CMS_get1_ReceiptRequest.3 CMS_sign.3 CMS_sign_receipt.3
CMS_uncompress.3 CMS_verify.3 CMS_verify_receipt.3
CONF_modules_free.3 CONF_modules_load_file.3
CRYPTO_THREAD_run_once.3 CRYPTO_get_ex_new_index.3
CTLOG_STORE_get0_log_by_id.3 CTLOG_STORE_new.3 CTLOG_new.3
CT_POLICY_EVAL_CTX_new.3 DEFINE_STACK_OF.3 DES_random_key.3
DH_generate_key.3 DH_generate_parameters.3 DH_get0_pqg.3
DH_get_1024_160.3 DH_meth_new.3 DH_new.3 DH_new_by_nid.3
DH_set_method.3 DH_size.3 DSA_SIG_new.3 DSA_do_sign.3 DSA_dup_DH.3
DSA_generate_key.3 DSA_generate_parameters.3 DSA_get0_pqg.3
DSA_meth_new.3 DSA_new.3 DSA_set_method.3 DSA_sign.3 DSA_size.3
DTLS_get_data_mtu.3 DTLS_set_timer_cb.3 DTLSv1_listen.3
ECDSA_SIG_new.3 ECPKParameters_print.3 EC_GFp_simple_method.3
EC_GROUP_copy.3 EC_GROUP_new.3 EC_KEY_get_enc_flags.3 EC_KEY_new.3
EC_POINT_add.3 EC_POINT_new.3 ENGINE_add.3 ERR_GET_LIB.3
ERR_clear_error.3 ERR_error_string.3 ERR_get_error.3
ERR_load_crypto_strings.3 ERR_load_strings.3 ERR_print_errors.3
ERR_put_error.3 ERR_remove_state.3 ERR_set_mark.3 EVP_BytesToKey.3
EVP_CIPHER_CTX_get_cipher_data.3 EVP_CIPHER_meth_new.3
EVP_DigestInit.3 EVP_DigestSignInit.3 EVP_DigestVerifyInit.3
EVP_EncodeInit.3 EVP_EncryptInit.3 EVP_MD_meth_new.3 EVP_OpenInit.3
EVP_PKEY_ASN1_METHOD.3 EVP_PKEY_CTX_ctrl.3 EVP_PKEY_CTX_new.3
EVP_PKEY_CTX_set1_pbe_pass.3 EVP_PKEY_CTX_set_hkdf_md.3
EVP_PKEY_CTX_set_rsa_pss_keygen_md.3 EVP_PKEY_CTX_set_scrypt_N.3
EVP_PKEY_CTX_set_tls1_prf_md.3 

CVS commit: src/crypto/external/bsd/openssl/include/openssl

2020-10-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Oct 19 12:46:04 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/include/openssl: opensslconf.h

Log Message:
Define OPENSSL_NO_EC_NISTP_64_GCC_128 also for aarch64eb.

Fix ssh-keygen(1) on aarch64eb. Also, all tests in tests/crypto pass
with this change.

As martin pointed out when this macro was defined for sparc64,

http://cvsweb.netbsd.org/bsdweb.cgi/src/crypto/external/bsd/openssl/include/openssl/opensslconf.h#rev1.5

this code seems broken on LP64BE architectures.

At the moment, mips64eb is not affected since only N32 is supported as
userland. Also, we do not support powerpc64 (eb) yet. But we may need to
take care of them in future.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/crypto/external/bsd/openssl/include/openssl/opensslconf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/include/openssl/opensslconf.h
diff -u src/crypto/external/bsd/openssl/include/openssl/opensslconf.h:1.8 src/crypto/external/bsd/openssl/include/openssl/opensslconf.h:1.9
--- src/crypto/external/bsd/openssl/include/openssl/opensslconf.h:1.8	Thu Oct  8 16:00:09 2020
+++ src/crypto/external/bsd/openssl/include/openssl/opensslconf.h	Mon Oct 19 12:46:04 2020
@@ -50,7 +50,12 @@ extern "C" {
 #  define OPENSSL_NO_DEVCRYPTOENG
 # endif
 #endif
-#if !defined(_LP64) || defined(__alpha__) || defined(__sparc64__)
+/*
+ * XXX
+ * This seems broken on big-endian or strictly-aligned architectures.
+ */
+#if !defined(_LP64) || \
+defined(__AARCH64EB__) || defined(__alpha__) || defined(__sparc64__)
 # ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
 #  define OPENSSL_NO_EC_NISTP_64_GCC_128
 # endif



CVS commit: src/crypto/external/bsd/openssl/include/openssl

2020-10-08 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Oct  8 16:00:09 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/include/openssl: opensslconf.h

Log Message:
openssl: Define OPENSSL_NO_EC_NISTP_64_GCC_128 for Alpha too

The ecp_nistp521.c code depends on doing unaligned 64-bit accesses,
which the NetBSD/alpha kernel doesn't like to trap and emulate.

fixes PR lib/55701


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/crypto/external/bsd/openssl/include/openssl/opensslconf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/include/openssl/opensslconf.h
diff -u src/crypto/external/bsd/openssl/include/openssl/opensslconf.h:1.7 src/crypto/external/bsd/openssl/include/openssl/opensslconf.h:1.8
--- src/crypto/external/bsd/openssl/include/openssl/opensslconf.h:1.7	Sat Dec  8 17:07:27 2018
+++ src/crypto/external/bsd/openssl/include/openssl/opensslconf.h	Thu Oct  8 16:00:09 2020
@@ -50,7 +50,7 @@ extern "C" {
 #  define OPENSSL_NO_DEVCRYPTOENG
 # endif
 #endif
-#if !defined(_LP64) || defined(__sparc64__)
+#if !defined(_LP64) || defined(__alpha__) || defined(__sparc64__)
 # ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
 #  define OPENSSL_NO_EC_NISTP_64_GCC_128
 # endif



CVS commit: src/crypto/external/bsd/openssl

2020-10-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Oct  5 14:34:04 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/bn: bn_print.c
src/crypto/external/bsd/openssl/dist/include/openssl: bn.h
src/crypto/external/bsd/openssl/lib/libcrypto: crypto.map

Log Message:
revert previous octal conversion code (broken and not worth it).


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/dist/crypto/bn/bn_print.c
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/dist/include/openssl/bn.h
cvs rdiff -u -r1.10 -r1.11 \
src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/bn/bn_print.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/bn/bn_print.c:1.2 src/crypto/external/bsd/openssl/dist/crypto/bn/bn_print.c:1.3
--- src/crypto/external/bsd/openssl/dist/crypto/bn/bn_print.c:1.2	Sun Oct  4 15:32:48 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/bn/bn_print.c	Mon Oct  5 10:34:03 2020
@@ -266,87 +266,6 @@ int BN_dec2bn(BIGNUM **bn, const char *a
 return 0;
 }
 
-int BN_oct2bn(BIGNUM **bn, const char *a)
-{
-BIGNUM *ret = NULL;
-BN_ULONG l = 0;
-int neg = 0, h, m, i, j, b, k, c, r;
-int num;
-
-if (a == NULL || *a == '\0')
-return 0;
-
-if (*a == '-') {
-neg = 1;
-a++;
-}
-
-for (i = 0; i <= INT_MAX / 4 && ossl_isdigit(a[i]) && a[i] < '8'; i++)
-continue;
-
-if (i == 0 || i > INT_MAX / 4)
-goto err;
-
-num = i + neg;
-if (bn == NULL)
-return num;
-
-/* a is the start of the hex digits, and it is 'i' long */
-if (*bn == NULL) {
-if ((ret = BN_new()) == NULL)
-return 0;
-} else {
-ret = *bn;
-BN_zero(ret);
-}
-
-/* i is the number of hex digits */
-if (bn_expand(ret, i * 4) == NULL)
-goto err;
-
-j = i;  /* least significant 'oct' */
-h = 0;
-b = 0;
-#define M (BN_BYTES * 8 / 3)
-while (j > 0) {
-m = (M <= j) ? M : j;
-	while (m > 0) {
-	k = a[j - m] - '0';
-	l = (l << 3) | k;
-	b += 3;
-	m--;
-	}
-j -= M;
-	if (j <= 0) {
-	ret->d[h++] = l;
-	break;
-	}
-	b = BN_BYTES * 8 - b;
-	r = 3 - b;
-	k = a[j--] - '0';
-	l = (l << r) | (k >> b);
-	ret->d[h++] = l;
-	l = k & ((2 << r) - 1);
-	if (j == 0) {
-	ret->d[h++] = l;
-	break;
-	}
-}
-ret->top = h;
-bn_correct_top(ret);
-
-*bn = ret;
-bn_check_top(ret);
-/* Don't set the negative flag if it's zero. */
-if (ret->top != 0)
-ret->neg = neg;
-return num;
- err:
-if (*bn == NULL)
-BN_free(ret);
-return 0;
-}
-
 int BN_asc2bn(BIGNUM **bn, const char *a)
 {
 const char *p = a;
@@ -354,14 +273,9 @@ int BN_asc2bn(BIGNUM **bn, const char *a
 if (*p == '-')
 p++;
 
-if (p[0] == '0') {
-	if (p[1] == 'X' || p[1] == 'x') {
-	if (!BN_hex2bn(bn, p + 2))
-		return 0;
-	} else {
-	if (!BN_oct2bn(bn, p + 1))
-		return 0;
-	}
+if (p[0] == '0' && (p[1] == 'X' || p[1] == 'x')) {
+if (!BN_hex2bn(bn, p + 2))
+return 0;
 } else {
 if (!BN_dec2bn(bn, p))
 return 0;

Index: src/crypto/external/bsd/openssl/dist/include/openssl/bn.h
diff -u src/crypto/external/bsd/openssl/dist/include/openssl/bn.h:1.2 src/crypto/external/bsd/openssl/dist/include/openssl/bn.h:1.3
--- src/crypto/external/bsd/openssl/dist/include/openssl/bn.h:1.2	Sun Oct  4 15:32:48 2020
+++ src/crypto/external/bsd/openssl/dist/include/openssl/bn.h	Mon Oct  5 10:34:03 2020
@@ -310,7 +310,6 @@ char *BN_bn2hex(const BIGNUM *a);
 char *BN_bn2dec(const BIGNUM *a);
 int BN_hex2bn(BIGNUM **a, const char *str);
 int BN_dec2bn(BIGNUM **a, const char *str);
-int BN_oct2bn(BIGNUM **a, const char *str);
 int BN_asc2bn(BIGNUM **a, const char *str);
 int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
 int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* returns

Index: src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map:1.10 src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map:1.11
--- src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map:1.10	Mon Oct  5 07:29:36 2020
+++ src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map	Mon Oct  5 10:34:04 2020
@@ -552,7 +552,6 @@ OPENSSL_1_1_0 {
 BN_nnmod;
 BN_num_bits;
 BN_num_bits_word;
-BN_oct2bn;
 BN_options;
 BN_print;
 BN_print_fp;



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto

2020-10-05 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Oct  5 11:29:36 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto: crypto.map

Log Message:
Whitespace nit.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map:1.9 src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map:1.10
--- src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map:1.9	Sun Oct  4 19:32:48 2020
+++ src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map	Mon Oct  5 11:29:36 2020
@@ -552,7 +552,7 @@ OPENSSL_1_1_0 {
 BN_nnmod;
 BN_num_bits;
 BN_num_bits_word;
-	BN_oct2bn;
+BN_oct2bn;
 BN_options;
 BN_print;
 BN_print_fp;



CVS commit: src/crypto/external/bsd/openssl

2020-10-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Oct  4 19:32:48 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/bn: bn_print.c
src/crypto/external/bsd/openssl/dist/include/openssl: bn.h
src/crypto/external/bsd/openssl/lib/libcrypto: crypto.map

Log Message:
Add BN_oct2bn(3) for factor(6)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.10 -r1.2 \
src/crypto/external/bsd/openssl/dist/crypto/bn/bn_print.c
cvs rdiff -u -r1.1.1.3 -r1.2 \
src/crypto/external/bsd/openssl/dist/include/openssl/bn.h
cvs rdiff -u -r1.8 -r1.9 \
src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/bn/bn_print.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/bn/bn_print.c:1.1.1.10 src/crypto/external/bsd/openssl/dist/crypto/bn/bn_print.c:1.2
--- src/crypto/external/bsd/openssl/dist/crypto/bn/bn_print.c:1.1.1.10	Sat Mar 21 20:49:05 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/bn/bn_print.c	Sun Oct  4 15:32:48 2020
@@ -266,6 +266,87 @@ int BN_dec2bn(BIGNUM **bn, const char *a
 return 0;
 }
 
+int BN_oct2bn(BIGNUM **bn, const char *a)
+{
+BIGNUM *ret = NULL;
+BN_ULONG l = 0;
+int neg = 0, h, m, i, j, b, k, c, r;
+int num;
+
+if (a == NULL || *a == '\0')
+return 0;
+
+if (*a == '-') {
+neg = 1;
+a++;
+}
+
+for (i = 0; i <= INT_MAX / 4 && ossl_isdigit(a[i]) && a[i] < '8'; i++)
+continue;
+
+if (i == 0 || i > INT_MAX / 4)
+goto err;
+
+num = i + neg;
+if (bn == NULL)
+return num;
+
+/* a is the start of the hex digits, and it is 'i' long */
+if (*bn == NULL) {
+if ((ret = BN_new()) == NULL)
+return 0;
+} else {
+ret = *bn;
+BN_zero(ret);
+}
+
+/* i is the number of hex digits */
+if (bn_expand(ret, i * 4) == NULL)
+goto err;
+
+j = i;  /* least significant 'oct' */
+h = 0;
+b = 0;
+#define M (BN_BYTES * 8 / 3)
+while (j > 0) {
+m = (M <= j) ? M : j;
+	while (m > 0) {
+	k = a[j - m] - '0';
+	l = (l << 3) | k;
+	b += 3;
+	m--;
+	}
+j -= M;
+	if (j <= 0) {
+	ret->d[h++] = l;
+	break;
+	}
+	b = BN_BYTES * 8 - b;
+	r = 3 - b;
+	k = a[j--] - '0';
+	l = (l << r) | (k >> b);
+	ret->d[h++] = l;
+	l = k & ((2 << r) - 1);
+	if (j == 0) {
+	ret->d[h++] = l;
+	break;
+	}
+}
+ret->top = h;
+bn_correct_top(ret);
+
+*bn = ret;
+bn_check_top(ret);
+/* Don't set the negative flag if it's zero. */
+if (ret->top != 0)
+ret->neg = neg;
+return num;
+ err:
+if (*bn == NULL)
+BN_free(ret);
+return 0;
+}
+
 int BN_asc2bn(BIGNUM **bn, const char *a)
 {
 const char *p = a;
@@ -273,9 +354,14 @@ int BN_asc2bn(BIGNUM **bn, const char *a
 if (*p == '-')
 p++;
 
-if (p[0] == '0' && (p[1] == 'X' || p[1] == 'x')) {
-if (!BN_hex2bn(bn, p + 2))
-return 0;
+if (p[0] == '0') {
+	if (p[1] == 'X' || p[1] == 'x') {
+	if (!BN_hex2bn(bn, p + 2))
+		return 0;
+	} else {
+	if (!BN_oct2bn(bn, p + 1))
+		return 0;
+	}
 } else {
 if (!BN_dec2bn(bn, p))
 return 0;

Index: src/crypto/external/bsd/openssl/dist/include/openssl/bn.h
diff -u src/crypto/external/bsd/openssl/dist/include/openssl/bn.h:1.1.1.3 src/crypto/external/bsd/openssl/dist/include/openssl/bn.h:1.2
--- src/crypto/external/bsd/openssl/dist/include/openssl/bn.h:1.1.1.3	Sun Sep 23 09:17:50 2018
+++ src/crypto/external/bsd/openssl/dist/include/openssl/bn.h	Sun Oct  4 15:32:48 2020
@@ -310,6 +310,7 @@ char *BN_bn2hex(const BIGNUM *a);
 char *BN_bn2dec(const BIGNUM *a);
 int BN_hex2bn(BIGNUM **a, const char *str);
 int BN_dec2bn(BIGNUM **a, const char *str);
+int BN_oct2bn(BIGNUM **a, const char *str);
 int BN_asc2bn(BIGNUM **a, const char *str);
 int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
 int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* returns

Index: src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map:1.8 src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map:1.9
--- src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map:1.8	Sat Mar 21 20:53:11 2020
+++ src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map	Sun Oct  4 15:32:48 2020
@@ -552,6 +552,7 @@ OPENSSL_1_1_0 {
 BN_nnmod;
 BN_num_bits;
 BN_num_bits_word;
+	BN_oct2bn;
 BN_options;
 BN_print;
 BN_print_fp;



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc

2020-09-15 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep 15 09:22:32 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc: aes.inc

Log Message:
build the 32 bit aesfx-sparcv9.S for sparc64 32 bit comapt libs.
now libcrypto works -m32.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes.inc:1.4 src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes.inc:1.5
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes.inc:1.4	Thu Nov  3 22:18:29 2016
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes.inc	Tue Sep 15 09:22:32 2020
@@ -1,6 +1,6 @@
 .if ${MACHINE} == "sparc64"
 .PATH.S: ${.PARSEDIR}
-AES_SRCS = aes_core.c aes_cbc.c aes-sparcv9.S aest4-sparcv9.S
+AES_SRCS = aes_core.c aes_cbc.c aes-sparcv9.S aest4-sparcv9.S aesfx-sparcv9.S
 AESCPPFLAGS = -DAES_ASM
 AFLAGS.aes-sparcv9.S+= -Wa,-Av9
 AFLAGS.aest4-sparcv9.S+= -Wa,-Av9



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/engine

2020-09-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Sep 12 09:37:01 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/engine: eng_devcrypto.c

Log Message:
Restore a local change for PR/54740 lost during openssl 1.1.1e merge.

syslogd(8) complains "Could not open /dev/crypto: Device not configured"
again when pseudo-device crypto(4) is not configured in a kernel.
 
http://cvsweb.netbsd.org/bsdweb.cgi/src/crypto/external/bsd/openssl/dist/crypto/engine/eng_devcrypto.c#rev1.5
 
http://cvsweb.netbsd.org/bsdweb.cgi/src/crypto/external/bsd/openssl/dist/crypto/engine/eng_devcrypto.c#rev1.7

Should be pullued up to netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/crypto/external/bsd/openssl/dist/crypto/engine/eng_devcrypto.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/engine/eng_devcrypto.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/engine/eng_devcrypto.c:1.7 src/crypto/external/bsd/openssl/dist/crypto/engine/eng_devcrypto.c:1.8
--- src/crypto/external/bsd/openssl/dist/crypto/engine/eng_devcrypto.c:1.7	Sun Mar 22 00:53:05 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/engine/eng_devcrypto.c	Sat Sep 12 09:37:01 2020
@@ -761,7 +761,7 @@ void engine_load_devcrypto_int()
 
 if ((cfd = open("/dev/crypto", O_RDWR, 0)) < 0) {
 #ifndef ENGINE_DEVCRYPTO_DEBUG
-if (errno != ENOENT)
+if (errno != ENOENT && errno != ENXIO)
 #endif
 fprintf(stderr, "Could not open /dev/crypto: %s\n", strerror(errno));
 return;



CVS commit: src/crypto/external/bsd/openssl/dist/crypto

2020-07-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jul 19 15:33:08 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto: ppccap.c

Log Message:
Expand on importance of not using fpu for crypto if there's no fpu.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 \
src/crypto/external/bsd/openssl/dist/crypto/ppccap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/ppccap.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.17 src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.18
--- src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.17	Wed Jul 15 08:14:41 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/ppccap.c	Sun Jul 19 15:33:08 2020
@@ -374,8 +374,11 @@ void OPENSSL_cpuid_setup(void)
 size_t len = sizeof(val);
 
 /*
- * If machdep.fpu_present == 0, FPU is absent and emulated by software.
- * Avoid using it for better performance.
+ * If machdep.fpu_present == 0, FPU is absent and emulated by
+ * software.  In that case, using FPU instructions hurts rather
+ * than helps performance, and the software is unlikely to run in
+ * constant time so it would expose us to timing side channel
+ * attacks.  So don't do it!
  */
 error = sysctlbyname("machdep.fpu_present", , , NULL, 0);
 if (error != 0 || (error == 0 && val != 0))



CVS commit: src/crypto/external/bsd/openssl/dist/crypto

2020-07-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 15 08:14:41 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto: ppccap.c

Log Message:
PR port-powerpc/55425

Update comment; FPU emulation seems to work just fine now. However,
FPU-optimized code should still be avoided for better performance,
if FPU is not present.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 \
src/crypto/external/bsd/openssl/dist/crypto/ppccap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/ppccap.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.16 src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.17
--- src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.16	Tue Jul  7 01:47:47 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/ppccap.c	Wed Jul 15 08:14:41 2020
@@ -375,8 +375,7 @@ void OPENSSL_cpuid_setup(void)
 
 /*
  * If machdep.fpu_present == 0, FPU is absent and emulated by software.
- * Avoid using it as calculation results may not be correct in bit-to-bit
- * precision.
+ * Avoid using it for better performance.
  */
 error = sysctlbyname("machdep.fpu_present", , , NULL, 0);
 if (error != 0 || (error == 0 && val != 0))



CVS commit: src/crypto/external/bsd/openssl/dist/crypto

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul  7 01:47:47 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto: ppccap.c

Log Message:
Part of PR port-powerpc/55425
openssl fails on FPU emulation for powerpc

When machdep.fpu_present sysctl variable can be retrieved, and
its value is zero, avoid using FPU arithmetic.

FPU is absent and emulated by kernel in that case, and calculation
results are not correct in bit-to-bit precision.

This behavior should be useful even if we could fix FPU emulation;
it is much faster to skip FPU arithmetic in general, rather than
relying upon emulation by kernel via illegal instruction handler.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 \
src/crypto/external/bsd/openssl/dist/crypto/ppccap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/ppccap.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.15 src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.16
--- src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.15	Mon Jun 22 16:25:08 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/ppccap.c	Tue Jul  7 01:47:47 2020
@@ -26,6 +26,10 @@
 # include 
 # include 
 #endif
+#if defined(__NetBSD__)
+# include 
+# include 
+#endif
 #include 
 #include 
 #include 
@@ -365,6 +369,18 @@ void OPENSSL_cpuid_setup(void)
 sigaction(SIGILL, _act, _oact);
 
 #ifndef OSSL_IMPLEMENT_GETAUXVAL
+# ifdef __NetBSD__
+int error, val;
+size_t len = sizeof(val);
+
+/*
+ * If machdep.fpu_present == 0, FPU is absent and emulated by software.
+ * Avoid using it as calculation results may not be correct in bit-to-bit
+ * precision.
+ */
+error = sysctlbyname("machdep.fpu_present", , , NULL, 0);
+if (error != 0 || (error == 0 && val != 0))
+# endif
 if (sigsetjmp(ill_jmp,1) == 0) {
 OPENSSL_fpu_probe();
 OPENSSL_ppccap_P |= PPC_FPU;



CVS commit: src/crypto/external/bsd/openssl/dist/crypto

2020-06-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jun 22 22:43:56 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto: armcap.c

Log Message:
remove unneeded ifdefs


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 \
src/crypto/external/bsd/openssl/dist/crypto/armcap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/armcap.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/armcap.c:1.11 src/crypto/external/bsd/openssl/dist/crypto/armcap.c:1.12
--- src/crypto/external/bsd/openssl/dist/crypto/armcap.c:1.11	Sat Mar 21 20:53:02 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/armcap.c	Mon Jun 22 18:43:56 2020
@@ -41,7 +41,6 @@ static void ill_handler(int sig)
  * Following subroutines could have been inlined, but it's not all
  * ARM compilers support inline assembler...
  */
-#if __ARM_MAX_ARCH__>=7
 void _armv7_neon_probe(void);
 void _armv8_aes_probe(void);
 void _armv8_sha1_probe(void);
@@ -54,11 +53,9 @@ uint32_t _armv7_tick(void);
 
 uint32_t OPENSSL_rdtsc(void)
 {
-#if __ARM_MAX_ARCH__>=7
 if (OPENSSL_armcap_P & ARMV7_TICK)
 return _armv7_tick();
 else
-#endif
 return 0;
 }
 
@@ -210,7 +207,6 @@ void OPENSSL_cpuid_setup(void)
 _armv7_tick();
 OPENSSL_armcap_P |= ARMV7_TICK;
 }
-#endif
 
 sigaction(SIGILL, _oact, NULL);
 sigprocmask(SIG_SETMASK, , NULL);



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm

2020-06-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jun 22 19:56:36 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm: modes.inc

Log Message:
Always compile in v8 support.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/modes.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/modes.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/modes.inc:1.4 src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/modes.inc:1.5
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/modes.inc:1.4	Wed Mar  7 15:38:39 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/modes.inc	Mon Jun 22 15:56:36 2020
@@ -3,9 +3,8 @@
 .PATH.S: ${.PARSEDIR}
 MODES_SRCS += ghash-armv4.S
 
-.if ${ARM_MAX_ARCH} >= 8
 MODES_SRCS += ghashv8-armx.S
-.endif
+AFLAGS.ghashv8-armx.S = -Wa,-march=armv8.4-a
 
 MODESCPPFLAGS = -DGHASH_ASM
 .include "../../modes.inc"



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/modes

2020-06-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jun 22 19:55:43 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/modes: gcm128.c

Log Message:
reduce diff with upstream. we always compile with v8 assembly and
detect at runtime.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c:1.8 src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c:1.9
--- src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c:1.8	Sun Jun 21 18:17:35 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c	Mon Jun 22 15:55:43 2020
@@ -668,6 +668,7 @@ void gcm_ghash_4bit_x86(u64 Xi[2], const
 #  if __ARM_MAX_ARCH__>=7
 #   define GHASH_ASM_ARM
 #   define GCM_FUNCREF_4BIT
+#   define PMULL_CAPABLE(OPENSSL_armcap_P & ARMV8_PMULL)
 #   if defined(__arm__) || defined(__arm)
 #define NEON_CAPABLE(OPENSSL_armcap_P & ARMV7_NEON)
 #   endif
@@ -675,18 +676,15 @@ void gcm_init_neon(u128 Htable[16], cons
 void gcm_gmult_neon(u64 Xi[2], const u128 Htable[16]);
 void gcm_ghash_neon(u64 Xi[2], const u128 Htable[16], const u8 *inp,
 size_t len);
-#   if __ARM_MAX_ARCH__>=8
-#define PMULL_CAPABLE(OPENSSL_armcap_P & ARMV8_PMULL)
 void gcm_init_v8(u128 Htable[16], const u64 Xi[2]);
 void gcm_gmult_v8(u64 Xi[2], const u128 Htable[16]);
 void gcm_ghash_v8(u64 Xi[2], const u128 Htable[16], const u8 *inp,
   size_t len);
-#   endif
 #  endif
 # elif defined(__sparc__) || defined(__sparc)
 #  include "sparc_arch.h"
-#   define GHASH_ASM_SPARC
-#   define GCM_FUNCREF_4BIT
+#  define GHASH_ASM_SPARC
+#  define GCM_FUNCREF_4BIT
 extern unsigned int OPENSSL_sparcv9cap_P[];
 void gcm_init_vis3(u128 Htable[16], const u64 Xi[2]);
 void gcm_gmult_vis3(u64 Xi[2], const u128 Htable[16]);



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch

2020-06-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jun 22 16:34:57 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc: sha.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64: sha.inc

Log Message:
use the C version of keccak


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha.inc
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/sha.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha.inc:1.4 src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha.inc:1.5
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha.inc:1.4	Mon Jun 22 12:26:29 2020
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha.inc	Mon Jun 22 12:34:57 2020
@@ -1,7 +1,6 @@
 .PATH.S: ${.PARSEDIR}
 SHA_SRCS = sha1-ppc.S
 SHACPPFLAGS = -DSHA1_ASM
-KECCAKNI = yes
 .if NOT_USING_SHAXXX_FROM_LIBC
 SHA_SRCS += sha512-ppc.S sha512p8-ppc.S
 SHA_SRCS += sha256-ppc.S sha256p8-ppc.S

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/sha.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/sha.inc:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/sha.inc:1.3
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/sha.inc:1.2	Wed Apr 15 17:29:28 2020
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/sha.inc	Mon Jun 22 12:34:57 2020
@@ -1,7 +1,6 @@
 .PATH.S: ${.PARSEDIR}
-SHA_SRCS = sha1-ppc.S keccak1600-ppc64.S keccak1600.c
-SHACPPFLAGS = -DSHA1_ASM -DKECCAK1600_ASM
-KECCAKNI = yes
+SHA_SRCS = sha1-ppc.S
+SHACPPFLAGS = -DSHA1_ASM
 .if NOT_USING_SHAXXX_FROM_LIBC
 SHA_SRCS += sha512-ppc.S sha512p8-ppc.S
 SHA_SRCS += sha256-ppc.S sha256p8-ppc.S



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64

2020-06-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jun 22 16:26:52 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64:
keccak1600-ppc64.S keccak1600p8-ppc.S

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \

src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/keccak1600-ppc64.S 
\

src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/keccak1600p8-ppc.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/keccak1600-ppc64.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/keccak1600-ppc64.S:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/keccak1600-ppc64.S:1.3
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/keccak1600-ppc64.S:1.2	Sat Apr 11 18:41:06 2020
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/keccak1600-ppc64.S	Mon Jun 22 12:26:52 2020
@@ -317,16 +317,16 @@ dword_le_load:
 .long	0
 
 
-.globl	SHA3_absorb_vsx
-.type	SHA3_absorb_vsx,@function
+.globl	SHA3_absorb
+.type	SHA3_absorb,@function
 .section	".opd","aw"
 .align	3
-SHA3_absorb_vsx:
-.quad	.SHA3_absorb_vsx,.TOC.@tocbase,0
+SHA3_absorb:
+.quad	.SHA3_absorb,.TOC.@tocbase,0
 .previous
 
 .align	5
-.SHA3_absorb_vsx:
+.SHA3_absorb:
 	stdu	1,-272(1)
 	mflr	0
 	std	14,128(1)
@@ -546,16 +546,16 @@ SHA3_absorb_vsx:
 .byte	0,12,4,1,0x80,18,4,0
 .long	0
 
-.globl	SHA3_squeeze_vsx
-.type	SHA3_squeeze_vsx,@function
+.globl	SHA3_squeeze
+.type	SHA3_squeeze,@function
 .section	".opd","aw"
 .align	3
-SHA3_squeeze_vsx:
-.quad	.SHA3_squeeze_vsx,.TOC.@tocbase,0
+SHA3_squeeze:
+.quad	.SHA3_squeeze,.TOC.@tocbase,0
 .previous
 
 .align	5
-.SHA3_squeeze_vsx:
+.SHA3_squeeze:
 	stdu	1,-80(1)
 	mflr	0
 	std	28,48(1)
Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/keccak1600p8-ppc.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/keccak1600p8-ppc.S:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/keccak1600p8-ppc.S:1.3
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/keccak1600p8-ppc.S:1.2	Sat Apr 11 18:41:06 2020
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/keccak1600p8-ppc.S	Mon Jun 22 12:26:52 2020
@@ -288,16 +288,16 @@ KeccakF1600:
 .byte	0,12,0x04,1,0x80,0,1,0
 .long	0
 
-.globl	SHA3_absorb_vsx
-.type	SHA3_absorb_vsx,@function
+.globl	SHA3_absorb
+.type	SHA3_absorb,@function
 .section	".opd","aw"
 .align	3
-SHA3_absorb_vsx:
-.quad	.SHA3_absorb_vsx,.TOC.@tocbase,0
+SHA3_absorb:
+.quad	.SHA3_absorb,.TOC.@tocbase,0
 .previous
 
 .align	5
-.SHA3_absorb_vsx:
+.SHA3_absorb:
 	stdu	1,-256(1)
 	li	10,63
 	li	11,79
@@ -595,16 +595,16 @@ SHA3_absorb_vsx:
 .byte	0,12,0x04,1,0x80,0,4,0
 .long	0
 
-.globl	SHA3_squeeze_vsx
-.type	SHA3_squeeze_vsx,@function
+.globl	SHA3_squeeze
+.type	SHA3_squeeze,@function
 .section	".opd","aw"
 .align	3
-SHA3_squeeze_vsx:
-.quad	.SHA3_squeeze_vsx,.TOC.@tocbase,0
+SHA3_squeeze:
+.quad	.SHA3_squeeze,.TOC.@tocbase,0
 .previous
 
 .align	5
-.SHA3_squeeze_vsx:
+.SHA3_squeeze:
 	mflr	9
 	subi	4,4,1
 	addi	8,3,4



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc

2020-06-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jun 22 16:26:29 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc:
keccak1600p8-ppc.S sha.inc

Log Message:
Regen and disable keccak asm


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \

src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/keccak1600p8-ppc.S
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/keccak1600p8-ppc.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/keccak1600p8-ppc.S:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/keccak1600p8-ppc.S:1.3
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/keccak1600p8-ppc.S:1.2	Sat Apr 11 18:41:06 2020
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/keccak1600p8-ppc.S	Mon Jun 22 12:26:29 2020
@@ -288,11 +288,11 @@ KeccakF1600:
 .byte	0,12,0x04,1,0x80,0,1,0
 .long	0
 
-.globl	SHA3_absorb_vsx
-.type	SHA3_absorb_vsx,@function
+.globl	SHA3_absorb
+.type	SHA3_absorb,@function
 
 .align	5
-SHA3_absorb_vsx:
+SHA3_absorb:
 	stwu	1,-232(1)
 	li	10,39
 	li	11,55
@@ -590,11 +590,11 @@ SHA3_absorb_vsx:
 .byte	0,12,0x04,1,0x80,0,4,0
 .long	0
 
-.globl	SHA3_squeeze_vsx
-.type	SHA3_squeeze_vsx,@function
+.globl	SHA3_squeeze
+.type	SHA3_squeeze,@function
 
 .align	5
-SHA3_squeeze_vsx:
+SHA3_squeeze:
 	mflr	9
 	subi	4,4,1
 	addi	8,3,4

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha.inc:1.3 src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha.inc:1.4
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha.inc:1.3	Sat Apr 11 18:41:06 2020
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha.inc	Mon Jun 22 12:26:29 2020
@@ -1,6 +1,6 @@
 .PATH.S: ${.PARSEDIR}
-SHA_SRCS = sha1-ppc.S keccak1600p8-ppc.S keccak1600.c
-SHACPPFLAGS = -DSHA1_ASM -DKECCAK1600_ASM
+SHA_SRCS = sha1-ppc.S
+SHACPPFLAGS = -DSHA1_ASM
 KECCAKNI = yes
 .if NOT_USING_SHAXXX_FROM_LIBC
 SHA_SRCS += sha512-ppc.S sha512p8-ppc.S



CVS commit: src/crypto/external/bsd/openssl/dist/crypto

2020-06-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jun 22 16:25:08 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto: ppccap.c
src/crypto/external/bsd/openssl/dist/crypto/sha: keccak1600.c
src/crypto/external/bsd/openssl/dist/crypto/sha/asm:
keccak1600-ppc64.pl keccak1600p8-ppc.pl

Log Message:
Revert the conditional use of vsx on keccak. Upstream wants to disable it
instead (dot-asm:
So that both assembly modules export SHA3_absorb_vsx... Either way,
it makes lesser sense to deploy vector keccak1600p8-ppc.pl, because
benefits are not that clear. It's only nominally faster than scalar
module on POWER8 but significantly slower on POWER9. Because POWER9
is better equipped to handle non-vector code. On related note,
there is version optimized for little-endian, as well as 32-bit
version. [And since MIPS was mentioned, there is even MIPS module...]


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 \
src/crypto/external/bsd/openssl/dist/crypto/ppccap.c
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/dist/crypto/sha/keccak1600.c
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/dist/crypto/sha/asm/keccak1600-ppc64.pl \
src/crypto/external/bsd/openssl/dist/crypto/sha/asm/keccak1600p8-ppc.pl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/ppccap.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.14 src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.15
--- src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.14	Tue Jun 16 23:22:06 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/ppccap.c	Mon Jun 22 12:25:08 2020
@@ -160,37 +160,6 @@ void ecp_nistz256_from_mont(unsigned lon
 }
 #endif
 
-size_t SHA3_absorb(uint64_t A[5][5], const unsigned char *inp, size_t len,
-size_t r);
-void SHA3_squeeze(uint64_t A[5][5], unsigned char *out, size_t len, size_t r);
-
-size_t SHA3_absorb_default(uint64_t A[5][5], const unsigned char *inp,
-size_t len, size_t r);
-void SHA3_squeeze_default(uint64_t A[5][5], unsigned char *out, size_t len,
-size_t r);
-
-size_t SHA3_absorb_vsx(uint64_t A[5][5], const unsigned char *inp,
-size_t len, size_t r);
-void SHA3_squeeze_vsx(uint64_t A[5][5], unsigned char *out, size_t len,
-size_t r);
-
-size_t SHA3_absorb(uint64_t A[5][5], const unsigned char *inp, size_t len,
-size_t r)
-{
-return OPENSSL_ppccap_P & PPC_CRYPTO207
-? SHA3_absorb_vsx(A, inp, len, r)
-: SHA3_absorb_default(A, inp, len, r);
-}
-
-void SHA3_squeeze(uint64_t A[5][5], unsigned char *out, size_t len, size_t r)
-{
-OPENSSL_ppccap_P & PPC_CRYPTO207
-? SHA3_squeeze_vsx(A, out, len, r)
-: SHA3_squeeze_default(A, out, len, r);
-}
-
-
-
 static sigjmp_buf ill_jmp;
 static void ill_handler(int sig)
 {

Index: src/crypto/external/bsd/openssl/dist/crypto/sha/keccak1600.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/sha/keccak1600.c:1.2 src/crypto/external/bsd/openssl/dist/crypto/sha/keccak1600.c:1.3
--- src/crypto/external/bsd/openssl/dist/crypto/sha/keccak1600.c:1.2	Sat Apr 11 18:41:06 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/sha/keccak1600.c	Mon Jun 22 12:25:08 2020
@@ -11,12 +11,6 @@
 #include 
 #include 
 
-#ifdef __powerpc__
-#define SHA3_absorb SHA3_absorb_default
-#define SHA3_squeeze SHA3_squeeze_default
-#undef KECCAK1600_ASM
-#endif
-
 size_t SHA3_absorb(uint64_t A[5][5], const unsigned char *inp, size_t len,
size_t r);
 void SHA3_squeeze(uint64_t A[5][5], unsigned char *out, size_t len, size_t r);

Index: src/crypto/external/bsd/openssl/dist/crypto/sha/asm/keccak1600-ppc64.pl
diff -u src/crypto/external/bsd/openssl/dist/crypto/sha/asm/keccak1600-ppc64.pl:1.2 src/crypto/external/bsd/openssl/dist/crypto/sha/asm/keccak1600-ppc64.pl:1.3
--- src/crypto/external/bsd/openssl/dist/crypto/sha/asm/keccak1600-ppc64.pl:1.2	Sat Apr 11 18:41:06 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/sha/asm/keccak1600-ppc64.pl	Mon Jun 22 12:25:08 2020
@@ -405,10 +405,10 @@ dword_le_load:
 	.long	0
 .size	dword_le_load,.-dword_le_load
 
-.globl	SHA3_absorb_vsx
-.type	SHA3_absorb_vsx,\@function
+.globl	SHA3_absorb
+.type	SHA3_absorb,\@function
 .align	5
-SHA3_absorb_vsx:
+SHA3_absorb:
 	$STU	$sp,-$FRAME($sp)
 	mflr	r0
 	$PUSH	r14,`$FRAME-$SIZE_T*18`($sp)
@@ -627,15 +627,15 @@ SHA3_absorb_vsx:
 	.long	0
 	.byte	0,12,4,1,0x80,18,4,0
 	.long	0
-.size	SHA3_absorb_vsx,.-SHA3_absorb_vsx
+.size	SHA3_absorb,.-SHA3_absorb
 ___
 {
 my ($A_flat,$out,$len,$bsz) = map("r$_",(28..31));
 $code.=<<___;
-.globl	SHA3_squeeze_vsx
-.type	SHA3_squeeze_vsx,\@function
+.globl	SHA3_squeeze
+.type	SHA3_squeeze,\@function
 .align	5
-SHA3_squeeze_vsx:
+SHA3_squeeze:
 	$STU	$sp,`-10*$SIZE_T`($sp)
 	mflr	r0
 	$PUSH	r28,`6*$SIZE_T`($sp)
@@ -705,7 +705,7 @@ SHA3_squeeze_vsx:
 	.long	0
 	.byte	

CVS commit: src/crypto/external/bsd/openssl/dist/crypto/modes

2020-06-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun 21 22:17:35 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/modes: gcm128.c

Log Message:
Revert to the upstream version


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c:1.7 src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c:1.8
--- src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c:1.7	Sat Mar 21 20:53:07 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c	Sun Jun 21 18:17:35 2020
@@ -685,7 +685,6 @@ void gcm_ghash_v8(u64 Xi[2], const u128 
 #  endif
 # elif defined(__sparc__) || defined(__sparc)
 #  include "sparc_arch.h"
-#  if defined(__arch64__)
 #   define GHASH_ASM_SPARC
 #   define GCM_FUNCREF_4BIT
 extern unsigned int OPENSSL_sparcv9cap_P[];
@@ -693,7 +692,6 @@ void gcm_init_vis3(u128 Htable[16], cons
 void gcm_gmult_vis3(u64 Xi[2], const u128 Htable[16]);
 void gcm_ghash_vis3(u64 Xi[2], const u128 Htable[16], const u8 *inp,
 size_t len);
-#  endif
 # elif defined(OPENSSL_CPUID_OBJ) && (defined(__powerpc__) || defined(__ppc__) || defined(_ARCH_PPC))
 #  include "ppc_arch.h"
 #  define GHASH_ASM_PPC



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/bn/asm

2020-06-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun 21 22:16:53 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/bn/asm: mips.pl

Log Message:
Revert to the upstream version, there are no more warnings


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl
diff -u src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl:1.7 src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl:1.8
--- src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl:1.7	Sat Mar 21 20:53:03 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl	Sun Jun 21 18:16:53 2020
@@ -486,9 +486,8 @@ $code.=<<___;
 	$ST	$ta3,-2*$BNSZ($a0)
 
 	.set	noreorder
-	$ST	$ta2,-$BNSZ($a0)
 	bgtz	$ta0,.L_bn_sqr_words_loop
-	nop
+	$ST	$ta2,-$BNSZ($a0)
 
 	beqz	$a2,.L_bn_sqr_words_return
 	nop
@@ -817,9 +816,8 @@ bn_div_3_words:
 
 	$LD	$a0,($a3)
 	move	$ta2,$a1
-	$LD	$a1,-$BNSZ($a3)
 	bne	$a0,$a2,bn_div_3_words_internal
-	 nop
+	 $LD	$a1,-$BNSZ($a3)
 	li	$v0,-1
 	jr	$ra
 	move	$a0,$v0



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc

2020-06-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun 21 22:16:08 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc: bn.inc
crypto.inc modes.inc

Log Message:
Re-enable the v9 testing and assembly


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc
cvs rdiff -u -r1.12 -r1.13 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/modes.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc:1.1 src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc:1.2
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc:1.1	Sun Mar  2 04:02:43 2014
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc	Sun Jun 21 18:16:08 2020
@@ -1,6 +1,5 @@
-.if ${MACHINE} == "sparc64"
 .PATH.S: ${.PARSEDIR}
 # XXX bn-sparcv8plus.S doesn't work well. why?
 BN_SRCS = bn-sparcv8.S
-.endif
+AFLAGS.bn-sparcv8.S+= -Wa,-Av9
 .include "../../bn.inc"

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc:1.12 src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc:1.13
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc:1.12	Sat May  9 09:16:42 2020
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc	Sun Jun 21 18:16:08 2020
@@ -1,10 +1,9 @@
 .PATH.S: ${.PARSEDIR}
 .PATH.c: ${.PARSEDIR}
 CPUID = yes
-CPUID_SRCS += sparccpuid.S sparccap.c
+CPUID_SRCS += sparccpuid.S sparcv9cap.c
 CPPFLAGS += -DOPENSSL_CPUID_OBJ
 
-.if ${MACHINE} == "sparc64"
 CPUID_SRCS += sparcv9-mont.S sparcv9a-mont.S 
 CPUID_SRCS += sparct4-mont.S vis3-mont.S
 #CPPFLAGS += -DOPENSSL_BN_ASM_MONT
@@ -12,6 +11,5 @@ AFLAGS.sparcv9-mont.S+= -Wa,-Av9
 AFLAGS.sparcv9a-mont.S+= -Wa,-Av9a
 AFLAGS.sparct4-mont.S+= -Wa,-Av9a
 AFLAGS.vis3-mont.S+= -Wa,-Av9a
-.endif
 
 .include "../../crypto.inc"

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/modes.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/modes.inc:1.3 src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/modes.inc:1.4
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/modes.inc:1.3	Fri Oct 14 12:09:44 2016
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/modes.inc	Sun Jun 21 18:16:08 2020
@@ -1,7 +1,5 @@
-.if ${MACHINE} == "sparc64"
 .PATH.S: ${.PARSEDIR}
 MODES_SRCS = ghash-sparcv9.S
 MODESCPPFLAGS = -DGHASH_ASM
 AFLAGS.ghash-sparcv9.S+= -Wa,-Av9
-.endif
 .include "../../modes.inc"



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips

2020-06-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun 21 22:16:16 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips: mips.S
mips64.S

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.S
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips64.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.S:1.3 src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.S:1.4
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.S:1.3	Sat Mar 21 20:53:12 2020
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.S	Sun Jun 21 18:16:16 2020
@@ -316,9 +316,8 @@ bn_sqr_words_internal:
 	sw	$11,-2*4($4)
 
 	.set	noreorder
-	sw	$10,-4($4)
 	bgtz	$8,.L_bn_sqr_words_loop
-	nop
+	sw	$10,-4($4)
 
 	beqz	$6,.L_bn_sqr_words_return
 	nop
@@ -589,9 +588,8 @@ bn_div_3_words:
 
 	lw	$4,($7)
 	move	$10,$5
-	lw	$5,-4($7)
 	bne	$4,$6,bn_div_3_words_internal
-	 nop
+	 lw	$5,-4($7)
 	li	$2,-1
 	jr	$31
 	move	$4,$2

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips64.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips64.S:1.4 src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips64.S:1.5
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips64.S:1.4	Sat Mar 21 20:53:12 2020
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips64.S	Sun Jun 21 18:16:16 2020
@@ -313,9 +313,8 @@ bn_sqr_words_internal:
 	sd	$11,-2*8($4)
 
 	.set	noreorder
-	sd	$10,-8($4)
 	bgtz	$8,.L_bn_sqr_words_loop
-	nop
+	sd	$10,-8($4)
 
 	beqz	$6,.L_bn_sqr_words_return
 	nop
@@ -586,9 +585,8 @@ bn_div_3_words:
 
 	ld	$4,($7)
 	move	$10,$5
-	ld	$5,-8($7)
 	bne	$4,$6,bn_div_3_words_internal
-	 nop
+	 ld	$5,-8($7)
 	li	$2,-1
 	jr	$31
 	move	$4,$2



CVS commit: src/crypto/external/bsd/openssl/dist/crypto

2020-06-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jun 17 03:22:06 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto: ppccap.c

Log Message:
fix pasto (noted by Viktor Duchovny)


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 \
src/crypto/external/bsd/openssl/dist/crypto/ppccap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/ppccap.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.13 src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.14
--- src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.13	Sat Apr 11 18:41:06 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/ppccap.c	Tue Jun 16 23:22:06 2020
@@ -185,7 +185,7 @@ size_t SHA3_absorb(uint64_t A[5][5], con
 void SHA3_squeeze(uint64_t A[5][5], unsigned char *out, size_t len, size_t r)
 {
 OPENSSL_ppccap_P & PPC_CRYPTO207
-? SHA3_absorb_vsx(A, out, len, r)
+? SHA3_squeeze_vsx(A, out, len, r)
 : SHA3_squeeze_default(A, out, len, r);
 }
 



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto

2020-05-09 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sat May  9 13:16:43 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto: crypto.inc evp.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64:
crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64: crypto.inc

Log Message:
Define OPENSSL_CPUID_OBJ in general CPPFLAGS instead of CRYPTOCPPFLAGS

This is used in various parts of the distribution, defining it here
avoids future problems with CPU-specific features not being detected.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/crypto/external/bsd/openssl/lib/libcrypto/crypto.inc \
src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/crypto.inc
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/crypto.inc
cvs rdiff -u -r1.10 -r1.11 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/crypto.inc
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/crypto.inc
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/crypto.inc
cvs rdiff -u -r1.11 -r1.12 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc
cvs rdiff -u -r1.7 -r1.8 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/crypto.inc
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax/crypto.inc
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/crypto.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/crypto.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/crypto.inc:1.9 src/crypto/external/bsd/openssl/lib/libcrypto/crypto.inc:1.10
--- src/crypto/external/bsd/openssl/lib/libcrypto/crypto.inc:1.9	Sat Dec  8 22:35:44 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/crypto.inc	Sat May  9 13:16:41 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: crypto.inc,v 1.9 2018/12/08 22:35:44 christos Exp $
+#	$NetBSD: crypto.inc,v 1.10 2020/05/09 13:16:41 nia Exp $
 #
 #	@(#) Copyright (c) 1995 Simon J. Gerraty
 #
@@ -37,7 +37,6 @@ SRCS += ${CRYPTO_SRCS}
 CRYPTO_SRCS+=  mem_clr.c
 .else
 CRYPTO_SRCS+=  ${CPUID_SRCS}
-#CRYPTOCPPFLAGS=-DOPENSSL_CPUID_OBJ
 .endif
 
 CRYPTOCPPFLAGS+=-DOPENSSL_NO_STATIC_ENGINE
Index: src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc:1.9 src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc:1.10
--- src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc:1.9	Sat May  9 12:20:50 2020
+++ src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc	Sat May  9 13:16:41 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: evp.inc,v 1.9 2020/05/09 12:20:50 nia Exp $
+#	$NetBSD: evp.inc,v 1.10 2020/05/09 13:16:41 nia Exp $
 #
 #	@(#) Copyright (c) 1995 Simon J. Gerraty
 #
@@ -85,7 +85,6 @@ EVP_AES_SRCS = e_aes.c
 
 .for cryptosrc in ${EVP_AES_SRCS}
 CPPFLAGS.${cryptosrc} += ${AESCPPFLAGS}
-CPPFLAGS.${cryptosrc} += ${CRYPTOCPPFLAGS}
 .endfor
 
 CPPFLAGS.e_aes.c += -I${OPENSSLSRC}/crypto/modes

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/crypto.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/crypto.inc:1.4 src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/crypto.inc:1.5
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/crypto.inc:1.4	Mon Sep 24 11:03:39 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/crypto.inc	Sat May  9 13:16:42 2020
@@ -1,9 +1,9 @@
 .PATH.S: ${.PARSEDIR}
 CPUID_SRCS += arm64cpuid.S armcap.c
-CRYPTOCPPFLAGS += -DOPENSSL_CPUID_OBJ
 CPUID = yes
 ARM_MAX_ARCH=8
 CPPFLAGS += -D__ARM_MAX_ARCH__=${ARM_MAX_ARCH}
+CPPFLAGS += -DOPENSSL_CPUID_OBJ
 CFLAGS+= ${${ACTIVE_CC} == "clang" :? -no-integrated-as :}
 .include "../../crypto.inc"
 

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/crypto.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/crypto.inc:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/crypto.inc:1.3

CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto

2020-05-09 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sat May  9 12:20:50 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto: evp.inc

Log Message:
Ensure that -DOPENSSL_CPUID_OBJ is passed when compiling AES EVP bits

This way CPUs that support AES-NI actually get detected properly ;_;

(... just one part of the puzzle)


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc:1.8 src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc:1.9
--- src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc:1.8	Sun Sep 23 13:33:04 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc	Sat May  9 12:20:50 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: evp.inc,v 1.8 2018/09/23 13:33:04 christos Exp $
+#	$NetBSD: evp.inc,v 1.9 2020/05/09 12:20:50 nia Exp $
 #
 #	@(#) Copyright (c) 1995 Simon J. Gerraty
 #
@@ -85,6 +85,7 @@ EVP_AES_SRCS = e_aes.c
 
 .for cryptosrc in ${EVP_AES_SRCS}
 CPPFLAGS.${cryptosrc} += ${AESCPPFLAGS}
+CPPFLAGS.${cryptosrc} += ${CRYPTOCPPFLAGS}
 .endfor
 
 CPPFLAGS.e_aes.c += -I${OPENSSLSRC}/crypto/modes



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/rand

2020-04-30 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Thu Apr 30 10:59:02 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/rand: rand_unix.c

Log Message:
Fix the detection of KERN_ARND by OpenSSL.

Firstly, include the correct headers. Then, make sure that requests
never exceed 256 bytes.

Disable a hack for old FreeBSD versions, just in case it actually gets
used.

This should mean that OpenSSL doesn't ever fall back to reading from
/dev/urandom.

XXX pullup, XXX upstream.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 \
src/crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c:1.15 src/crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c:1.16
--- src/crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c:1.15	Sun Mar 22 00:53:07 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c	Thu Apr 30 10:59:02 2020
@@ -26,12 +26,12 @@
 #  include 
 # endif
 #endif
-#if defined(__FreeBSD__) && !defined(OPENSSL_SYS_UEFI)
+#if (defined(__FreeBSD__) || defined(__NetBSD__)) && !defined(OPENSSL_SYS_UEFI)
 # include 
 # include 
 # include 
 #endif
-#if defined(__OpenBSD__) || defined(__NetBSD__)
+#if defined(__OpenBSD__)
 # include 
 #endif
 
@@ -247,10 +247,12 @@ static ssize_t sysctl_random(char *buf, 
  * when the sysctl returns long and we want to request something not a
  * multiple of longs, which should never be the case.
  */
+#if   defined(__FreeBSD__)
 if (!ossl_assert(buflen % sizeof(long) == 0)) {
 errno = EINVAL;
 return -1;
 }
+#endif
 
 /*
  * On NetBSD before 4.0 KERN_ARND was an alias for KERN_URND, and only
@@ -268,7 +270,8 @@ static ssize_t sysctl_random(char *buf, 
 mib[1] = KERN_ARND;
 
 do {
-len = buflen;
+/* On NetBSD, KERN_ARND fails if more than 256 bytes are requested */
+len = buflen > 256 ? 256 : buflen;
 if (sysctl(mib, 2, buf, , NULL, 0) == -1)
 return done > 0 ? done : -1;
 done += len;



CVS commit: src/crypto/external/bsd/openssl/dist

2020-04-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 24 19:37:09 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist: CHANGES NEWS README
src/crypto/external/bsd/openssl/dist/apps: ocsp.c s_time.c
src/crypto/external/bsd/openssl/dist/crypto/ec: ec_asn1.c ec_lib.c
ecp_smpl.c
src/crypto/external/bsd/openssl/dist/crypto/evp: e_aes.c
src/crypto/external/bsd/openssl/dist/crypto/x509: x509_vfy.c
src/crypto/external/bsd/openssl/dist/ssl: t1_lib.c

Log Message:
merge conflicts


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/crypto/external/bsd/openssl/dist/CHANGES \
src/crypto/external/bsd/openssl/dist/NEWS \
src/crypto/external/bsd/openssl/dist/README
cvs rdiff -u -r1.21 -r1.22 src/crypto/external/bsd/openssl/dist/apps/ocsp.c
cvs rdiff -u -r1.10 -r1.11 src/crypto/external/bsd/openssl/dist/apps/s_time.c
cvs rdiff -u -r1.9 -r1.10 \
src/crypto/external/bsd/openssl/dist/crypto/ec/ec_asn1.c
cvs rdiff -u -r1.8 -r1.9 \
src/crypto/external/bsd/openssl/dist/crypto/ec/ec_lib.c
cvs rdiff -u -r1.11 -r1.12 \
src/crypto/external/bsd/openssl/dist/crypto/ec/ecp_smpl.c
cvs rdiff -u -r1.22 -r1.23 \
src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c
cvs rdiff -u -r1.19 -r1.20 \
src/crypto/external/bsd/openssl/dist/crypto/x509/x509_vfy.c
cvs rdiff -u -r1.31 -r1.32 src/crypto/external/bsd/openssl/dist/ssl/t1_lib.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/CHANGES
diff -u src/crypto/external/bsd/openssl/dist/CHANGES:1.23 src/crypto/external/bsd/openssl/dist/CHANGES:1.24
--- src/crypto/external/bsd/openssl/dist/CHANGES:1.23	Sun Apr  5 17:53:44 2020
+++ src/crypto/external/bsd/openssl/dist/CHANGES	Fri Apr 24 15:37:09 2020
@@ -7,6 +7,27 @@
  https://github.com/openssl/openssl/commits/ and pick the appropriate
  release branch.
 
+ Changes between 1.1.1f and 1.1.1g [21 Apr 2020]
+
+  *) Fixed segmentation fault in SSL_check_chain()
+ Server or client applications that call the SSL_check_chain() function
+ during or after a TLS 1.3 handshake may crash due to a NULL pointer
+ dereference as a result of incorrect handling of the
+ "signature_algorithms_cert" TLS extension. The crash occurs if an invalid
+ or unrecognised signature algorithm is received from the peer. This could
+ be exploited by a malicious peer in a Denial of Service attack.
+ (CVE-2020-1967)
+ [Benjamin Kaduk]
+
+  *) Added AES consttime code for no-asm configurations
+ an optional constant time support for AES was added
+ when building openssl for no-asm.
+ Enable with: ./config no-asm -DOPENSSL_AES_CONST_TIME
+ Disable with: ./config no-asm -DOPENSSL_NO_AES_CONST_TIME
+ At this time this feature is by default disabled.
+ It will be enabled by default in 3.0.
+ [Bernd Edlinger]
+
  Changes between 1.1.1e and 1.1.1f [31 Mar 2020]
 
   *) Revert the change of EOF detection while reading in libssl to avoid
Index: src/crypto/external/bsd/openssl/dist/NEWS
diff -u src/crypto/external/bsd/openssl/dist/NEWS:1.23 src/crypto/external/bsd/openssl/dist/NEWS:1.24
--- src/crypto/external/bsd/openssl/dist/NEWS:1.23	Sun Apr  5 17:53:44 2020
+++ src/crypto/external/bsd/openssl/dist/NEWS	Fri Apr 24 15:37:09 2020
@@ -5,6 +5,10 @@
   This file gives a brief overview of the major changes between each OpenSSL
   release. For more details please read the CHANGES file.
 
+  Major changes between OpenSSL 1.1.1f and OpenSSL 1.1.1g [21 Apr 2020]
+
+  o Fixed segmentation fault in SSL_check_chain() (CVE-2020-1967)
+
   Major changes between OpenSSL 1.1.1e and OpenSSL 1.1.1f [31 Mar 2020]
 
   o Revert the unexpected EOF reporting via SSL_ERROR_SSL
Index: src/crypto/external/bsd/openssl/dist/README
diff -u src/crypto/external/bsd/openssl/dist/README:1.23 src/crypto/external/bsd/openssl/dist/README:1.24
--- src/crypto/external/bsd/openssl/dist/README:1.23	Sun Apr  5 17:53:44 2020
+++ src/crypto/external/bsd/openssl/dist/README	Fri Apr 24 15:37:09 2020
@@ -1,5 +1,5 @@
 
- OpenSSL 1.1.1f 31 Mar 2020
+ OpenSSL 1.1.1g 21 Apr 2020
 
  Copyright (c) 1998-2020 The OpenSSL Project
  Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson

Index: src/crypto/external/bsd/openssl/dist/apps/ocsp.c
diff -u src/crypto/external/bsd/openssl/dist/apps/ocsp.c:1.21 src/crypto/external/bsd/openssl/dist/apps/ocsp.c:1.22
--- src/crypto/external/bsd/openssl/dist/apps/ocsp.c:1.21	Sat Mar 21 20:53:02 2020
+++ src/crypto/external/bsd/openssl/dist/apps/ocsp.c	Fri Apr 24 15:37:09 2020
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2001-2020 The OpenSSL Project Authors. All Rights Reserved.
  *
  * Licensed under the OpenSSL license (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a 

CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64

2020-04-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 15 21:29:28 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64: sha.inc

Log Message:
Switch sha3 to the assembly version (fix the build)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/sha.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/sha.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/sha.inc:1.1 src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/sha.inc:1.2
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/sha.inc:1.1	Sat Oct 15 08:19:02 2016
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/sha.inc	Wed Apr 15 17:29:28 2020
@@ -1,6 +1,7 @@
 .PATH.S: ${.PARSEDIR}
-SHA_SRCS = sha1-ppc.S
-SHACPPFLAGS = -DSHA1_ASM
+SHA_SRCS = sha1-ppc.S keccak1600-ppc64.S keccak1600.c
+SHACPPFLAGS = -DSHA1_ASM -DKECCAK1600_ASM
+KECCAKNI = yes
 .if NOT_USING_SHAXXX_FROM_LIBC
 SHA_SRCS += sha512-ppc.S sha512p8-ppc.S
 SHA_SRCS += sha256-ppc.S sha256p8-ppc.S



CVS commit: src/crypto/external/bsd/openssl

2020-04-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 11 22:41:06 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto: ppccap.c
src/crypto/external/bsd/openssl/dist/crypto/sha: keccak1600.c
src/crypto/external/bsd/openssl/dist/crypto/sha/asm:
keccak1600-ppc64.pl keccak1600p8-ppc.pl
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc:
keccak1600p8-ppc.S sha.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64:
keccak1600-ppc64.S keccak1600p8-ppc.S

Log Message:
We can only use the SHA3 assembly routines if we have VSX


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 \
src/crypto/external/bsd/openssl/dist/crypto/ppccap.c
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/crypto/external/bsd/openssl/dist/crypto/sha/keccak1600.c
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/crypto/external/bsd/openssl/dist/crypto/sha/asm/keccak1600-ppc64.pl \
src/crypto/external/bsd/openssl/dist/crypto/sha/asm/keccak1600p8-ppc.pl
cvs rdiff -u -r1.1 -r1.2 \

src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/keccak1600p8-ppc.S
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha.inc
cvs rdiff -u -r1.1 -r1.2 \

src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/keccak1600-ppc64.S 
\

src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/keccak1600p8-ppc.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/ppccap.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.12 src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.13
--- src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.12	Sat Mar 21 20:53:02 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/ppccap.c	Sat Apr 11 18:41:06 2020
@@ -160,6 +160,37 @@ void ecp_nistz256_from_mont(unsigned lon
 }
 #endif
 
+size_t SHA3_absorb(uint64_t A[5][5], const unsigned char *inp, size_t len,
+size_t r);
+void SHA3_squeeze(uint64_t A[5][5], unsigned char *out, size_t len, size_t r);
+
+size_t SHA3_absorb_default(uint64_t A[5][5], const unsigned char *inp,
+size_t len, size_t r);
+void SHA3_squeeze_default(uint64_t A[5][5], unsigned char *out, size_t len,
+size_t r);
+
+size_t SHA3_absorb_vsx(uint64_t A[5][5], const unsigned char *inp,
+size_t len, size_t r);
+void SHA3_squeeze_vsx(uint64_t A[5][5], unsigned char *out, size_t len,
+size_t r);
+
+size_t SHA3_absorb(uint64_t A[5][5], const unsigned char *inp, size_t len,
+size_t r)
+{
+return OPENSSL_ppccap_P & PPC_CRYPTO207
+? SHA3_absorb_vsx(A, inp, len, r)
+: SHA3_absorb_default(A, inp, len, r);
+}
+
+void SHA3_squeeze(uint64_t A[5][5], unsigned char *out, size_t len, size_t r)
+{
+OPENSSL_ppccap_P & PPC_CRYPTO207
+? SHA3_absorb_vsx(A, out, len, r)
+: SHA3_squeeze_default(A, out, len, r);
+}
+
+
+
 static sigjmp_buf ill_jmp;
 static void ill_handler(int sig)
 {

Index: src/crypto/external/bsd/openssl/dist/crypto/sha/keccak1600.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/sha/keccak1600.c:1.1.1.2 src/crypto/external/bsd/openssl/dist/crypto/sha/keccak1600.c:1.2
--- src/crypto/external/bsd/openssl/dist/crypto/sha/keccak1600.c:1.1.1.2	Sun Jun  9 13:47:44 2019
+++ src/crypto/external/bsd/openssl/dist/crypto/sha/keccak1600.c	Sat Apr 11 18:41:06 2020
@@ -11,6 +11,12 @@
 #include 
 #include 
 
+#ifdef __powerpc__
+#define SHA3_absorb SHA3_absorb_default
+#define SHA3_squeeze SHA3_squeeze_default
+#undef KECCAK1600_ASM
+#endif
+
 size_t SHA3_absorb(uint64_t A[5][5], const unsigned char *inp, size_t len,
size_t r);
 void SHA3_squeeze(uint64_t A[5][5], unsigned char *out, size_t len, size_t r);

Index: src/crypto/external/bsd/openssl/dist/crypto/sha/asm/keccak1600-ppc64.pl
diff -u src/crypto/external/bsd/openssl/dist/crypto/sha/asm/keccak1600-ppc64.pl:1.1.1.2 src/crypto/external/bsd/openssl/dist/crypto/sha/asm/keccak1600-ppc64.pl:1.2
--- src/crypto/external/bsd/openssl/dist/crypto/sha/asm/keccak1600-ppc64.pl:1.1.1.2	Sat Mar 21 20:49:11 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/sha/asm/keccak1600-ppc64.pl	Sat Apr 11 18:41:06 2020
@@ -405,10 +405,10 @@ dword_le_load:
 	.long	0
 .size	dword_le_load,.-dword_le_load
 
-.globl	SHA3_absorb
-.type	SHA3_absorb,\@function
+.globl	SHA3_absorb_vsx
+.type	SHA3_absorb_vsx,\@function
 .align	5
-SHA3_absorb:
+SHA3_absorb_vsx:
 	$STU	$sp,-$FRAME($sp)
 	mflr	r0
 	$PUSH	r14,`$FRAME-$SIZE_T*18`($sp)
@@ -627,15 +627,15 @@ SHA3_absorb:
 	.long	0
 	.byte	0,12,4,1,0x80,18,4,0
 	.long	0
-.size	SHA3_absorb,.-SHA3_absorb
+.size	SHA3_absorb_vsx,.-SHA3_absorb_vsx
 ___
 {
 my ($A_flat,$out,$len,$bsz) = map("r$_",(28..31));
 $code.=<<___;
-.globl	SHA3_squeeze
-.type	SHA3_squeeze,\@function
+.globl	SHA3_squeeze_vsx
+.type	SHA3_squeeze_vsx,\@function
 .align	5
-SHA3_squeeze:

CVS commit: src/crypto/external/bsd/openssl/dist

2020-04-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Apr  5 21:53:45 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist: CHANGES NEWS README
src/crypto/external/bsd/openssl/dist/apps: s_server.c
src/crypto/external/bsd/openssl/dist/crypto: ex_data.c
src/crypto/external/bsd/openssl/dist/crypto/x509: x509_vfy.c
src/crypto/external/bsd/openssl/dist/ssl: ssl_err.c

Log Message:
merge conflicts


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/crypto/external/bsd/openssl/dist/CHANGES \
src/crypto/external/bsd/openssl/dist/NEWS \
src/crypto/external/bsd/openssl/dist/README
cvs rdiff -u -r1.22 -r1.23 \
src/crypto/external/bsd/openssl/dist/apps/s_server.c
cvs rdiff -u -r1.6 -r1.7 \
src/crypto/external/bsd/openssl/dist/crypto/ex_data.c
cvs rdiff -u -r1.18 -r1.19 \
src/crypto/external/bsd/openssl/dist/crypto/x509/x509_vfy.c
cvs rdiff -u -r1.17 -r1.18 src/crypto/external/bsd/openssl/dist/ssl/ssl_err.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/CHANGES
diff -u src/crypto/external/bsd/openssl/dist/CHANGES:1.22 src/crypto/external/bsd/openssl/dist/CHANGES:1.23
--- src/crypto/external/bsd/openssl/dist/CHANGES:1.22	Sat Mar 21 20:53:02 2020
+++ src/crypto/external/bsd/openssl/dist/CHANGES	Sun Apr  5 17:53:44 2020
@@ -7,6 +7,24 @@
  https://github.com/openssl/openssl/commits/ and pick the appropriate
  release branch.
 
+ Changes between 1.1.1e and 1.1.1f [31 Mar 2020]
+
+  *) Revert the change of EOF detection while reading in libssl to avoid
+ regressions in applications depending on the current way of reporting
+ the EOF. As the existing method is not fully accurate the change to
+ reporting the EOF via SSL_ERROR_SSL is kept on the current development
+ branch and will be present in the 3.0 release.
+ [Tomas Mraz]
+
+  *) Revised BN_generate_prime_ex to not avoid factors 3..17863 in p-1
+ when primes for RSA keys are computed.
+ Since we previously always generated primes == 2 (mod 3) for RSA keys,
+ the 2-prime and 3-prime RSA modules were easy to distinguish, since
+ N = p*q = 1 (mod 3), but N = p*q*r = 2 (mod 3). Therefore fingerprinting
+ 2-prime vs. 3-prime RSA keys was possible by computing N mod 3.
+ This avoids possible fingerprinting of newly generated RSA modules.
+ [Bernd Edlinger]
+
  Changes between 1.1.1d and 1.1.1e [17 Mar 2020]
   *) Properly detect EOF while reading in libssl. Previously if we hit an EOF
  while reading in libssl then we would report an error back to the
Index: src/crypto/external/bsd/openssl/dist/NEWS
diff -u src/crypto/external/bsd/openssl/dist/NEWS:1.22 src/crypto/external/bsd/openssl/dist/NEWS:1.23
--- src/crypto/external/bsd/openssl/dist/NEWS:1.22	Sat Mar 21 20:53:02 2020
+++ src/crypto/external/bsd/openssl/dist/NEWS	Sun Apr  5 17:53:44 2020
@@ -5,10 +5,16 @@
   This file gives a brief overview of the major changes between each OpenSSL
   release. For more details please read the CHANGES file.
 
+  Major changes between OpenSSL 1.1.1e and OpenSSL 1.1.1f [31 Mar 2020]
+
+  o Revert the unexpected EOF reporting via SSL_ERROR_SSL
+
   Major changes between OpenSSL 1.1.1d and OpenSSL 1.1.1e [17 Mar 2020]
 
   o Fixed an overflow bug in the x64_64 Montgomery squaring procedure
 used in exponentiation with 512-bit moduli (CVE-2019-1551)
+  o Properly detect unexpected EOF while reading in libssl and report
+it via SSL_ERROR_SSL
 
   Major changes between OpenSSL 1.1.1c and OpenSSL 1.1.1d [10 Sep 2019]
 
Index: src/crypto/external/bsd/openssl/dist/README
diff -u src/crypto/external/bsd/openssl/dist/README:1.22 src/crypto/external/bsd/openssl/dist/README:1.23
--- src/crypto/external/bsd/openssl/dist/README:1.22	Sat Mar 21 20:53:02 2020
+++ src/crypto/external/bsd/openssl/dist/README	Sun Apr  5 17:53:44 2020
@@ -1,7 +1,7 @@
 
- OpenSSL 1.1.1e 17 Mar 2020
+ OpenSSL 1.1.1f 31 Mar 2020
 
- Copyright (c) 1998-2019 The OpenSSL Project
+ Copyright (c) 1998-2020 The OpenSSL Project
  Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
  All rights reserved.
 

Index: src/crypto/external/bsd/openssl/dist/apps/s_server.c
diff -u src/crypto/external/bsd/openssl/dist/apps/s_server.c:1.22 src/crypto/external/bsd/openssl/dist/apps/s_server.c:1.23
--- src/crypto/external/bsd/openssl/dist/apps/s_server.c:1.22	Sun Mar 22 16:01:48 2020
+++ src/crypto/external/bsd/openssl/dist/apps/s_server.c	Sun Apr  5 17:53:44 2020
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
  * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
  * Copyright 2005 Nokia. All rights reserved.
  *
@@ -1904,7 +1904,7 @@ int s_server_main(int argc, char *argv[]
 BIO_printf(bio_s_out, 

CVS commit: src/crypto/external/bsd/openssl/dist/crypto/md4

2020-03-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 29 14:58:22 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/md4: md4_dgst.c

Log Message:
restore previous unsigned change.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/crypto/external/bsd/openssl/dist/crypto/md4/md4_dgst.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/md4/md4_dgst.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/md4/md4_dgst.c:1.8 src/crypto/external/bsd/openssl/dist/crypto/md4/md4_dgst.c:1.9
--- src/crypto/external/bsd/openssl/dist/crypto/md4/md4_dgst.c:1.8	Sat Mar 21 20:53:06 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/md4/md4_dgst.c	Sun Mar 29 10:58:22 2020
@@ -37,7 +37,7 @@ int MD4_Init(MD4_CTX *c)
 void md4_block_data_order(MD4_CTX *c, const void *data_, size_t num)
 {
 const unsigned char *data = data_;
-register MD32_REG_T A, B, C, D, l;
+register unsigned MD32_REG_T A, B, C, D, l;
 # ifndef MD32_XARRAY
 /* See comment in crypto/sha/sha_local.h for details. */
 unsigned MD32_REG_T XX0, XX1, XX2, XX3, XX4, XX5, XX6, XX7,



CVS commit: src/crypto/external/bsd/openssl/dist/test/testutil

2020-03-23 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Mar 23 22:21:34 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/test/testutil: format_output.c
main.c output.h tests.c

Log Message:
Fix format string usage.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/dist/test/testutil/format_output.c \
src/crypto/external/bsd/openssl/dist/test/testutil/main.c \
src/crypto/external/bsd/openssl/dist/test/testutil/tests.c
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/dist/test/testutil/output.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/test/testutil/format_output.c
diff -u src/crypto/external/bsd/openssl/dist/test/testutil/format_output.c:1.4 src/crypto/external/bsd/openssl/dist/test/testutil/format_output.c:1.5
--- src/crypto/external/bsd/openssl/dist/test/testutil/format_output.c:1.4	Sun Mar 22 00:53:11 2020
+++ src/crypto/external/bsd/openssl/dist/test/testutil/format_output.c	Mon Mar 23 22:21:34 2020
@@ -31,9 +31,9 @@ static void test_diff_header(const char 
 static void test_string_null_empty(const char *m, char c)
 {
 if (m == NULL)
-test_printf_stderr("% 4s %c NULL\n", "", c);
+test_printf_stderr("%4s %c NULL\n", "", c);
 else
-test_printf_stderr("% 4u:%c ''\n", 0u, c);
+test_printf_stderr("%4u:%c ''\n", 0u, c);
 }
 
 static void test_fail_string_common(const char *prefix, const char *file,
@@ -94,18 +94,18 @@ static void test_fail_string_common(cons
 bdiff[i] = '\0';
 }
 if (n1 == n2 && !diff) {
-test_printf_stderr("% 4u:  '%s'\n", cnt, n2 > n1 ? b2 : b1);
+test_printf_stderr("%4u:  '%s'\n", cnt, n2 > n1 ? b2 : b1);
 } else {
 if (cnt == 0 && (m1 == NULL || *m1 == '\0'))
 test_string_null_empty(m1, '-');
 else if (n1 > 0)
-test_printf_stderr("% 4u:- '%s'\n", cnt, b1);
+test_printf_stderr("%4u:- '%s'\n", cnt, b1);
 if (cnt == 0 && (m2 == NULL || *m2 == '\0'))
test_string_null_empty(m2, '+');
 else if (n2 > 0)
-test_printf_stderr("% 4u:+ '%s'\n", cnt, b2);
+test_printf_stderr("%4u:+ '%s'\n", cnt, b2);
 if (diff && i > 0)
-test_printf_stderr("% 4s%s\n", "", bdiff);
+test_printf_stderr("%4s%s\n", "", bdiff);
 }
 m1 += n1;
 m2 += n2;
@@ -410,7 +410,7 @@ void test_output_bignum(const char *name
 static void test_memory_null_empty(const unsigned char *m, char c)
 {
 if (m == NULL)
-test_printf_stderr("% 4s %c%s\n", "", c, "NULL");
+test_printf_stderr("%4s %c%s\n", "", c, "NULL");
 else
 test_printf_stderr("%04x %c%s\n", 0u, c, "empty");
 }
@@ -494,7 +494,7 @@ static void test_fail_memory_common(cons
 else if (n2 > 0)
 test_printf_stderr("%04x:+%s\n", cnt, b2);
 if (diff && i > 0)
-test_printf_stderr("% 4s  %s\n", "", bdiff);
+test_printf_stderr("%4s  %s\n", "", bdiff);
 }
 m1 += n1;
 m2 += n2;
Index: src/crypto/external/bsd/openssl/dist/test/testutil/main.c
diff -u src/crypto/external/bsd/openssl/dist/test/testutil/main.c:1.4 src/crypto/external/bsd/openssl/dist/test/testutil/main.c:1.5
--- src/crypto/external/bsd/openssl/dist/test/testutil/main.c:1.4	Sun Mar 22 00:53:11 2020
+++ src/crypto/external/bsd/openssl/dist/test/testutil/main.c	Mon Mar 23 22:21:34 2020
@@ -25,7 +25,7 @@ static void check_arg_usage(void)
 
 for (i = 0; i < n; i++)
 if (!arg_used[i+1])
-test_printf_stderr("Warning ignored command-line argument %d: %s\n",
+test_printf_stderr("Warning ignored command-line argument %zu: %s\n",
i, args[i+1]);
 if (i < arg_count)
 test_printf_stderr("Warning arguments %zu and later unchecked\n", i);
Index: src/crypto/external/bsd/openssl/dist/test/testutil/tests.c
diff -u src/crypto/external/bsd/openssl/dist/test/testutil/tests.c:1.4 src/crypto/external/bsd/openssl/dist/test/testutil/tests.c:1.5
--- src/crypto/external/bsd/openssl/dist/test/testutil/tests.c:1.4	Sun Mar 22 00:53:11 2020
+++ src/crypto/external/bsd/openssl/dist/test/testutil/tests.c	Mon Mar 23 22:21:34 2020
@@ -72,6 +72,7 @@ static void test_fail_message(const char
   const char *fmt, ...)
 PRINTF_FORMAT(8, 9);
 
+PRINTF_FORMAT(8, 0)
 static void test_fail_message_va(const char *prefix, const char *file,
  int line, const char *type,
  const char *left, const char *right,

Index: src/crypto/external/bsd/openssl/dist/test/testutil/output.h
diff -u 

CVS commit: src/crypto/external/bsd/openssl/dist/crypto/sha

2020-03-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 22 20:16:49 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/sha: sha256.c

Log Message:
reduce diff with upstream


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/crypto/external/bsd/openssl/dist/crypto/sha/sha256.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/sha/sha256.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/sha/sha256.c:1.9 src/crypto/external/bsd/openssl/dist/crypto/sha/sha256.c:1.10
--- src/crypto/external/bsd/openssl/dist/crypto/sha/sha256.c:1.9	Sat Mar 21 20:53:08 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/sha/sha256.c	Sun Mar 22 16:16:49 2020
@@ -168,7 +168,7 @@ static const SHA_LONG K256[64] = {
 static void sha256_block_data_order(SHA256_CTX *ctx, const void *in,
 size_t num)
 {
-MD32_REG_T a, b, c, d, e, f, g, h, s0, s1, T1, T2;
+unsigned MD32_REG_T a, b, c, d, e, f, g, h, s0, s1, T1, T2;
 SHA_LONG X[16], l;
 int i;
 const unsigned char *data = in;
@@ -246,7 +246,7 @@ static void sha256_block_data_order(SHA2
 static void sha256_block_data_order(SHA256_CTX *ctx, const void *in,
 size_t num)
 {
-MD32_REG_T a, b, c, d, e, f, g, h, s0, s1, T1;
+unsigned MD32_REG_T a, b, c, d, e, f, g, h, s0, s1, T1;
 SHA_LONG X[16];
 int i;
 const unsigned char *data = in;



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/ripemd

2020-03-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 22 20:15:30 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/ripemd: rmd_dgst.c

Log Message:
reduce diff with upstream


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/crypto/external/bsd/openssl/dist/crypto/ripemd/rmd_dgst.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/ripemd/rmd_dgst.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/ripemd/rmd_dgst.c:1.8 src/crypto/external/bsd/openssl/dist/crypto/ripemd/rmd_dgst.c:1.9
--- src/crypto/external/bsd/openssl/dist/crypto/ripemd/rmd_dgst.c:1.8	Sat Mar 21 20:53:08 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/ripemd/rmd_dgst.c	Sun Mar 22 16:15:29 2020
@@ -36,8 +36,8 @@ int RIPEMD160_Init(RIPEMD160_CTX *c)
 void ripemd160_block_data_order(RIPEMD160_CTX *ctx, const void *p, size_t num)
 {
 const unsigned char *data = p;
-register MD32_REG_T A, B, C, D, E;
-MD32_REG_T a, b, c, d, e, l;
+register unsigned MD32_REG_T A, B, C, D, E;
+unsigned MD32_REG_T a, b, c, d, e, l;
 # ifndef MD32_XARRAY
 /* See comment in crypto/sha/sha_local.h for details. */
 unsigned MD32_REG_T XX0, XX1, XX2, XX3, XX4, XX5, XX6, XX7,



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/md5

2020-03-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 22 20:13:15 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/md5: md5_dgst.c

Log Message:
reduce diff with upstream


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/crypto/external/bsd/openssl/dist/crypto/md5/md5_dgst.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/md5/md5_dgst.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/md5/md5_dgst.c:1.6 src/crypto/external/bsd/openssl/dist/crypto/md5/md5_dgst.c:1.7
--- src/crypto/external/bsd/openssl/dist/crypto/md5/md5_dgst.c:1.6	Sat Mar 21 20:53:06 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/md5/md5_dgst.c	Sun Mar 22 16:13:15 2020
@@ -37,7 +37,7 @@ int MD5_Init(MD5_CTX *c)
 void md5_block_data_order(MD5_CTX *c, const void *data_, size_t num)
 {
 const unsigned char *data = data_;
-register MD32_REG_T A, B, C, D, l;
+register unsigned MD32_REG_T A, B, C, D, l;
 # ifndef MD32_XARRAY
 /* See comment in crypto/sha/sha_local.h for details. */
 unsigned MD32_REG_T XX0, XX1, XX2, XX3, XX4, XX5, XX6, XX7,



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/evp

2020-03-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 22 20:09:17 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/evp: e_aes.c

Log Message:
reduce diff with upstream.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 \
src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c:1.21 src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c:1.22
--- src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c:1.21	Sun Mar 22 16:05:29 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c	Sun Mar 22 16:09:17 2020
@@ -2551,7 +2551,7 @@ const EVP_CIPHER *EVP_aes_##keylen##_##m
 
 #if defined(OPENSSL_CPUID_OBJ) && defined(AES_ASM) && (defined(__arm__) || defined(__arm) || defined(__aarch64__))
 # include "arm_arch.h"
-# if __ARM_MAX_ARCH__>= 7
+# if __ARM_MAX_ARCH__>=7
 #  if defined(BSAES_ASM)
 #   define BSAES_CAPABLE (OPENSSL_armcap_P & ARMV7_NEON)
 #  endif
@@ -2559,7 +2559,7 @@ const EVP_CIPHER *EVP_aes_##keylen##_##m
 #   define VPAES_CAPABLE (OPENSSL_armcap_P & ARMV7_NEON)
 #  endif
 # endif
-# if __ARM_MAX_ARCH__>= 8
+# if __ARM_MAX_ARCH__>=8
 #  define HWAES_CAPABLE (OPENSSL_armcap_P & ARMV8_AES)
 #  define HWAES_set_encrypt_key aes_v8_set_encrypt_key
 #  define HWAES_set_decrypt_key aes_v8_set_decrypt_key



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/bio

2020-03-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 22 20:07:05 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/bio: bss_log.c

Log Message:
eliminate diff with upstream.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 \
src/crypto/external/bsd/openssl/dist/crypto/bio/bss_log.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/bio/bss_log.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/bio/bss_log.c:1.11 src/crypto/external/bsd/openssl/dist/crypto/bio/bss_log.c:1.12
--- src/crypto/external/bsd/openssl/dist/crypto/bio/bss_log.c:1.11	Sat Mar 21 20:53:03 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/bio/bss_log.c	Sun Mar 22 16:07:05 2020
@@ -97,7 +97,7 @@ static const BIO_METHOD methods_slg = {
 slg_ctrl,
 slg_new,
 slg_free,
-NULL,
+NULL,  /* slg_callback_ctrl */
 };
 
 const BIO_METHOD *BIO_s_log(void)



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/evp

2020-03-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 22 20:05:29 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/evp: e_aes.c

Log Message:
put back removed code


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 \
src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c:1.20 src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c:1.21
--- src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c:1.20	Sat Mar 21 20:53:05 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c	Sun Mar 22 16:05:29 2020
@@ -2801,6 +2801,8 @@ static int aes_cfb1_cipher(EVP_CIPHER_CT
 EVP_CIPHER_CTX_encrypting(ctx), dat->block);
 EVP_CIPHER_CTX_set_num(ctx, num);
 len -= MAXBITCHUNK;
+out += MAXBITCHUNK;
+in  += MAXBITCHUNK;
 }
 if (len) {
 int num = EVP_CIPHER_CTX_num(ctx);



CVS commit: src/crypto/external/bsd/openssl/dist/apps

2020-03-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 22 20:01:48 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/apps: s_server.c

Log Message:
add back missing goto;


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 \
src/crypto/external/bsd/openssl/dist/apps/s_server.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/apps/s_server.c
diff -u src/crypto/external/bsd/openssl/dist/apps/s_server.c:1.21 src/crypto/external/bsd/openssl/dist/apps/s_server.c:1.22
--- src/crypto/external/bsd/openssl/dist/apps/s_server.c:1.21	Sun Mar 22 15:56:07 2020
+++ src/crypto/external/bsd/openssl/dist/apps/s_server.c	Sun Mar 22 16:01:48 2020
@@ -1809,6 +1809,7 @@ int s_server_main(int argc, char *argv[]
 goto end;
 if (max_version != 0
 && SSL_CTX_set_max_proto_version(ctx, max_version) == 0)
+goto end;
 
 if (session_id_prefix) {
 if (strlen(session_id_prefix) >= 32)



CVS commit: src/crypto/external/bsd/openssl/dist/apps

2020-03-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 22 19:56:07 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/apps: s_client.c s_server.c

Log Message:
always use fdin


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 \
src/crypto/external/bsd/openssl/dist/apps/s_client.c
cvs rdiff -u -r1.20 -r1.21 \
src/crypto/external/bsd/openssl/dist/apps/s_server.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/apps/s_client.c
diff -u src/crypto/external/bsd/openssl/dist/apps/s_client.c:1.21 src/crypto/external/bsd/openssl/dist/apps/s_client.c:1.22
--- src/crypto/external/bsd/openssl/dist/apps/s_client.c:1.21	Sat Mar 21 20:53:02 2020
+++ src/crypto/external/bsd/openssl/dist/apps/s_client.c	Sun Mar 22 15:56:07 2020
@@ -2804,7 +2804,7 @@ int s_client_main(int argc, char **argv)
  * set the flag so we exit.
  */
 if (read_tty && !at_eof)
-openssl_fdset(fileno_stdin(), );
+openssl_fdset(fdin, );
 #if !defined(OPENSSL_SYS_VMS)
 if (write_tty)
 openssl_fdset(fdout, );

Index: src/crypto/external/bsd/openssl/dist/apps/s_server.c
diff -u src/crypto/external/bsd/openssl/dist/apps/s_server.c:1.20 src/crypto/external/bsd/openssl/dist/apps/s_server.c:1.21
--- src/crypto/external/bsd/openssl/dist/apps/s_server.c:1.20	Sat Mar 21 20:53:02 2020
+++ src/crypto/external/bsd/openssl/dist/apps/s_server.c	Sun Mar 22 15:56:07 2020
@@ -2423,7 +2423,7 @@ static int sv_body(int s, int stype, int
 }
 FD_ZERO();
 #if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MSDOS)
-openssl_fdset(fileno_stdin(), );
+openssl_fdset(fdin, );
 #endif
 openssl_fdset(s, );
 /*



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc

2020-03-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 22 17:35:29 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc: sparccap.c

Log Message:
cryptlib header moved


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/sparccap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/sparccap.c
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/sparccap.c:1.3 src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/sparccap.c:1.4
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/sparccap.c:1.3	Mon Sep 24 16:36:51 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/sparccap.c	Sun Mar 22 13:35:29 2020
@@ -1,5 +1,5 @@
 #include "e_os.h"
-#include "internal/cryptlib_int.h"
+#include "crypto/cryptlib.h"
 
 uint32_t OPENSSL_rdtsc(void)
 {



CVS commit: src/crypto/external/bsd/openssl/dist/include/openssl

2020-03-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 22 02:30:16 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/include/openssl: safestack.h

Log Message:
Add more casts.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/crypto/external/bsd/openssl/dist/include/openssl/safestack.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/include/openssl/safestack.h
diff -u src/crypto/external/bsd/openssl/dist/include/openssl/safestack.h:1.5 src/crypto/external/bsd/openssl/dist/include/openssl/safestack.h:1.6
--- src/crypto/external/bsd/openssl/dist/include/openssl/safestack.h:1.5	Sat Mar 21 20:53:10 2020
+++ src/crypto/external/bsd/openssl/dist/include/openssl/safestack.h	Sat Mar 21 22:30:15 2020
@@ -28,7 +28,7 @@ extern "C" {
 { \
 return OPENSSL_sk_num((const OPENSSL_STACK *)(const void *)sk); \
 } \
-static ossl_unused ossl_inline t2 *sk_##t1##_value(const STACK_OF(t1) *sk, int idx) \
+static ossl_unused ossl_inline t2 *sk_##t1##_value(const STACK_OF(t1)*sk, int idx) \
 { \
 return (t2 *)(void *)OPENSSL_sk_value((const OPENSSL_STACK *)(const void *)sk, idx); \
 } \
@@ -42,11 +42,11 @@ extern "C" {
 } \
 static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_new_reserve(sk_##t1##_compfunc compare, int n) \
 { \
-return (STACK_OF(t1) *)OPENSSL_sk_new_reserve((OPENSSL_sk_compfunc)compare, n); \
+return (STACK_OF(t1) *)(void *)OPENSSL_sk_new_reserve((OPENSSL_sk_compfunc)compare, n); \
 } \
 static ossl_unused ossl_inline int sk_##t1##_reserve(STACK_OF(t1) *sk, int n) \
 { \
-return OPENSSL_sk_reserve((OPENSSL_STACK *)sk, n); \
+return OPENSSL_sk_reserve((OPENSSL_STACK *)(void *)sk, n); \
 } \
 static ossl_unused ossl_inline void sk_##t1##_free(STACK_OF(t1) *sk) \
 { \



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm

2020-02-29 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Feb 29 17:14:40 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm: arm.inc

Log Message:
earmv5 / earmv5eb is a valid MACHINE_ARCH, so match it when
setting __ARM_MAX_ARCH__.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/arm.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/arm.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/arm.inc:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/arm.inc:1.3
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/arm.inc:1.2	Fri Mar  9 01:34:30 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/arm.inc	Sat Feb 29 17:14:40 2020
@@ -4,7 +4,8 @@
 	${MACHINE_ARCH} == "armeb" || \
 	${MACHINE_ARCH} == "arm"
 ARM_MAX_ARCH=4
-.	elif ${MACHINE_ARCH} == "earm" || \
+.	elif !empty(MACHINE_ARCH:Mearmv5*) || \
+	${MACHINE_ARCH} == "earm" || \
 	${MACHINE_ARCH} == "earmhf" || \
 	${MACHINE_ARCH} == "earmeb" || \
 	${MACHINE_ARCH} == "earmhfeb"



CVS commit: src/crypto/external/bsd/openssl/dist/crypto

2020-02-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb 16 15:03:22 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/md4: md4_dgst.c
src/crypto/external/bsd/openssl/dist/crypto/ripemd: rmd_dgst.c

Log Message:
use unsigned to avoid undefined behavior in shifts (nisharg joshi)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/crypto/external/bsd/openssl/dist/crypto/md4/md4_dgst.c
cvs rdiff -u -r1.6 -r1.7 \
src/crypto/external/bsd/openssl/dist/crypto/ripemd/rmd_dgst.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/md4/md4_dgst.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/md4/md4_dgst.c:1.6 src/crypto/external/bsd/openssl/dist/crypto/md4/md4_dgst.c:1.7
--- src/crypto/external/bsd/openssl/dist/crypto/md4/md4_dgst.c:1.6	Thu Feb  8 16:51:29 2018
+++ src/crypto/external/bsd/openssl/dist/crypto/md4/md4_dgst.c	Sun Feb 16 10:03:22 2020
@@ -37,10 +37,10 @@ int MD4_Init(MD4_CTX *c)
 void md4_block_data_order(MD4_CTX *c, const void *data_, size_t num)
 {
 const unsigned char *data = data_;
-register MD32_REG_T A, B, C, D, l;
+register unsigned MD32_REG_T A, B, C, D, l;
 # ifndef MD32_XARRAY
 /* See comment in crypto/sha/sha_locl.h for details. */
-MD32_REG_T XX0, XX1, XX2, XX3, XX4, XX5, XX6, XX7,
+unsigned MD32_REG_T XX0, XX1, XX2, XX3, XX4, XX5, XX6, XX7,
 XX8, XX9, XX10, XX11, XX12, XX13, XX14, XX15;
 #  define X(i)   XX##i
 # else

Index: src/crypto/external/bsd/openssl/dist/crypto/ripemd/rmd_dgst.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/ripemd/rmd_dgst.c:1.6 src/crypto/external/bsd/openssl/dist/crypto/ripemd/rmd_dgst.c:1.7
--- src/crypto/external/bsd/openssl/dist/crypto/ripemd/rmd_dgst.c:1.6	Thu Feb  8 16:51:31 2018
+++ src/crypto/external/bsd/openssl/dist/crypto/ripemd/rmd_dgst.c	Sun Feb 16 10:03:22 2020
@@ -36,11 +36,11 @@ int RIPEMD160_Init(RIPEMD160_CTX *c)
 void ripemd160_block_data_order(RIPEMD160_CTX *ctx, const void *p, size_t num)
 {
 const unsigned char *data = p;
-register MD32_REG_T A, B, C, D, E;
-MD32_REG_T a, b, c, d, e, l;
+register unsigned MD32_REG_T A, B, C, D, E;
+unsigned MD32_REG_T a, b, c, d, e, l;
 # ifndef MD32_XARRAY
 /* See comment in crypto/sha/sha_locl.h for details. */
-MD32_REG_T XX0, XX1, XX2, XX3, XX4, XX5, XX6, XX7,
+unsigned MD32_REG_T XX0, XX1, XX2, XX3, XX4, XX5, XX6, XX7,
 XX8, XX9, XX10, XX11, XX12, XX13, XX14, XX15;
 #  define X(i)   XX##i
 # else



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/rand

2020-02-15 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Feb 15 23:19:37 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/rand: rand_unix.c

Log Message:
Open /dev/urandom with O_CLOEXEC.

Let's avoid bleeding file descriptors into our clients' children,
shall we?

XXX pullup


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 \
src/crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c:1.13 src/crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c:1.14
--- src/crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c:1.13	Thu Jan 23 02:54:55 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c	Sat Feb 15 23:19:37 2020
@@ -479,7 +479,7 @@ static int get_random_device(size_t n)
 return rd->fd;
 
 /* open the random device ... */
-if ((rd->fd = open(random_device_paths[n], O_RDONLY)) == -1)
+if ((rd->fd = open(random_device_paths[n], O_RDONLY|O_CLOEXEC)) == -1)
 return rd->fd;
 
 /* ... and cache its relevant stat(2) data */



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64

2020-01-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jan 23 17:37:03 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64:
aesni-x86_64.S ecp_nistz256-x86_64.S ghash-x86_64.S rsaz-avx2.S
vpaes-x86_64.S x86_64-mont5.S

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/aesni-x86_64.S
cvs rdiff -u -r1.4 -r1.5 \

src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/ecp_nistz256-x86_64.S
cvs rdiff -u -r1.6 -r1.7 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/ghash-x86_64.S
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/rsaz-avx2.S
cvs rdiff -u -r1.5 -r1.6 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/vpaes-x86_64.S
cvs rdiff -u -r1.7 -r1.8 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/x86_64-mont5.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/aesni-x86_64.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/aesni-x86_64.S:1.9 src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/aesni-x86_64.S:1.10
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/aesni-x86_64.S:1.9	Sun Sep 23 09:33:05 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/aesni-x86_64.S	Thu Jan 23 12:37:03 2020
@@ -5,6 +5,7 @@
 .type	aesni_encrypt,@function
 .align	16
 aesni_encrypt:
+.cfi_startproc	
 	movups	(%rdi),%xmm2
 	movl	240(%rdx),%eax
 	movups	(%rdx),%xmm0
@@ -23,12 +24,14 @@ aesni_encrypt:
 	movups	%xmm2,(%rsi)
 	pxor	%xmm2,%xmm2
 	.byte	0xf3,0xc3
+.cfi_endproc	
 .size	aesni_encrypt,.-aesni_encrypt
 
 .globl	aesni_decrypt
 .type	aesni_decrypt,@function
 .align	16
 aesni_decrypt:
+.cfi_startproc	
 	movups	(%rdi),%xmm2
 	movl	240(%rdx),%eax
 	movups	(%rdx),%xmm0
@@ -47,10 +50,12 @@ aesni_decrypt:
 	movups	%xmm2,(%rsi)
 	pxor	%xmm2,%xmm2
 	.byte	0xf3,0xc3
+.cfi_endproc	
 .size	aesni_decrypt, .-aesni_decrypt
 .type	_aesni_encrypt2,@function
 .align	16
 _aesni_encrypt2:
+.cfi_startproc	
 	movups	(%rcx),%xmm0
 	shll	$4,%eax
 	movups	16(%rcx),%xmm1
@@ -76,10 +81,12 @@ _aesni_encrypt2:
 .byte	102,15,56,221,208
 .byte	102,15,56,221,216
 	.byte	0xf3,0xc3
+.cfi_endproc	
 .size	_aesni_encrypt2,.-_aesni_encrypt2
 .type	_aesni_decrypt2,@function
 .align	16
 _aesni_decrypt2:
+.cfi_startproc	
 	movups	(%rcx),%xmm0
 	shll	$4,%eax
 	movups	16(%rcx),%xmm1
@@ -105,10 +112,12 @@ _aesni_decrypt2:
 .byte	102,15,56,223,208
 .byte	102,15,56,223,216
 	.byte	0xf3,0xc3
+.cfi_endproc	
 .size	_aesni_decrypt2,.-_aesni_decrypt2
 .type	_aesni_encrypt3,@function
 .align	16
 _aesni_encrypt3:
+.cfi_startproc	
 	movups	(%rcx),%xmm0
 	shll	$4,%eax
 	movups	16(%rcx),%xmm1
@@ -139,10 +148,12 @@ _aesni_encrypt3:
 .byte	102,15,56,221,216
 .byte	102,15,56,221,224
 	.byte	0xf3,0xc3
+.cfi_endproc	
 .size	_aesni_encrypt3,.-_aesni_encrypt3
 .type	_aesni_decrypt3,@function
 .align	16
 _aesni_decrypt3:
+.cfi_startproc	
 	movups	(%rcx),%xmm0
 	shll	$4,%eax
 	movups	16(%rcx),%xmm1
@@ -173,10 +184,12 @@ _aesni_decrypt3:
 .byte	102,15,56,223,216
 .byte	102,15,56,223,224
 	.byte	0xf3,0xc3
+.cfi_endproc	
 .size	_aesni_decrypt3,.-_aesni_decrypt3
 .type	_aesni_encrypt4,@function
 .align	16
 _aesni_encrypt4:
+.cfi_startproc	
 	movups	(%rcx),%xmm0
 	shll	$4,%eax
 	movups	16(%rcx),%xmm1
@@ -213,10 +226,12 @@ _aesni_encrypt4:
 .byte	102,15,56,221,224
 .byte	102,15,56,221,232
 	.byte	0xf3,0xc3
+.cfi_endproc	
 .size	_aesni_encrypt4,.-_aesni_encrypt4
 .type	_aesni_decrypt4,@function
 .align	16
 _aesni_decrypt4:
+.cfi_startproc	
 	movups	(%rcx),%xmm0
 	shll	$4,%eax
 	movups	16(%rcx),%xmm1
@@ -253,10 +268,12 @@ _aesni_decrypt4:
 .byte	102,15,56,223,224
 .byte	102,15,56,223,232
 	.byte	0xf3,0xc3
+.cfi_endproc	
 .size	_aesni_decrypt4,.-_aesni_decrypt4
 .type	_aesni_encrypt6,@function
 .align	16
 _aesni_encrypt6:
+.cfi_startproc	
 	movups	(%rcx),%xmm0
 	shll	$4,%eax
 	movups	16(%rcx),%xmm1
@@ -307,10 +324,12 @@ _aesni_encrypt6:
 .byte	102,15,56,221,240
 .byte	102,15,56,221,248
 	.byte	0xf3,0xc3
+.cfi_endproc	
 .size	_aesni_encrypt6,.-_aesni_encrypt6
 .type	_aesni_decrypt6,@function
 .align	16
 _aesni_decrypt6:
+.cfi_startproc	
 	movups	(%rcx),%xmm0
 	shll	$4,%eax
 	movups	16(%rcx),%xmm1
@@ -361,10 +380,12 @@ _aesni_decrypt6:
 .byte	102,15,56,223,240
 .byte	102,15,56,223,248
 	.byte	0xf3,0xc3
+.cfi_endproc	
 .size	_aesni_decrypt6,.-_aesni_decrypt6
 .type	_aesni_encrypt8,@function
 .align	16
 _aesni_encrypt8:
+.cfi_startproc	
 	movups	(%rcx),%xmm0
 	shll	$4,%eax
 	movups	16(%rcx),%xmm1
@@ -425,10 +446,12 @@ _aesni_encrypt8:
 .byte	102,68,15,56,221,192
 .byte	102,68,15,56,221,200
 	.byte	0xf3,0xc3
+.cfi_endproc	
 .size	_aesni_encrypt8,.-_aesni_encrypt8
 .type	_aesni_decrypt8,@function
 .align	16
 _aesni_decrypt8:
+.cfi_startproc	
 	movups	

CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto

2020-01-23 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Thu Jan 23 12:55:09 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto: crypto.map

Log Message:
Add the EC_GFp_nistp*_methods again


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map:1.6 src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map:1.7
--- src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map:1.6	Thu Jan 23 02:54:56 2020
+++ src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map	Thu Jan 23 12:55:09 2020
@@ -1078,6 +1078,10 @@ OPENSSL_1_1_0 {
 ECPKParameters_print_fp;
 ECParameters_print;
 ECParameters_print_fp;
+EC_GFp_nistp224_method;
+EC_GFp_nistp256_method;
+EC_GFp_nistp521_method;
+EC_GFp_nistz256_method;
 EC_GF2m_simple_method;
 EC_GFp_mont_method;
 EC_GFp_nist_method;



CVS commit: src/crypto/external/bsd/openssl/lib/libcryptotest

2020-01-22 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Jan 23 07:27:00 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/lib/libcryptotest: Makefile

Log Message:
add new random.c.  builds for me.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssl/lib/libcryptotest/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcryptotest/Makefile
diff -u src/crypto/external/bsd/openssl/lib/libcryptotest/Makefile:1.1 src/crypto/external/bsd/openssl/lib/libcryptotest/Makefile:1.2
--- src/crypto/external/bsd/openssl/lib/libcryptotest/Makefile:1.1	Sun Sep 23 13:33:09 2018
+++ src/crypto/external/bsd/openssl/lib/libcryptotest/Makefile	Thu Jan 23 07:27:00 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2018/09/23 13:33:09 christos Exp $
+# $NetBSD: Makefile,v 1.2 2020/01/23 07:27:00 mrg Exp $
 
 LIBISPRIVATE=	yes
 LIB=		cryptotest
@@ -13,6 +13,6 @@ CRYPTODIST= ${NETBSDSRCDIR}/crypto
 CPPFLAGS+= -I${OPENSSLSRC}/include
 
 SRCS+=	tests.c format_output.c output_helpers.c basic_output.c stanza.c
-SRCS+=	main.c tap_bio.c driver.c init.c test_cleanup.c cb.c
+SRCS+=	main.c tap_bio.c driver.c init.c test_cleanup.c cb.c random.c
 
 .include 



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/engine

2019-12-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Dec  5 17:52:06 UTC 2019

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/engine: eng_devcrypto.c

Log Message:
PR/54740: Izumi Tsutsui: Disable cryptoengine unavailable message when
device is not configured (ENXIO).


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/dist/crypto/engine/eng_devcrypto.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/engine/eng_devcrypto.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/engine/eng_devcrypto.c:1.4 src/crypto/external/bsd/openssl/dist/crypto/engine/eng_devcrypto.c:1.5
--- src/crypto/external/bsd/openssl/dist/crypto/engine/eng_devcrypto.c:1.4	Tue Mar 12 12:58:13 2019
+++ src/crypto/external/bsd/openssl/dist/crypto/engine/eng_devcrypto.c	Thu Dec  5 12:52:06 2019
@@ -761,7 +761,7 @@ void engine_load_devcrypto_int()
 
 if ((cfd = open("/dev/crypto", O_RDWR, 0)) < 0) {
 #ifndef ENGINE_DEVCRYPTO_DEBUG
-if (errno != ENOENT)
+if (errno != ENOENT && errno != ENXIO)
 #endif
 fprintf(stderr, "Could not open /dev/crypto: %s\n", strerror(errno));
 return;



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64

2019-03-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 13 23:37:48 UTC 2019

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64:
ppccpuid.S

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/ppccpuid.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/ppccpuid.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/ppccpuid.S:1.3 src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/ppccpuid.S:1.4
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/ppccpuid.S:1.3	Sun Sep 23 09:33:05 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/ppccpuid.S	Wed Mar 13 19:37:48 2019
@@ -137,21 +137,36 @@ OPENSSL_atomic_add:
 .long	0
 
 
-.globl	OPENSSL_rdtsc
-.type	OPENSSL_rdtsc,@function
+.globl	OPENSSL_rdtsc_mftb
+.type	OPENSSL_rdtsc_mftb,@function
 .section	".opd","aw"
 .align	3
-OPENSSL_rdtsc:
-.quad	.OPENSSL_rdtsc,.TOC.@tocbase,0
+OPENSSL_rdtsc_mftb:
+.quad	.OPENSSL_rdtsc_mftb,.TOC.@tocbase,0
 .previous
 .align	4
-.OPENSSL_rdtsc:
+.OPENSSL_rdtsc_mftb:
 	mftb	3
 	blr	
 .long	0
 .byte	0,12,0x14,0,0,0,0,0
 
 
+.globl	OPENSSL_rdtsc_mfspr268
+.type	OPENSSL_rdtsc_mfspr268,@function
+.section	".opd","aw"
+.align	3
+OPENSSL_rdtsc_mfspr268:
+.quad	.OPENSSL_rdtsc_mfspr268,.TOC.@tocbase,0
+.previous
+.align	4
+.OPENSSL_rdtsc_mfspr268:
+	mfspr	3,268
+	blr	
+.long	0
+.byte	0,12,0x14,0,0,0,0,0
+
+
 .globl	OPENSSL_cleanse
 .type	OPENSSL_cleanse,@function
 .section	".opd","aw"
@@ -222,15 +237,15 @@ CRYPTO_memcmp:
 .byte	0,12,0x14,0,0,0,3,0
 .long	0
 
-.globl	OPENSSL_instrument_bus
-.type	OPENSSL_instrument_bus,@function
+.globl	OPENSSL_instrument_bus_mftb
+.type	OPENSSL_instrument_bus_mftb,@function
 .section	".opd","aw"
 .align	3
-OPENSSL_instrument_bus:
-.quad	.OPENSSL_instrument_bus,.TOC.@tocbase,0
+OPENSSL_instrument_bus_mftb:
+.quad	.OPENSSL_instrument_bus_mftb,.TOC.@tocbase,0
 .previous
 .align	4
-.OPENSSL_instrument_bus:
+.OPENSSL_instrument_bus_mftb:
 	mtctr	4
 
 	mftb	7
@@ -260,15 +275,15 @@ OPENSSL_instrument_bus:
 .long	0
 
 
-.globl	OPENSSL_instrument_bus2
-.type	OPENSSL_instrument_bus2,@function
+.globl	OPENSSL_instrument_bus2_mftb
+.type	OPENSSL_instrument_bus2_mftb,@function
 .section	".opd","aw"
 .align	3
-OPENSSL_instrument_bus2:
-.quad	.OPENSSL_instrument_bus2,.TOC.@tocbase,0
+OPENSSL_instrument_bus2_mftb:
+.quad	.OPENSSL_instrument_bus2_mftb,.TOC.@tocbase,0
 .previous
 .align	4
-.OPENSSL_instrument_bus2:
+.OPENSSL_instrument_bus2_mftb:
 	mr	0,4
 	slwi	4,4,2
 
@@ -317,3 +332,99 @@ OPENSSL_instrument_bus2:
 .byte	0,12,0x14,0,0,0,3,0
 .long	0
 
+
+.globl	OPENSSL_instrument_bus_mfspr268
+.type	OPENSSL_instrument_bus_mfspr268,@function
+.section	".opd","aw"
+.align	3
+OPENSSL_instrument_bus_mfspr268:
+.quad	.OPENSSL_instrument_bus_mfspr268,.TOC.@tocbase,0
+.previous
+.align	4
+.OPENSSL_instrument_bus_mfspr268:
+	mtctr	4
+
+	mfspr	7,268
+	li	8,0
+
+	dcbf	0,3
+	lwarx	6,0,3
+	add	6,6,8
+	stwcx.	6,0,3
+	stwx	6,0,3
+
+.Loop3:	mfspr	6,268
+	sub	8,6,7
+	mr	7,6
+	dcbf	0,3
+	lwarx	6,0,3
+	add	6,6,8
+	stwcx.	6,0,3
+	stwx	6,0,3
+	addi	3,3,4
+	bc	16,0,.Loop3
+
+	mr	3,4
+	blr	
+.long	0
+.byte	0,12,0x14,0,0,0,2,0
+.long	0
+
+
+.globl	OPENSSL_instrument_bus2_mfspr268
+.type	OPENSSL_instrument_bus2_mfspr268,@function
+.section	".opd","aw"
+.align	3
+OPENSSL_instrument_bus2_mfspr268:
+.quad	.OPENSSL_instrument_bus2_mfspr268,.TOC.@tocbase,0
+.previous
+.align	4
+.OPENSSL_instrument_bus2_mfspr268:
+	mr	0,4
+	slwi	4,4,2
+
+	mfspr	7,268
+	li	8,0
+
+	dcbf	0,3
+	lwarx	6,0,3
+	add	6,6,8
+	stwcx.	6,0,3
+	stwx	6,0,3
+
+	mfspr	6,268
+	sub	8,6,7
+	mr	7,6
+	mr	9,8
+.Loop4:
+	dcbf	0,3
+	lwarx	6,0,3
+	add	6,6,8
+	stwcx.	6,0,3
+	stwx	6,0,3
+
+	addic.	5,5,-1
+	beq	.Ldone4
+
+	mfspr	6,268
+	sub	8,6,7
+	mr	7,6
+	cmplw	7,8,9
+	mr	9,8
+
+	mfcr	6
+	not	6,6
+	rlwinm	6,6,1,29,29
+
+	sub.	4,4,6
+	add	3,3,6
+	bne	.Loop4
+
+.Ldone4:
+	srwi	4,4,2
+	sub	3,0,4
+	blr	
+.long	0
+.byte	0,12,0x14,0,0,0,3,0
+.long	0
+



CVS commit: src/crypto/external/bsd/openssl/dist/crypto

2019-03-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Mar 13 09:42:01 UTC 2019

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto: armcap.c

Log Message:
fix merge botch in previous.  i *think* this is now right.  it sure builds..


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/crypto/external/bsd/openssl/dist/crypto/armcap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/armcap.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/armcap.c:1.9 src/crypto/external/bsd/openssl/dist/crypto/armcap.c:1.10
--- src/crypto/external/bsd/openssl/dist/crypto/armcap.c:1.9	Tue Mar 12 16:58:12 2019
+++ src/crypto/external/bsd/openssl/dist/crypto/armcap.c	Wed Mar 13 09:42:01 2019
@@ -206,6 +206,7 @@ void OPENSSL_cpuid_setup(void)
 }
 # endif
 
+#if __ARM_MAX_ARCH__>=7
 /* Things that getauxval didn't tell us */
 if (sigsetjmp(ill_jmp, 1) == 0) {
 _armv7_tick();



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc

2019-03-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Mar 13 09:23:59 UTC 2019

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc: ppccpuid.S

Log Message:
regen for openssl 1.1.1b.

not 100% sure this is right but my build works now.  here's what i did:

   % cd crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc
   % make regen

after checking that the openssl generator calling code had not change
(but the relevant .pl file had.)


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S:1.11 src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S:1.12
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S:1.11	Sun Jan  6 22:22:02 2019
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S	Wed Mar 13 09:23:59 2019
@@ -102,10 +102,11 @@ OPENSSL_atomic_add:
 .long	0
 
 
-.globl	OPENSSL_rdtsc
-.type	OPENSSL_rdtsc,@function
+.globl	OPENSSL_rdtsc_mftb
+.type	OPENSSL_rdtsc_mftb,@function
 .align	4
-OPENSSL_rdtsc:
+OPENSSL_rdtsc_mftb:
+	mftb	3
 	mfspr	0,287
 	srwi	0,0,0x10
 	cmplwi	0,0x1
@@ -128,6 +129,16 @@ OPENSSL_rdtsc:
 .byte	0,12,0x14,0,0,0,0,0
 
 
+.globl	OPENSSL_rdtsc_mfspr268
+.type	OPENSSL_rdtsc_mfspr268,@function
+.align	4
+OPENSSL_rdtsc_mfspr268:
+	mfspr	3,268
+	blr	
+.long	0
+.byte	0,12,0x14,0,0,0,0,0
+
+
 .globl	OPENSSL_cleanse
 .type	OPENSSL_cleanse,@function
 .align	4
@@ -188,10 +199,10 @@ CRYPTO_memcmp:
 .byte	0,12,0x14,0,0,0,3,0
 .long	0
 
-.globl	OPENSSL_instrument_bus
-.type	OPENSSL_instrument_bus,@function
+.globl	OPENSSL_instrument_bus_mftb
+.type	OPENSSL_instrument_bus_mftb,@function
 .align	4
-OPENSSL_instrument_bus:
+OPENSSL_instrument_bus_mftb:
 	mtctr	4
 
 	mftb	7
@@ -221,10 +232,10 @@ OPENSSL_instrument_bus:
 .long	0
 
 
-.globl	OPENSSL_instrument_bus2
-.type	OPENSSL_instrument_bus2,@function
+.globl	OPENSSL_instrument_bus2_mftb
+.type	OPENSSL_instrument_bus2_mftb,@function
 .align	4
-OPENSSL_instrument_bus2:
+OPENSSL_instrument_bus2_mftb:
 	mr	0,4
 	slwi	4,4,2
 
@@ -273,3 +284,89 @@ OPENSSL_instrument_bus2:
 .byte	0,12,0x14,0,0,0,3,0
 .long	0
 
+
+.globl	OPENSSL_instrument_bus_mfspr268
+.type	OPENSSL_instrument_bus_mfspr268,@function
+.align	4
+OPENSSL_instrument_bus_mfspr268:
+	mtctr	4
+
+	mfspr	7,268
+	li	8,0
+
+	dcbf	0,3
+	lwarx	6,0,3
+	add	6,6,8
+	stwcx.	6,0,3
+	stwx	6,0,3
+
+.Loop3:	mfspr	6,268
+	sub	8,6,7
+	mr	7,6
+	dcbf	0,3
+	lwarx	6,0,3
+	add	6,6,8
+	stwcx.	6,0,3
+	stwx	6,0,3
+	addi	3,3,4
+	bc	16,0,.Loop3
+
+	mr	3,4
+	blr	
+.long	0
+.byte	0,12,0x14,0,0,0,2,0
+.long	0
+
+
+.globl	OPENSSL_instrument_bus2_mfspr268
+.type	OPENSSL_instrument_bus2_mfspr268,@function
+.align	4
+OPENSSL_instrument_bus2_mfspr268:
+	mr	0,4
+	slwi	4,4,2
+
+	mfspr	7,268
+	li	8,0
+
+	dcbf	0,3
+	lwarx	6,0,3
+	add	6,6,8
+	stwcx.	6,0,3
+	stwx	6,0,3
+
+	mfspr	6,268
+	sub	8,6,7
+	mr	7,6
+	mr	9,8
+.Loop4:
+	dcbf	0,3
+	lwarx	6,0,3
+	add	6,6,8
+	stwcx.	6,0,3
+	stwx	6,0,3
+
+	addic.	5,5,-1
+	beq	.Ldone4
+
+	mfspr	6,268
+	sub	8,6,7
+	mr	7,6
+	.long	0x7f884840
+	mr	9,8
+
+	mfcr	6
+	not	6,6
+	rlwinm	6,6,1,29,29
+
+	sub.	4,4,6
+	add	3,3,6
+	bne	.Loop4
+
+.Ldone4:
+	srwi	4,4,2
+	sub	3,0,4
+	blr	
+.long	0
+.byte	0,12,0x14,0,0,0,3,0
+.long	0
+



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/man

2019-01-26 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jan 27 04:21:26 UTC 2019

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/man: OPENSSL_ia32cap.3

Log Message:
fix duplicated chunk from merge


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 \
src/crypto/external/bsd/openssl/lib/libcrypto/man/OPENSSL_ia32cap.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/man/OPENSSL_ia32cap.3
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/man/OPENSSL_ia32cap.3:1.19 src/crypto/external/bsd/openssl/lib/libcrypto/man/OPENSSL_ia32cap.3:1.20
--- src/crypto/external/bsd/openssl/lib/libcrypto/man/OPENSSL_ia32cap.3:1.19	Sun Jan 27 02:08:33 2019
+++ src/crypto/external/bsd/openssl/lib/libcrypto/man/OPENSSL_ia32cap.3	Sun Jan 27 04:21:26 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: OPENSSL_ia32cap.3,v 1.19 2019/01/27 02:08:33 pgoyette Exp $
+.\"	$NetBSD: OPENSSL_ia32cap.3,v 1.20 2019/01/27 04:21:26 dholland Exp $
 .\"
 .\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32)
 .\"
@@ -279,14 +279,6 @@ the problem by making build procedure us
 \&   #!/bin/sh
 \&   exec clang \-no\-integrated\-as "$@"
 .Ve
-.SH "NOTES"
-.IX Header "NOTES"
-Even though \s-1AVX512\s0 support was implemented in llvm 3.6, compilation of
-assembly modules apparently requires explicit \-march flag. But then
-compiler generates processor-specific code, which in turn contradicts
-the mere idea of run-time switch execution facilitated by the variable
-in question. Till the limitation is lifted, it's possible to work around
-the problem by making build procedure use following script:
 .PP
 instead of real clang. In which case it doesn't matter which clang
 version is used, as it is \s-1GNU\s0 assembler version that will be checked.



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64

2019-01-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan  6 22:22:26 UTC 2019

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64:
sha256p8-ppc.S sha512p8-ppc.S

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/sha256p8-ppc.S 
\
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/sha512p8-ppc.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/sha256p8-ppc.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/sha256p8-ppc.S:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/sha256p8-ppc.S:1.3
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/sha256p8-ppc.S:1.2	Sun Sep 23 09:33:05 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/sha256p8-ppc.S	Sun Jan  6 17:22:26 2019
@@ -24,7 +24,7 @@ sha256_block_p8:
 	stvx	30,10,1
 	stvx	31,11,1
 	li	11,-4096+255
-	stw	12,428(1)
+	stw	12,332(1)
 	li	10,0x10
 	std	26,336(1)
 	li	26,0x20
@@ -626,24 +626,17 @@ L16_xx:
 	vperm	4,4,7,9
 	.long	0x7C001F19
 	.long	0x7C8A1F19
-	li	10,207
+	addi	11,1,207
 	mtlr	8
-	li	11,223
 	mtspr	256,12
-	lvx	24,10,1
-	addi	10,10,32
-	lvx	25,11,1
-	addi	11,11,32
-	lvx	26,10,1
-	addi	10,10,32
-	lvx	27,11,1
-	addi	11,11,32
-	lvx	28,10,1
-	addi	10,10,32
-	lvx	29,11,1
-	addi	11,11,32
-	lvx	30,10,1
-	lvx	31,11,1
+	lvx	24,0,11
+	lvx	25,10,11
+	lvx	26,26,11
+	lvx	27,27,11
+	lvx	28,28,11
+	lvx	29,29,11
+	lvx	30,30,11
+	lvx	31,31,11
 	ld	26,336(1)
 	ld	27,344(1)
 	ld	28,352(1)
Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/sha512p8-ppc.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/sha512p8-ppc.S:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/sha512p8-ppc.S:1.3
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/sha512p8-ppc.S:1.2	Sun Sep 23 09:33:05 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/sha512p8-ppc.S	Sun Jan  6 17:22:26 2019
@@ -24,7 +24,7 @@ sha512_block_p8:
 	stvx	30,10,1
 	stvx	31,11,1
 	li	11,-4096+255
-	stw	12,428(1)
+	stw	12,332(1)
 	li	10,0x10
 	std	26,336(1)
 	li	26,0x20
@@ -628,24 +628,17 @@ L16_xx:
 	.long	0x7C4A1F99
 	.long	0x7C9A1F99
 	.long	0x7CDB1F99
-	li	10,207
+	addi	11,1,207
 	mtlr	8
-	li	11,223
 	mtspr	256,12
-	lvx	24,10,1
-	addi	10,10,32
-	lvx	25,11,1
-	addi	11,11,32
-	lvx	26,10,1
-	addi	10,10,32
-	lvx	27,11,1
-	addi	11,11,32
-	lvx	28,10,1
-	addi	10,10,32
-	lvx	29,11,1
-	addi	11,11,32
-	lvx	30,10,1
-	lvx	31,11,1
+	lvx	24,0,11
+	lvx	25,10,11
+	lvx	26,26,11
+	lvx	27,27,11
+	lvx	28,28,11
+	lvx	29,29,11
+	lvx	30,30,11
+	lvx	31,31,11
 	ld	26,336(1)
 	ld	27,344(1)
 	ld	28,352(1)



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc

2019-01-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan  6 22:22:02 UTC 2019

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc: ppccpuid.S
sha256p8-ppc.S sha512p8-ppc.S

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha256p8-ppc.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha512p8-ppc.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S:1.10 src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S:1.11
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S:1.10	Sat Mar  3 22:25:18 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S	Sun Jan  6 17:22:02 2019
@@ -106,6 +106,17 @@ OPENSSL_atomic_add:
 .type	OPENSSL_rdtsc,@function
 .align	4
 OPENSSL_rdtsc:
+	mfspr	0,287
+	srwi	0,0,0x10
+	cmplwi	0,0x1
+	bgt	.Loop_rdtsc
+.Loop_rdtsc_601:
+	mfrtcu	5
+	mfrtcl	3
+	mfrtcu	4
+	.long	0x7c042840
+	bne	.Loop_rdtsc_601
+	blr	
 .Loop_rdtsc:
 	mftbu	5
 	mftb	3

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha256p8-ppc.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha256p8-ppc.S:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha256p8-ppc.S:1.3
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha256p8-ppc.S:1.2	Sun Sep 23 09:33:04 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha256p8-ppc.S	Sun Jan  6 17:22:02 2019
@@ -24,7 +24,7 @@ sha256_block_p8:
 	stvx	30,10,1
 	stvx	31,11,1
 	li	11,-4096+255
-	stw	12,348(1)
+	stw	12,300(1)
 	li	10,0x10
 	stw	26,304(1)
 	li	26,0x20
@@ -626,24 +626,17 @@ L16_xx:
 	vperm	4,4,7,9
 	.long	0x7C001F19
 	.long	0x7C8A1F19
-	li	10,175
+	addi	11,1,175
 	mtlr	8
-	li	11,191
 	mtspr	256,12
-	lvx	24,10,1
-	addi	10,10,32
-	lvx	25,11,1
-	addi	11,11,32
-	lvx	26,10,1
-	addi	10,10,32
-	lvx	27,11,1
-	addi	11,11,32
-	lvx	28,10,1
-	addi	10,10,32
-	lvx	29,11,1
-	addi	11,11,32
-	lvx	30,10,1
-	lvx	31,11,1
+	lvx	24,0,11
+	lvx	25,10,11
+	lvx	26,26,11
+	lvx	27,27,11
+	lvx	28,28,11
+	lvx	29,29,11
+	lvx	30,30,11
+	lvx	31,31,11
 	lwz	26,304(1)
 	lwz	27,308(1)
 	lwz	28,312(1)
Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha512p8-ppc.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha512p8-ppc.S:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha512p8-ppc.S:1.3
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha512p8-ppc.S:1.2	Sun Sep 23 09:33:04 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha512p8-ppc.S	Sun Jan  6 17:22:02 2019
@@ -24,7 +24,7 @@ sha512_block_p8:
 	stvx	30,10,1
 	stvx	31,11,1
 	li	11,-4096+255
-	stw	12,348(1)
+	stw	12,300(1)
 	li	10,0x10
 	stw	26,304(1)
 	li	26,0x20
@@ -628,24 +628,17 @@ L16_xx:
 	.long	0x7C4A1F99
 	.long	0x7C9A1F99
 	.long	0x7CDB1F99
-	li	10,175
+	addi	11,1,175
 	mtlr	8
-	li	11,191
 	mtspr	256,12
-	lvx	24,10,1
-	addi	10,10,32
-	lvx	25,11,1
-	addi	11,11,32
-	lvx	26,10,1
-	addi	10,10,32
-	lvx	27,11,1
-	addi	11,11,32
-	lvx	28,10,1
-	addi	10,10,32
-	lvx	29,11,1
-	addi	11,11,32
-	lvx	30,10,1
-	lvx	31,11,1
+	lvx	24,0,11
+	lvx	25,10,11
+	lvx	26,26,11
+	lvx	27,27,11
+	lvx	28,28,11
+	lvx	29,29,11
+	lvx	30,30,11
+	lvx	31,31,11
 	lwz	26,304(1)
 	lwz	27,308(1)
 	lwz	28,312(1)



CVS commit: src/crypto/external/bsd/openssl/dist/crypto

2019-01-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan  6 22:20:50 UTC 2019

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto: ppccpuid.pl

Log Message:
PR/53838: Scole Mail: OPENSSL_rdtsc() is reading a time counter
for randomness, and the powerpc code uses mftbu and mftb for access.
The 601 is different than other powerpcs. It doesn't have a time
base register (TBR), but a real time clock (RTC) so it needs to
use different calls like mfrtcu/mfrtcl instead.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/crypto/external/bsd/openssl/dist/crypto/ppccpuid.pl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/ppccpuid.pl
diff -u src/crypto/external/bsd/openssl/dist/crypto/ppccpuid.pl:1.6 src/crypto/external/bsd/openssl/dist/crypto/ppccpuid.pl:1.7
--- src/crypto/external/bsd/openssl/dist/crypto/ppccpuid.pl:1.6	Thu Feb  8 16:51:24 2018
+++ src/crypto/external/bsd/openssl/dist/crypto/ppccpuid.pl	Sun Jan  6 17:20:50 2019
@@ -132,6 +132,17 @@ $code.=<<___	if ($flavour =~ /64/);
 	mftb	r3
 ___
 $code.=<<___	if ($flavour !~ /64/);
+	mfspr	r0,287
+	srwi	r0,r0,0x10
+	cmplwi	r0,0x1
+	bgt	.Loop_rdtsc
+.Loop_rdtsc_601:	
+	mfrtcu	r5
+	mfrtcl	r3
+	mfrtcu	r4
+	cmplw	r4,r5
+	bne	.Loop_rdtsc_601
+	blr
 Loop_rdtsc:
 	mftbu	r5
 	mftb	r3



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64

2018-12-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  9 21:39:48 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64: aes.inc

Log Message:
add new file (Robert Swindells)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/aes.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/aes.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/aes.inc:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/aes.inc:1.3
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/aes.inc:1.2	Wed Mar  7 11:05:44 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/aes.inc	Sun Dec  9 16:39:48 2018
@@ -1,4 +1,6 @@
 .PATH.S: ${.PARSEDIR}
-#AES_SRCS = aesv8-armx.S aes_cbc.c
-#AESCPPFLAGS = -DAES_ASM
+#AES_SRCS = aesv8-armx.S aes_cbc.c vpaes-armv8.S
+#AESCPPFLAGS = -DAES_ASM -DVPAES_ASM
+AES_SRCS = aes_core.c aes_cbc.c vpaes-armv8.S
+AESCPPFLAGS = -DVPAES_ASM
 .include "../../aes.inc"



CVS commit: src/crypto/external/bsd/openssl/lib/engines

2018-12-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  8 23:24:02 UTC 2018

Added Files:
src/crypto/external/bsd/openssl/lib/engines: Makefile engines.mk
src/crypto/external/bsd/openssl/lib/engines/capi: Makefile
src/crypto/external/bsd/openssl/lib/engines/dasync: Makefile
src/crypto/external/bsd/openssl/lib/engines/ossltest: Makefile
src/crypto/external/bsd/openssl/lib/engines/padlock: Makefile

Log Message:
Add engines infrastructure, not hooked to the build:
1. sets needs to be fixed
2. need to decide if I am going to add engine.so.MAJOR or use engine.so
   like OpenSSL wants
3. padlock is MD (x86) needs asm to be added, and conditionally built


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/crypto/external/bsd/openssl/lib/engines/Makefile \
src/crypto/external/bsd/openssl/lib/engines/engines.mk
cvs rdiff -u -r0 -r1.1 \
src/crypto/external/bsd/openssl/lib/engines/capi/Makefile
cvs rdiff -u -r0 -r1.1 \
src/crypto/external/bsd/openssl/lib/engines/dasync/Makefile
cvs rdiff -u -r0 -r1.1 \
src/crypto/external/bsd/openssl/lib/engines/ossltest/Makefile
cvs rdiff -u -r0 -r1.1 \
src/crypto/external/bsd/openssl/lib/engines/padlock/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/crypto/external/bsd/openssl/lib/engines/Makefile
diff -u /dev/null src/crypto/external/bsd/openssl/lib/engines/Makefile:1.1
--- /dev/null	Sat Dec  8 18:24:02 2018
+++ src/crypto/external/bsd/openssl/lib/engines/Makefile	Sat Dec  8 18:24:01 2018
@@ -0,0 +1,8 @@
+#	$NetBSD: Makefile,v 1.1 2018/12/08 23:24:01 christos Exp $
+
+.include "bsd.own.mk"
+
+# OpenSSL engines.
+SUBDIR= capi dasync ossltest padlock
+
+.include 
Index: src/crypto/external/bsd/openssl/lib/engines/engines.mk
diff -u /dev/null src/crypto/external/bsd/openssl/lib/engines/engines.mk:1.1
--- /dev/null	Sat Dec  8 18:24:02 2018
+++ src/crypto/external/bsd/openssl/lib/engines/engines.mk	Sat Dec  8 18:24:01 2018
@@ -0,0 +1,36 @@
+#	$NetBSD: engines.mk,v 1.1 2018/12/08 23:24:01 christos Exp $
+
+NOLINT=		# don't build a lint library
+NOPROFILE=	# don't build a profile library
+NOPICINSTALL=	# don't install _pic.a library
+
+.include 
+
+SHLIB_MAJOR=0
+SHLIB_MINOR=0
+
+CRYPTODIST= ${NETBSDSRCDIR}/crypto
+.include "${NETBSDSRCDIR}/crypto/Makefile.openssl"
+.PATH: ${OPENSSLSRC}/engines
+
+CPPFLAGS+= -I${OPENSSLSRC}/include -I${OPENSSLSRC}/../include
+ 
+.if defined(MLIBDIR)
+LIBDIR=/usr/lib/${MLIBDIR}/openssl
+.else
+LIBDIR=/usr/lib/openssl
+.endif
+
+.if ${MKPIC} != "no"
+.PRECIOUS: ${DESTDIR}${LIBDIR}/${LIB}.so
+libinstall:: ${DESTDIR}${LIBDIR}/${LIB}.so
+.else
+libinstall::
+.endif
+
+.include 
+
+${DESTDIR}${LIBDIR}/${LIB}.so: lib${LIB}.so.${SHLIB_FULLVERSION}
+	${_MKTARGET_INSTALL}
+	${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+	${.ALLSRC} ${.TARGET}

Index: src/crypto/external/bsd/openssl/lib/engines/capi/Makefile
diff -u /dev/null src/crypto/external/bsd/openssl/lib/engines/capi/Makefile:1.1
--- /dev/null	Sat Dec  8 18:24:02 2018
+++ src/crypto/external/bsd/openssl/lib/engines/capi/Makefile	Sat Dec  8 18:24:01 2018
@@ -0,0 +1,6 @@
+#	$NetBSD: Makefile,v 1.1 2018/12/08 23:24:01 christos Exp $
+
+LIB=	capi
+SRCS=	e_capi.c e_capi_err.c
+
+.include "../engines.mk"

Index: src/crypto/external/bsd/openssl/lib/engines/dasync/Makefile
diff -u /dev/null src/crypto/external/bsd/openssl/lib/engines/dasync/Makefile:1.1
--- /dev/null	Sat Dec  8 18:24:02 2018
+++ src/crypto/external/bsd/openssl/lib/engines/dasync/Makefile	Sat Dec  8 18:24:01 2018
@@ -0,0 +1,6 @@
+#	$NetBSD: Makefile,v 1.1 2018/12/08 23:24:01 christos Exp $
+
+LIB=	dasync
+SRCS=	e_dasync.c e_dasync_err.c
+
+.include "../engines.mk"

Index: src/crypto/external/bsd/openssl/lib/engines/ossltest/Makefile
diff -u /dev/null src/crypto/external/bsd/openssl/lib/engines/ossltest/Makefile:1.1
--- /dev/null	Sat Dec  8 18:24:02 2018
+++ src/crypto/external/bsd/openssl/lib/engines/ossltest/Makefile	Sat Dec  8 18:24:02 2018
@@ -0,0 +1,6 @@
+#	$NetBSD: Makefile,v 1.1 2018/12/08 23:24:02 christos Exp $
+
+LIB=	ossltest
+SRCS=	e_ossltest.c e_ossltest_err.c
+
+.include "../engines.mk"

Index: src/crypto/external/bsd/openssl/lib/engines/padlock/Makefile
diff -u /dev/null src/crypto/external/bsd/openssl/lib/engines/padlock/Makefile:1.1
--- /dev/null	Sat Dec  8 18:24:02 2018
+++ src/crypto/external/bsd/openssl/lib/engines/padlock/Makefile	Sat Dec  8 18:24:02 2018
@@ -0,0 +1,6 @@
+#	$NetBSD: Makefile,v 1.1 2018/12/08 23:24:02 christos Exp $
+
+LIB=	padlock
+SRCS=	e_padlock.c
+
+.include "../engines.mk"



CVS commit: src/crypto/external/bsd/openssl

2018-12-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  8 22:35:45 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/dist: CHANGES Configure NEWS README
e_os.h
src/crypto/external/bsd/openssl/dist/apps: ca.c ocsp.c openssl.cnf
s_server.c speed.c
src/crypto/external/bsd/openssl/dist/crypto: cryptlib.c
src/crypto/external/bsd/openssl/dist/crypto/bio: bio_lib.c bss_log.c
src/crypto/external/bsd/openssl/dist/crypto/bn: bn_exp.c bn_lib.c
src/crypto/external/bsd/openssl/dist/crypto/bn/asm: x86_64-gcc.c
src/crypto/external/bsd/openssl/dist/crypto/ec: ec_ameth.c
src/crypto/external/bsd/openssl/dist/crypto/engine: eng_devcrypto.c
src/crypto/external/bsd/openssl/dist/crypto/evp: e_aes.c
src/crypto/external/bsd/openssl/dist/crypto/rand: rand_unix.c
randfile.c
src/crypto/external/bsd/openssl/dist/crypto/rsa: rsa_lib.c
src/crypto/external/bsd/openssl/dist/crypto/ui: ui_openssl.c
src/crypto/external/bsd/openssl/dist/crypto/x509: x509_vfy.c
src/crypto/external/bsd/openssl/dist/include/internal: tsan_assist.h
src/crypto/external/bsd/openssl/dist/ssl: d1_lib.c s3_cbc.c s3_enc.c
s3_lib.c ssl_ciph.c ssl_lib.c ssl_locl.h t1_lib.c
src/crypto/external/bsd/openssl/dist/test: ecdsatest.c evp_extra_test.c
evp_test.c
src/crypto/external/bsd/openssl/dist/util: mkdef.pl
src/crypto/external/bsd/openssl/lib/libcrypto: crypto.inc
Removed Files:
src/crypto/external/bsd/openssl/dist/doc/man3:
SSL_CTX_set_client_CA_list.pod SSL_get_client_CA_list.pod
SSL_get_server_tmp_key.pod

Log Message:
Merge conflicts


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/crypto/external/bsd/openssl/dist/CHANGES \
src/crypto/external/bsd/openssl/dist/NEWS \
src/crypto/external/bsd/openssl/dist/README
cvs rdiff -u -r1.21 -r1.22 src/crypto/external/bsd/openssl/dist/Configure
cvs rdiff -u -r1.11 -r1.12 src/crypto/external/bsd/openssl/dist/e_os.h
cvs rdiff -u -r1.17 -r1.18 src/crypto/external/bsd/openssl/dist/apps/ca.c \
src/crypto/external/bsd/openssl/dist/apps/s_server.c
cvs rdiff -u -r1.16 -r1.17 src/crypto/external/bsd/openssl/dist/apps/ocsp.c
cvs rdiff -u -r1.6 -r1.7 \
src/crypto/external/bsd/openssl/dist/apps/openssl.cnf
cvs rdiff -u -r1.15 -r1.16 src/crypto/external/bsd/openssl/dist/apps/speed.c
cvs rdiff -u -r1.12 -r1.13 \
src/crypto/external/bsd/openssl/dist/crypto/cryptlib.c
cvs rdiff -u -r1.5 -r1.6 \
src/crypto/external/bsd/openssl/dist/crypto/bio/bio_lib.c
cvs rdiff -u -r1.9 -r1.10 \
src/crypto/external/bsd/openssl/dist/crypto/bio/bss_log.c
cvs rdiff -u -r1.17 -r1.18 \
src/crypto/external/bsd/openssl/dist/crypto/bn/bn_exp.c
cvs rdiff -u -r1.9 -r1.10 \
src/crypto/external/bsd/openssl/dist/crypto/bn/bn_lib.c
cvs rdiff -u -r1.9 -r1.10 \
src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gcc.c
cvs rdiff -u -r1.7 -r1.8 \
src/crypto/external/bsd/openssl/dist/crypto/ec/ec_ameth.c
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/dist/crypto/engine/eng_devcrypto.c
cvs rdiff -u -r1.16 -r1.17 \
src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c
cvs rdiff -u -r1.9 -r1.10 \
src/crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c
cvs rdiff -u -r1.10 -r1.11 \
src/crypto/external/bsd/openssl/dist/crypto/rand/randfile.c
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/dist/crypto/rsa/rsa_lib.c
cvs rdiff -u -r1.12 -r1.13 \
src/crypto/external/bsd/openssl/dist/crypto/ui/ui_openssl.c
cvs rdiff -u -r1.14 -r1.15 \
src/crypto/external/bsd/openssl/dist/crypto/x509/x509_vfy.c
cvs rdiff -u -r1.1.1.1 -r0 \

src/crypto/external/bsd/openssl/dist/doc/man3/SSL_CTX_set_client_CA_list.pod \
src/crypto/external/bsd/openssl/dist/doc/man3/SSL_get_client_CA_list.pod \
src/crypto/external/bsd/openssl/dist/doc/man3/SSL_get_server_tmp_key.pod
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/dist/include/internal/tsan_assist.h
cvs rdiff -u -r1.8 -r1.9 src/crypto/external/bsd/openssl/dist/ssl/d1_lib.c \
src/crypto/external/bsd/openssl/dist/ssl/s3_cbc.c
cvs rdiff -u -r1.13 -r1.14 src/crypto/external/bsd/openssl/dist/ssl/s3_enc.c \
src/crypto/external/bsd/openssl/dist/ssl/ssl_lib.c
cvs rdiff -u -r1.22 -r1.23 src/crypto/external/bsd/openssl/dist/ssl/s3_lib.c
cvs rdiff -u -r1.16 -r1.17 \
src/crypto/external/bsd/openssl/dist/ssl/ssl_ciph.c
cvs rdiff -u -r1.19 -r1.20 \
src/crypto/external/bsd/openssl/dist/ssl/ssl_locl.h
cvs rdiff -u -r1.27 -r1.28 src/crypto/external/bsd/openssl/dist/ssl/t1_lib.c
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/dist/test/ecdsatest.c
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/dist/test/evp_extra_test.c \
src/crypto/external/bsd/openssl/dist/test/evp_test.c
cvs rdiff -u -r1.9 -r1.10 

CVS commit: src/crypto/external/bsd/openssl

2018-12-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  8 17:07:27 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/engine: eng_devcrypto.c
src/crypto/external/bsd/openssl/include/openssl: opensslconf.h
src/crypto/external/bsd/openssl/lib/libcrypto: engine.inc

Log Message:
Put back devcrypto (what was called cryptodev) engine support.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/openssl/dist/crypto/engine/eng_devcrypto.c
cvs rdiff -u -r1.6 -r1.7 \
src/crypto/external/bsd/openssl/include/openssl/opensslconf.h
cvs rdiff -u -r1.12 -r1.13 \
src/crypto/external/bsd/openssl/lib/libcrypto/engine.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/engine/eng_devcrypto.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/engine/eng_devcrypto.c:1.1.1.1 src/crypto/external/bsd/openssl/dist/crypto/engine/eng_devcrypto.c:1.2
--- src/crypto/external/bsd/openssl/dist/crypto/engine/eng_devcrypto.c:1.1.1.1	Sun Sep 23 09:17:46 2018
+++ src/crypto/external/bsd/openssl/dist/crypto/engine/eng_devcrypto.c	Sat Dec  8 12:07:27 2018
@@ -177,7 +177,8 @@ static int cipher_do_cipher(EVP_CIPHER_C
 if (EVP_CIPHER_CTX_iv_length(ctx) > 0) {
 assert(inl >= EVP_CIPHER_CTX_iv_length(ctx));
 if (!EVP_CIPHER_CTX_encrypting(ctx)) {
-unsigned char *ivptr = in + inl - EVP_CIPHER_CTX_iv_length(ctx);
+const unsigned char *ivptr =
+		in + inl - EVP_CIPHER_CTX_iv_length(ctx);
 
 memcpy(saved_iv, ivptr, EVP_CIPHER_CTX_iv_length(ctx));
 }

Index: src/crypto/external/bsd/openssl/include/openssl/opensslconf.h
diff -u src/crypto/external/bsd/openssl/include/openssl/opensslconf.h:1.6 src/crypto/external/bsd/openssl/include/openssl/opensslconf.h:1.7
--- src/crypto/external/bsd/openssl/include/openssl/opensslconf.h:1.6	Mon Oct 15 08:45:52 2018
+++ src/crypto/external/bsd/openssl/include/openssl/opensslconf.h	Sat Dec  8 12:07:27 2018
@@ -45,8 +45,10 @@ extern "C" {
 #ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
 # define OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
 #endif
-#ifndef OPENSSL_NO_DEVCRYPTOENG
-# define OPENSSL_NO_DEVCRYPTOENG
+#if 0
+# ifndef OPENSSL_NO_DEVCRYPTOENG
+#  define OPENSSL_NO_DEVCRYPTOENG
+# endif
 #endif
 #if !defined(_LP64) || defined(__sparc64__)
 # ifndef OPENSSL_NO_EC_NISTP_64_GCC_128

Index: src/crypto/external/bsd/openssl/lib/libcrypto/engine.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/engine.inc:1.12 src/crypto/external/bsd/openssl/lib/libcrypto/engine.inc:1.13
--- src/crypto/external/bsd/openssl/lib/libcrypto/engine.inc:1.12	Sun Sep 23 09:33:04 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/engine.inc	Sat Dec  8 12:07:27 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: engine.inc,v 1.12 2018/09/23 13:33:04 christos Exp $
+#	$NetBSD: engine.inc,v 1.13 2018/12/08 17:07:27 christos Exp $
 #
 #	@(#) Copyright (c) 1995 Simon J. Gerraty
 #
@@ -13,6 +13,7 @@ ENGINE_SRCS += \
 eng_all.c \
 eng_cnf.c \
 eng_ctrl.c \
+eng_devcrypto.c \
 eng_dyn.c \
 eng_err.c \
 eng_fat.c \



CVS commit: src/crypto/external/bsd/openssl/dist/crypto

2018-11-19 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Tue Nov 20 07:30:18 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto: armcap.c ppccap.c

Log Message:
Don't expose a getauxval symbol.

The code already knows how to handle it, but it assumes anyone who uses
GCC or clang might resolve the getauxval function to something eventually.

The only time we will expose getauxval is if a package tries to substitute
getauxval too, and then code will start having mysterious failures.

getauxval is purely a linux function (as far as I can see), so limit it to
that.

PR pkg/53387, PR port-arm/53386


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/crypto/external/bsd/openssl/dist/crypto/armcap.c
cvs rdiff -u -r1.8 -r1.9 src/crypto/external/bsd/openssl/dist/crypto/ppccap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/armcap.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/armcap.c:1.7 src/crypto/external/bsd/openssl/dist/crypto/armcap.c:1.8
--- src/crypto/external/bsd/openssl/dist/crypto/armcap.c:1.7	Sun Sep 23 13:32:55 2018
+++ src/crypto/external/bsd/openssl/dist/crypto/armcap.c	Tue Nov 20 07:30:17 2018
@@ -70,7 +70,7 @@ void OPENSSL_cpuid_setup(void) __attribu
  * Use a weak reference to getauxval() so we can use it if it is available but
  * don't break the build if it is not.
  */
-# if defined(__GNUC__) && __GNUC__>=2 && defined(__ELF__)
+# if defined(__linux__)
 extern unsigned long getauxval(unsigned long type) __attribute__ ((weak));
 # else
 static unsigned long (*getauxval) (unsigned long) = NULL;

Index: src/crypto/external/bsd/openssl/dist/crypto/ppccap.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.8 src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.9
--- src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.8	Sun Sep 23 13:32:55 2018
+++ src/crypto/external/bsd/openssl/dist/crypto/ppccap.c	Tue Nov 20 07:30:17 2018
@@ -178,7 +178,7 @@ void OPENSSL_madd300_probe(void);
  * feature detection, not *run-time*. In other words if we link with
  * symbol present, it's expected to be present even at run-time.
  */
-#if defined(__GNUC__) && __GNUC__>=2 && defined(__ELF__)
+#if defined(__linux__)
 extern unsigned long getauxval(unsigned long type) __attribute__ ((weak));
 #else
 static unsigned long (*getauxval) (unsigned long) = NULL;



CVS commit: src/crypto/external/bsd/openssl/include/openssl

2018-10-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 15 12:45:53 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/include/openssl: opensslconf.h

Log Message:
Ooops - fix editor accident in previous


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/crypto/external/bsd/openssl/include/openssl/opensslconf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/include/openssl/opensslconf.h
diff -u src/crypto/external/bsd/openssl/include/openssl/opensslconf.h:1.5 src/crypto/external/bsd/openssl/include/openssl/opensslconf.h:1.6
--- src/crypto/external/bsd/openssl/include/openssl/opensslconf.h:1.5	Mon Oct 15 12:27:58 2018
+++ src/crypto/external/bsd/openssl/include/openssl/opensslconf.h	Mon Oct 15 12:45:52 2018
@@ -50,7 +50,7 @@ extern "C" {
 #endif
 #if !defined(_LP64) || defined(__sparc64__)
 # ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
-  define OPENSSL_NO_EC_NISTP_64_GCC_128
+#  define OPENSSL_NO_EC_NISTP_64_GCC_128
 # endif
 #endif
 #ifndef OPENSSL_NO_EGD



CVS commit: src/crypto/external/bsd/openssl/include/openssl

2018-10-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 15 12:27:58 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/include/openssl: opensslconf.h

Log Message:
Define OPENSSL_NO_EC_NISTP_64_GCC_128 for sparc64, the code does
not work there (or maybe any big endian machine).
Fixes PR bin/53670.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/include/openssl/opensslconf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/include/openssl/opensslconf.h
diff -u src/crypto/external/bsd/openssl/include/openssl/opensslconf.h:1.4 src/crypto/external/bsd/openssl/include/openssl/opensslconf.h:1.5
--- src/crypto/external/bsd/openssl/include/openssl/opensslconf.h:1.4	Wed Oct 10 06:16:55 2018
+++ src/crypto/external/bsd/openssl/include/openssl/opensslconf.h	Mon Oct 15 12:27:58 2018
@@ -48,9 +48,9 @@ extern "C" {
 #ifndef OPENSSL_NO_DEVCRYPTOENG
 # define OPENSSL_NO_DEVCRYPTOENG
 #endif
-#ifndef _LP64
+#if !defined(_LP64) || defined(__sparc64__)
 # ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
-#  define OPENSSL_NO_EC_NISTP_64_GCC_128
+  define OPENSSL_NO_EC_NISTP_64_GCC_128
 # endif
 #endif
 #ifndef OPENSSL_NO_EGD



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto

2018-10-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 10 14:57:31 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto: crypto.map

Log Message:
Add the EC_GFp_nistp*_method's


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map:1.4 src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map:1.5
--- src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map:1.4	Sun Sep 23 09:33:04 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/crypto.map	Wed Oct 10 10:57:31 2018
@@ -1078,6 +1078,10 @@ OPENSSL_1_1_0 {
 ECPKParameters_print_fp;
 ECParameters_print;
 ECParameters_print_fp;
+EC_GFp_nistp224_method;
+EC_GFp_nistp256_method;
+EC_GFp_nistp521_method;
+EC_GFp_nistz256_method;
 EC_GF2m_simple_method;
 EC_GFp_mont_method;
 EC_GFp_nist_method;



CVS commit: src/crypto/external/bsd/openssl/include/openssl

2018-10-10 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Oct 10 06:16:55 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/include/openssl: opensslconf.h

Log Message:
On 32bit platforms set OPENSSL_NO_EC_NISTP_64_GCC_128 again, the non
standard __uint128_t is required for the code, but only provided by gcc
on 64bit archs.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/include/openssl/opensslconf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/include/openssl/opensslconf.h
diff -u src/crypto/external/bsd/openssl/include/openssl/opensslconf.h:1.3 src/crypto/external/bsd/openssl/include/openssl/opensslconf.h:1.4
--- src/crypto/external/bsd/openssl/include/openssl/opensslconf.h:1.3	Wed Oct 10 01:29:25 2018
+++ src/crypto/external/bsd/openssl/include/openssl/opensslconf.h	Wed Oct 10 06:16:55 2018
@@ -48,6 +48,11 @@ extern "C" {
 #ifndef OPENSSL_NO_DEVCRYPTOENG
 # define OPENSSL_NO_DEVCRYPTOENG
 #endif
+#ifndef _LP64
+# ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
+#  define OPENSSL_NO_EC_NISTP_64_GCC_128
+# endif
+#endif
 #ifndef OPENSSL_NO_EGD
 # define OPENSSL_NO_EGD
 #endif



CVS commit: src/crypto/external/bsd/openssl/include/openssl

2018-10-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 10 01:29:25 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/include/openssl: opensslconf.h

Log Message:
enable OPENSSL_NO_EC_NISTP_64_GCC_128, requested by wiz


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/include/openssl/opensslconf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/include/openssl/opensslconf.h
diff -u src/crypto/external/bsd/openssl/include/openssl/opensslconf.h:1.2 src/crypto/external/bsd/openssl/include/openssl/opensslconf.h:1.3
--- src/crypto/external/bsd/openssl/include/openssl/opensslconf.h:1.2	Sun Sep 23 09:33:04 2018
+++ src/crypto/external/bsd/openssl/include/openssl/opensslconf.h	Tue Oct  9 21:29:25 2018
@@ -48,9 +48,6 @@ extern "C" {
 #ifndef OPENSSL_NO_DEVCRYPTOENG
 # define OPENSSL_NO_DEVCRYPTOENG
 #endif
-#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
-# define OPENSSL_NO_EC_NISTP_64_GCC_128
-#endif
 #ifndef OPENSSL_NO_EGD
 # define OPENSSL_NO_EGD
 #endif



CVS commit: src/crypto/external/bsd/openssl/lib/libssl

2018-10-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Oct  8 18:01:23 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/lib/libssl: Makefile

Log Message:
elide a warning that triggers on arm/clang


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/crypto/external/bsd/openssl/lib/libssl/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libssl/Makefile
diff -u src/crypto/external/bsd/openssl/lib/libssl/Makefile:1.9 src/crypto/external/bsd/openssl/lib/libssl/Makefile:1.10
--- src/crypto/external/bsd/openssl/lib/libssl/Makefile:1.9	Fri Mar  2 08:26:40 2018
+++ src/crypto/external/bsd/openssl/lib/libssl/Makefile	Mon Oct  8 14:01:23 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.9 2018/03/02 13:26:40 christos Exp $
+#	$NetBSD: Makefile,v 1.10 2018/10/08 18:01:23 christos Exp $
 
 # RCSid:
 #	Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp
@@ -23,6 +23,8 @@ USE_FORT?=yes	# cryptographic software a
 # XXX There's a bit of work to do before we can enable warnings.
 WARNS=0
 CWARNFLAGS.clang+=	-Wno-unused-value
+# XXX: This warning seems to trigger incorrectly
+CWARNFLAGS.clang+=	-Wno-atomic-alignment
 
 LIB=	ssl
 CPPFLAGS+= -Dlib${LIB} -I${OPENSSLSRC} -I${OPENSSLSRC}/crypto



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto

2018-10-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Oct  8 16:31:35 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto: man.inc

Log Message:
Skip man pages that conflict (but have different case with libc: {hmac,md5}.3
and libdes: des_random_key.3)


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 \
src/crypto/external/bsd/openssl/lib/libcrypto/man.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/man.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/man.inc:1.12 src/crypto/external/bsd/openssl/lib/libcrypto/man.inc:1.13
--- src/crypto/external/bsd/openssl/lib/libcrypto/man.inc:1.12	Mon Sep 24 07:02:12 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/man.inc	Mon Oct  8 12:31:35 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: man.inc,v 1.12 2018/09/24 11:02:12 christos Exp $
+#	$NetBSD: man.inc,v 1.13 2018/10/08 16:31:35 christos Exp $
 
 .PATH:	${.CURDIR}/man
 
@@ -92,7 +92,6 @@ CTLOG_STORE_new.3 \
 CTLOG_new.3 \
 CT_POLICY_EVAL_CTX_new.3 \
 DEFINE_STACK_OF.3 \
-DES_random_key.3 \
 DH_generate_key.3 \
 DH_generate_parameters.3 \
 DH_get0_pqg.3 \
@@ -198,8 +197,6 @@ EVP_sm3.3 \
 EVP_sm4_cbc.3 \
 EVP_whirlpool.3 \
 Ed25519.7 \
-HMAC.3 \
-MD5.3 \
 MDC2_Init.3 \
 OBJ_nid2obj.3 \
 OCSP_REQUEST_new.3 \



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto

2018-10-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct  6 15:31:09 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto: Makefile

Log Message:
disable another clang warning


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 \
src/crypto/external/bsd/openssl/lib/libcrypto/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/Makefile
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/Makefile:1.18 src/crypto/external/bsd/openssl/lib/libcrypto/Makefile:1.19
--- src/crypto/external/bsd/openssl/lib/libcrypto/Makefile:1.18	Thu Sep 27 14:18:53 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/Makefile	Sat Oct  6 11:31:09 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.18 2018/09/27 18:18:53 christos Exp $
+#	$NetBSD: Makefile,v 1.19 2018/10/06 15:31:09 christos Exp $
 
 # RCSid:
 #	Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp
@@ -25,9 +25,11 @@ USE_FIPS=	no
 .include 
 .include 
 
-# XXX There's a bit of work to do before we can enable warnings.
+# XXX: There's a bit of work to do before we can enable warnings.
 WARNS=0
 CWARNFLAGS.clang+=	-Wno-empty-body -Wno-unused-value -Wno-parentheses
+# XXX: This warning seems to trigger incorrectly
+CWARNFLAGS.clang+=	-Wno-atomic-alignment
 
 # XXX Not yet.
 LINTFLAGS+=-D__int128='long long'



CVS commit: src/crypto/external/bsd/openssl/dist/test/testutil

2018-10-04 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Oct  4 13:38:41 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/dist/test/testutil: tests.c

Log Message:
Add missing format string annotation.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/dist/test/testutil/tests.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/test/testutil/tests.c
diff -u src/crypto/external/bsd/openssl/dist/test/testutil/tests.c:1.2 src/crypto/external/bsd/openssl/dist/test/testutil/tests.c:1.3
--- src/crypto/external/bsd/openssl/dist/test/testutil/tests.c:1.2	Sun Sep 23 13:33:03 2018
+++ src/crypto/external/bsd/openssl/dist/test/testutil/tests.c	Thu Oct  4 13:38:41 2018
@@ -72,6 +72,7 @@ static void test_fail_message(const char
   const char *fmt, ...)
 PRINTF_FORMAT(8, 9);
 
+PRINTF_FORMAT(8, 0)
 static void test_fail_message_va(const char *prefix, const char *file,
  int line, const char *type,
  const char *left, const char *right,



CVS commit: src/crypto/external/bsd/openssl/dist/test

2018-10-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Oct  2 13:53:51 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/dist/test: hmactest.c

Log Message:
Use hex string syntax to prevent overflow warnings for character constants
>= 128.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/crypto/external/bsd/openssl/dist/test/hmactest.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/test/hmactest.c
diff -u src/crypto/external/bsd/openssl/dist/test/hmactest.c:1.3 src/crypto/external/bsd/openssl/dist/test/hmactest.c:1.4
--- src/crypto/external/bsd/openssl/dist/test/hmactest.c:1.3	Sun Sep 23 09:33:03 2018
+++ src/crypto/external/bsd/openssl/dist/test/hmactest.c	Tue Oct  2 09:53:51 2018
@@ -38,10 +38,8 @@ static struct test_st {
 "e9139d1e6ee064ef8cf514fc7dc83e86",
 },
 {
-{
-0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
-0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
-}, 16, "Hi There", 8,
+"\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
+16, "Hi There", 8,
 "9294727a3638bb1c13f48ef8158bfc9d",
 },
 {
@@ -49,10 +47,8 @@ static struct test_st {
 "750c783e6ab0b503eaa86e310a5db738",
 },
 {
-{
-0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-}, 16, {
+"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
+16, {
 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,



CVS commit: src/crypto/external/bsd/openssl/dist/test/testutil

2018-09-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 30 19:23:13 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/dist/test/testutil: format_output.c
main.c output.h

Log Message:
Annotate format functions and fix format errors.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/dist/test/testutil/format_output.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/openssl/dist/test/testutil/main.c \
src/crypto/external/bsd/openssl/dist/test/testutil/output.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/test/testutil/format_output.c
diff -u src/crypto/external/bsd/openssl/dist/test/testutil/format_output.c:1.2 src/crypto/external/bsd/openssl/dist/test/testutil/format_output.c:1.3
--- src/crypto/external/bsd/openssl/dist/test/testutil/format_output.c:1.2	Sun Sep 23 09:33:03 2018
+++ src/crypto/external/bsd/openssl/dist/test/testutil/format_output.c	Sun Sep 30 15:23:13 2018
@@ -31,9 +31,9 @@ static void test_diff_header(const char 
 static void test_string_null_empty(const char *m, char c)
 {
 if (m == NULL)
-test_printf_stderr("% 4s %c NULL\n", "", c);
+test_printf_stderr("%4s %c NULL\n", "", c);
 else
-test_printf_stderr("% 4u:%c ''\n", 0u, c);
+test_printf_stderr("%4u:%c ''\n", 0u, c);
 }
 
 static void test_fail_string_common(const char *prefix, const char *file,
@@ -94,18 +94,18 @@ static void test_fail_string_common(cons
 bdiff[i] = '\0';
 }
 if (n1 == n2 && !diff) {
-test_printf_stderr("% 4u:  '%s'\n", cnt, n2 > n1 ? b2 : b1);
+test_printf_stderr("%4u:  '%s'\n", cnt, n2 > n1 ? b2 : b1);
 } else {
 if (cnt == 0 && (m1 == NULL || *m1 == '\0'))
 test_string_null_empty(m1, '-');
 else if (n1 > 0)
-test_printf_stderr("% 4u:- '%s'\n", cnt, b1);
+test_printf_stderr("%4u:- '%s'\n", cnt, b1);
 if (cnt == 0 && (m2 == NULL || *m2 == '\0'))
test_string_null_empty(m2, '+');
 else if (n2 > 0)
-test_printf_stderr("% 4u:+ '%s'\n", cnt, b2);
+test_printf_stderr("%4u:+ '%s'\n", cnt, b2);
 if (diff && i > 0)
-test_printf_stderr("% 4s%s\n", "", bdiff);
+test_printf_stderr("%4s%s\n", "", bdiff);
 }
 m1 += n1;
 m2 += n2;
@@ -410,7 +410,7 @@ void test_output_bignum(const char *name
 static void test_memory_null_empty(const unsigned char *m, char c)
 {
 if (m == NULL)
-test_printf_stderr("% 4s %c%s\n", "", c, "NULL");
+test_printf_stderr("%4s %c%s\n", "", c, "NULL");
 else
 test_printf_stderr("%04x %c%s\n", 0u, c, "empty");
 }
@@ -494,7 +494,7 @@ static void test_fail_memory_common(cons
 else if (n2 > 0)
 test_printf_stderr("%04x:+%s\n", cnt, b2);
 if (diff && i > 0)
-test_printf_stderr("% 4s  %s\n", "", bdiff);
+test_printf_stderr("%4s  %s\n", "", bdiff);
 }
 m1 += n1;
 m2 += n2;

Index: src/crypto/external/bsd/openssl/dist/test/testutil/main.c
diff -u src/crypto/external/bsd/openssl/dist/test/testutil/main.c:1.1.1.1 src/crypto/external/bsd/openssl/dist/test/testutil/main.c:1.2
--- src/crypto/external/bsd/openssl/dist/test/testutil/main.c:1.1.1.1	Sun Sep 23 09:17:35 2018
+++ src/crypto/external/bsd/openssl/dist/test/testutil/main.c	Sun Sep 30 15:23:13 2018
@@ -25,7 +25,7 @@ static void check_arg_usage(void)
 
 for (i = 0; i < n; i++)
 if (!arg_used[i+1])
-test_printf_stderr("Warning ignored command-line argument %d: %s\n",
+test_printf_stderr("Warning ignored command-line argument %zu: %s\n",
i, args[i+1]);
 if (i < arg_count)
 test_printf_stderr("Warning arguments %zu and later unchecked\n", i);
Index: src/crypto/external/bsd/openssl/dist/test/testutil/output.h
diff -u src/crypto/external/bsd/openssl/dist/test/testutil/output.h:1.1.1.1 src/crypto/external/bsd/openssl/dist/test/testutil/output.h:1.2
--- src/crypto/external/bsd/openssl/dist/test/testutil/output.h:1.1.1.1	Sun Sep 23 09:17:35 2018
+++ src/crypto/external/bsd/openssl/dist/test/testutil/output.h	Sun Sep 30 15:23:13 2018
@@ -10,8 +10,25 @@
 #ifndef HEADER_TU_OUTPUT_H
 # define HEADER_TU_OUTPUT_H
 
-#include 
+# include 
 
+# define ossl_test__attr__(x)
+# if defined(__GNUC__) && defined(__STDC_VERSION__) \
+&& !defined(__APPLE__)
+/*
+ * Because we support the 'z' modifier, which made its appearance in C99,
+ * we can't use __attribute__ with pre C99 dialects.
+ */
+#  if __STDC_VERSION__ >= 199901L
+#   undef ossl_test__attr__
+#   define ossl_test__attr__ __attribute__
+#   if __GNUC__*10 + 

CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm

2018-09-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 30 09:46:41 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm: arm_asm.h

Log Message:
Newer gcc seems to use __ARM_ARCH_ISA_THUMB to tell use we have thumb
instructions available


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/arm_asm.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/arm_asm.h
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/arm_asm.h:1.1 src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/arm_asm.h:1.2
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/arm_asm.h:1.1	Tue Mar 10 13:28:47 2015
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/arm_asm.h	Sun Sep 30 09:46:41 2018
@@ -1,4 +1,4 @@
-#if defined (_ARM_ARCH_4T)
+#if defined (_ARM_ARCH_4T) || defined(__ARM_ARCH_ISA_THUMB)
 # define RET		bx		lr
 #else
 # define RET		mov		pc, lr



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm

2018-09-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Sep 29 19:45:18 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm: aes-armv4.S
aesv8-armx.S arm64cpuid.S armv4-gf2m.S armv4-mont.S armv4cpuid.S
armv8-mont.S bsaes-armv7.S chacha-armv4.S chacha-armv8.S
ecp_nistz256-armv4.S ecp_nistz256-armv8.S ghash-armv4.S
ghashv8-armx.S keccak1600-armv4.S keccak1600-armv8.S
poly1305-armv4.S poly1305-armv8.S sha1-armv4-large.S sha1-armv8.S
sha256-armv4.S sha512-armv4.S sha512-armv8.S vpaes-armv8.S

Log Message:
Regen


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes-armv4.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/armv4cpuid.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/ghashv8-armx.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/sha256-armv4.S
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aesv8-armx.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/armv4-gf2m.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/armv4-mont.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/bsaes-armv7.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/sha1-armv4-large.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/sha512-armv4.S
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/arm64cpuid.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/chacha-armv4.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/ecp_nistz256-armv4.S 
\
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/ecp_nistz256-armv8.S 
\
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/poly1305-armv4.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/sha512-armv8.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/vpaes-armv8.S
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/armv8-mont.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/chacha-armv8.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/keccak1600-armv4.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/keccak1600-armv8.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/poly1305-armv8.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/sha1-armv8.S
cvs rdiff -u -r1.5 -r1.6 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/ghash-armv4.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes-armv4.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes-armv4.S:1.4 src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes-armv4.S:1.5
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes-armv4.S:1.4	Sun Sep 23 13:33:04 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes-armv4.S	Sat Sep 29 19:45:18 2018
@@ -1,3 +1,4 @@
+#include "arm_asm.h"
 @ Copyright 2007-2018 The OpenSSL Project Authors. All Rights Reserved.
 @
 @ Licensed under the OpenSSL license (the "License").  You may not use
@@ -708,7 +709,7 @@ _armv4_AES_set_encrypt_key:
 	ldmia	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}
 .Labrt:
 #if __ARM_ARCH__>=5
-	bx	lr@ .word	0xe12fff1e
+	RET@ .word	0xe12fff1e
 #else
 	tst	lr,#1
 	moveq	pc,lr			@ be binary compatible with V4, yet
Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/armv4cpuid.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/armv4cpuid.S:1.4 src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/armv4cpuid.S:1.5
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/armv4cpuid.S:1.4	Sun Sep 23 13:33:04 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/armv4cpuid.S	Sat Sep 29 19:45:18 2018
@@ -1,3 +1,4 @@
+#include "arm_asm.h"
 #include "arm_arch.h"
 
 .text
@@ -20,7 +21,7 @@ OPENSSL_atomic_add:
 	cmp	r2,#0
 	bne	.Ladd
 	mov	r0,r3
-	bx	lr
+	RET
 #else
 	stmdb	sp!,{r4,r5,r6,lr}
 	ldr	r2,.Lspinlock
@@ -42,7 +43,7 @@ OPENSSL_atomic_add:
 	ldmia	sp!,{r4,r5,r6,lr}
 	tst	lr,#1
 	moveq	pc,lr
-.word	0xe12fff1e	@ bx	lr
+.word	0xe12fff1e	@ RET
 #endif
 .size	OPENSSL_atomic_add,.-OPENSSL_atomic_add
 
@@ -77,11 +78,11 @@ OPENSSL_cleanse:
 	bne	.Little
 .Lcleanse_done:
 #if __ARM_ARCH__>=5
-	bx	lr
+	RET
 #else
 	tst	lr,#1
 	moveq	pc,lr
-.word	0xe12fff1e	@ bx	lr
+.word	0xe12fff1e	@ RET
 #endif
 .size	OPENSSL_cleanse,.-OPENSSL_cleanse
 
@@ -107,11 +108,11 @@ CRYPTO_memcmp:
 	rsb	r0,ip,#0
 	mov	r0,r0,lsr#31
 #if __ARM_ARCH__>=5
-	bx	lr
+	RET
 #else
 	tst	lr,#1
 	moveq	pc,lr
-.word	0xe12fff1e	@ bx	lr
+.word	0xe12fff1e	@ RET
 #endif
 .size	CRYPTO_memcmp,.-CRYPTO_memcmp
 
@@ -124,7 +125,7 @@ CRYPTO_memcmp:
 .type	_armv7_neon_probe,%function
 

CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm

2018-09-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Sep 29 19:44:58 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm: Makefile

Log Message:
Upstream does not support armv4 any more - but it is trivial to add
add regen time. Make the "regen" target here do it.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/Makefile
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/Makefile:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/Makefile:1.3
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/Makefile:1.2	Sun Mar  4 00:24:21 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/Makefile	Sat Sep 29 19:44:57 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2018/03/04 00:24:21 christos Exp $
+#	$NetBSD: Makefile,v 1.3 2018/09/29 19:44:57 martin Exp $
 
 .include "bsd.own.mk"
 
@@ -9,8 +9,10 @@ regen:
 	for i in $$(find ${OPENSSLSRC} -name \*arm\*.pl); do \
 		case $$i in \
 		(*/charmap.pl|*/arm-xlate.pl);; \
-		(*) perl -I${OPENSSLSRC}/crypto/perlasm \
+		(*) printf '#include "arm_asm.h"\n' > $$(basename $$i .pl).S; \
+		perl -I${OPENSSLSRC}/crypto/perlasm \
 		-I${OPENSSLSRC}/crypto/bn/asm $$i linux /dev/stdout \
-		> $$(basename $$i .pl).S;; \
+		| sed -E 's/bx[[:space:]]+lr/RET/' \
+		>> $$(basename $$i .pl).S;; \
 		esac; \
 	done



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64

2018-09-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Sep 28 17:28:01 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64: ec.inc

Log Message:
fix build


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/ec.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/ec.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/ec.inc:1.1 src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/ec.inc:1.2
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/ec.inc:1.1	Sun Sep 23 09:33:05 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/ec.inc	Fri Sep 28 13:28:01 2018
@@ -5,5 +5,4 @@ x25519-ppc64.S 
 
 ECCPPFLAGS+= -DX25519_ASM
 
-ECNI = yes
 .include "../../ec.inc"



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto

2018-09-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 27 18:18:53 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto: Makefile

Log Message:
Remove debugging accidentally left in! Noticed by Tobias Ulmer


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 \
src/crypto/external/bsd/openssl/lib/libcrypto/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/Makefile
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/Makefile:1.17 src/crypto/external/bsd/openssl/lib/libcrypto/Makefile:1.18
--- src/crypto/external/bsd/openssl/lib/libcrypto/Makefile:1.17	Sun Sep 23 09:33:04 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/Makefile	Thu Sep 27 14:18:53 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.17 2018/09/23 13:33:04 christos Exp $
+#	$NetBSD: Makefile,v 1.18 2018/09/27 18:18:53 christos Exp $
 
 # RCSid:
 #	Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp
@@ -20,7 +20,7 @@ LIB=	crypto
 USE_FORT?= yes	# cryptographic software
 USE_SHLIBDIR=	yes
 USE_FIPS=	no
-DBG=-g
+#DBG=-g
 
 .include 
 .include 



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax

2018-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Sep 25 14:17:49 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax: crypto.inc

Log Message:
use the standard code instead of ours


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax/crypto.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax/crypto.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax/crypto.inc:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax/crypto.inc:1.3
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax/crypto.inc:1.2	Mon Sep 24 07:03:40 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax/crypto.inc	Tue Sep 25 10:17:49 2018
@@ -1,6 +1,6 @@
 .PATH.S: ${.PARSEDIR}
 
-CRYPTO_SRCS += libc-memequal.c
-CRYPTOCPPFLAGS += -DOPENSSL_CPUID_OBJ
+#CRYPTO_SRCS += libc-memequal.c
+#CRYPTOCPPFLAGS += -DOPENSSL_CPUID_OBJ
 
 .include "../../crypto.inc"



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/ia64

2018-09-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Sep 25 14:16:33 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/ia64: crypto.inc

Log Message:
no need for our copy of memequal


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/ia64/crypto.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/ia64/crypto.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/ia64/crypto.inc:1.1 src/crypto/external/bsd/openssl/lib/libcrypto/arch/ia64/crypto.inc:1.2
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/ia64/crypto.inc:1.1	Tue Mar  6 14:32:16 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/ia64/crypto.inc	Tue Sep 25 10:16:33 2018
@@ -1,3 +1,3 @@
 
-CRYPTO_SRCS += libc-memequal.c
+#CRYPTO_SRCS += libc-memequal.c
 .include "../../crypto.inc"



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc

2018-09-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Sep 24 20:36:51 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc: crypto.inc
Added Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc: sparccap.c

Log Message:
put back sparccap.c; too hard to iron out the bn_mont stuff.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc
cvs rdiff -u -r0 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/sparccap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc:1.10 src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc:1.11
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc:1.10	Mon Sep 24 16:15:38 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc	Mon Sep 24 16:36:51 2018
@@ -1,7 +1,7 @@
 .PATH.S: ${.PARSEDIR}
 .PATH.c: ${.PARSEDIR}
 CPUID = yes
-CPUID_SRCS += sparccpuid.S sparcv9cap.c
+CPUID_SRCS += sparccpuid.S sparccap.c
 CRYPTOCPPFLAGS += -DOPENSSL_CPUID_OBJ
 
 .if ${MACHINE} == "sparc64"

Added files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/sparccap.c
diff -u /dev/null src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/sparccap.c:1.3
--- /dev/null	Mon Sep 24 16:36:51 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/sparccap.c	Mon Sep 24 16:36:51 2018
@@ -0,0 +1,11 @@
+#include "e_os.h"
+#include "internal/cryptlib_int.h"
+
+uint32_t OPENSSL_rdtsc(void)
+{
+return 0;
+}
+
+void OPENSSL_cpuid_setup(void)
+{
+}



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc

2018-09-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Sep 24 20:15:38 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc: crypto.inc

Log Message:
sparcv9cap is a c file.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc:1.9 src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc:1.10
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc:1.9	Mon Sep 24 15:50:51 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc	Mon Sep 24 16:15:38 2018
@@ -1,7 +1,7 @@
 .PATH.S: ${.PARSEDIR}
 .PATH.c: ${.PARSEDIR}
 CPUID = yes
-CPUID_SRCS += sparccpuid.S sparcv9cap.S
+CPUID_SRCS += sparccpuid.S sparcv9cap.c
 CRYPTOCPPFLAGS += -DOPENSSL_CPUID_OBJ
 
 .if ${MACHINE} == "sparc64"
@@ -12,7 +12,6 @@ AFLAGS.sparcv9-mont.S+= -Wa,-Av9
 AFLAGS.sparcv9a-mont.S+= -Wa,-Av9a
 AFLAGS.sparct4-mont.S+= -Wa,-Av9a
 AFLAGS.vis3-mont.S+= -Wa,-Av9a
-AFLAGS.sparcv9cap.S+= -Wa,-Av9
 .endif
 
 .include "../../crypto.inc"



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc

2018-09-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Sep 24 19:50:51 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc: crypto.inc
Removed Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc: sparccap.c

Log Message:
use sparcv9cap.S


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc
cvs rdiff -u -r1.1 -r0 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/sparccap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc:1.8 src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc:1.9
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc:1.8	Sun Sep 23 20:45:12 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc	Mon Sep 24 15:50:51 2018
@@ -1,7 +1,7 @@
 .PATH.S: ${.PARSEDIR}
 .PATH.c: ${.PARSEDIR}
 CPUID = yes
-CPUID_SRCS += sparccpuid.S sparccap.c
+CPUID_SRCS += sparccpuid.S sparcv9cap.S
 CRYPTOCPPFLAGS += -DOPENSSL_CPUID_OBJ
 
 .if ${MACHINE} == "sparc64"
@@ -12,6 +12,7 @@ AFLAGS.sparcv9-mont.S+= -Wa,-Av9
 AFLAGS.sparcv9a-mont.S+= -Wa,-Av9a
 AFLAGS.sparct4-mont.S+= -Wa,-Av9a
 AFLAGS.vis3-mont.S+= -Wa,-Av9a
+AFLAGS.sparcv9cap.S+= -Wa,-Av9
 .endif
 
 .include "../../crypto.inc"



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch

2018-09-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Sep 24 11:03:40 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/hppa: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64:
crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sh3: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax: crypto.inc

Log Message:
Don't include the libc CRYPTO_memcmp file (it has a different prototype
now) and it is provided by openssl in C, or use the assembly versions.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/crypto.inc
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/crypto.inc
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/hppa/crypto.inc
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/crypto.inc
cvs rdiff -u -r1.6 -r1.7 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/crypto.inc
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/crypto.inc
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sh3/crypto.inc
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax/crypto.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/crypto.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/crypto.inc:1.3 src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/crypto.inc:1.4
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/crypto.inc:1.3	Sun Jul 15 20:08:12 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/crypto.inc	Mon Sep 24 07:03:39 2018
@@ -1,5 +1,6 @@
 .PATH.S: ${.PARSEDIR}
 CPUID_SRCS += arm64cpuid.S armcap.c
+CRYPTOCPPFLAGS += -DOPENSSL_CPUID_OBJ
 CPUID = yes
 ARM_MAX_ARCH=8
 CPPFLAGS += -D__ARM_MAX_ARCH__=${ARM_MAX_ARCH}

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/crypto.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/crypto.inc:1.1 src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/crypto.inc:1.2
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/crypto.inc:1.1	Sat Mar  3 23:00:45 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/crypto.inc	Mon Sep 24 07:03:39 2018
@@ -5,6 +5,7 @@ ASMDIR:=${.PARSEDIR}
 CPUID_SRCS += alpha-mont.S alphacpuid.S
 CPUID = yes
 CPPFLAGS += -DOPENSSL_BN_ASM_MONT -I${ASMDIR}
+CRYPTOCPPFLAGS += -DOPENSSL_CPUID_OBJ
 
 .include "../../crypto.inc"
 

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/hppa/crypto.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/hppa/crypto.inc:1.1 src/crypto/external/bsd/openssl/lib/libcrypto/arch/hppa/crypto.inc:1.2
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/hppa/crypto.inc:1.1	Tue Mar  6 14:30:56 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/hppa/crypto.inc	Mon Sep 24 07:03:39 2018
@@ -1,3 +1,3 @@
 
-CRYPTO_SRCS += libc-memequal.c
+#CRYPTO_SRCS += libc-memequal.c
 .include "../../crypto.inc"

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/crypto.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/crypto.inc:1.1 src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/crypto.inc:1.2
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/crypto.inc:1.1	Sun Mar  4 20:00:12 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/crypto.inc	Mon Sep 24 07:03:39 2018
@@ -1,5 +1,5 @@
 .PATH.S: ${.PARSEDIR}
 
-CRYPTO_SRCS += libc-memequal.c
+#CRYPTO_SRCS += libc-memequal.c
 
 .include "../../crypto.inc"

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc:1.6 src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc:1.7
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc:1.6	Fri Mar  9 16:49:55 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc	Mon Sep 24 07:03:40 2018
@@ -3,6 +3,5 @@
 
 CRYPTO_SRCS += mips-mont${"${COPTS:M*-mabi=64*}" == "":?:64}.S
 .endif
-CRYPTO_SRCS += libc-memequal.c
 
 .include "../../crypto.inc"

Index: 

CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto

2018-09-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Sep 24 11:02:12 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto: man.inc

Log Message:
don't override the sha man page provided by libc.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 \
src/crypto/external/bsd/openssl/lib/libcrypto/man.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/man.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/man.inc:1.11 src/crypto/external/bsd/openssl/lib/libcrypto/man.inc:1.12
--- src/crypto/external/bsd/openssl/lib/libcrypto/man.inc:1.11	Sun Sep 23 09:33:04 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/man.inc	Mon Sep 24 07:02:12 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: man.inc,v 1.11 2018/09/23 13:33:04 christos Exp $
+#	$NetBSD: man.inc,v 1.12 2018/09/24 11:02:12 christos Exp $
 
 .PATH:	${.CURDIR}/man
 
@@ -277,7 +277,6 @@ RSA_size.3 \
 SCT_new.3 \
 SCT_print.3 \
 SCT_validate.3 \
-SHA256_Init.3 \
 SM2.7 \
 SMIME_read_CMS.3 \
 SMIME_read_PKCS7.3 \



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch

2018-09-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Sep 24 00:45:12 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64: crypto.inc

Log Message:
sparc has memcmp and cpuid


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc
cvs rdiff -u -r1.6 -r1.7 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/crypto.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc:1.7 src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc:1.8
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc:1.7	Sun Feb 25 20:33:05 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc	Sun Sep 23 20:45:12 2018
@@ -2,6 +2,7 @@
 .PATH.c: ${.PARSEDIR}
 CPUID = yes
 CPUID_SRCS += sparccpuid.S sparccap.c
+CRYPTOCPPFLAGS += -DOPENSSL_CPUID_OBJ
 
 .if ${MACHINE} == "sparc64"
 CPUID_SRCS += sparcv9-mont.S sparcv9a-mont.S 

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/crypto.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/crypto.inc:1.6 src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/crypto.inc:1.7
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/crypto.inc:1.6	Fri Oct 14 12:09:44 2016
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/crypto.inc	Sun Sep 23 20:45:12 2018
@@ -1,6 +1,7 @@
 .PATH.S: ${.PARSEDIR}
 CPUID_SRCS = sparcv9cap.c sparccpuid.S sparcv9-mont.S sparcv9a-mont.S 
 CPUID_SRCS += sparct4-mont.S vis3-mont.S
+CRYPTOCPPFLAGS += -DOPENSSL_CPUID_OBJ
 CPUID = yes
 #CPPFLAGS += -DOPENSSL_BN_ASM_MONT
 .include "../../crypto.inc"



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm

2018-09-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 23 21:44:01 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm: crypto.inc

Log Message:
we provide memcmp and rdtsc


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc:1.9 src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc:1.10
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc:1.9	Wed Mar  7 15:38:39 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc	Sun Sep 23 17:44:01 2018
@@ -3,6 +3,7 @@
 CPUID_SRCS += armv4cpuid.S armcap.c armv4-mont.S armv4-gf2m.S
 CPUID = yes
 CPPFLAGS += -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m
+CRYPTOCPPFLAGS += -DOPENSSL_CPUID_OBJ
 
 .include "../../crypto.inc"
 



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto

2018-09-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 23 21:43:00 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto: curve448.inc

Log Message:
Kill stack protector warnings.
XXX: need to understand why gcc complains; it is not obvious to me.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/curve448.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/curve448.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/curve448.inc:1.1 src/crypto/external/bsd/openssl/lib/libcrypto/curve448.inc:1.2
--- src/crypto/external/bsd/openssl/lib/libcrypto/curve448.inc:1.1	Sun Sep 23 09:33:04 2018
+++ src/crypto/external/bsd/openssl/lib/libcrypto/curve448.inc	Sun Sep 23 17:43:00 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: curve448.inc,v 1.1 2018/09/23 13:33:04 christos Exp $
+#	$NetBSD: curve448.inc,v 1.2 2018/09/23 21:43:00 christos Exp $
 #
 #	SRCS extracted from src/crypto/dist/openssl/crypto/ec/curve448
 #
@@ -16,6 +16,9 @@ f_impl.c \
 scalar.c
 
 SRCS += ${CURVE448_SRCS}
+COPTS.curve448.c+=-Wno-error=stack-protector
+COPTS.eddsa.c+=-Wno-error=stack-protector
+COPTS.f_generic.c+=-Wno-error=stack-protector
 
 .for cryptosrc in ${CURVE448_SRCS}
 CPPFLAGS.${cryptosrc} = -I${CURVE448} -I${CURVE448}/arch_32 ${CURVE448CPPFLAGS}



CVS commit: src/crypto/external/bsd/openssl/lib

2018-09-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 23 15:08:41 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/lib: Makefile

Log Message:
oops forgot to commit (add libcryptotest)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/crypto/external/bsd/openssl/lib/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/Makefile
diff -u src/crypto/external/bsd/openssl/lib/Makefile:1.4 src/crypto/external/bsd/openssl/lib/Makefile:1.5
--- src/crypto/external/bsd/openssl/lib/Makefile:1.4	Sun May 21 11:28:37 2017
+++ src/crypto/external/bsd/openssl/lib/Makefile	Sun Sep 23 11:08:41 2018
@@ -1,9 +1,9 @@
-#	$NetBSD: Makefile,v 1.4 2017/05/21 15:28:37 riastradh Exp $
+#	$NetBSD: Makefile,v 1.5 2018/09/23 15:08:41 christos Exp $
 
 .include "bsd.own.mk"
 
 # OpenSSL libraries.
-SUBDIR= libcrypto libdes
+SUBDIR= libcrypto libcryptotest libdes
 
 SUBDIR+= .WAIT	libssl		# depends on libcrypto
 



  1   2   3   4   >