-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2023-05-25-18_17_52.log
344 lines (341 loc) · 11.6 KB
/
2023-05-25-18_17_52.log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
+ source common/common_openssl.sh
++ source /root/mugen/libs/locallibs/common_lib.sh
+++ python3 --version
+++ '[' 0 -eq 0 ']'
+++ source /root/mugen/libs/locallibs/common_lib_python.sh
+ main
++ type -t post_test
+ '[' -n function ']'
+ trap post_test EXIT INT HUP TERM
+ rpm -qa
+ grep expect
++ type -t config_params
+ '[' -n function ']'
+ config_params
+ LOG_INFO 'Start to config params of the case.'
+ message='Start to config params of the case.'
+ python3 /root/mugen/libs/locallibs/mugen_log.py --level info --message 'Start to config params of the case.'
Thu May 25 18:17:56 2023 - INFO - Start to config params of the case.
+ deploy_env
+ CA_Path=/etc/pki/CA
+ '[' '!' -d /etc/pki/CA ']'
+ cp /etc/pki/tls/openssl.cnf /etc/pki/tls/openssl.cnf.bak
+ sed -i '0,/^dir/s/\.\/demoCA/\/etc\/pki\/CA/' /etc/pki/tls/openssl.cnf
+ LOG_INFO 'End to config params of the case.'
+ message='End to config params of the case.'
+ python3 /root/mugen/libs/locallibs/mugen_log.py --level info --message 'End to config params of the case.'
Thu May 25 18:17:58 2023 - INFO - End to config params of the case.
++ type -t pre_test
+ '[' -n function ']'
+ pre_test
+ LOG_INFO 'Start to prepare the test environment.'
+ message='Start to prepare the test environment.'
+ python3 /root/mugen/libs/locallibs/mugen_log.py --level info --message 'Start to prepare the test environment.'
Thu May 25 18:17:59 2023 - INFO - Start to prepare the test environment.
+ DNF_INSTALL 'httpd mod_ssl'
+ pkgs='httpd mod_ssl'
+ node=1
+ '[' -z '' ']'
+ tmpfile=
++ python3 /root/mugen/libs/locallibs/rpm_manage.py install --pkgs 'httpd mod_ssl' --node 1 --tempfile ''
+ tmpfile2=/tmp/tmpaebj970f
+ '[' -z '' ']'
+ tmpfile=/tmp/tmpaebj970f
+ createCA_and_Self_signed_certificate
+ touch /etc/pki/CA/index.txt
+ echo 01
+ openssl genrsa -out /etc/pki/CA/private/cakey.pem 2048
+ CHECK_RESULT 0
+ actual_result=0
+ expect_result=0
+ mode=0
+ error_log=
+ exit_mode=0
+ '[' -z 0 ']'
+ '[' 0 -eq 0 ']'
+ test 0x '!=' 0x
+ return 0
+ grep 'BEGIN RSA PRIVATE KEY' /etc/pki/CA/private/cakey.pem
+ CHECK_RESULT 1
+ actual_result=1
+ expect_result=0
+ mode=0
+ error_log=
+ exit_mode=0
+ '[' -z 1 ']'
+ '[' 0 -eq 0 ']'
+ test 1x '!=' 0x
+ test -n ''
+ (( exec_result++ ))
+ LOG_ERROR 'common/common_openssl.sh line 36'
+ message='common/common_openssl.sh line 36'
+ python3 /root/mugen/libs/locallibs/mugen_log.py --level error --message 'common/common_openssl.sh line 36'
Thu May 25 18:19:10 2023 - ERROR - common/common_openssl.sh line 36
+ '[' 0 -eq 1 ']'
+ return 0
+ expect
spawn openssl req -x509 -key /etc/pki/CA/private/cakey.pem -days 365 -out /etc/pki/CA/cacert.pem -new
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:CN
State or Province Name (full name) [Some-State]:shanxi
Locality Name (eg, city) []:xian
Organization Name (eg, company) [Internet Widgits Pty Ltd]:openEuler
Organizational Unit Name (eg, section) []:develop
Common Name (e.g. server FQDN or YOUR name) []:www.openeuler.org
Email Address []:[email protected]
+ grep 'certificate request' /etc/pki/CA/testlog1
into your certificate request.
+ CHECK_RESULT 0
+ actual_result=0
+ expect_result=0
+ mode=0
+ error_log=
+ exit_mode=0
+ '[' -z 0 ']'
+ '[' 0 -eq 0 ']'
+ test 0x '!=' 0x
+ return 0
+ grep 'BEGIN CERTIFICATE' /etc/pki/CA/cacert.pem
-----BEGIN CERTIFICATE-----
+ CHECK_RESULT 0
+ actual_result=0
+ expect_result=0
+ mode=0
+ error_log=
+ exit_mode=0
+ '[' -z 0 ']'
+ '[' 0 -eq 0 ']'
+ test 0x '!=' 0x
+ return 0
+ generate_PrivateKey_and_Certificate_Signing_Request
+ applying=httpd
+ build_path=/etc/httpd/ssl
+ mkdir /etc/httpd/ssl
+ openssl genrsa -out /etc/httpd/ssl/httpd.key 2048
+ CHECK_RESULT 0
+ actual_result=0
+ expect_result=0
+ mode=0
+ error_log=
+ exit_mode=0
+ '[' -z 0 ']'
+ '[' 0 -eq 0 ']'
+ test 0x '!=' 0x
+ return 0
+ grep 'BEGIN RSA PRIVATE KEY' /etc/httpd/ssl/httpd.key
+ CHECK_RESULT 1
+ actual_result=1
+ expect_result=0
+ mode=0
+ error_log=
+ exit_mode=0
+ '[' -z 1 ']'
+ '[' 0 -eq 0 ']'
+ test 1x '!=' 0x
+ test -n ''
+ (( exec_result++ ))
+ LOG_ERROR 'common/common_openssl.sh line 70'
+ message='common/common_openssl.sh line 70'
+ python3 /root/mugen/libs/locallibs/mugen_log.py --level error --message 'common/common_openssl.sh line 70'
Thu May 25 18:19:16 2023 - ERROR - common/common_openssl.sh line 70
+ '[' 0 -eq 1 ']'
+ return 0
+ expect
spawn openssl req -key /etc/httpd/ssl/httpd.key -out /etc/httpd/ssl/httpd.csr -new
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:CN
State or Province Name (full name) [Some-State]:shanxi
Locality Name (eg, city) []:xian
Organization Name (eg, company) [Internet Widgits Pty Ltd]:openEuler
Organizational Unit Name (eg, section) []:develop
Common Name (e.g. server FQDN or YOUR name) []:www.openeuler.org
Email Address []:[email protected]
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:openeuler12#$
An optional company name []:jiangfengjituan
+ grep 'certificate request' /etc/httpd/ssl/testlog2
into your certificate request.
to be sent with your certificate request
+ CHECK_RESULT 0
+ actual_result=0
+ expect_result=0
+ mode=0
+ error_log=
+ exit_mode=0
+ '[' -z 0 ']'
+ '[' 0 -eq 0 ']'
+ test 0x '!=' 0x
+ return 0
+ grep 'BEGIN CERTIFICATE REQUEST' /etc/httpd/ssl/httpd.csr
-----BEGIN CERTIFICATE REQUEST-----
+ CHECK_RESULT 0
+ actual_result=0
+ expect_result=0
+ mode=0
+ error_log=
+ exit_mode=0
+ '[' -z 0 ']'
+ '[' 0 -eq 0 ']'
+ test 0x '!=' 0x
+ return 0
+ CA_Signature_Authentication
+ applying=httpd
+ build_path=/etc/httpd/ssl
+ expect
spawn openssl ca -in /etc/httpd/ssl/httpd.csr -out /etc/httpd/ssl/httpd.crt -days 365
Using configuration from /etc/pki/tls/openssl.cnf
Check that the request matches the signature
Signature ok
Certificate Details:
Serial Number: 1 (0x1)
Validity
Not Before: May 25 10:19:18 2023 GMT
Not After : May 24 10:19:18 2024 GMT
Subject:
countryName = CN
stateOrProvinceName = shanxi
organizationName = openEuler
organizationalUnitName = develop
commonName = www.openeuler.org
emailAddress = [email protected]
X509v3 extensions:
X509v3 Basic Constraints:
CA:FALSE
X509v3 Subject Key Identifier:
1C:F2:54:41:BD:74:E7:3A:C1:F0:F1:E5:B6:67:F5:58:DD:7E:E3:EB
X509v3 Authority Key Identifier:
06:A9:81:D0:67:8F:8C:6F:5A:FB:05:D7:79:3B:DE:C3:7C:B0:A4:73
Certificate is to be certified until May 24 10:19:18 2024 GMT (365 days)
Sign the certificate? [y/n]:y
1 out of 1 certificate requests certified, commit? [y/n]y
Write out database with 1 new entries
Data Base Updated
+ grep 'Certificate Details' /etc/httpd/ssl/testlog3
Certificate Details:
+ CHECK_RESULT 0
+ actual_result=0
+ expect_result=0
+ mode=0
+ error_log=
+ exit_mode=0
+ '[' -z 0 ']'
+ '[' 0 -eq 0 ']'
+ test 0x '!=' 0x
+ return 0
+ grep 'BEGIN CERTIFICATE' /etc/httpd/ssl/httpd.crt
-----BEGIN CERTIFICATE-----
+ CHECK_RESULT 0
+ actual_result=0
+ expect_result=0
+ mode=0
+ error_log=
+ exit_mode=0
+ '[' -z 0 ']'
+ '[' 0 -eq 0 ']'
+ test 0x '!=' 0x
+ return 0
+ Modify_application_configuration
+ file=/etc/httpd/conf.d/ssl.conf
+ sed -i '/DocumentRoot/s/^#//' /etc/httpd/conf.d/ssl.conf
+ sed -i 's/\#ServerName www.example.com:443/ServerName www.linuxpanda.com:443/' /etc/httpd/conf.d/ssl.conf
+ sed -i 's#SSLCertificateFile /etc/pki/tls/certs/localhost.crt#SSLCertificateFile /etc/httpd/ssl/httpd.crt#' /etc/httpd/conf.d/ssl.conf
+ sed -i 's#SSLCertificateKeyFile /etc/pki/tls/private/localhost.key#SSLCertificateKeyFile /etc/httpd/ssl/httpd.key#' /etc/httpd/conf.d/ssl.conf
+ file2=/etc/httpd/conf/httpd.conf
+ sed -i 's/\#ServerName www.example.com:80/ServerName www.openeuler.org:80/' /etc/httpd/conf/httpd.conf
+ sed -i 's/Require all denied/Require all granted/' /etc/httpd/conf/httpd.conf
+ cp /etc/hosts /etc/hosts.bak
+ echo '127.0.0.1 www.openeuler.org'
+ cp /usr/share/httpd/noindex/index.html /var/www/html/
+ chmod 755 /var/www/html/index.html
+ setenforce 0
setenforce: SELinux is disabled
+ LOG_INFO 'End to prepare the test environment.'
+ message='End to prepare the test environment.'
+ python3 /root/mugen/libs/locallibs/mugen_log.py --level info --message 'End to prepare the test environment.'
Thu May 25 18:19:20 2023 - INFO - End to prepare the test environment.
++ type -t run_test
+ '[' -n function ']'
+ run_test
+ LOG_INFO 'Start to run test.'
+ message='Start to run test.'
+ python3 /root/mugen/libs/locallibs/mugen_log.py --level info --message 'Start to run test.'
Thu May 25 18:19:22 2023 - INFO - Start to run test.
+ systemctl restart httpd
+ systemctl status httpd
+ grep active
Active: active (running) since Thu 2023-05-25 18:19:24 CST; 422ms ago
+ CHECK_RESULT 0
+ actual_result=0
+ expect_result=0
+ mode=0
+ error_log=
+ exit_mode=0
+ '[' -z 0 ']'
+ '[' 0 -eq 0 ']'
+ test 0x '!=' 0x
+ return 0
+ grep 200
+ curl --cacert /etc/pki/CA/cacert.pem https://www.openeuler.org/index.html -I
HTTP/1.1 200 OK
+ CHECK_RESULT 0
+ actual_result=0
+ expect_result=0
+ mode=0
+ error_log=
+ exit_mode=0
+ '[' -z 0 ']'
+ '[' 0 -eq 0 ']'
+ test 0x '!=' 0x
+ return 0
+ LOG_INFO 'End to run test.'
+ message='End to run test.'
+ python3 /root/mugen/libs/locallibs/mugen_log.py --level info --message 'End to run test.'
Thu May 25 18:19:26 2023 - INFO - End to run test.
+ CASE_RESULT 0
+ case_re=0
+ test -z 2
+ test 2 -gt 0
+ LOG_ERROR 'failed to execute the case.'
+ message='failed to execute the case.'
+ python3 /root/mugen/libs/locallibs/mugen_log.py --level error --message 'failed to execute the case.'
Thu May 25 18:19:27 2023 - ERROR - failed to execute the case.
+ exit 2
+ post_test
+ LOG_INFO 'Start to restore the test environment.'
+ message='Start to restore the test environment.'
+ python3 /root/mugen/libs/locallibs/mugen_log.py --level info --message 'Start to restore the test environment.'
Thu May 25 18:19:28 2023 - INFO - Start to restore the test environment.
+ mv -f /etc/pki/tls/openssl.cnf.bak /etc/pki/tls/openssl.cnf
+ clean_httpd_openssl
+ rm -f /etc/pki/CA/index.txt /etc/pki/CA/index.txt.attr /etc/pki/CA/index.txt.old /etc/pki/CA/serial /etc/pki/CA/serial.old /etc/pki/CA/private/cakey.pem /etc/pki/CA/cacert.pem /etc/pki/CA/testlog1
+ rm -rf /etc/httpd/ssl
+ mv -f /etc/pki/tls/openssl.cnf.bak /etc/pki/tls/openssl.cnf
mv: cannot stat '/etc/pki/tls/openssl.cnf.bak': No such file or directory
+ mv -f /etc/hosts.bak /etc/hosts
+ systemctl stop httpd
+ DNF_REMOVE
+ node=1
+ pkg_list=
+ mode=0
+ [[ -z /tmp/tmpaebj970f ]]
+ '[' 0 -ne 0 ']'
+ '[' 1 == 0 ']'
+ python3 /root/mugen/libs/locallibs/rpm_manage.py remove --node 1 --pkgs '' --tempfile /tmp/tmpaebj970f
+ '[' 0 -ne 0 ']'
+ LOG_INFO 'End to restore the test environment.'
+ message='End to restore the test environment.'
+ python3 /root/mugen/libs/locallibs/mugen_log.py --level info --message 'End to restore the test environment.'
Thu May 25 18:19:59 2023 - INFO - End to restore the test environment.