1 |
commit: 6ef21c07141f752b13217a0b3f2f9fc34959114b |
2 |
Author: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Apr 16 21:52:17 2019 +0000 |
4 |
Commit: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Apr 16 21:52:41 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ef21c07 |
7 |
|
8 |
dev-libs/xmlsec: simplify test patch |
9 |
|
10 |
Signed-off-by: Alon Bar-Lev <alonbl <AT> gentoo.org> |
11 |
Package-Manager: Portage-2.3.62, Repoman-2.3.11 |
12 |
|
13 |
dev-libs/xmlsec/files/xmlsec-1.2.28-test.patch | 96 ++++---------------------- |
14 |
1 file changed, 13 insertions(+), 83 deletions(-) |
15 |
|
16 |
diff --git a/dev-libs/xmlsec/files/xmlsec-1.2.28-test.patch b/dev-libs/xmlsec/files/xmlsec-1.2.28-test.patch |
17 |
index fa1fa60a6df..ae80e1fa5f3 100644 |
18 |
--- a/dev-libs/xmlsec/files/xmlsec-1.2.28-test.patch |
19 |
+++ b/dev-libs/xmlsec/files/xmlsec-1.2.28-test.patch |
20 |
@@ -1,121 +1,51 @@ |
21 |
-From 9d5f2d172ab91fd9fb2c2eddaee86ba62eab2d67 Mon Sep 17 00:00:00 2001 |
22 |
+From 3d5c9e38d9576aea252ba186dd2913c57a7a8dd8 Mon Sep 17 00:00:00 2001 |
23 |
From: Alon Bar-Lev <alon.barlev@×××××.com> |
24 |
Date: Tue, 16 Apr 2019 23:07:08 +0300 |
25 |
Subject: [PATCH] tests: workout test --X509-skip-strict-checks |
26 |
|
27 |
-The --X509-skip-strict-checks parameter is not accepted by all commands, |
28 |
-result of skipping many tests. |
29 |
+Apply --X509-skip-strict-checks parameter to verify commands. |
30 |
|
31 |
-Reduce impact of the --X509-skip-strict-checks to a workaround to gnutls only. |
32 |
- |
33 |
-Filter double --X509-skip-strict-checks commands as cli does not accept |
34 |
-multiple instances. |
35 |
+[PORT] |
36 |
|
37 |
Signed-off-by: Alon Bar-Lev <alon.barlev@×××××.com> |
38 |
--- |
39 |
- tests/testrun.sh | 37 ++++++++++++++++++++++--------------- |
40 |
- 1 file changed, 22 insertions(+), 15 deletions(-) |
41 |
- |
42 |
diff --git a/tests/testrun.sh b/tests/testrun.sh |
43 |
-index ea65802b..35f4a780 100755 |
44 |
+index ea65802b..9950d4fb 100755 |
45 |
--- a/tests/testrun.sh |
46 |
+++ b/tests/testrun.sh |
47 |
-@@ -59,7 +59,11 @@ if [ "z$XMLSEC_DEFAULT_CRYPTO" != "z" ] ; then |
48 |
+@@ -59,7 +59,7 @@ if [ "z$XMLSEC_DEFAULT_CRYPTO" != "z" ] ; then |
49 |
elif [ "z$crypto" != "z" ] ; then |
50 |
xmlsec_params="$xmlsec_params --crypto $crypto" |
51 |
fi |
52 |
-xmlsec_params="$xmlsec_params --X509-skip-strict-checks --crypto-config $crypto_config" |
53 |
+xmlsec_params="$xmlsec_params --crypto-config $crypto_config" |
54 |
-+xmlsec_x509_params= |
55 |
-+if [ "z${crypto}" = zgnutls ]; then |
56 |
-+ xmlsec_x509_params="--X509-skip-strict-checks" |
57 |
-+fi |
58 |
|
59 |
# |
60 |
# Setup keys config |
61 |
-@@ -218,8 +222,8 @@ execKeysTest() { |
62 |
- if [ -f $keysfile ] ; then |
63 |
- params="$params --keys-file $keysfile" |
64 |
- fi |
65 |
-- echo "$VALGRIND $xmlsec_app keys $params $xmlsec_params $keysfile" >> $curlogfile |
66 |
-- $VALGRIND $xmlsec_app keys $params $xmlsec_params $keysfile >> $curlogfile 2>> $curlogfile |
67 |
-+ echo "$VALGRIND $xmlsec_app keys $params $xmlsec_x509_params $xmlsec_params $keysfile" >> $curlogfile |
68 |
-+ $VALGRIND $xmlsec_app keys $params $xmlsec_x509_params $xmlsec_params $keysfile >> $curlogfile 2>> $curlogfile |
69 |
- printRes $expected_res $? |
70 |
- if [ $? != 0 ]; then |
71 |
- failures=`expr $failures + 1` |
72 |
-@@ -307,9 +311,10 @@ execDSigTest() { |
73 |
- |
74 |
+@@ -308,8 +308,9 @@ execDSigTest() { |
75 |
# run tests |
76 |
if [ -n "$params1" ] ; then |
77 |
-+ echo "$params1" | grep -q -- "$xmlsec_x509_params" && _xmlsec_x509_params= || _xmlsec_x509_params="$xmlsec_x509_params" |
78 |
printf " Verify existing signature " |
79 |
- echo "$VALGRIND $xmlsec_app verify $xmlsec_params $params1 $full_file.xml" >> $curlogfile |
80 |
- $VALGRIND $xmlsec_app verify $xmlsec_params $params1 $full_file.xml >> $curlogfile 2>> $curlogfile |
81 |
-+ echo "$VALGRIND $xmlsec_app verify $_xmlsec_x509_params $xmlsec_params $params1 $full_file.xml" >> $curlogfile |
82 |
-+ $VALGRIND $xmlsec_app verify $_xmlsec_x509_params $xmlsec_params $params1 $full_file.xml >> $curlogfile 2>> $curlogfile |
83 |
++ params1="$(echo $params1 | sed 's/--X509-skip-strict-checks//')" |
84 |
++ echo "$VALGRIND $xmlsec_app verify --X509-skip-strict-checks $xmlsec_params $params1 $full_file.xml" >> $curlogfile |
85 |
++ $VALGRIND $xmlsec_app verify --X509-skip-strict-checks $xmlsec_params $params1 $full_file.xml >> $curlogfile 2>> $curlogfile |
86 |
printRes $expected_res $? |
87 |
if [ $? != 0 ]; then |
88 |
failures=`expr $failures + 1` |
89 |
-@@ -317,9 +322,10 @@ execDSigTest() { |
90 |
- fi |
91 |
- |
92 |
- if [ -n "$params2" -a -z "$PERF_TEST" ] ; then |
93 |
-+ echo "$params2" | grep -q -- "$xmlsec_x509_params" && _xmlsec_x509_params= || _xmlsec_x509_params="$xmlsec_x509_params" |
94 |
- printf " Create new signature " |
95 |
-- echo "$VALGRIND $xmlsec_app sign $xmlsec_params $params2 --output $tmpfile $full_file.tmpl" >> $curlogfile |
96 |
-- $VALGRIND $xmlsec_app sign $xmlsec_params $params2 --output $tmpfile $full_file.tmpl >> $curlogfile 2>> $curlogfile |
97 |
-+ echo "$VALGRIND $xmlsec_app sign $_xmlsec_x509_params $_xmlsec_params $params2 --output $tmpfile $full_file.tmpl" >> $curlogfile |
98 |
-+ $VALGRIND $xmlsec_app sign $_xmlsec_x509_params $_xmlsec_params $params2 --output $tmpfile $full_file.tmpl >> $curlogfile 2>> $curlogfile |
99 |
- printRes $res_success $? |
100 |
- if [ $? != 0 ]; then |
101 |
- failures=`expr $failures + 1` |
102 |
-@@ -327,9 +333,10 @@ execDSigTest() { |
103 |
- fi |
104 |
+@@ -328,8 +328,9 @@ execDSigTest() { |
105 |
|
106 |
if [ -n "$params3" -a -z "$PERF_TEST" ] ; then |
107 |
-+ echo "$params3" | grep -q -- "$xmlsec_x509_params" && _xmlsec_x509_params= || _xmlsec_x509_params="$xmlsec_x509_params" |
108 |
printf " Verify new signature " |
109 |
- echo "$VALGRIND $xmlsec_app verify $xmlsec_params $params3 $tmpfile" >> $curlogfile |
110 |
- $VALGRIND $xmlsec_app verify $xmlsec_params $params3 $tmpfile >> $curlogfile 2>> $curlogfile |
111 |
-+ echo "$VALGRIND $xmlsec_app verify $_xmlsec_x509_params $xmlsec_params $params3 $tmpfile" >> $curlogfile |
112 |
-+ $VALGRIND $xmlsec_app verify $_xmlsec_x509_params $xmlsec_params $params3 $tmpfile >> $curlogfile 2>> $curlogfile |
113 |
- printRes $res_success $? |
114 |
- if [ $? != 0 ]; then |
115 |
- failures=`expr $failures + 1` |
116 |
-@@ -406,8 +413,8 @@ execEncTest() { |
117 |
- if [ -n "$params1" ] ; then |
118 |
- rm -f $tmpfile |
119 |
- printf " Decrypt existing document " |
120 |
-- echo "$VALGRIND $xmlsec_app decrypt $xmlsec_params $params1 $full_file.xml" >> $curlogfile |
121 |
-- $VALGRIND $xmlsec_app decrypt $xmlsec_params $params1 --output $tmpfile $full_file.xml >> $curlogfile 2>> $curlogfile |
122 |
-+ echo "$VALGRIND $xmlsec_app decrypt $xmlsec_x509_params $xmlsec_params $params1 $full_file.xml" >> $curlogfile |
123 |
-+ $VALGRIND $xmlsec_app decrypt $xmlsec_x509_params $xmlsec_params $params1 --output $tmpfile $full_file.xml >> $curlogfile 2>> $curlogfile |
124 |
- res=$? |
125 |
- echo "=== TEST RESULT: $res; expected: $expected_res" >> $curlogfile |
126 |
- if [ $res = 0 -a "$expected_res" = "$res_success" ]; then |
127 |
-@@ -428,8 +435,8 @@ execEncTest() { |
128 |
- if [ -n "$params2" -a -z "$PERF_TEST" ] ; then |
129 |
- rm -f $tmpfile |
130 |
- printf " Encrypt document " |
131 |
-- echo "$VALGRIND $xmlsec_app encrypt $xmlsec_params $params2 --output $tmpfile $full_file.tmpl" >> $curlogfile |
132 |
-- $VALGRIND $xmlsec_app encrypt $xmlsec_params $params2 --output $tmpfile $full_file.tmpl >> $curlogfile 2>> $curlogfile |
133 |
-+ echo "$VALGRIND $xmlsec_app encrypt $xmlsec_x509_params $xmlsec_params $params2 --output $tmpfile $full_file.tmpl" >> $curlogfile |
134 |
-+ $VALGRIND $xmlsec_app encrypt $xmlsec_x509_params $xmlsec_params $params2 --output $tmpfile $full_file.tmpl >> $curlogfile 2>> $curlogfile |
135 |
++ params3="$(echo $params3 | sed 's/--X509-skip-strict-checks//')" |
136 |
++ echo "$VALGRIND $xmlsec_app verify --X509-skip-strict-checks $xmlsec_params $params3 $tmpfile" >> $curlogfile |
137 |
++ $VALGRIND $xmlsec_app verify --X509-skip-strict-checks $xmlsec_params $params3 $tmpfile >> $curlogfile 2>> $curlogfile |
138 |
printRes $res_success $? |
139 |
if [ $? != 0 ]; then |
140 |
failures=`expr $failures + 1` |
141 |
-@@ -439,8 +446,8 @@ execEncTest() { |
142 |
- if [ -n "$params3" -a -z "$PERF_TEST" ] ; then |
143 |
- rm -f $tmpfile.2 |
144 |
- printf " Decrypt new document " |
145 |
-- echo "$VALGRIND $xmlsec_app decrypt $xmlsec_params $params3 --output $tmpfile.2 $tmpfile" >> $curlogfile |
146 |
-- $VALGRIND $xmlsec_app decrypt $xmlsec_params $params3 --output $tmpfile.2 $tmpfile >> $curlogfile 2>> $curlogfile |
147 |
-+ echo "$VALGRIND $xmlsec_app decrypt $xmlsec_x509_params $xmlsec_params $params3 --output $tmpfile.2 $tmpfile" >> $curlogfile |
148 |
-+ $VALGRIND $xmlsec_app decrypt $xmlsec_x509_params $xmlsec_params $params3 --output $tmpfile.2 $tmpfile >> $curlogfile 2>> $curlogfile |
149 |
- res=$? |
150 |
- if [ $res = 0 ]; then |
151 |
- if [ "z$outputTransform" != "z" ] ; then |
152 |
-- |
153 |
2.21.0 |