Skip to content

Commit 82eee1c

Browse files
committed
Update version number and xmlsec to 1.3.6
IB-7927, Fixes #637, IB-8260 Signed-off-by: Raul Metsma <[email protected]>
1 parent fb38ed4 commit 82eee1c

22 files changed

+112
-96
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ jobs:
1616
steps:
1717
- name: Checkout
1818
uses: actions/checkout@v4
19-
with:
20-
submodules: recursive
2119
- name: Install dependencies
2220
run: |
2321
brew update
@@ -79,7 +77,7 @@ jobs:
7977
container: fedora:${{ matrix.container }}
8078
strategy:
8179
matrix:
82-
container: [39, 40]
80+
container: [39, 40, 41]
8381
steps:
8482
- name: Install Deps
8583
run: |
@@ -93,8 +91,6 @@ jobs:
9391
sh cmake-3.28.1-linux-x86_64.sh --skip-license --prefix=/usr/local
9492
- name: Checkout
9593
uses: actions/checkout@v4
96-
with:
97-
submodules: recursive
9894
- name: Build
9995
run: |
10096
cmake -DCMAKE_INSTALL_SYSCONFDIR=/etc -B build -S .
@@ -111,7 +107,7 @@ jobs:
111107
container: ubuntu:${{ matrix.container }}
112108
strategy:
113109
matrix:
114-
container: ['20.04', '22.04', '24.04']
110+
container: ['20.04', '22.04', '24.04', '24.10']
115111
env:
116112
DEBIAN_FRONTEND: noninteractive
117113
DEBFULLNAME: github-actions
@@ -121,8 +117,6 @@ jobs:
121117
run: apt update -qq && apt install --no-install-recommends -y git lsb-release build-essential devscripts debhelper lintian pkg-config ${UBUNTU_DEPS} doxygen swig openjdk-11-jdk-headless libpython3-dev python3-setuptools libboost-test-dev
122118
- name: Checkout
123119
uses: actions/checkout@v4
124-
with:
125-
submodules: recursive
126120
- name: Setup changelog
127121
run: |
128122
export VERSION=$(grep project CMakeLists.txt | egrep -o "([0-9]{1,}\.)+[0-9]{1,}")
@@ -144,48 +138,38 @@ jobs:
144138
runs-on: ${{ matrix.image }}
145139
strategy:
146140
matrix:
147-
toolset: [143, 142]
141+
toolset: [143]
148142
platform: [x86, x64]
149143
include:
150144
- toolset: 143
151145
image: windows-2022
152146
vcvars: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvarsall.bat"
153-
- toolset: 142
154-
image: windows-2019
155-
vcvars: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvarsall.bat"
156147
env:
157148
VER_SUFFIX: .VS${{ matrix.toolset }}
158149
CXXFLAGS: '/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR' # https://github.com/actions/runner-images/issues/10004
159-
VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg_installed
160150
steps:
161151
- name: Checkout
162152
uses: actions/checkout@v4
163-
with:
164-
submodules: recursive
165153
- name: Prepare vcpkg
166154
uses: lukka/run-vcpkg@v11
167155
with:
168-
vcpkgGitCommitId: 511d74f695bd45959d12b50b00f1b68f69e8f0b0
156+
vcpkgGitCommitId: e2edf52610d2c94d2038fe30b247ea5a26964e1b
169157
vcpkgJsonGlob: ./vcpkg.json
170158
runVcpkgInstall: true
171159
runVcpkgFormatString: "[`install`, `--recurse`, `--clean-after-build`, `--x-install-root`, `$[env.VCPKG_INSTALLED_DIR]`, `--triplet`, `$[env.VCPKG_DEFAULT_TRIPLET]`, `--x-feature`, `tests`]"
172160
env:
173161
VCPKG_DEFAULT_TRIPLET: ${{ matrix.platform }}-windows
162+
VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg_installed_${{ matrix.platform }}
174163
- name: Install dependencies
175164
run: choco install doxygen.install -y > $null
176165
- uses: actions/setup-python@v5
177166
if: matrix.platform == 'x86'
178167
with:
179168
python-version: 3.12
180169
architecture: x86
181-
- name: Install WiX
182-
run: |
183-
dotnet tool install -g wix --version 5.0.1
184-
wix extension -g add WixToolset.UI.wixext/5.0.1
185170
- name: Build
186171
run: |
187172
& .\build.ps1 `
188-
-vcpkg_installed ${{ env.VCPKG_INSTALLED_DIR }} `
189173
-vcvars "${{ matrix.vcvars }}" `
190174
-platform ${{ matrix.platform }} `
191175
-swig C:/ProgramData/chocolatey/bin/swig.exe `
@@ -199,14 +183,12 @@ jobs:
199183
pages:
200184
name: Deploy pages
201185
if: github.repository == 'open-eid/libdigidocpp' && contains(github.ref, 'master')
202-
runs-on: ubuntu-22.04
186+
runs-on: ubuntu-24.04
203187
permissions:
204188
contents: write
205189
steps:
206190
- name: Checkout
207191
uses: actions/checkout@v4
208-
with:
209-
submodules: recursive
210192
- name: Install dependencies
211193
run: sudo apt update -qq && sudo apt install --no-install-recommends -y doxygen ${UBUNTU_DEPS}
212194
- name: Build docs
@@ -222,15 +204,13 @@ jobs:
222204
coverity:
223205
name: Run Coverity tests
224206
if: github.repository == 'open-eid/libdigidocpp' && contains(github.ref, 'coverity_scan')
225-
runs-on: ubuntu-22.04
207+
runs-on: ubuntu-24.04
226208
env:
227209
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
228210
PROJECTNAME: ${{ github.repository }}
229211
steps:
230212
- name: Checkout
231213
uses: actions/checkout@v4
232-
with:
233-
submodules: recursive
234214
- name: Install dependencies
235215
run: sudo apt update -qq && sudo apt install --no-install-recommends -y curl ca-certificates ${UBUNTU_DEPS}
236216
- name: Download Coverity Build Tool
@@ -257,14 +237,12 @@ jobs:
257237
codeql:
258238
name: Run CodeQL tests
259239
if: github.repository == 'open-eid/libdigidocpp'
260-
runs-on: ubuntu-22.04
240+
runs-on: ubuntu-24.04
261241
permissions:
262242
security-events: write
263243
steps:
264244
- name: Checkout
265245
uses: actions/checkout@v4
266-
with:
267-
submodules: recursive
268246
- name: Install dependencies
269247
run: sudo apt update -qq && sudo apt install --no-install-recommends -y ${UBUNTU_DEPS}
270248
- name: Initialize CodeQL

.gitmodules

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

CMakeLists.txt

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
cmake_minimum_required(VERSION 3.16)
2-
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/cmake/modules/VersionInfo.cmake)
3-
message(FATAL_ERROR "cmake submodule directory empty, did you 'git clone --recursive'?")
4-
endif()
5-
62
if(POLICY CMP0122)
73
cmake_policy(SET CMP0122 NEW)
84
endif()
95
if(POLICY CMP0167)
106
cmake_policy(SET CMP0167 NEW)
117
endif()
12-
project(libdigidocpp VERSION 4.0.0)
8+
project(libdigidocpp VERSION 4.1.0)
139
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
1410
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX})
1511

16-
include(VersionInfo)
12+
macro(SET_ENV NAME DEF)
13+
if(DEFINED ENV{${NAME}})
14+
set(${NAME} $ENV{${NAME}} ${ARGN})
15+
else()
16+
set(${NAME} ${DEF} ${ARGN})
17+
endif()
18+
endmacro()
19+
1720
include(GNUInstallDirs)
1821

1922
set_env( TSL_URL "https://ec.europa.eu/tools/lotl/eu-lotl.xml" CACHE STRING "TSL trust list primary URL" )
@@ -32,6 +35,11 @@ set( BUILD_TOOLS YES CACHE BOOL "Build digidoc-tool" )
3235
set( BUILD_SHARED_LIBS YES CACHE BOOL "Build library as SHARED or STATIC" )
3336
set( SIGNCERT "" CACHE STRING "Common name of certificate to used sign binaries, empty skip signing" )
3437
set( CROSSSIGNCERT "" CACHE STRING "Common name of certificate to used cross sign binaries, empty skip signing" )
38+
set(CMAKE_CXX_STANDARD 17)
39+
set(CMAKE_CXX_STANDARD_REQUIRED YES)
40+
set(CMAKE_C_VISIBILITY_PRESET hidden)
41+
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
42+
set(CMAKE_VISIBILITY_INLINES_HIDDEN YES)
3543
set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Adds a postfix for debug-built libraries.")
3644
set(CPACK_PACKAGE_VERSION ${VERSION})
3745
set(CPACK_GENERATOR RPM)
@@ -64,10 +72,7 @@ if(UNIX)
6472
endif()
6573
else()
6674
find_package(unofficial-xmlsec REQUIRED)
67-
target_link_libraries(xmlsec INTERFACE
68-
unofficial::xmlsec::xmlsec1
69-
unofficial::xmlsec::xmlsec1-openssl
70-
)
75+
target_link_libraries(xmlsec INTERFACE unofficial::xmlsec::xmlsec1-openssl)
7176
endif()
7277
find_package(SWIG)
7378
if(SWIG_FOUND)

ID.ico

58.8 KB
Binary file not shown.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Ubuntu
1919
sudo apt install cmake libxml2-dev libxmlsec1-dev zlib1g-dev
2020
# Fedora
21-
sudo dnf install cmake gcc-c++ openssl-devel libxml2-devel xmlsec1-openssl-devel zlib-devel
21+
sudo dnf install cmake gcc-c++ openssl-devel libxml2-devel xmlsec1-openssl-devel libtool-ltdl-devel zlib-devel
2222

2323
* doxygen - Optional, for API documentation
2424
* libboost-test-dev - Optional, for unittests

RELEASE-NOTES.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
Libdigidocpp library [3.18.0](https://github.com/open-eid/libdigidocpp/releases/tag/v3.18.0) release notes
1+
Libdigidocpp library [4.0.0](https://github.com/open-eid/libdigidocpp/releases/tag/v4.0.0) release notes
22
--------------------------------------
33
- Major rewrite of library internals due upstream dependecy xalan-c and xml-security-c package has been retired.
44
https://shibboleth.atlassian.net/wiki/spaces/DEV/pages/3726671873/Santuario
55
https://lists.apache.org/thread/tls9xgp45zbhzc9k8jhd3m49r6npbrql
66
- Update libraries and platform support
77
(#572, #565, #571, #570, #574, #578, #581, #582, #583, #579, #587, #589, #590, #563, #592, #597, #605, #608, #616)
88
- Improve signature and container compatibility
9-
(#573, #585, #586, #588, #591, #584, #596, #593, #595, #603, #604, #607, #613, #609)
9+
(#573, #585, #586, #588, #591, #584, #596, #593, #595, #603, #604, #607, #613, #609, #619)
1010
- Other fixes and optimizations
1111
(#564, #577, #580, #599, #606, #612, #614, #611, #610)
1212

13-
[Full Changelog](https://github.com/open-eid/libdigidocpp/compare/v3.17.0...v3.18.0)
13+
[Full Changelog](https://github.com/open-eid/libdigidocpp/compare/v3.17.0...v4.0.0)
1414

1515
Libdigidocpp library [3.17.1](https://github.com/open-eid/libdigidocpp/releases/tag/v3.17.1) release notes
1616
--------------------------------------

banner.bmp

83.9 KB
Binary file not shown.

build.ps1

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,35 @@
11
#powershell -ExecutionPolicy ByPass -File build.ps1
22
param(
33
[string]$libdigidocpp = $PSScriptRoot,
4+
[string]$platform = "x64",
45
[string]$git = "git.exe",
56
[string]$vcpkg = "vcpkg\vcpkg.exe",
67
[string]$vcpkg_dir = (split-path -parent $vcpkg),
78
[string]$vcpkg_installed = $libdigidocpp,
89
[string]$vcpkg_installed_platform = "$vcpkg_installed\vcpkg_installed_$platform",
910
[string]$build_number = $(if ($null -eq $env:BUILD_NUMBER) {"0"} else {$env:BUILD_NUMBER}),
10-
[string]$msiversion = "4.0.0.$build_number",
11-
[string]$platform = "x64",
11+
[string]$msiversion = "4.1.0.$build_number",
1212
[string]$msi_name = "libdigidocpp-$msiversion$env:VER_SUFFIX.$platform.msi",
1313
[string]$cmake = "cmake.exe",
1414
[string]$generator = "NMake Makefiles",
1515
[string]$vcvars = "vcvarsall",
16-
[string]$wix = "wix.exe",
1716
[string]$swig = $null,
1817
[string]$doxygen = $null,
1918
[switch]$boost = $false,
2019
[string]$sign = $null
2120
)
2221

2322
Try {
24-
& $wix > $null
23+
& wix > $null
2524
}
2625
Catch {
27-
& dotnet tool install --global --version 5.0.1 wix
28-
& $wix extension add -g WixToolset.UI.wixext/5.0.1
26+
& dotnet tool install -g --version 5.0.2 wix
27+
& wix extension add -g WixToolset.UI.wixext/5.0.2
2928
}
3029

3130
if(!(Test-Path -Path $vcpkg)) {
3231
& $git clone https://github.com/microsoft/vcpkg $vcpkg_dir
3332
& $vcpkg_dir\bootstrap-vcpkg.bat
34-
& $vcpkg install --clean-after-build --triplet x64-windows --x-feature=tests --x-install-root=$vcpkg_installed_platform
3533
}
3634

3735
$cmakeext = @()
@@ -69,12 +67,11 @@ if($sign) {
6967
$vcpkg_installed_platform/$platform-windows/debug/bin/*.dll
7068
}
7169

72-
& $vcvars $platform "&&" $wix build -nologo -arch $platform -out $msi_name $wixext `
70+
& $vcvars $platform "&&" wix build -nologo -arch $platform -out $msi_name $wixext `
7371
-ext WixToolset.UI.wixext `
74-
-bv "WixUIBannerBmp=$libdigidocpp/cmake/modules/banner.bmp" `
75-
-bv "WixUIDialogBmp=$libdigidocpp/cmake/modules/dlgbmp.bmp" `
76-
-d "ICON=$libdigidocpp/cmake/modules/ID.ico" `
77-
-d "MSI_VERSION=$msiversion" `
72+
-bv "WixUIBannerBmp=$libdigidocpp/banner.bmp" `
73+
-bv "WixUIDialogBmp=$libdigidocpp/dlgbmp.bmp" `
74+
-d "ICON=$libdigidocpp/ID.ico" `
7875
-d "vcpkg=$vcpkg_installed_platform/$platform-windows" `
7976
-d "libdigidocpp=$(Get-Location)/$platform" `
8077
$libdigidocpp\libdigidocpp.wxs

cmake

Lines changed: 0 additions & 1 deletion
This file was deleted.

cmake/modules/FindPKCS11.cmake

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# - Find pkcs11
2+
# Find the PKCS11 module
3+
#
4+
# PKCS11_MODULE - pkcs11 module path and name
5+
# PKCS11_FOUND - True if pkcs11 module found.
6+
7+
if(APPLE)
8+
find_library(PKCS11_MODULE NAMES opensc-pkcs11.so HINTS /Library/OpenSC/lib)
9+
elseif(WIN32)
10+
if(NOT PKCS11_MODULE)
11+
set(PKCS11_MODULE opensc-pkcs11.dll)
12+
endif()
13+
else()
14+
if(NOT PKCS11_MODULE)
15+
set(PKCS11_MODULE opensc-pkcs11.so)
16+
endif()
17+
endif()
18+
19+
include(FindPackageHandleStandardArgs)
20+
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PKCS11 DEFAULT_MSG PKCS11_MODULE)
21+
MARK_AS_ADVANCED(PKCS11)

0 commit comments

Comments
 (0)