]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
secureserver.pl, genserv.sh: cleanups
authorYedaya Katsman <yedaya.ka@gmail.com>
Sat, 15 Mar 2025 21:02:27 +0000 (23:02 +0200)
committerViktor Szakats <commit@vsz.me>
Sun, 23 Mar 2025 19:26:30 +0000 (20:26 +0100)
stunnel: print configuration actually in file
Instead of duplicating all the logic of writing the stunnel
configuration, and having to keep it up to date, when running in verbose
mode print the actual contents of the file after writing it.

certs/genserv.sh: Fix typo in error message

Closes #16783

tests/certs/scripts/genserv.sh
tests/secureserver.pl

index c2701ed87e84cc38fcd2ec16c2294c01522f85ea..cf99d511d29730d07d74c37f0b834b6cbca1d5a1 100755 (executable)
@@ -69,7 +69,7 @@ if [ -z "$CAPREFIX" ]; then
   NOTOK=1
 else
   if [ ! -f "$CAPREFIX-ca.cacert" ]; then
-    echo "No CA certificate file $CAPREFIX-ca.caert"
+    echo "No CA certificate file $CAPREFIX-ca.cacert"
     NOTOK=1
   fi
   if [ ! -f "$CAPREFIX-ca.key" ]; then
index 12c5dfbe22a5f6d60ee1011d97efef4ac7e015be..8e8049fc0a231a9f792f3208586d10ed755db862 100755 (executable)
@@ -322,22 +322,11 @@ if($stunnel_version >= 400) {
     if($verbose) {
         print uc($proto) ." server (stunnel $ver_major.$ver_minor)\n";
         print "cmd: $cmd\n";
-        print "CApath = $capath\n";
-        print "cert = $certfile\n";
-        print "debug = $loglevel\n";
-        print "socket = $socketopt\n";
-        if($fips_support) {
-            print "fips = no\n";
-        }
-        if(!$tstunnel_windows) {
-            print "pid = $pidfile\n";
-            print "output = $logfile\n";
-            print "foreground = yes\n";
-        }
+        print "stunnel config at $conffile:\n";
+        open (my $writtenconf, '<', "$conffile") or die "$ssltext could not open the config file after writing\n";
+        print <$writtenconf>;
         print "\n";
-        print "[curltest]\n";
-        print "accept = $host_ip:$accept_port\n";
-        print "connect = $host_ip:$target_port\n";
+        close ($writtenconf);
     }
 }