svn commit: r1926790 - in /subversion/trunk: Makefile.in subversion/tests/cmdline/davautocheck.sh

[email protected]
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <[email protected]>
Author: brane
Date: Sat Jun 28 02:41:59 2025
New Revision: 1926790

URL: http://svn.apache.org/viewvc?rev=1926790&view=rev
Log:
Add infrastructure to allow testing ra_serf using Digest instead of Basic
authentication. This is really only for testing Serf in a context that Serf's
own test suite currently doesn't provide.

* Makefile.in
  (davautocheck): Set the $PYTHON environment variable for davautocheck.sh.
* subversion/tests/cmdline/davautocheck.sh: Add some commented-out sections
   that configure Digest authentication and generate the password file in the
   appropriate format. When used, needs Python3 to generate the password file,
   thus the change in Makefile.in.

Modified:
    subversion/trunk/Makefile.in
    subversion/trunk/subversion/tests/cmdline/davautocheck.sh

Modified: subversion/trunk/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/trunk/Makefile.in?rev=1926790&r1=1926789&r2=1926790&view=diff
==============================================================================
--- subversion/trunk/Makefile.in (original)
+++ subversion/trunk/Makefile.in Sat Jun 28 02:41:59 2025
@@ -659,7 +659,7 @@ davcheck: bin $(TEST_DEPS) @BDB_TEST_DEP
 # run make check.
 davautocheck: bin $(TEST_DEPS) @BDB_TEST_DEPS@ apache-mod mod_dontdothat
 	@# Takes MODULE_PATH, USE_HTTPV1 and SVN_PATH_AUTHZ in the environment.
-	@APXS=$(APXS) MAKE=$(MAKE) $(SHELL) $(top_srcdir)/subversion/tests/cmdline/davautocheck.sh
+	@APXS=$(APXS) MAKE=$(MAKE) PYTHON=$(PYTHON) $(SHELL) $(top_srcdir)/subversion/tests/cmdline/davautocheck.sh
 
 # First, run:
 #   subversion/svnserve/svnserve -d -r `pwd`/subversion/tests/cmdline

Modified: subversion/trunk/subversion/tests/cmdline/davautocheck.sh
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/davautocheck.sh?rev=1926790&r1=1926789&r2=1926790&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/davautocheck.sh (original)
+++ subversion/trunk/subversion/tests/cmdline/davautocheck.sh Sat Jun 28 02:41:59 2025
@@ -300,6 +300,9 @@ LOAD_MOD_AUTH=$(get_loadmodule_config mo
 say "Monolithic Auth module not found. Assuming we run against Apache 2.1+"
 LOAD_MOD_AUTH="$(get_loadmodule_config mod_auth_basic)" \
     || fail "Auth_Basic module not found."
+# FIXME: Uncomment to test digest authentication:
+# LOAD_MOD_AUTH="$(get_loadmodule_config mod_auth_digest)" \
+#     || fail "Auth_Digest module not found."
 LOAD_MOD_ACCESS_COMPAT="$(get_loadmodule_config mod_access_compat)" \
     && {
 say "Found modules for Apache 2.3.0+"
@@ -428,6 +431,22 @@ $HTPASSWD -b  $HTTPD_USERS __dumpster__
 $HTPASSWD -b  $HTTPD_USERS JRANDOM   rayjandom
 $HTPASSWD -b  $HTTPD_USERS JCONSTANT rayjandom
 
+# FIXME: Uncomment to test digest authentication:
+# rm -f $HTTPD_USERS
+# gen_digest_authn() {
+#   # This is what `htdigest` does when we're not looking.
+#   r="Subversion Repository"
+#   p="$1:$r:"
+#   s="$1:$r:$2"
+#   $PYTHON -c "from hashlib import md5; print('$p' + md5(b'$s').hexdigest())" \
+#           >> $HTTPD_USERS
+# }
+# gen_digest_authn jrandom   rayjandom
+# gen_digest_authn jconstant rayjandom
+# gen_digest_authn __dumpster__ __loadster__
+# gen_digest_authn JRANDOM   rayjandom
+# gen_digest_authn JCONSTANT rayjandom
+
 say "Adding groups for mod_authz_svn tests"
 cat > "$HTTPD_GROUPS" <<__EOF__
 random: jrandom
@@ -548,6 +567,9 @@ Alias /fsdavroot $ABS_BUILDDIR/subversio
 <Location /svn-test-work/repositories>
 __EOF__
 location_common_without_authz() {
+# FIXME: To test digest authentication, replace 'AuthType Basic' with:
+#    AuthType          Digest
+#    AuthDigestProvider file
 cat >> "$HTTPD_CFG" <<__EOF__
   DAV               svn
   AuthType          Basic
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.