Skip to content

Commit 9b8f998

Browse files
committed
Update version number and packages
IB-8447, IB-8528, IB-8527, IB-8433, IB-8306, IB-8529 Signed-off-by: Raul Metsma <raul@metsma.ee>
1 parent 2c6bdad commit 9b8f998

10 files changed

Lines changed: 3088 additions & 2324 deletions

File tree

.github/workflows/build.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ jobs:
8585
- name: Prepare vcpkg
8686
uses: lukka/run-vcpkg@v11
8787
with:
88-
vcpkgGitCommitId: 5ee5eee0d3e9c6098b24d263e9099edcdcef6631
88+
vcpkgGitCommitId: 031ad89ce6c575df35a8e58707ad2c898446c63e
8989
vcpkgJsonGlob: ./vcpkg.json
9090
runVcpkgInstall: true
9191
env:
9292
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}
9393
- name: Build
9494
run: |
95-
cmake --preset ${{ matrix.target }} "-GUnix Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=libdigidocpp.${{ matrix.target }}
95+
cmake --preset ${{ matrix.target }} "-GUnix Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo
9696
cmake --build --preset ${{ matrix.target }}
9797
cmake --build --preset ${{ matrix.target }} --target install/strip
9898
zip -q -r libdigidocpp.${{ matrix.target }}.zip libdigidocpp.${{ matrix.target }}
@@ -161,15 +161,12 @@ jobs:
161161
path: libdigidocpp*.*
162162
windows:
163163
name: Build on Windows
164-
runs-on: ${{ matrix.image }}
164+
runs-on: windows-2025
165165
strategy:
166166
matrix:
167167
toolset: [143]
168168
platform: [x86, x64, arm64]
169169
include:
170-
- toolset: 143
171-
image: windows-2022
172-
vcvars: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvarsall.bat"
173170
- platform: x86
174171
setenv: amd64_x86
175172
- platform: x64
@@ -185,18 +182,15 @@ jobs:
185182
- name: Prepare vcpkg
186183
uses: lukka/run-vcpkg@v11
187184
with:
188-
vcpkgGitCommitId: 5ee5eee0d3e9c6098b24d263e9099edcdcef6631
185+
vcpkgGitCommitId: 031ad89ce6c575df35a8e58707ad2c898446c63e
189186
vcpkgJsonGlob: ./vcpkg.json
190187
runVcpkgInstall: true
191188
runVcpkgFormatString: "[`install`, `--recurse`, `--clean-after-build`, `--x-install-root`, `$[env.VCPKG_INSTALLED_DIR]`, `--triplet`, `$[env.VCPKG_DEFAULT_TRIPLET]`, `--x-feature`, `tests`]"
192189
env:
193190
VCPKG_DEFAULT_TRIPLET: ${{ matrix.platform }}-windows
194191
VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg_installed_${{ matrix.platform }}
195192
- name: Install dependencies
196-
run: |
197-
choco install doxygen.install -y > $null
198-
Invoke-WebRequest -UserAgent "Wget" "https://sourceforge.net/projects/swig/files/swigwin/swigwin-4.2.1/swigwin-4.2.1.zip/download" -OutFile swig.zip
199-
tar xf swig.zip
193+
run: winget install --silent --accept-source-agreements --accept-package-agreements swig doxygen
200194
- uses: actions/setup-java@v4
201195
with:
202196
distribution: 'temurin'
@@ -208,8 +202,9 @@ jobs:
208202
architecture: ${{ matrix.platform }}
209203
- name: Build
210204
run: |
211-
& "${{ matrix.vcvars }}" ${{ matrix.setenv }} "&&" pwsh build.ps1 `
212-
-swig ${{ github.workspace }}/swigwin-4.2.1/swig.exe `
205+
$swig = (Get-Item "$env:LOCALAPPDATA\Microsoft\WinGet\Links\swig.exe").Target
206+
& "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvarsall.bat" ${{ matrix.setenv }} "&&" pwsh build.ps1 `
207+
-swig $swig `
213208
-doxygen "C:/Program files/doxygen/bin/doxygen.exe" `
214209
-boost
215210
- name: Archive artifacts

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ endif()
55
if(POLICY CMP0177)
66
cmake_policy(SET CMP0177 NEW)
77
endif()
8-
project(libdigidocpp VERSION 4.2.0)
8+
project(libdigidocpp VERSION 4.2.1)
99
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
1010
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX})
1111

CMakePresets.json

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,32 @@
1111
"CMAKE_BUILD_TYPE": "Debug"
1212
}
1313
},
14-
{
15-
"name": "base",
16-
"displayName": "Base build config",
17-
"hidden": true,
18-
"inherits": "default",
19-
"environment": {
20-
"DEST": "/Library/libdigidocpp$env{DEST_SUFFIX}"
21-
},
22-
"installDir": "$env{DEST}"
23-
},
2414
{
2515
"name": "macos",
2616
"description": "This macos build is only available on macOS",
27-
"inherits": "base",
17+
"inherits": "default",
2818
"condition": {
2919
"type": "equals",
3020
"lhs": "${hostSystemName}",
3121
"rhs": "Darwin"
3222
},
23+
"installDir": "$env{DEST}",
24+
"environment": {
25+
"DEST": "/Library/libdigidocpp$env{DEST_SUFFIX}"
26+
},
3327
"cacheVariables": {
3428
"CMAKE_OSX_ARCHITECTURES": "arm64;x86_64",
35-
"CMAKE_OSX_DEPLOYMENT_TARGET": "12.0",
29+
"CMAKE_OSX_DEPLOYMENT_TARGET": "13.0",
3630
"CMAKE_FIND_ROOT_PATH": "$env{DEST}"
3731
}
3832
},
3933
{
4034
"name": "mobile",
4135
"hidden": true,
42-
"inherits": "base",
36+
"inherits": "default",
37+
"installDir": "$env{DEST}",
4338
"environment": {
39+
"DEST": "libdigidocpp$env{DEST_SUFFIX}",
4440
"DEST_SUFFIX": ".${presetName}"
4541
},
4642
"cacheVariables": {
@@ -52,7 +48,7 @@
5248
{
5349
"name": "ios",
5450
"hidden": true,
55-
"inherits": ["mobile", "macos"],
51+
"inherits": ["macos", "mobile"],
5652
"cacheVariables": {
5753
"CMAKE_SYSTEM_NAME": "iOS",
5854
"CMAKE_OSX_SYSROOT": "${presetName}",

build.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ param(
33
[string]$libdigidocpp = $PSScriptRoot,
44
[string]$platform = $env:PLATFORM,
55
[string]$build_number = $(if ($null -eq $env:BUILD_NUMBER) {"0"} else {$env:BUILD_NUMBER}),
6-
[string]$msiversion = "4.2.0.$build_number",
6+
[string]$msiversion = "4.2.1.$build_number",
77
[string]$msi_name = "libdigidocpp-$msiversion$env:VER_SUFFIX.$platform.msi",
88
[string]$git = "git.exe",
99
[string]$vcpkg = "vcpkg\vcpkg.exe",
@@ -23,8 +23,8 @@ Try {
2323
& wix > $null
2424
}
2525
Catch {
26-
& dotnet tool install -g --version 5.0.2 wix
27-
& wix extension add -g WixToolset.UI.wixext/5.0.2
26+
& dotnet tool install -g --version 6.0.1 wix
27+
& wix extension add -g WixToolset.UI.wixext/6.0.1
2828
}
2929

3030
if(!(Test-Path -Path $vcpkg)) {

prepare_osx_build_environment.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ case "$@" in
4242
TARGET_PATH=/Library/libdigidocpp
4343
SYSROOT=$(xcrun -sdk macosx --show-sdk-path)
4444
: ${ARCHS:="arm64 x86_64"}
45-
: ${MACOSX_DEPLOYMENT_TARGET:="12.0"}
45+
: ${MACOSX_DEPLOYMENT_TARGET:="13.0"}
4646
export MACOSX_DEPLOYMENT_TARGET
4747
export CFLAGS="-arch ${ARCHS// / -arch } "
4848
;;
@@ -51,7 +51,8 @@ esac
5151
function xmlsec {
5252
echo Building ${XMLSEC_DIR}
5353
if [ ! -f ${XMLSEC_DIR}.tar.gz ]; then
54-
curl -O -L https://www.aleksey.com/xmlsec/download/${XMLSEC_DIR}.tar.gz
54+
XMLSEC_VERSION="${XMLSEC_DIR##*-}"
55+
curl -O -L https://github.com/lsh123/xmlsec/releases/download/${XMLSEC_VERSION}/${XMLSEC_DIR}.tar.gz
5556
fi
5657
rm -rf ${XMLSEC_DIR}
5758
tar xf ${XMLSEC_DIR}.tar.gz
@@ -126,7 +127,7 @@ case "$@" in
126127
echo " tasks: openssl, xmlsec, all, help"
127128
echo "To control builds set environment variables:"
128129
echo " minimum deployment target"
129-
echo " - MACOSX_DEPLOYMENT_TARGET=12.0"
130+
echo " - MACOSX_DEPLOYMENT_TARGET=13.0"
130131
echo " - IPHONEOS_DEPLOYMENT_TARGET=15.0"
131132
echo " archs to build on macOS/iOS"
132133
echo " - ARCHS=\"arm64 x86_64\" (macOS)"

src/CMakeLists.txt

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ if( FRAMEWORK )
352352
-change '${LIBPATH}/libssl.3.dylib' '@executable_path/../Libraries/libssl.3.dylib'
353353
-change '${LIBPATH}/libxmlsec1.1.dylib' '@executable_path/../Libraries/libxmlsec1.1.dylib'
354354
-change '${LIBPATH}/libxmlsec1-openssl.1.dylib' '@executable_path/../Libraries/libxmlsec1-openssl.1.dylib'
355+
-rpath '${CMAKE_CURRENT_BINARY_DIR}' '@executable_path/../../../..'
355356
$<TARGET_FILE_DIR:digidocpp>/Resources/digidoc-tool
356357
COMMAND touch $<TARGET_FILE:digidoc-tool>
357358
)
@@ -360,13 +361,15 @@ if( FRAMEWORK )
360361
add_custom_command(TARGET digidocpp POST_BUILD
361362
COMMAND /usr/libexec/PlistBuddy -c "Add :MinimumOSVersion string ${CMAKE_OSX_DEPLOYMENT_TARGET}" $<TARGET_FILE_DIR:digidocpp>/Info.plist)
362363
endif()
363-
add_custom_target(codesign DEPENDS digidocpp $<TARGET_NAME_IF_EXISTS:digidoc-tool>
364-
COMMAND codesign -f -s "Developer ID Application: ${SIGNCERT}"
365-
$<TARGET_FILE_DIR:digidocpp>/Libraries/*
366-
$<$<TARGET_EXISTS:digidoc-tool>:$<TARGET_FILE_DIR:digidocpp>/Resources/digidoc-tool>
367-
$<TARGET_BUNDLE_DIR:digidocpp>
368-
COMMAND touch $<TARGET_FILE:digidocpp> $<$<TARGET_EXISTS:digidoc-tool>:$<TARGET_FILE:digidoc-tool>>
369-
)
364+
if(SIGNCERT)
365+
add_custom_command(TARGET embedlibs POST_BUILD
366+
COMMAND codesign -f -s "Developer ID Application: ${SIGNCERT}"
367+
$<TARGET_FILE_DIR:digidocpp>/Libraries/*
368+
$<$<TARGET_EXISTS:digidoc-tool>:$<TARGET_FILE_DIR:digidocpp>/Resources/digidoc-tool>
369+
$<TARGET_BUNDLE_DIR:digidocpp>
370+
COMMAND touch $<TARGET_FILE:digidocpp> $<$<TARGET_EXISTS:digidoc-tool>:$<TARGET_FILE:digidoc-tool>>
371+
)
372+
endif()
370373
add_custom_target(pkgbuild DEPENDS digidocpp $<TARGET_NAME_IF_EXISTS:digidoc-tool>
371374
COMMAND DESTDIR=install ${CMAKE_COMMAND} --install .
372375
COMMAND pkgbuild --root install "$<$<BOOL:${SIGNCERT}>:--sign;${SIGNCERT}>"

src/digidoc-tool.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -928,18 +928,20 @@ static int tslcmd(int /*argc*/, char* /*argv*/[])
928928
{
929929
int returnCode = EXIT_SUCCESS;
930930
string cache = CONF(TSLCache);
931+
auto certs = CONF(TSLCerts);
932+
for(const X509Cert &cert: certs)
933+
cout << "Signer: " << cert << endl;
931934
TSL t(File::path(cache, File::fileName(CONF(TSLUrl))));
932935
cout << "TSL: " << t.url() << endl
933936
<< " Type: " << t.type() << endl
934937
<< " Territory: " << t.territory() << endl
935938
<< " Operator: " << t.operatorName() << endl
936939
<< " Sequence: " << t.sequenceNumber() << endl
937940
<< " Issued: " << t.issueDate() << endl
938-
<< " Next update: " << t.nextUpdate() << endl
939-
<< "Pointers:" << endl;
941+
<< " Next update: " << t.nextUpdate() << endl;
940942
try {
941943
cout << " Signature: ";
942-
t.validate(CONF(TSLCerts));
944+
t.validate(certs);
943945
cout << ToolConfig::GREEN << "VALID" << ToolConfig::RESET << endl;
944946
} catch(const Exception &e) {
945947
cout << ToolConfig::RED << "INVALID" << ToolConfig::RESET << endl;
@@ -952,6 +954,7 @@ static int tslcmd(int /*argc*/, char* /*argv*/[])
952954
for(const X509Cert &x: s.certs)
953955
cout << " Cert: " << x << endl;
954956
}
957+
cout << "Pointers: " << endl;
955958
for(const TSL::Pointer &p: t.pointers())
956959
{
957960
cout << " Pointer: " << p.territory << endl

0 commit comments

Comments
 (0)