Skip to content

Commit c7c86b8

Browse files
authored
Use libxml2/xmsec1 for TSL parsing and validation (#1278)
IB-7947 Signed-off-by: Raul Metsma <[email protected]>
1 parent 4246198 commit c7c86b8

File tree

8 files changed

+86
-95
lines changed

8 files changed

+86
-95
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ permissions:
55
env:
66
BUILD_NUMBER: ${{ github.run_number }}
77
CMAKE_BUILD_PARALLEL_LEVEL: 4
8+
UBUNTU_DEPS: ./libdigidocpp-pkg/*.deb cmake libldap2-dev gettext libpcsclite-dev libssl-dev libgl-dev libqt6svg6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libflatbuffers-dev zlib1g-dev
89
jobs:
910
macos:
1011
name: Build on macOS
@@ -61,16 +62,6 @@ jobs:
6162
DEBFULLNAME: github-actions
6263
6364
steps:
64-
- name: Install dependencies
65-
if: matrix.container == '20.04'
66-
run: apt update -qq && apt install --no-install-recommends -y git lsb-release build-essential devscripts debhelper pkg-config cmake libldap2-dev gettext libpcsclite-dev libssl-dev libqt5svg5-dev qttools5-dev-tools qttools5-dev lintian libflatbuffers-dev zlib1g-dev
67-
- name: Install dependencies
68-
if: matrix.container != '20.04'
69-
run: apt update -qq && apt install --no-install-recommends -y git lsb-release build-essential devscripts debhelper pkg-config cmake libldap2-dev gettext libpcsclite-dev libssl-dev libgl-dev libqt6svg6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools lintian libflatbuffers-dev zlib1g-dev
70-
- name: Checkout
71-
uses: actions/checkout@v4
72-
with:
73-
submodules: recursive
7465
- name: Download artifact
7566
uses: dawidd6/action-download-artifact@v6
7667
with:
@@ -79,12 +70,19 @@ jobs:
7970
name: ubuntu_${{ matrix.container }}
8071
path: libdigidocpp-pkg
8172
repo: open-eid/libdigidocpp
82-
- name: Install artifact
83-
run: |
84-
apt install --no-install-recommends -y ./libdigidocpp-pkg/*.deb
85-
rm -rf libdigidocpp-pkg
73+
- name: Install dependencies
74+
if: matrix.container == '20.04'
75+
run: apt update -qq && apt install --no-install-recommends -y git lsb-release build-essential devscripts debhelper pkg-config lintian ./libdigidocpp-pkg/*.deb cmake libldap2-dev gettext libpcsclite-dev libssl-dev libqt5svg5-dev qttools5-dev-tools qttools5-dev libflatbuffers-dev zlib1g-dev
76+
- name: Install dependencies
77+
if: matrix.container != '20.04'
78+
run: apt update -qq && apt install --no-install-recommends -y git lsb-release build-essential devscripts debhelper pkg-config lintian ${UBUNTU_DEPS}
79+
- name: Checkout
80+
uses: actions/checkout@v4
81+
with:
82+
submodules: recursive
8683
- name: Setup changelog
8784
run: |
85+
rm -rf libdigidocpp-pkg
8886
export VERSION=$(grep project CMakeLists.txt | egrep -o "([0-9]{1,}\.)+[0-9]{1,}")
8987
export VERSIONEX=${VERSION}.${BUILD_NUMBER}.$(lsb_release -rs)
9088
dch --distribution $(lsb_release -cs) -v ${VERSIONEX} "Release ${VERSIONEX}."
@@ -216,8 +214,6 @@ jobs:
216214
uses: actions/checkout@v4
217215
with:
218216
submodules: recursive
219-
- name: Install dependencies
220-
run: sudo apt update -qq && sudo apt install --no-install-recommends -y cmake libldap2-dev gettext libpcsclite-dev libminizip-dev libxml-security-c-dev libgl-dev libqt6svg6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libflatbuffers-dev zlib1g-dev
221217
- name: Download artifact
222218
uses: dawidd6/action-download-artifact@v6
223219
with:
@@ -226,8 +222,8 @@ jobs:
226222
name: ubuntu_22.04
227223
path: libdigidocpp-pkg
228224
repo: open-eid/libdigidocpp
229-
- name: Install artifact
230-
run: sudo dpkg -i libdigidocpp-pkg/*.deb
225+
- name: Install dependencies
226+
run: sudo apt update -qq && sudo apt install --no-install-recommends -y ${UBUNTU_DEPS}
231227
- name: Download Coverity Build Tool
232228
run: |
233229
curl -s -d "token=$TOKEN&project=$PROJECTNAME" -o cov-analysis-linux64.tar.gz https://scan.coverity.com/download/cxx/linux64
@@ -260,8 +256,6 @@ jobs:
260256
uses: actions/checkout@v4
261257
with:
262258
submodules: recursive
263-
- name: Install dependencies
264-
run: sudo apt update -qq && sudo apt install --no-install-recommends -y cmake libldap2-dev gettext libpcsclite-dev libminizip-dev libxml-security-c-dev libgl-dev libqt6svg6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libflatbuffers-dev zlib1g-dev
265259
- name: Download artifact
266260
uses: dawidd6/action-download-artifact@v6
267261
with:
@@ -270,8 +264,8 @@ jobs:
270264
name: ubuntu_22.04
271265
path: libdigidocpp-pkg
272266
repo: open-eid/libdigidocpp
273-
- name: Install artifact
274-
run: sudo dpkg -i libdigidocpp-pkg/*.deb
267+
- name: Install dependencies
268+
run: sudo apt update -qq && sudo apt install --no-install-recommends -y ${UBUNTU_DEPS}
275269
- name: Initialize CodeQL
276270
uses: github/codeql-action/init@v3
277271
with:

.github/workflows/tar.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.16)
22
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/cmake/modules/VersionInfo.cmake)
3-
message(FATAL_ERROR "cmake submodule directory empty, did you 'git clone --recursive'?")
3+
message(FATAL_ERROR "cmake submodule directory empty, did you 'git clone --recursive'?")
44
endif()
55
project(qdigidoc4 VERSION 4.6.0)
66

COPYING

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,3 +264,28 @@ client/fonts/Open_Sans
264264
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
265265
See the License for the specific language governing permissions and
266266
limitations under the License.
267+
268+
_______________________________________________________________________________
269+
schema
270+
271+
MIT License
272+
273+
Copyright (c) 2023 Open Electronic Identity
274+
275+
Permission is hereby granted, free of charge, to any person obtaining a copy
276+
of this software and associated documentation files (the "Software"), to deal
277+
in the Software without restriction, including without limitation the rights
278+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
279+
copies of the Software, and to permit persons to whom the Software is
280+
furnished to do so, subject to the following conditions:
281+
282+
The above copyright notice and this permission notice shall be included in all
283+
copies or substantial portions of the Software.
284+
285+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
286+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
287+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
288+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
289+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
290+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
291+
SOFTWARE.

client/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,9 @@ elseif(WIN32)
266266
COMMAND ${CMAKE_COMMAND} -E copy ${LIBS_PATH}/XalanMessages_1_12.dll appx
267267
COMMAND ${CMAKE_COMMAND} -E copy ${LIBS_PATH}/Xalan-C_1_12.dll appx
268268
COMMAND ${CMAKE_COMMAND} -E copy ${LIBS_PATH}/xsec_2_0.dll appx
269+
COMMAND ${CMAKE_COMMAND} -E copy ${LIBS_PATH}/libxml2.dll appx
270+
COMMAND ${CMAKE_COMMAND} -E copy ${LIBS_PATH}/libxmlsec1.dll appx
271+
COMMAND ${CMAKE_COMMAND} -E copy ${LIBS_PATH}/libxmlsec1-openssl.dll appx
269272
COMMAND ${CMAKE_COMMAND} -E copy ${LIBS_PATH}/digidocpp.dll appx
270273
COMMAND ${CMAKE_COMMAND} -E copy ${LIBS_PATH}/digidocpp.conf appx
271274
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/Assets appx/Assets

qdigidoc4.wxs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,14 @@
101101
<File Name="Xalan-C_1_12$(var.qt_suffix).dll" />
102102
<File Name="xsec_2_0$(var.qt_suffix).dll" />
103103
<File Name="libxml2.dll" />
104+
<File Name="libxmlsec1.dll" />
105+
<File Name="libxmlsec1-openssl.dll" />
104106
<File Name="digidocpp$(var.qt_suffix).dll" />
105107
<File Name="digidoc-tool.exe" />
106108
<File Name="digidocpp.conf" />
109+
<Directory Name="schema">
110+
<Files Include="$(var.libs_path)\schema\*.xsd" />
111+
</Directory>
107112
<?ifdef var.qt_path ?>
108113
<File Name="libcrypto-3$(var.OpenSSLSuffix).dll" />
109114
<File Name="libssl-3$(var.OpenSSLSuffix).dll" />
@@ -123,11 +128,6 @@
123128
<File Source="$(var.qt_path)\D3DCompiler_47.dll" />
124129
<File Source="$(var.qt_path)\opengl32sw.dll" />
125130
<File Source="$(var.qt_path)\Qt6SvgWidgets$(var.qt_suffix).dll" />
126-
<?endif?>
127-
<Directory Name="schema">
128-
<Files Include="$(var.libs_path)\schema\*.xsd" />
129-
</Directory>
130-
<?ifdef var.qt_path ?>
131131
<Directory Name="platforms">
132132
<File Source="$(var.qt_path)\..\plugins\platforms\qwindows$(var.qt_suffix).dll" />
133133
</Directory>

schema/header.fbs

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
/*
2-
* QDigiDocClient
2+
* MIT License
33
*
4-
* This library is free software; you can redistribute it and/or
5-
* modify it under the terms of the GNU Lesser General Public
6-
* License as published by the Free Software Foundation; either
7-
* version 2.1 of the License, or (at your option) any later version.
4+
* Copyright (c) 2023 Open Electronic Identity
85
*
9-
* This library is distributed in the hope that it will be useful,
10-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12-
* Lesser General Public License for more details.
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
1312
*
14-
* You should have received a copy of the GNU Lesser General Public
15-
* License along with this library; if not, write to the Free Software
16-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
1723
*
1824
*/
1925

schema/recipients.fbs

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
/*
2-
* QDigiDocClient
2+
* MIT License
33
*
4-
* This library is free software; you can redistribute it and/or
5-
* modify it under the terms of the GNU Lesser General Public
6-
* License as published by the Free Software Foundation; either
7-
* version 2.1 of the License, or (at your option) any later version.
4+
* Copyright (c) 2023 Open Electronic Identity
85
*
9-
* This library is distributed in the hope that it will be useful,
10-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12-
* Lesser General Public License for more details.
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
1312
*
14-
* You should have received a copy of the GNU Lesser General Public
15-
* License along with this library; if not, write to the Free Software
16-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
1723
*
1824
*/
1925

0 commit comments

Comments
 (0)