[rs-commit] r434 - in /mod_cms_verify/trunk: mod_cms_verify.c test.sh
rs-commit at redwax.eu
rs-commit at redwax.eu
Thu Oct 19 18:58:14 CEST 2023
Author: dirkx at redwax.eu
Date: Thu Oct 19 18:58:13 2023
New Revision: 434
Log:
It appears we need this filter earlier
Modified:
mod_cms_verify/trunk/mod_cms_verify.c
mod_cms_verify/trunk/test.sh
Modified: mod_cms_verify/trunk/mod_cms_verify.c
==============================================================================
--- mod_cms_verify/trunk/mod_cms_verify.c (original)
+++ mod_cms_verify/trunk/mod_cms_verify.c Thu Oct 19 18:58:13 2023
@@ -454,7 +454,7 @@
static void _register_hooks(apr_pool_t * p)
{
ap_hook_pre_config(_pre_config, NULL, NULL, APR_HOOK_MIDDLE);
- ap_register_input_filter(HANDLER, _input_filter, NULL, AP_FTYPE_RESOURCE);
+ ap_register_input_filter(HANDLER, _input_filter, NULL, AP_FTYPE_CONNECTION /* AP_FTYPE_RESOURCE */);
}
static const command_rec _cmds[] =
Modified: mod_cms_verify/trunk/test.sh
==============================================================================
--- mod_cms_verify/trunk/test.sh (original)
+++ mod_cms_verify/trunk/test.sh Thu Oct 19 18:58:13 2023
@@ -104,6 +104,17 @@
# Alias ... etc.
</Location>
+
+<IfModule !reflector_module>
+LoadModule reflector_module lib/apache2/modules/mod_reflector.so
+</IfModule>
+
+<Location /check-and-return>
+ SetInputFilter cmsverify
+ CMSVerifyCertificate "${CA_PREFIX}.pem"
+
+ SetHandler reflector
+</Location>
EOM
# Check config
@@ -126,6 +137,7 @@
echo 'field1=foo&field2=bar' > "$TMPDIR/payload.raw"
+if false; then
# check that it works when we post plainly.
#
curl --silent -d "$TMPDIR/payload.raw" http://127.0.0.1:8080/cgi-bin/printenv > /dev/null
@@ -149,6 +161,11 @@
#
curl -vvv --silent --data-binary "$TMPDIR/post.json" http://127.0.0.1:8080/post-api
cat "$TMPDIR/post.json" | jq --sort-keys | curl -vvv --silent --data-binary @- http://127.0.0.1:8080/post-api
+fi
+
+cat "$TMPDIR/payload.raw" |\
+ $OPENSSL cms -sign -signer "${CERT_PREFIX}.crt" -certfile "${CA_PREFIX}-chain.pem" -outform DER -nodetach -binary |\
+ curl -vvv --silent --data-binary @- http://127.0.0.1:8080/check-and-return
echo
echo
More information about the rs-commit
mailing list