|
|
7a8c6d |
From 151699403803230e6d420b422cca13380b36e2a8 Mon Sep 17 00:00:00 2001
|
|
|
7a8c6d |
From: Trevor Vaughan <tvaughan@onyxpoint.com>
|
|
|
7a8c6d |
Date: Tue, 27 Mar 2018 18:04:34 -0400
|
|
|
7a8c6d |
Subject: [PATCH 24/25] Updated tests
|
|
|
7a8c6d |
|
|
|
7a8c6d |
Worked around the fact that data under the 'cas' directory is
|
|
|
7a8c6d |
dynamically provisioned by moving from `cmp` to `diff -q -I` in
|
|
|
7a8c6d |
run-tests.sh and excluding everything in the dynamically generated
|
|
|
7a8c6d |
space.
|
|
|
7a8c6d |
|
|
|
7a8c6d |
Ref #89
|
|
|
7a8c6d |
---
|
|
|
7a8c6d |
tests/028-dbus/expected.out | 42 +++++++++++++++++++++++++++++++++++++++++-
|
|
|
7a8c6d |
tests/033-scep/run.sh | 6 +++---
|
|
|
7a8c6d |
tests/run-tests.sh | 4 +++-
|
|
|
7a8c6d |
3 files changed, 47 insertions(+), 5 deletions(-)
|
|
|
7a8c6d |
|
|
|
7a8c6d |
diff --git a/tests/028-dbus/expected.out b/tests/028-dbus/expected.out
|
|
|
7a8c6d |
index 4c33e9a..dd9cac1 100644
|
|
|
7a8c6d |
--- a/tests/028-dbus/expected.out
|
|
|
7a8c6d |
+++ b/tests/028-dbus/expected.out
|
|
|
7a8c6d |
@@ -536,6 +536,9 @@ After setting template-eku to 1.2.3.4.5.6.7.8.9.10, we got dbus.Array([dbus.Stri
|
|
|
7a8c6d |
</signal>
|
|
|
7a8c6d |
</interface>
|
|
|
7a8c6d |
<interface name="org.fedorahosted.certmonger.ca">
|
|
|
7a8c6d |
+ <method name="get_config_file_path">
|
|
|
7a8c6d |
+ <arg name="path" type="s" direction="out"/>
|
|
|
7a8c6d |
+ </method>
|
|
|
7a8c6d |
<method name="get_nickname">
|
|
|
7a8c6d |
<arg name="nickname" type="s" direction="out"/>
|
|
|
7a8c6d |
</method>
|
|
|
7a8c6d |
@@ -580,6 +583,8 @@ After setting template-eku to 1.2.3.4.5.6.7.8.9.10, we got dbus.Array([dbus.Stri
|
|
|
7a8c6d |
<property name="ca-presave-uid" type="s" access="read"/>
|
|
|
7a8c6d |
<property name="ca-postsave-command" type="s" access="read"/>
|
|
|
7a8c6d |
<property name="ca-postsave-uid" type="s" access="read"/>
|
|
|
7a8c6d |
+ <property name="scep-cipher" type="s" access="readwrite"/>
|
|
|
7a8c6d |
+ <property name="scep-digest" type="s" access="readwrite"/>
|
|
|
7a8c6d |
<property name="scep-ca-identifier" type="s" access="readwrite"/>
|
|
|
7a8c6d |
<property name="scep-ca-capabilities" type="as" access="read"/>
|
|
|
7a8c6d |
<property name="scep-ra-cert" type="s" access="read"/>
|
|
|
7a8c6d |
@@ -588,6 +593,9 @@ After setting template-eku to 1.2.3.4.5.6.7.8.9.10, we got dbus.Array([dbus.Stri
|
|
|
7a8c6d |
</interface>
|
|
|
7a8c6d |
</node>
|
|
|
7a8c6d |
|
|
|
7a8c6d |
+[ /org/fedorahosted/certmonger/cas/CA1: org.fedorahosted.certmonger.ca.get_config_file_path ]
|
|
|
7a8c6d |
+$tmpdir/cas/local
|
|
|
7a8c6d |
+
|
|
|
7a8c6d |
[ /org/fedorahosted/certmonger/cas/CA1: org.fedorahosted.certmonger.ca.get_nickname ]
|
|
|
7a8c6d |
local
|
|
|
7a8c6d |
|
|
|
7a8c6d |
@@ -641,6 +649,9 @@ dbus.Array([], signature=dbus.Signature('s'))
|
|
|
7a8c6d |
</signal>
|
|
|
7a8c6d |
</interface>
|
|
|
7a8c6d |
<interface name="org.fedorahosted.certmonger.ca">
|
|
|
7a8c6d |
+ <method name="get_config_file_path">
|
|
|
7a8c6d |
+ <arg name="path" type="s" direction="out"/>
|
|
|
7a8c6d |
+ </method>
|
|
|
7a8c6d |
<method name="get_nickname">
|
|
|
7a8c6d |
<arg name="nickname" type="s" direction="out"/>
|
|
|
7a8c6d |
</method>
|
|
|
7a8c6d |
@@ -685,6 +696,8 @@ dbus.Array([], signature=dbus.Signature('s'))
|
|
|
7a8c6d |
<property name="ca-presave-uid" type="s" access="read"/>
|
|
|
7a8c6d |
<property name="ca-postsave-command" type="s" access="read"/>
|
|
|
7a8c6d |
<property name="ca-postsave-uid" type="s" access="read"/>
|
|
|
7a8c6d |
+ <property name="scep-cipher" type="s" access="readwrite"/>
|
|
|
7a8c6d |
+ <property name="scep-digest" type="s" access="readwrite"/>
|
|
|
7a8c6d |
<property name="scep-ca-identifier" type="s" access="readwrite"/>
|
|
|
7a8c6d |
<property name="scep-ca-capabilities" type="as" access="read"/>
|
|
|
7a8c6d |
<property name="scep-ra-cert" type="s" access="read"/>
|
|
|
7a8c6d |
@@ -693,6 +706,9 @@ dbus.Array([], signature=dbus.Signature('s'))
|
|
|
7a8c6d |
</interface>
|
|
|
7a8c6d |
</node>
|
|
|
7a8c6d |
|
|
|
7a8c6d |
+[ /org/fedorahosted/certmonger/cas/CA2: org.fedorahosted.certmonger.ca.get_config_file_path ]
|
|
|
7a8c6d |
+$tmpdir/cas/20180327134236
|
|
|
7a8c6d |
+
|
|
|
7a8c6d |
[ /org/fedorahosted/certmonger/cas/CA2: org.fedorahosted.certmonger.ca.get_nickname ]
|
|
|
7a8c6d |
SelfSign
|
|
|
7a8c6d |
|
|
|
7a8c6d |
@@ -715,7 +731,7 @@ dbus.Array([], signature=dbus.Signature('s'))
|
|
|
7a8c6d |
[ /org/fedorahosted/certmonger/cas/CA2: org.fedorahosted.certmonger.ca.refresh ]
|
|
|
7a8c6d |
1
|
|
|
7a8c6d |
|
|
|
7a8c6d |
-/org/fedorahosted/certmonger/cas/CA2: warning: property org.fedorahosted.certmonger.ca.scep-ca-identifier not settable on this object
|
|
|
7a8c6d |
+/org/fedorahosted/certmonger/cas/CA2: property org.fedorahosted.certmonger.ca.scep-cipher not set: (, x)
|
|
|
7a8c6d |
[ /org/fedorahosted/certmonger/cas/CA3: org.freedesktop.DBus.Introspectable.Introspect ]
|
|
|
7a8c6d |
|
|
|
7a8c6d |
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
|
|
7a8c6d |
@@ -748,6 +764,9 @@ dbus.Array([], signature=dbus.Signature('s'))
|
|
|
7a8c6d |
</signal>
|
|
|
7a8c6d |
</interface>
|
|
|
7a8c6d |
<interface name="org.fedorahosted.certmonger.ca">
|
|
|
7a8c6d |
+ <method name="get_config_file_path">
|
|
|
7a8c6d |
+ <arg name="path" type="s" direction="out"/>
|
|
|
7a8c6d |
+ </method>
|
|
|
7a8c6d |
<method name="get_nickname">
|
|
|
7a8c6d |
<arg name="nickname" type="s" direction="out"/>
|
|
|
7a8c6d |
</method>
|
|
|
7a8c6d |
@@ -792,6 +811,8 @@ dbus.Array([], signature=dbus.Signature('s'))
|
|
|
7a8c6d |
<property name="ca-presave-uid" type="s" access="read"/>
|
|
|
7a8c6d |
<property name="ca-postsave-command" type="s" access="read"/>
|
|
|
7a8c6d |
<property name="ca-postsave-uid" type="s" access="read"/>
|
|
|
7a8c6d |
+ <property name="scep-cipher" type="s" access="readwrite"/>
|
|
|
7a8c6d |
+ <property name="scep-digest" type="s" access="readwrite"/>
|
|
|
7a8c6d |
<property name="scep-ca-identifier" type="s" access="readwrite"/>
|
|
|
7a8c6d |
<property name="scep-ca-capabilities" type="as" access="read"/>
|
|
|
7a8c6d |
<property name="scep-ra-cert" type="s" access="read"/>
|
|
|
7a8c6d |
@@ -800,6 +821,9 @@ dbus.Array([], signature=dbus.Signature('s'))
|
|
|
7a8c6d |
</interface>
|
|
|
7a8c6d |
</node>
|
|
|
7a8c6d |
|
|
|
7a8c6d |
+[ /org/fedorahosted/certmonger/cas/CA3: org.fedorahosted.certmonger.ca.get_config_file_path ]
|
|
|
7a8c6d |
+$tmpdir/cas/20180327134236-1
|
|
|
7a8c6d |
+
|
|
|
7a8c6d |
[ /org/fedorahosted/certmonger/cas/CA3: org.fedorahosted.certmonger.ca.get_nickname ]
|
|
|
7a8c6d |
IPA
|
|
|
7a8c6d |
|
|
|
7a8c6d |
@@ -853,6 +877,9 @@ dbus.Array([], signature=dbus.Signature('s'))
|
|
|
7a8c6d |
</signal>
|
|
|
7a8c6d |
</interface>
|
|
|
7a8c6d |
<interface name="org.fedorahosted.certmonger.ca">
|
|
|
7a8c6d |
+ <method name="get_config_file_path">
|
|
|
7a8c6d |
+ <arg name="path" type="s" direction="out"/>
|
|
|
7a8c6d |
+ </method>
|
|
|
7a8c6d |
<method name="get_nickname">
|
|
|
7a8c6d |
<arg name="nickname" type="s" direction="out"/>
|
|
|
7a8c6d |
</method>
|
|
|
7a8c6d |
@@ -897,6 +924,8 @@ dbus.Array([], signature=dbus.Signature('s'))
|
|
|
7a8c6d |
<property name="ca-presave-uid" type="s" access="read"/>
|
|
|
7a8c6d |
<property name="ca-postsave-command" type="s" access="read"/>
|
|
|
7a8c6d |
<property name="ca-postsave-uid" type="s" access="read"/>
|
|
|
7a8c6d |
+ <property name="scep-cipher" type="s" access="readwrite"/>
|
|
|
7a8c6d |
+ <property name="scep-digest" type="s" access="readwrite"/>
|
|
|
7a8c6d |
<property name="scep-ca-identifier" type="s" access="readwrite"/>
|
|
|
7a8c6d |
<property name="scep-ca-capabilities" type="as" access="read"/>
|
|
|
7a8c6d |
<property name="scep-ra-cert" type="s" access="read"/>
|
|
|
7a8c6d |
@@ -905,6 +934,9 @@ dbus.Array([], signature=dbus.Signature('s'))
|
|
|
7a8c6d |
</interface>
|
|
|
7a8c6d |
</node>
|
|
|
7a8c6d |
|
|
|
7a8c6d |
+[ /org/fedorahosted/certmonger/cas/CA4: org.fedorahosted.certmonger.ca.get_config_file_path ]
|
|
|
7a8c6d |
+$tmpdir/cas/20180327134236-2
|
|
|
7a8c6d |
+
|
|
|
7a8c6d |
[ /org/fedorahosted/certmonger/cas/CA4: org.fedorahosted.certmonger.ca.get_nickname ]
|
|
|
7a8c6d |
certmaster
|
|
|
7a8c6d |
|
|
|
7a8c6d |
@@ -958,6 +990,9 @@ dbus.Array([], signature=dbus.Signature('s'))
|
|
|
7a8c6d |
</signal>
|
|
|
7a8c6d |
</interface>
|
|
|
7a8c6d |
<interface name="org.fedorahosted.certmonger.ca">
|
|
|
7a8c6d |
+ <method name="get_config_file_path">
|
|
|
7a8c6d |
+ <arg name="path" type="s" direction="out"/>
|
|
|
7a8c6d |
+ </method>
|
|
|
7a8c6d |
<method name="get_nickname">
|
|
|
7a8c6d |
<arg name="nickname" type="s" direction="out"/>
|
|
|
7a8c6d |
</method>
|
|
|
7a8c6d |
@@ -1002,6 +1037,8 @@ dbus.Array([], signature=dbus.Signature('s'))
|
|
|
7a8c6d |
<property name="ca-presave-uid" type="s" access="read"/>
|
|
|
7a8c6d |
<property name="ca-postsave-command" type="s" access="read"/>
|
|
|
7a8c6d |
<property name="ca-postsave-uid" type="s" access="read"/>
|
|
|
7a8c6d |
+ <property name="scep-cipher" type="s" access="readwrite"/>
|
|
|
7a8c6d |
+ <property name="scep-digest" type="s" access="readwrite"/>
|
|
|
7a8c6d |
<property name="scep-ca-identifier" type="s" access="readwrite"/>
|
|
|
7a8c6d |
<property name="scep-ca-capabilities" type="as" access="read"/>
|
|
|
7a8c6d |
<property name="scep-ra-cert" type="s" access="read"/>
|
|
|
7a8c6d |
@@ -1010,6 +1047,9 @@ dbus.Array([], signature=dbus.Signature('s'))
|
|
|
7a8c6d |
</interface>
|
|
|
7a8c6d |
</node>
|
|
|
7a8c6d |
|
|
|
7a8c6d |
+[ /org/fedorahosted/certmonger/cas/CA5: org.fedorahosted.certmonger.ca.get_config_file_path ]
|
|
|
7a8c6d |
+$tmpdir/cas/20180327134236-3
|
|
|
7a8c6d |
+
|
|
|
7a8c6d |
[ /org/fedorahosted/certmonger/cas/CA5: org.fedorahosted.certmonger.ca.get_nickname ]
|
|
|
7a8c6d |
dogtag-ipa-renew-agent
|
|
|
7a8c6d |
|
|
|
7a8c6d |
diff --git a/tests/033-scep/run.sh b/tests/033-scep/run.sh
|
|
|
7a8c6d |
index 15480ac..f270a49 100755
|
|
|
7a8c6d |
--- a/tests/033-scep/run.sh
|
|
|
7a8c6d |
+++ b/tests/033-scep/run.sh
|
|
|
7a8c6d |
@@ -103,7 +103,7 @@ check_nonce() {
|
|
|
7a8c6d |
fi
|
|
|
7a8c6d |
}
|
|
|
7a8c6d |
|
|
|
7a8c6d |
-set_digest md5
|
|
|
7a8c6d |
+set_digest sha256
|
|
|
7a8c6d |
$toolsdir/scepgen ca entry > scepdata
|
|
|
7a8c6d |
|
|
|
7a8c6d |
echo "[req, no trust root]"
|
|
|
7a8c6d |
@@ -135,7 +135,7 @@ grep ^gic: scepdata | cut -f2- -d: | base64 -i -d | $toolsdir/pk7verify -r mini.
|
|
|
7a8c6d |
check_failed
|
|
|
7a8c6d |
echo OK
|
|
|
7a8c6d |
echo "[req, old root]"
|
|
|
7a8c6d |
-set_digest md5
|
|
|
7a8c6d |
+set_digest sha256
|
|
|
7a8c6d |
$toolsdir/scepgen ca entry > scepdata
|
|
|
7a8c6d |
if test x`grep ^req: scepdata | cut -f2- -d:` = x ; then
|
|
|
7a8c6d |
echo missing req
|
|
|
7a8c6d |
@@ -145,7 +145,7 @@ check_verified
|
|
|
7a8c6d |
check_msgtype $SCEP_MSGTYPE_PKCSREQ
|
|
|
7a8c6d |
check_txid
|
|
|
7a8c6d |
check_nonce
|
|
|
7a8c6d |
-check_digest md5
|
|
|
7a8c6d |
+check_digest sha256
|
|
|
7a8c6d |
echo OK
|
|
|
7a8c6d |
echo "[gic, old trust root]"
|
|
|
7a8c6d |
set_digest sha1
|
|
|
7a8c6d |
diff --git a/tests/run-tests.sh b/tests/run-tests.sh
|
|
|
7a8c6d |
index a0f7c2d..266ddc6 100755
|
|
|
7a8c6d |
--- a/tests/run-tests.sh
|
|
|
7a8c6d |
+++ b/tests/run-tests.sh
|
|
|
7a8c6d |
@@ -77,7 +77,9 @@ for testid in "$@" $subdirs ; do
|
|
|
7a8c6d |
if ! test -s "$i" ; then
|
|
|
7a8c6d |
break
|
|
|
7a8c6d |
fi
|
|
|
7a8c6d |
- if cmp -s "$tmpfile" "$i" 2> /dev/null ; then
|
|
|
7a8c6d |
+ # This regex needs to be ignored since it is dynamically created at
|
|
|
7a8c6d |
+ # every CA creation
|
|
|
7a8c6d |
+ if diff -q -I "tmpdir/cas/[[:digit:]]\+" "$tmpfile" "$i" 2> /dev/null ; then
|
|
|
7a8c6d |
stat=0
|
|
|
7a8c6d |
echo "OK"
|
|
|
7a8c6d |
cp $tmpfile "$builddir"/"$testid"/actual.out
|
|
|
7a8c6d |
--
|
|
|
7a8c6d |
1.8.3.1
|
|
|
7a8c6d |
|