blob: 5d69f725e706c1af0ceced9dbccd2a5f97130db4 (
plain)
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
|
rem
rem This file is part of the LibreOffice project.
rem
rem This Source Code Form is subject to the terms of the Mozilla Public
rem License, v. 2.0. If a copy of the MPL was not distributed with this
rem file, You can obtain one at http://mozilla.org/MPL/2.0/.
rem
rem This file incorporates work covered by the following license notice:
rem
rem Licensed to the Apache Software Foundation (ASF) under one or more
rem contributor license agreements. See the NOTICE file distributed
rem with this work for additional information regarding copyright
rem ownership. The ASF licenses this file to you under the Apache
rem License, Version 2.0 (the "License"); you may not use this file
rem except in compliance with the License. You may obtain a copy of
rem the License at http://www.apache.org/licenses/LICENSE-2.0 .
rem
call env_win.bat
@echo off
echo =============================================
echo step - 1 create a temporary folder
echo =============================================
@echo on
%TEMP_DRIVE%
cd /
mkdir %TEMP_FOLDER%
@echo off
echo =============================================
echo step - 2 copy the xsecsim.rdb
echo =============================================
@echo on
cp %WS_PATH%/xmlsecurity/wntmsci8.pro/bin/xsecsim.rdb %TEMP_DRIVE%/%TEMP_FOLDER%/.
@echo off
echo =============================================
echo step - 3 copy services.rdb and types.rdb
echo =============================================
@echo on
cp %SO_DRIVE%/%SO_PATH%/program/services.rdb %TEMP_DRIVE%/%TEMP_FOLDER%/.
cp %SO_DRIVE%/%SO_PATH%/program/types.rdb %TEMP_DRIVE%/%TEMP_FOLDER%/.
@echo off
echo =============================================
echo step - 4 add types.rdb, xsecsim.rdb to services.rdb
echo =============================================
@echo on
cd %TEMP_FOLDER%
regmerge services.rdb / types.rdb
regmerge services.rdb / xsecsim.rdb
@echo off
echo =============================================
echo step - 5 register new component
echo =============================================
@echo on
mkdir windows.plt
cp %WS_PATH%/xmlsecurity/wntmsci8.pro/bin/xsec_sim.dll windows.plt/.
cp %WS_PATH%/xmlsecurity/wntmsci8.pro/bin/xsecsim.rdb windows.plt/.
cp %WS_PATH%/xmlsecurity/wntmsci8.pro/class/jflatfilter.jar windows.plt/.
zip xsec_sim.zip windows.plt\*.*
rm -R windows.plt
%SO_DRIVE%
cd %SO_DRIVE%/%SO_PATH%/program
pkgchk -s %TEMP_DRIVE%/%TEMP_FOLDER%/xsec_sim.zip
%TEMP_DRIVE%
@echo off
echo =============================================
echo step - 6 copy dynamic libraries
echo =============================================
@echo on
cp %SO_DRIVE%/%SO_PATH%/program/*.dll ./.
@echo off
echo =============================================
echo step - 7 copy testtool program
echo =============================================
@echo on
cp %WS_PATH%/xmlsecurity/wntmsci8.pro/bin/testtool.exe ./.
@echo off
echo =============================================
echo step - 8 start LibreOffice
echo =============================================
@echo on
@echo off
echo please start up LibreOffice with "--accept=socket,host=0,port=2002;urp;"
pause Press Enter when finished...
@echo on
@echo off
echo =============================================
echo step - 9 run the testtool program
echo =============================================
@echo on
mkdir examples
cd examples
cp %WS_PATH%/xmlsecurity/tools/examples/warmup.xml ./.
cp %WS_PATH%/xmlsecurity/tools/examples/sign-0.xml ./.
cp %WS_PATH%/xmlsecurity/tools/examples/sign-1.xml ./.
cp %WS_PATH%/xmlsecurity/tools/examples/sign-2.xml ./.
cp %WS_PATH%/xmlsecurity/tools/examples/sign-3.xml ./.
cp %WS_PATH%/xmlsecurity/tools/examples/sign-4.xml ./.
cp %WS_PATH%/xmlsecurity/tools/examples/sign-5.xml ./.
cd ..
cp %WS_PATH%/xmlsecurity/tools/examples/eval_import.txt ./.
cp %WS_PATH%/xmlsecurity/tools/examples/eval_export.txt ./.
testtool %WS_PATH%/xmlsecurity/tools/cryptoken/jks/testToken.jks %WS_PATH%/xmlsecurity/tools/cryptoken/nss %TEMP_DRIVE%/%TEMP_FOLDER%/eval_export.txt %TEMP_DRIVE%/%TEMP_FOLDER%/eval_import.txt
@echo off
echo =============================================
echo step - 10 stop LibreOffice
echo =============================================
@echo on
@echo off
echo please stop the LibreOffice application
pause Press Enter when finished...
@echo on
@echo off
echo =============================================
echo step - 11 remove new component
echo =============================================
@echo on
rm %SO_DRIVE%/%SO_PATH%/user/uno_packages/xsec_sim.zip
%SO_DRIVE%
cd %SO_DRIVE%/%SO_PATH%/program
pkgchk -s -d xsec_sim.zip
%TEMP_DRIVE%
@echo off
echo =============================================
echo step - 12 remove the temporary folder
echo =============================================
@echo on
cd ..
rm -R %TEMP_FOLDER%
|