Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/external/bsd/openssl/lib more checkpointing



details:   https://anonhg.NetBSD.org/src/rev/902beadc309b
branches:  trunk
changeset: 374599:902beadc309b
user:      christos <christos%NetBSD.org@localhost>
date:      Sun May 07 16:22:10 2023 +0000

description:
more checkpointing

diffstat:

 crypto/external/bsd/openssl/lib/Makefile                                        |   4 +-
 crypto/external/bsd/openssl/lib/libapps/Makefile                                |  66 +++++++
 crypto/external/bsd/openssl/lib/libapps/PROTO.in                                |  12 +
 crypto/external/bsd/openssl/lib/libapps/apps_lib.inc                            |  29 +++
 crypto/external/bsd/openssl/lib/libapps/mkinc                                   |  29 +++
 crypto/external/bsd/openssl/lib/libapps/srcs.inc                                |  12 +
 crypto/external/bsd/openssl/lib/libcrypto/libc-sha1.c                           |  15 +
 crypto/external/bsd/openssl/lib/liblegacy/Makefile                              |  86 ++++++++++
 crypto/external/bsd/openssl/lib/liblegacy/PROTO.in                              |  12 +
 crypto/external/bsd/openssl/lib/liblegacy/crypto.inc                            |  13 +
 crypto/external/bsd/openssl/lib/liblegacy/crypto_des.inc                        |  13 +
 crypto/external/bsd/openssl/lib/liblegacy/crypto_md5.inc                        |  14 +
 crypto/external/bsd/openssl/lib/liblegacy/legacy.map                            |   5 +
 crypto/external/bsd/openssl/lib/liblegacy/mkinc                                 |  29 +++
 crypto/external/bsd/openssl/lib/liblegacy/providers.inc                         |  12 +
 crypto/external/bsd/openssl/lib/liblegacy/providers_common.inc                  |  12 +
 crypto/external/bsd/openssl/lib/liblegacy/providers_implementations_ciphers.inc |  30 +++
 crypto/external/bsd/openssl/lib/liblegacy/providers_implementations_digests.inc |  15 +
 crypto/external/bsd/openssl/lib/liblegacy/providers_implementations_kdfs.inc    |  12 +
 crypto/external/bsd/openssl/lib/liblegacy/srcs.inc                              |  19 ++
 20 files changed, 437 insertions(+), 2 deletions(-)

diffs (truncated from 532 to 300 lines):

diff -r fffd871fe3aa -r 902beadc309b crypto/external/bsd/openssl/lib/Makefile
--- a/crypto/external/bsd/openssl/lib/Makefile  Sun May 07 16:21:19 2023 +0000
+++ b/crypto/external/bsd/openssl/lib/Makefile  Sun May 07 16:22:10 2023 +0000
@@ -1,9 +1,9 @@
-#      $NetBSD: Makefile,v 1.5 2018/09/23 15:08:41 christos Exp $
+#      $NetBSD: Makefile,v 1.6 2023/05/07 16:22:10 christos Exp $
 
 .include "bsd.own.mk"
 
 # OpenSSL libraries.
-SUBDIR= libcrypto libcryptotest libdes
+SUBDIR= libapps liblegacy libcrypto libcryptotest libdes
 
 SUBDIR+= .WAIT libssl          # depends on libcrypto
 
