]> arthur.barton.de Git - ngircd-alex.git/commitdiff
testsuite: Pass -nameopt to openssl s_client.
authorSebastian Andrzej Siewior <sebastian@breakpoint.cc>
Tue, 30 Jan 2024 20:26:16 +0000 (21:26 +0100)
committerAlexander Barton <alex@barton.de>
Mon, 5 Feb 2024 12:39:15 +0000 (13:39 +0100)
The default value for the -nameopt option changed in OpenSSL 3.2 from
`oneline' to `utf8'. The `oneline' option also included a space around
the fields which is not the case for `utf8'. This means that
CN = my.first.domain.tld

changed to

CN=my.first.domain.tld

and is now longer recognized, leading to test failure.
This can be fixed by either going back to `oneline' or keeping `utf8'
and adding additionally `space_eq'. Anoter way would be to teach the
expect that the space is optional.

Add explicit -nameopt option with `utf8,space_eq' which is understood by
by OpenSSL 3.2 and earlier to make explicit. Remove the wildcard.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
src/testsuite/connect-ssl-cert1-test.e
src/testsuite/connect-ssl-cert2-test.e

index 5eb998b323a026f36d7ae383ea684e68fb658a9e..69f066ebaa20f586ece63039060e08e9e6c250cc 100644 (file)
@@ -1,10 +1,10 @@
 # ngIRCd test suite
 # Server connect test
 
-spawn openssl s_client -quiet -connect 127.0.0.1:6790
+spawn openssl s_client -quiet -nameopt utf8,space_eq -connect 127.0.0.1:6790
 expect {
         timeout { exit 1 }
-        "*CN*=*my.first.domain.tld"
+        "*CN = my.first.domain.tld"
 }
 
 sleep 2
index cc10a1ed984085bbb524246dd167ebd867641740..cf71d048de0fe9f3e1ef02de1bf624c8075c7737 100644 (file)
@@ -1,10 +1,10 @@
 # ngIRCd test suite
 # Server connect test
 
-spawn openssl s_client -quiet -connect 127.0.0.1:6790
+spawn openssl s_client -quiet -nameopt utf8,space_eq -connect 127.0.0.1:6790
 expect {
         timeout { exit 1 }
-        "*CN*=*my.second.domain.tld"
+        "*CN = my.second.domain.tld"
 }
 
 sleep 2