summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2021-08-30 17:50:05 +0000
committertb <>2021-08-30 17:50:05 +0000
commitc96960dbca904b29bdc31a6c1ea8eb4930557a9a (patch)
treeb0a54d9f57a08c17485f5aa1cc63bd595e5a604d
parent3ed421833eda880e728ee2dcbb9b843589478a92 (diff)
downloadopenbsd-c96960dbca904b29bdc31a6c1ea8eb4930557a9a.tar.gz
openbsd-c96960dbca904b29bdc31a6c1ea8eb4930557a9a.tar.bz2
openbsd-c96960dbca904b29bdc31a6c1ea8eb4930557a9a.zip
Remove tests that are now covered by regress/lib/libssl/verify
-rw-r--r--src/regress/usr.bin/openssl/x509/Makefile67
1 files changed, 2 insertions, 65 deletions
diff --git a/src/regress/usr.bin/openssl/x509/Makefile b/src/regress/usr.bin/openssl/x509/Makefile
index 69488994af..2a23259fd4 100644
--- a/src/regress/usr.bin/openssl/x509/Makefile
+++ b/src/regress/usr.bin/openssl/x509/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.9 2021/08/30 09:06:04 beck Exp $ 1# $OpenBSD: Makefile,v 1.10 2021/08/30 17:50:05 tb Exp $
2 2
3# Copyright (c) 2021 Jan Klemkow <j.klemkow@wemelug.de> 3# Copyright (c) 2021 Jan Klemkow <j.klemkow@wemelug.de>
4# 4#
@@ -31,72 +31,19 @@ regress:
31. endif 31. endif
32.endif 32.endif
33 33
34REGRESS_TARGETS += test-inlabel-wildcard-cert-no-CA-client
35REGRESS_TARGETS += test-inlabel-wildcard-cert-CA-client
36REGRESS_TARGETS += test-common-wildcard-cert-no-CA-client
37REGRESS_TARGETS += test-common-wildcard-cert-CA-client
38REGRESS_TARGETS += test-verify-unusual-wildcard-cert 34REGRESS_TARGETS += test-verify-unusual-wildcard-cert
39REGRESS_TARGETS += test-openssl-verify-common-wildcard-cert 35REGRESS_TARGETS += test-openssl-verify-common-wildcard-cert
40REGRESS_TARGETS += test-chain-certificates-s_server
41REGRESS_TARGETS += test-alternative-chain 36REGRESS_TARGETS += test-alternative-chain
37
42REGRESS_CLEANUP = cleanup-ssl 38REGRESS_CLEANUP = cleanup-ssl
43REGRESS_SETUP_ONCE = create-libressl-test-certs 39REGRESS_SETUP_ONCE = create-libressl-test-certs
44 40
45
46create-libressl-test-certs: create-libressl-test-certs.pl 41create-libressl-test-certs: create-libressl-test-certs.pl
47 ${PERL} ${.CURDIR}/$@.pl 42 ${PERL} ${.CURDIR}/$@.pl
48 43
49cleanup-ssl: 44cleanup-ssl:
50 rm *.pem *.key 45 rm *.pem *.key
51 46
52test-inlabel-wildcard-cert-no-CA-client:
53 # unusual wildcard cert, no CA given to client
54 # start server
55 ${OPENSSL} s_server -quiet -naccept 1 -cert server-unusual-wildcard.pem \
56 -key server-unusual-wildcard.pem & \
57 timeout=$$(($$(date +%s) + 5)); \
58 while fstat -p $$! | ! grep -q 'tcp .* \*:4433$$'; \
59 do test $$(date +%s) -lt $$timeout || exit 1; done
60 # start client, note - some versions of openssl return 21.
61 echo Q | ${OPENSSL} s_client -verify_return_error \
62 | grep "Verify return code: 20"
63
64test-inlabel-wildcard-cert-CA-client:
65 # unusual wildcard cert, CA given to client
66 # start server
67 ${OPENSSL} s_server -quiet -naccept 1 -cert server-unusual-wildcard.pem \
68 -key server-unusual-wildcard.pem & \
69 timeout=$$(($$(date +%s) + 5)); \
70 while fstat -p $$! | ! grep -q 'tcp .* \*:4433$$'; \
71 do test $$(date +%s) -lt $$timeout || exit 1; done
72 # start client
73 echo Q | ${OPENSSL} s_client -CAfile caR.pem \
74 | grep "Verify return code: 0"
75
76test-common-wildcard-cert-no-CA-client:
77 # common wildcard cert, no CA given to client
78 # start server
79 ${OPENSSL} s_server -quiet -naccept 1 -cert server-common-wildcard.pem \
80 -key server-common-wildcard.pem & \
81 timeout=$$(($$(date +%s) + 5)); \
82 while fstat -p $$! | ! grep -q 'tcp .* \*:4433$$'; \
83 do test $$(date +%s) -lt $$timeout || exit 1; done
84 # start client, note - some versions of openssl return 21.
85 echo Q | ${OPENSSL} s_client \
86 | grep "Verify return code: 20"
87
88test-common-wildcard-cert-CA-client:
89 # common wildcard cert, CA given to client
90 # start server
91 ${OPENSSL} s_server -quiet -naccept 1 -cert server-common-wildcard.pem \
92 -key server-common-wildcard.pem & \
93 timeout=$$(($$(date +%s) + 5)); \
94 while fstat -p $$! | ! grep -q 'tcp .* \*:4433$$'; \
95 do test $$(date +%s) -lt $$timeout || exit 1; done
96 # start client
97 echo Q | ${OPENSSL} s_client -CAfile caR.pem \
98 | grep "Verify return code: 0"
99
100test-verify-unusual-wildcard-cert: 47test-verify-unusual-wildcard-cert:
101 # openssl verify, unusual wildcard cert 48 # openssl verify, unusual wildcard cert
102 ${OPENSSL} verify -CAfile caR.pem server-unusual-wildcard.pem \ 49 ${OPENSSL} verify -CAfile caR.pem server-unusual-wildcard.pem \
@@ -107,16 +54,6 @@ test-openssl-verify-common-wildcard-cert:
107 ${OPENSSL} verify -CAfile caR.pem server-common-wildcard.pem \ 54 ${OPENSSL} verify -CAfile caR.pem server-common-wildcard.pem \
108 | grep "server-common-wildcard.pem: OK" 55 | grep "server-common-wildcard.pem: OK"
109 56
110test-chain-certificates-s_server:
111 # Not all chain certificates are sent in s_server
112 # start server
113 ${OPENSSL} s_server -quiet -naccept 1 -cert server-subca-chainS.pem -CAfile subcaR.pem & \
114 timeout=$$(($$(date +%s) + 5)); \
115 while fstat -p $$! | ! grep -q 'tcp .* \*:4433$$'; \
116 do test $$(date +%s) -lt $$timeout || exit 1; done
117 # start client
118 ${OPENSSL} s_client -CAfile caR.pem | grep "Verify return code: 0"
119
120test-alternative-chain: 57test-alternative-chain:
121 # alternative chain not found 58 # alternative chain not found
122 ${OPENSSL} verify -verbose -trusted caR.pem -untrusted chainSX.pem \ 59 ${OPENSSL} verify -verbose -trusted caR.pem -untrusted chainSX.pem \