diff -r fffd871fe3aa -r 902beadc309b crypto/external/bsd/openssl/lib/libapps/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/crypto/external/bsd/openssl/lib/libapps/Makefile  Sun May 07 16:22:10 2023 +0000
@@ -0,0 +1,66 @@
+#      $NetBSD: Makefile,v 1.1 2023/05/07 16:22:10 christos Exp $
+
+# RCSid:
+#      Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp
+#
+#      @(#) Copyright (c) 1994 Simon J. Gerraty
+#
+#      This file is provided in the hope that it will
+#      be of use.  There is absolutely NO WARRANTY.
+#      Permission to copy, redistribute or otherwise
+#      use this file is hereby granted provided that 
+#      the above copyright notice and this notice are
+#      left intact. 
+#      
+#      Please send copies of changes and bug-fixes to:
+#      sjg%quick.com.au@localhost
+#
+LIBISPRIVATE=  yes
+LIB=   apps
+USE_FORT?= yes # cryptographic software
+USE_SHLIBDIR=  no
+USE_FIPS=      no
+#DBG=-g
+
+.include <bsd.own.mk>
+.include <bsd.shlib.mk>
+
+# 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 -Wno-implicit-int-float-conversion
+# XXX: This warning seems to trigger incorrectly
+CWARNFLAGS.clang+=     -Wno-atomic-alignment
+
+LINTFLAGS+=    -X 161  # constant in conditional context
+LINTFLAGS+=    -X 129  # expression has null effect
+LINTFLAGS+=    -X 117  # bitwise '>>' on signed value possibly nonportable
+LINTFLAGS+=    -X 231  # argument '%s' unused in function '%s'
+LINTFLAGS+=    -X 220  # fallthrough on case statement
+LINTFLAGS+=    -X 118  # semantics of '%s' change in ANSI C; use explicit cast
+
+CPPFLAGS+= -Dlib${LIB} -I. -I${OPENSSLSRC}/crypto -I${OPENSSLSRC} -I${.CURDIR}
+CPPFLAGS+= -I${OPENSSLSRC}/include -I${OPENSSLSRC}/crypto/include
+CPPFLAGS+= -I${OPENSSLSRC}/crypto/asn1 -I${OPENSSLSRC}/crypto/evp
+CPPFLAGS+= -I${OPENSSLSRC}/crypto/modes
+CPPFLAGS+= -I${OPENSSLSRC}/../include
+CPPFLAGS+= -I${OPENSSLSRC}/apps/lib
+CPPFLAGS+= -I${OPENSSLSRC}/apps/include
+
+
+CRYPTODIST=    ${NETBSDSRCDIR}/crypto
+OPENSSLINC=    ${OPENSSLSRC}/include/openssl
+
+.include "${NETBSDSRCDIR}/crypto/Makefile.openssl"
+.PATH: ${OPENSSLSRC} ${OPENSSLINC}
+.PATH: ${OPENSSLSRC}/../include/openssl
+.PATH: ${OPENSSLSRC}/providers/implementations/digests
+.PATH: ${OPENSSLSRC}/providers/implementations/macs
+
+.include "srcs.inc"
+
+AFLAGS+=-DELF
+
+OS_VERSION!= ${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh
+
+.include <bsd.lib.mk>
+
diff -r fffd871fe3aa -r 902beadc309b crypto/external/bsd/openssl/lib/libapps/PROTO.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/crypto/external/bsd/openssl/lib/libapps/PROTO.in  Sun May 07 16:22:10 2023 +0000
@@ -0,0 +1,12 @@
+#      $NetBSD: PROTO.in,v 1.1 2023/05/07 16:22:10 christos Exp $
+
+.PATH: ${OPENSSLSRC}/@proto@
+
+@PROTO@_SRCS += \
+@SRCS@
+
+SRCS += ${@PROTO@_SRCS}
+
+.for appssrc in ${@PROTO@_SRCS}
+CPPFLAGS.${appssrc} += -I${OPENSSLSRC}/@proto@ ${@PROTO@CPPFLAGS}
+.endfor
diff -r fffd871fe3aa -r 902beadc309b crypto/external/bsd/openssl/lib/libapps/apps_lib.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/crypto/external/bsd/openssl/lib/libapps/apps_lib.inc      Sun May 07 16:22:10 2023 +0000
@@ -0,0 +1,29 @@
+#      $NetBSD: apps_lib.inc,v 1.1 2023/05/07 16:22:10 christos Exp $
+
+.PATH: ${OPENSSLSRC}/apps/lib
+
+APPS_LIB_SRCS += \
+app_libctx.c \
+app_params.c \
+app_provider.c \
+app_rand.c \
+app_x509.c \
+apps.c \
+apps_ui.c \
+columns.c \
+cmp_mock_srv.c \
+engine.c \
+engine_loader.c \
+fmt.c \
+http_server.c \
+names.c \
+opt.c \
+s_cb.c \
+s_socket.c \
+tlssrp_depr.c \
+
+SRCS += ${APPS_LIB_SRCS}
+
+.for commonsrc in ${APPS_LIB_SRCS}
+CPPFLAGS.${commonsrc} += -I${OPENSSLSRC}/apps/lib ${APPS_LIBCPPFLAGS}
+.endfor
diff -r fffd871fe3aa -r 902beadc309b crypto/external/bsd/openssl/lib/libapps/mkinc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/crypto/external/bsd/openssl/lib/libapps/mkinc     Sun May 07 16:22:10 2023 +0000
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+BUILD=../../openssl-3.0.8
+
+create() {
+       sed -e "s,@proto@,$proto,g" -e "s/@PROTO@/$PROTO/g" -e "/@SRCS@/ {
+r $fn.out
+d
+}" PROTO.in > $fn.inc
+rm -f $fn.out
+}
+
+d=
+for i in $(find ${BUILD} -name 'libapps-lib-*.d'); do
+       nd=$(dirname "$i" | sed -e s,${BUILD}/,,)
+       if [ "$nd" != "$d" ]; then
+               if [ -n "$d" ]; then
+                       create
+               fi
+               fn=$(echo $nd | tr '/' '_')
+               proto=$nd
+               PROTO=$(echo $fn | tr '[a-z]' '[A-Z]')
+               d=$nd
+               rm -f $fn.out
+       fi
+       echo $(basename $i) | \
+           sed -e 's/.*-lib-//' -e 's/\.d/.c \\/' >> $fn.out
+done
+create
diff -r fffd871fe3aa -r 902beadc309b crypto/external/bsd/openssl/lib/libapps/srcs.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/crypto/external/bsd/openssl/lib/libapps/srcs.inc  Sun May 07 16:22:10 2023 +0000
@@ -0,0 +1,12 @@
+#      $NetBSD: srcs.inc,v 1.1 2023/05/07 16:22:10 christos Exp $
+
+APPSINCS= \
+apps_lib.inc \
+
+.for appsinc in ${APPSINCS}
+.if exists(${.CURDIR}/arch/${APPS_MACHINE_CPU}/${appsinc})
+.include "${.CURDIR}/arch/${APPS_MACHINE_CPU}/${appsinc}"
+.else
+.include "${appsinc}"
+.endif
+.endfor
diff -r fffd871fe3aa -r 902beadc309b crypto/external/bsd/openssl/lib/libcrypto/libc-sha1.c
--- a/crypto/external/bsd/openssl/lib/libcrypto/libc-sha1.c     Sun May 07 16:21:19 2023 +0000
+++ b/crypto/external/bsd/openssl/lib/libcrypto/libc-sha1.c     Sun May 07 16:22:10 2023 +0000
@@ -20,6 +20,21 @@
 #include <openssl/evp.h>
 #include "crypto/sha.h"
 
