Skip to content

Commit

Permalink
Use libxml2/xmsec1 for TSL parsing and validation
Browse files Browse the repository at this point in the history
IB-7947

Signed-off-by: Raul Metsma <[email protected]>
  • Loading branch information
metsma committed Jul 11, 2024
1 parent 0fe8843 commit efbfcb9
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 28 deletions.
38 changes: 16 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ permissions:
env:
BUILD_NUMBER: ${{ github.run_number }}
CMAKE_BUILD_PARALLEL_LEVEL: 4
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
jobs:
macos:
name: Build on macOS
Expand Down Expand Up @@ -61,16 +62,6 @@ jobs:
DEBFULLNAME: github-actions
DEBEMAIL: [email protected]
steps:
- name: Install dependencies
if: matrix.container == '20.04'
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
- name: Install dependencies
if: matrix.container != '20.04'
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
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Download artifact
uses: dawidd6/action-download-artifact@v6
with:
Expand All @@ -79,12 +70,19 @@ jobs:
name: ubuntu_${{ matrix.container }}
path: libdigidocpp-pkg
repo: open-eid/libdigidocpp
- name: Install artifact
run: |
apt install --no-install-recommends -y ./libdigidocpp-pkg/*.deb
rm -rf libdigidocpp-pkg
- name: Install dependencies
if: matrix.container == '20.04'
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
- name: Install dependencies
if: matrix.container != '20.04'
run: apt update -qq && apt install --no-install-recommends -y git lsb-release build-essential devscripts debhelper pkg-config lintian ${UBUNTU_DEPS}
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup changelog
run: |
rm -rf libdigidocpp-pkg
export VERSION=$(grep project CMakeLists.txt | egrep -o "([0-9]{1,}\.)+[0-9]{1,}")
export VERSIONEX=${VERSION}.${BUILD_NUMBER}.$(lsb_release -rs)
dch --distribution $(lsb_release -cs) -v ${VERSIONEX} "Release ${VERSIONEX}."
Expand Down Expand Up @@ -216,8 +214,6 @@ jobs:
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
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
- name: Download artifact
uses: dawidd6/action-download-artifact@v6
with:
Expand All @@ -226,8 +222,8 @@ jobs:
name: ubuntu_22.04
path: libdigidocpp-pkg
repo: open-eid/libdigidocpp
- name: Install artifact
run: sudo dpkg -i libdigidocpp-pkg/*.deb
- name: Install dependencies
run: sudo apt update -qq && sudo apt install --no-install-recommends -y ${UBUNTU_DEPS}
- name: Download Coverity Build Tool
run: |
curl -s -d "token=$TOKEN&project=$PROJECTNAME" -o cov-analysis-linux64.tar.gz https://scan.coverity.com/download/cxx/linux64
Expand Down Expand Up @@ -260,8 +256,6 @@ jobs:
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
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
- name: Download artifact
uses: dawidd6/action-download-artifact@v6
with:
Expand All @@ -270,8 +264,8 @@ jobs:
name: ubuntu_22.04
path: libdigidocpp-pkg
repo: open-eid/libdigidocpp
- name: Install artifact
run: sudo dpkg -i libdigidocpp-pkg/*.deb
- name: Install dependencies
run: sudo apt update -qq && sudo apt install --no-install-recommends -y ${UBUNTU_DEPS}
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.16)
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/cmake/modules/VersionInfo.cmake)
message(FATAL_ERROR "cmake submodule directory empty, did you 'git clone --recursive'?")
message(FATAL_ERROR "cmake submodule directory empty, did you 'git clone --recursive'?")
endif()
project(qdigidoc4 VERSION 4.6.0)

Expand Down
3 changes: 3 additions & 0 deletions client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ elseif(WIN32)
COMMAND ${CMAKE_COMMAND} -E copy ${LIBS_PATH}/XalanMessages_1_12.dll appx
COMMAND ${CMAKE_COMMAND} -E copy ${LIBS_PATH}/Xalan-C_1_12.dll appx
COMMAND ${CMAKE_COMMAND} -E copy ${LIBS_PATH}/xsec_2_0.dll appx
COMMAND ${CMAKE_COMMAND} -E copy ${LIBS_PATH}/libxml2.dll appx
COMMAND ${CMAKE_COMMAND} -E copy ${LIBS_PATH}/libxmlsec1.dll appx
COMMAND ${CMAKE_COMMAND} -E copy ${LIBS_PATH}/libxmlsec1-openssl.dll appx
COMMAND ${CMAKE_COMMAND} -E copy ${LIBS_PATH}/digidocpp.dll appx
COMMAND ${CMAKE_COMMAND} -E copy ${LIBS_PATH}/digidocpp.conf appx
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/Assets appx/Assets
Expand Down
10 changes: 5 additions & 5 deletions qdigidoc4.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,14 @@
<File Name="Xalan-C_1_12$(var.qt_suffix).dll" />
<File Name="xsec_2_0$(var.qt_suffix).dll" />
<File Name="libxml2.dll" />
<File Name="libxmlsec1.dll" />
<File Name="libxmlsec1-openssl.dll" />
<File Name="digidocpp$(var.qt_suffix).dll" />
<File Name="digidoc-tool.exe" />
<File Name="digidocpp.conf" />
<Directory Name="schema">
<Files Include="$(var.libs_path)\schema\*.xsd" />
</Directory>
<?ifdef var.qt_path ?>
<File Name="libcrypto-3$(var.OpenSSLSuffix).dll" />
<File Name="libssl-3$(var.OpenSSLSuffix).dll" />
Expand All @@ -123,11 +128,6 @@
<File Source="$(var.qt_path)\D3DCompiler_47.dll" />
<File Source="$(var.qt_path)\opengl32sw.dll" />
<File Source="$(var.qt_path)\Qt6SvgWidgets$(var.qt_suffix).dll" />
<?endif?>
<Directory Name="schema">
<Files Include="$(var.libs_path)\schema\*.xsd" />
</Directory>
<?ifdef var.qt_path ?>
<Directory Name="platforms">
<File Source="$(var.qt_path)\..\plugins\platforms\qwindows$(var.qt_suffix).dll" />
</Directory>
Expand Down

0 comments on commit efbfcb9

Please sign in to comment.