Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/crypto/libcrypto make tests support both 1.x and 3.x.
details: https://anonhg.NetBSD.org/src/rev/02ed1756f6ec
branches: trunk
changeset: 374627:02ed1756f6ec
user: christos <christos%NetBSD.org@localhost>
date: Mon May 08 17:46:06 2023 +0000
description:
make tests support both 1.x and 3.x.
Lot of work needed to add all the 3.x tests, but that can wait until all
is switched
diffstat:
tests/crypto/libcrypto/Makefile | 10 ++-
tests/crypto/libcrypto/Makefile.inc | 4 +-
tests/crypto/libcrypto/conf/Makefile | 13 +++-
tests/crypto/libcrypto/conf/d_conf-1x.out | 94 +++++++++++++++++++++++++++++++
tests/crypto/libcrypto/conf/d_conf-3x.out | 94 +++++++++++++++++++++++++++++++
tests/crypto/libcrypto/conf/d_conf.out | 94 -------------------------------
tests/crypto/libcrypto/dh/Makefile | 3 +-
tests/crypto/libcrypto/evp/Makefile | 78 +++++++++++++++++++++++++-
tests/crypto/libcrypto/t_hashes.sh | 4 +-
tests/crypto/libcrypto/t_libcrypto.sh | 21 ++++--
tests/crypto/libcrypto/t_pubkey.sh | 6 +-
tests/crypto/libcrypto/threads/Makefile | 10 ++-
12 files changed, 314 insertions(+), 117 deletions(-)
diffs (truncated from 576 to 300 lines):
diff -r 2894a3c5033e -r 02ed1756f6ec tests/crypto/libcrypto/Makefile
--- a/tests/crypto/libcrypto/Makefile Mon May 08 14:31:43 2023 +0000
+++ b/tests/crypto/libcrypto/Makefile Mon May 08 17:46:06 2023 +0000
@@ -1,9 +1,13 @@
-# $NetBSD: Makefile,v 1.14 2018/09/23 13:34:57 christos Exp $
+# $NetBSD: Makefile,v 1.15 2023/05/08 17:46:06 christos Exp $
.include <bsd.own.mk>
-SUBDIR+=bf bn cast conf des dh dsa ec ecdh ecdsa engine evp hmac \
- md2 rc2 rc4 rsa srp threads
+SUBDIR+=bf bn cast conf des dh dsa ec engine evp hmac \
+ rc2 rc4 rsa srp threads
+
+.if ${HAVE_OPENSSL} <= 11
+SUBDIR+= ecdh ecdsa md2
+.endif
SUBDIR+=idea mdc2
SUBDIR+=rc5
diff -r 2894a3c5033e -r 02ed1756f6ec tests/crypto/libcrypto/Makefile.inc
--- a/tests/crypto/libcrypto/Makefile.inc Mon May 08 14:31:43 2023 +0000
+++ b/tests/crypto/libcrypto/Makefile.inc Mon May 08 17:46:06 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.10 2018/09/28 23:40:45 christos Exp $
+# $NetBSD: Makefile.inc,v 1.11 2023/05/08 17:46:06 christos Exp $
.include <bsd.own.mk>
.include "../Makefile.inc"
@@ -14,11 +14,13 @@ MAN= # empty
BINDIR= ${TESTSDIR}
CWARNFLAGS.clang+= -Wno-format
+CWARNFLAGS+=-Wno-error=deprecated-declarations
CPPFLAGS+= -DOPENSSL_FIPS
CPPFLAGS+= -I${OPENSSLSRC} -I${OPENSSLSRC}/crypto
CPPFLAGS+= -I${OPENSSLSRC}/include -I${OPENSSLSRC}/../include
CPPFLAGS+= -I${OPENSSLSRC}/crypto/include
+CPPFLAGS+= -I${OPENSSLSRC}/apps/include
CRYPTODIST= ${NETBSDSRCDIR}/crypto
.include "${NETBSDSRCDIR}/crypto/Makefile.openssl"
.if ${HAVE_OPENSSL} != 10
diff -r 2894a3c5033e -r 02ed1756f6ec tests/crypto/libcrypto/conf/Makefile
--- a/tests/crypto/libcrypto/conf/Makefile Mon May 08 14:31:43 2023 +0000
+++ b/tests/crypto/libcrypto/conf/Makefile Mon May 08 17:46:06 2023 +0000
@@ -1,4 +1,6 @@
-# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:14 jmmv Exp $
+# $NetBSD: Makefile,v 1.2 2023/05/08 17:46:06 christos Exp $
+
+.include <bsd.own.mk>
HELPER_NAME= conftest
HELPER_DIR= conf
@@ -6,6 +8,13 @@ HELPER_SRCS= test.c
FILESDIR= ${TESTSDIR}
FILES= d_conf_ssleay.cnf
-FILES+= d_conf.out
+.if ${HAVE_OPENSSL} <= 11
+FILES+= d_conf-1x.out
+FILESNAME_d_conf-1x.out= d_conf.out
+.else
+FILES+= d_conf-3x.out
+FILESNAME_d_conf_ssleay.out= ssleay.out
+FILESNAME_d_conf-3x.out= d_conf.out
+.endif
.include <bsd.init.mk>
diff -r 2894a3c5033e -r 02ed1756f6ec tests/crypto/libcrypto/conf/d_conf-1x.out
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/crypto/libcrypto/conf/d_conf-1x.out Mon May 08 17:46:06 2023 +0000
@@ -0,0 +1,94 @@
+num_items = 47
+num_nodes = 24
+num_alloc_nodes = 32
+num_expands = 16
+num_expand_reallocs = 1
+num_contracts = 0
+num_contract_reallocs = 0
+num_hash_calls = 60
+num_comp_calls = 5
+num_insert = 47
+num_replace = 0
+num_delete = 0
+num_no_delete = 0
+num_retrieve = 5
+num_retrieve_miss = 8
+num_hash_comps = 132
+node 0 -> 4
+node 1 -> 1
+node 2 -> 1
+node 3 -> 4
+node 4 -> 0
+node 5 -> 2
+node 6 -> 1
+node 7 -> 1
+node 8 -> 6
+node 9 -> 2
+node 10 -> 1
+node 11 -> 1
+node 12 -> 3
+node 13 -> 1
+node 14 -> 4
+node 15 -> 3
+node 16 -> 5
+node 17 -> 0
+node 18 -> 2
+node 19 -> 0
+node 20 -> 2
+node 21 -> 2
+node 22 -> 0
+node 23 -> 1
+20 nodes used out of 24
+47 items
+load 1.95 actual load 2.35
+init2=10
+cipher1=NULL
+s_client:cipher1=DES_CBC_MD5:DES_CBC_SHA:DES_EDE_SHA:RC4_MD5cipher2 = DES_CBC_MD5 DES_CBC_SHA DES_EDE_SHA RC4_MD5
+---------------------------- DUMP ------------------------
+[req] Attribute_text_7=Email Address
+[req] Attribute_text_2=State or Province Name (full name)
+[default] tmp_cert_dir=/tmp/eay/.ca_certs
+[req] Attribute_text_1=Country Name (2 letter code)
+[[genrsa]]
+[req] Attribute_default_5=TR
+[req] Attribute_text_6=Common Name (eg, YOUR name)
+[req] Attribute_default_1=AU
+[[req]]
+[[special]]
+[[gendh]]
+[req] Attribute_text_3=Locality Name (eg, city)
+[req] Attribute_type_1=countryName
+[default] init5==10' again
+[req] Attribute_type_3=localityName
+[s_client] cipher3=DES_CBC_MD5 DES_CBC_SHA DES_EDE_SHA RC4_MD5
+[default] in\#it1=10
+[req] Attribute_text_4=Organization Name (eg, company)
+[req] Attribute_type_7=emailAddress
+[gendh] def_generator=2
+[default] HOME=/tmp/eay
+[s_client] cipher4=DES_CBC_MD5 DES_CBC_SHA DES_EDE_SHA RC4_MD5
+[default] init=5
+[SSLeay] version=0.5.0
+[req] Attribute_type_4=organizationName
+[default] tmp2_cert_dir=thisis/tmp/eaystuff
+[req] Attribute_type_5=organizationalUnitName
+[[SSLEAY]]
+[default] init4=10'
+[[default]]
+[default] LOGNAME=Eric Young (home=/tmp/eay)
+[special] RANDFILE=/tmp/eay/.rand
+[req] default_keyfile=privkey.pem
+[req] Attribute_default_4=Mincom Pty Ltd
+[req] Attribute_default_2=Queensland
+[gendh] default_bits=512
+[req] default_bits=512
+[default] init2=10
+[SSLEAY] version=0.5.0
+[s_client] cipher1=DES_CBC_MD5:DES_CBC_SHA:DES_EDE_SHA:RC4_MD5cipher2 = DES_CBC_MD5 DES_CBC_SHA DES_EDE_SHA RC4_MD5
+[req] Attribute_text_5=Organizational Unit Name (eg, section)
+[req] Attribute_type_2=stateOrProvinceName
+[genrsa] default_bits=512
+[default] init3=10'
+[[SSLeay]]
+[[s_client]]
+[req] Attribute_type_6=commonName
diff -r 2894a3c5033e -r 02ed1756f6ec tests/crypto/libcrypto/conf/d_conf-3x.out
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/crypto/libcrypto/conf/d_conf-3x.out Mon May 08 17:46:06 2023 +0000
@@ -0,0 +1,94 @@
+num_items = 47
+num_nodes = 24
+num_alloc_nodes = 32
+num_expands = 0
+num_expand_reallocs = 0
+num_contracts = 0
+num_contract_reallocs = 0
+num_hash_calls = 0
+num_comp_calls = 0
+num_insert = 0
+num_replace = 0
+num_delete = 0
+num_no_delete = 0
+num_retrieve = 0
+num_retrieve_miss = 0
+num_hash_comps = 0
+node 0 -> 4
+node 1 -> 1
+node 2 -> 1
+node 3 -> 4
+node 4 -> 0
+node 5 -> 2
+node 6 -> 1
+node 7 -> 1
+node 8 -> 6
+node 9 -> 2
+node 10 -> 1
+node 11 -> 1
+node 12 -> 3
+node 13 -> 1
+node 14 -> 4
+node 15 -> 3
+node 16 -> 5
+node 17 -> 0
+node 18 -> 2
+node 19 -> 0
+node 20 -> 2
+node 21 -> 2
+node 22 -> 0
+node 23 -> 1
+20 nodes used out of 24
+47 items
+load 1.95 actual load 2.35
+init2=10
+cipher1=NULL
+s_client:cipher1=DES_CBC_MD5:DES_CBC_SHA:DES_EDE_SHA:RC4_MD5cipher2 = DES_CBC_MD5 DES_CBC_SHA DES_EDE_SHA RC4_MD5
+---------------------------- DUMP ------------------------
+[req] Attribute_text_7=Email Address
+[req] Attribute_text_2=State or Province Name (full name)
+[default] tmp_cert_dir=/tmp/eay/.ca_certs
+[req] Attribute_text_1=Country Name (2 letter code)
+[[genrsa]]
+[req] Attribute_default_5=TR
+[req] Attribute_text_6=Common Name (eg, YOUR name)
+[req] Attribute_default_1=AU
+[[req]]
+[[special]]
+[[gendh]]
+[req] Attribute_text_3=Locality Name (eg, city)
+[req] Attribute_type_1=countryName
+[default] init5==10' again
+[req] Attribute_type_3=localityName
+[s_client] cipher3=DES_CBC_MD5 DES_CBC_SHA DES_EDE_SHA RC4_MD5
+[default] in\#it1=10
+[req] Attribute_text_4=Organization Name (eg, company)
+[req] Attribute_type_7=emailAddress
+[gendh] def_generator=2
+[default] HOME=/tmp/eay
+[s_client] cipher4=DES_CBC_MD5 DES_CBC_SHA DES_EDE_SHA RC4_MD5
+[default] init=5
+[SSLeay] version=0.5.0
+[req] Attribute_type_4=organizationName
+[default] tmp2_cert_dir=thisis/tmp/eaystuff
+[req] Attribute_type_5=organizationalUnitName
+[[SSLEAY]]
+[default] init4=10'
+[[default]]
+[default] LOGNAME=Eric Young (home=/tmp/eay)
+[special] RANDFILE=/tmp/eay/.rand
+[req] default_keyfile=privkey.pem
+[req] Attribute_default_4=Mincom Pty Ltd
+[req] Attribute_default_2=Queensland
+[gendh] default_bits=512
+[req] default_bits=512
+[default] init2=10
+[SSLEAY] version=0.5.0
+[s_client] cipher1=DES_CBC_MD5:DES_CBC_SHA:DES_EDE_SHA:RC4_MD5cipher2 = DES_CBC_MD5 DES_CBC_SHA DES_EDE_SHA RC4_MD5
+[req] Attribute_text_5=Organizational Unit Name (eg, section)
+[req] Attribute_type_2=stateOrProvinceName
+[genrsa] default_bits=512
+[default] init3=10'
+[[SSLeay]]
+[[s_client]]
+[req] Attribute_type_6=commonName
diff -r 2894a3c5033e -r 02ed1756f6ec tests/crypto/libcrypto/conf/d_conf.out
--- a/tests/crypto/libcrypto/conf/d_conf.out Mon May 08 14:31:43 2023 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-num_items = 47
-num_nodes = 24
-num_alloc_nodes = 32
-num_expands = 16
-num_expand_reallocs = 1
-num_contracts = 0
-num_contract_reallocs = 0
-num_hash_calls = 60
-num_comp_calls = 5
-num_insert = 47
-num_replace = 0
-num_delete = 0
-num_no_delete = 0
-num_retrieve = 5
-num_retrieve_miss = 8
-num_hash_comps = 132
-node 0 -> 4
-node 1 -> 1
-node 2 -> 1
-node 3 -> 4
-node 4 -> 0
-node 5 -> 2
-node 6 -> 1
-node 7 -> 1
-node 8 -> 6
-node 9 -> 2
-node 10 -> 1
-node 11 -> 1
-node 12 -> 3
-node 13 -> 1
-node 14 -> 4
Home |
Main Index |
Thread Index |
Old Index