diff options
author | tb <> | 2021-08-29 12:40:37 +0000 |
---|---|---|
committer | tb <> | 2021-08-29 12:40:37 +0000 |
commit | 8703996dfd9fbe7f9c7f89efe9a16a241584aab4 (patch) | |
tree | c372d0485eb274397daa2435d0d23ce189188b5d /src | |
parent | 3958737f5fc329b07f544deb10827ed41270c9e0 (diff) | |
download | openbsd-8703996dfd9fbe7f9c7f89efe9a16a241584aab4.tar.gz openbsd-8703996dfd9fbe7f9c7f89efe9a16a241584aab4.tar.bz2 openbsd-8703996dfd9fbe7f9c7f89efe9a16a241584aab4.zip |
Use s_server -naccept 1 and remove echo "Q" | openssl s_client hack.
Diffstat (limited to 'src')
-rw-r--r-- | src/regress/usr.bin/openssl/x509/Makefile | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/regress/usr.bin/openssl/x509/Makefile b/src/regress/usr.bin/openssl/x509/Makefile index c61c1a595a..94cdf8d399 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.4 2021/04/27 05:14:25 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.5 2021/08/29 12:40:37 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 | # |
@@ -56,49 +56,49 @@ cleanup-ssl: | |||
56 | test-inlabel-wildcard-cert-no-CA-client: | 56 | test-inlabel-wildcard-cert-no-CA-client: |
57 | # unusual wildcard cert, no CA given to client | 57 | # unusual wildcard cert, no CA given to client |
58 | # start server | 58 | # start server |
59 | ${OPENSSL} s_server -cert server-unusual-wildcard.pem \ | 59 | ${OPENSSL} s_server -naccept 1 -cert server-unusual-wildcard.pem \ |
60 | -key server-unusual-wildcard.pem & \ | 60 | -key server-unusual-wildcard.pem & \ |
61 | timeout=$$(($$(date +%s) + 5)); \ | 61 | timeout=$$(($$(date +%s) + 5)); \ |
62 | while fstat -p $$! | ! grep -q 'tcp .* \*:4433$$'; \ | 62 | while fstat -p $$! | ! grep -q 'tcp .* \*:4433$$'; \ |
63 | do test $$(date +%s) -lt $$timeout || exit 1; done | 63 | do test $$(date +%s) -lt $$timeout || exit 1; done |
64 | # start client | 64 | # start client |
65 | echo "Q" | ${OPENSSL} s_client -verify_return_error \ | 65 | ${OPENSSL} s_client -verify_return_error \ |
66 | | grep "Verify return code: 21" | 66 | | grep "Verify return code: 21" |
67 | 67 | ||
68 | test-inlabel-wildcard-cert-CA-client: | 68 | test-inlabel-wildcard-cert-CA-client: |
69 | # unusual wildcard cert, CA given to client | 69 | # unusual wildcard cert, CA given to client |
70 | # start server | 70 | # start server |
71 | ${OPENSSL} s_server -cert server-unusual-wildcard.pem \ | 71 | ${OPENSSL} s_server -naccept 1 -cert server-unusual-wildcard.pem \ |
72 | -key server-unusual-wildcard.pem & \ | 72 | -key server-unusual-wildcard.pem & \ |
73 | timeout=$$(($$(date +%s) + 5)); \ | 73 | timeout=$$(($$(date +%s) + 5)); \ |
74 | while fstat -p $$! | ! grep -q 'tcp .* \*:4433$$'; \ | 74 | while fstat -p $$! | ! grep -q 'tcp .* \*:4433$$'; \ |
75 | do test $$(date +%s) -lt $$timeout || exit 1; done | 75 | do test $$(date +%s) -lt $$timeout || exit 1; done |
76 | # start client | 76 | # start client |
77 | echo "Q" | ${OPENSSL} s_client -CAfile caR.pem \ | 77 | ${OPENSSL} s_client -CAfile caR.pem \ |
78 | | grep "Verify return code: 0" | 78 | | grep "Verify return code: 0" |
79 | 79 | ||
80 | test-common-wildcard-cert-no-CA-client: | 80 | test-common-wildcard-cert-no-CA-client: |
81 | # common wildcard cert, no CA given to client | 81 | # common wildcard cert, no CA given to client |
82 | # start server | 82 | # start server |
83 | ${OPENSSL} s_server -cert server-common-wildcard.pem \ | 83 | ${OPENSSL} s_server -naccept 1 -cert server-common-wildcard.pem \ |
84 | -key server-common-wildcard.pem & \ | 84 | -key server-common-wildcard.pem & \ |
85 | timeout=$$(($$(date +%s) + 5)); \ | 85 | timeout=$$(($$(date +%s) + 5)); \ |
86 | while fstat -p $$! | ! grep -q 'tcp .* \*:4433$$'; \ | 86 | while fstat -p $$! | ! grep -q 'tcp .* \*:4433$$'; \ |
87 | do test $$(date +%s) -lt $$timeout || exit 1; done | 87 | do test $$(date +%s) -lt $$timeout || exit 1; done |
88 | # start client | 88 | # start client |
89 | echo "Q" | ${OPENSSL} s_client \ | 89 | ${OPENSSL} s_client \ |
90 | | grep "Verify return code: 21" | 90 | | grep "Verify return code: 21" |
91 | 91 | ||
92 | test-common-wildcard-cert-CA-client: | 92 | test-common-wildcard-cert-CA-client: |
93 | # common wildcard cert, CA given to client | 93 | # common wildcard cert, CA given to client |
94 | # start server | 94 | # start server |
95 | ${OPENSSL} s_server -cert server-unusual-wildcard.pem \ | 95 | ${OPENSSL} s_server -naccept 1 -cert server-unusual-wildcard.pem \ |
96 | -key server-unusual-wildcard.pem & \ | 96 | -key server-unusual-wildcard.pem & \ |
97 | timeout=$$(($$(date +%s) + 5)); \ | 97 | timeout=$$(($$(date +%s) + 5)); \ |
98 | while fstat -p $$! | ! grep -q 'tcp .* \*:4433$$'; \ | 98 | while fstat -p $$! | ! grep -q 'tcp .* \*:4433$$'; \ |
99 | do test $$(date +%s) -lt $$timeout || exit 1; done | 99 | do test $$(date +%s) -lt $$timeout || exit 1; done |
100 | # start client | 100 | # start client |
101 | echo "Q" | ${OPENSSL} s_client -CAfile caR.pem \ | 101 | ${OPENSSL} s_client -CAfile caR.pem \ |
102 | | grep "Verify return code: 21" | 102 | | grep "Verify return code: 21" |
103 | 103 | ||
104 | test-verify-unusual-wildcard-cert: | 104 | test-verify-unusual-wildcard-cert: |
@@ -114,13 +114,12 @@ test-openssl-verify-common-wildcard-cert: | |||
114 | test-chain-certificates-s_server: | 114 | test-chain-certificates-s_server: |
115 | # Not all chain certificates are sent in s_server | 115 | # Not all chain certificates are sent in s_server |
116 | # start server | 116 | # start server |
117 | # ${OPENSSL} s_server -cert server-subca.pem -CAfile subcaR.pem | 117 | ${OPENSSL} s_server -naccept 1 -cert server-subca-chainS.pem -CAfile subcaR.pem & \ |
118 | ${OPENSSL} s_server -cert server-subca-chainS.pem -CAfile subcaR.pem & \ | ||
119 | timeout=$$(($$(date +%s) + 5)); \ | 118 | timeout=$$(($$(date +%s) + 5)); \ |
120 | while fstat -p $$! | ! grep -q 'tcp .* \*:4433$$'; \ | 119 | while fstat -p $$! | ! grep -q 'tcp .* \*:4433$$'; \ |
121 | do test $$(date +%s) -lt $$timeout || exit 1; done | 120 | do test $$(date +%s) -lt $$timeout || exit 1; done |
122 | # start client | 121 | # start client |
123 | ${OPENSSL} s_client -CAfile caR.pem | grep "Verify return code: 0" | 122 | ${OPENSSL} s_client -CAfile caR.pem | grep "Verify return code: 0" |
124 | 123 | ||
125 | test-alternative-chain: | 124 | test-alternative-chain: |
126 | # alternative chain not found | 125 | # alternative chain not found |