+unsigned char *ossl_sha1(const unsigned char *d, size_t n, unsigned char *md)
+{
+    SHA_CTX c;
+    static unsigned char m[SHA_DIGEST_LENGTH];
+
+    if (md == NULL)
+        md = m;
+    if (!SHA1_Init(&c))
+        return NULL;
+    SHA1_Update(&c, d, n);
+    SHA1_Final(md, &c);
+    OPENSSL_cleanse(&c, sizeof(c));
+    return md;
+}
+
 unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md)
 {
     static unsigned char m[SHA_DIGEST_LENGTH];
diff -r fffd871fe3aa -r 902beadc309b crypto/external/bsd/openssl/lib/liblegacy/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/crypto/external/bsd/openssl/lib/liblegacy/Makefile        Sun May 07 16:22:10 2023 +0000
@@ -0,0 +1,86 @@
+#      $NetBSD: Makefile,v 1.1 2023/05/07 16:22:10 christos Exp $
+
+# RCSid:
+#      Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp
+#
+#      @(#) Copyright (c) 1994 Simon J. Gerraty
+#
+#      This file is provided in the hope that it will
+#      be of use.  There is absolutely NO WARRANTY.
+#      Permission to copy, redistribute or otherwise
+#      use this file is hereby granted provided that 
+#      the above copyright notice and this notice are
+#      left intact. 
+#      
+#      Please send copies of changes and bug-fixes to:
+#      sjg%quick.com.au@localhost
+#
+NOLINT=                # don't build a lint library
+NOPROFILE=     # don't build a profile library
+NOPICINSTALL=  # don't install _pic.a library
+LIB=   legacy
+USE_FORT?= yes # cryptographic software
+#DBG=-g
+
+.include <bsd.own.mk>
+.include <bsd.shlib.mk>
+
+# 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 -Wno-implicit-int-float-conversion
+# XXX: This warning seems to trigger incorrectly
+CWARNFLAGS.clang+=     -Wno-atomic-alignment
+
+LINTFLAGS+=    -X 161  # constant in conditional context
+LINTFLAGS+=    -X 129  # expression has null effect
+LINTFLAGS+=    -X 117  # bitwise '>>' on signed value possibly nonportable
+LINTFLAGS+=    -X 231  # argument '%s' unused in function '%s'
+LINTFLAGS+=    -X 220  # fallthrough on case statement
+LINTFLAGS+=    -X 118  # semantics of '%s' change in ANSI C; use explicit cast
+
+CPPFLAGS+= -Dlib${LIB} -I. -I${OPENSSLSRC}/crypto -I${OPENSSLSRC} -I${.CURDIR}
+CPPFLAGS+= -I${OPENSSLSRC}/include -I${OPENSSLSRC}/crypto/include
+CPPFLAGS+= -I${OPENSSLSRC}/crypto/asn1 -I${OPENSSLSRC}/crypto/evp
+CPPFLAGS+= -I${OPENSSLSRC}/crypto/modes
+CPPFLAGS+= -I${OPENSSLSRC}/../include
+CPPFLAGS+= -I${OPENSSLSRC}/providers/common/include
+CPPFLAGS+= -I${OPENSSLSRC}/providers/implementations/include
+CPPFLAGS+= -I${.CURDIR}/../libdefault
+
+
+CRYPTODIST=    ${NETBSDSRCDIR}/crypto
+OPENSSLINC=    ${OPENSSLSRC}/include/openssl
+
+.include "${NETBSDSRCDIR}/crypto/Makefile.openssl"
+.PATH: ${OPENSSLSRC} ${OPENSSLINC}
+.PATH: ${OPENSSLSRC}/../include/openssl
+.PATH: ${OPENSSLSRC}/providers/implementations/digests
+.PATH: ${OPENSSLSRC}/providers/implementations/macs
+
+.include "srcs.inc"
+
+AFLAGS+=-DELF
+
+OS_VERSION!= ${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh
+
+
+SHLIB_MAJOR=0
+SHLIB_MINOR=0
+
+LIBDIR=${OSSL_MODULESDIR}
+
+.if ${MKPIC} != "no"
+.PRECIOUS: ${DESTDIR}${LIBDIR}/${LIB}.so
+libinstall:: ${DESTDIR}${LIBDIR}/${LIB}.so
+.else
+libinstall::
+.endif
+
+LDFLAGS+=-Wl,--version-script=${.CURDIR}/${LIB}.map
+
+.include <bsd.lib.mk>
+
+${DESTDIR}${LIBDIR}/${LIB}.so: lib${LIB}.so.${SHLIB_FULLVERSION}
+       ${_MKTARGET_INSTALL}
+       ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+           ${.ALLSRC} ${.TARGET}
diff -r fffd871fe3aa -r 902beadc309b crypto/external/bsd/openssl/lib/liblegacy/PROTO.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000



Home | Main Index | Thread Index | Old Index