diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ad3242a76..783161a4d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: runs-on: macos-latest strategy: matrix: - target: [osx, ios, iossimulator, androidarm, androidarm64, androidx86_64] + target: [macos, iphoneos, iphonesimulator, androidarm, androidarm64, androidx86_64] steps: - name: Checkout uses: actions/checkout@v4 @@ -21,7 +21,7 @@ jobs: - name: Install dependencies run: | brew update - brew install --formula swig doxygen boost + brew install --formula ninja swig doxygen boost brew unlink python@3.11 || true brew unlink python@3.12 || true brew unlink xz @@ -48,22 +48,27 @@ jobs: - name: Setup cache run: sudo ln -s $PWD/cache/* /Library/ - name: Build macOS - if: matrix.target == 'osx' - run: ./build-library.sh test pkcs11sign zipdebug embedlibs pkgbuild + if: matrix.target == 'macos' + run: | + cmake --preset ${{ matrix.target }} -DCMAKE_BUILD_TYPE=RelWithDebInfo + cmake --build --preset ${{ matrix.target }} + cmake --build --preset ${{ matrix.target }} --target test pkcs11sign zipdebug embedlibs pkgbuild - name: Build ${{ matrix.target }} - if: matrix.target != 'osx' + if: matrix.target != 'macos' run: | - ./build-library.sh ${{ matrix.target }} install/strip + cmake --preset ${{ matrix.target }} -DCMAKE_BUILD_TYPE=RelWithDebInfo + cmake --build --preset ${{ matrix.target }} + sudo cmake --build --preset ${{ matrix.target }} --target install/strip cd /Library zip -q -r ${OLDPWD}/libdigidocpp.${{ matrix.target }}.zip libdigidocpp.* - name: Archive artifacts - if: matrix.target == 'osx' + if: matrix.target == 'macos' uses: actions/upload-artifact@v4 with: name: macOS - path: macOS/libdigidocpp*.* + path: build/macos/libdigidocpp*.* - name: Archive artifacts - if: matrix.target != 'osx' + if: matrix.target != 'macos' uses: actions/upload-artifact@v4 with: name: ${{ matrix.target }} @@ -150,7 +155,7 @@ jobs: vcvars: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvarsall.bat" env: VER_SUFFIX: .VS${{ matrix.toolset }} - CXXFLAGS: '/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR' # https://github.com/actions/runner-images/issues/10004 + VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg_installed steps: - name: Checkout uses: actions/checkout@v4 @@ -159,27 +164,27 @@ jobs: - name: Prepare vcpkg uses: lukka/run-vcpkg@v11 with: - vcpkgGitCommitId: 4065f37d0a6628ef17cf6ee15385f9091f1075bc + vcpkgGitCommitId: 1de2026f28ead93ff1773e6e680387643e914ea1 vcpkgJsonGlob: ./vcpkg.json runVcpkgInstall: true runVcpkgFormatString: "[`install`, `--recurse`, `--clean-after-build`, `--x-install-root`, `$[env.VCPKG_INSTALLED_DIR]`, `--triplet`, `$[env.VCPKG_DEFAULT_TRIPLET]`, `--x-feature`, `tests`]" env: VCPKG_DEFAULT_TRIPLET: ${{ matrix.platform }}-windows - VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg_installed - name: Install dependencies run: choco install doxygen.install -y > $null - uses: actions/setup-python@v5 + if: matrix.platform == 'x86' with: - python-version: 3.11 - architecture: ${{ matrix.platform }} + python-version: 3.12 + architecture: x86 - name: Install WiX run: | - dotnet tool install -g wix --version 5.0.0 - wix extension -g add WixToolset.UI.wixext/5.0.0 + dotnet tool install -g wix --version 5.0.1 + wix extension -g add WixToolset.UI.wixext/5.0.1 - name: Build run: | & .\build.ps1 ` - -vcpkg_installed ${{ github.workspace }}/vcpkg_installed ` + -vcpkg_installed ${{ env.VCPKG_INSTALLED_DIR }} ` -vcvars "${{ matrix.vcvars }}" ` -platform ${{ matrix.platform }} ` -swig C:/ProgramData/chocolatey/bin/swig.exe ` @@ -269,9 +274,9 @@ jobs: - name: Build run: | cmake -B build -S . \ - -DSWIG_EXECUTABLE=NOTFOUND \ - -DBoost_INCLUDE_DIR=NOTFOUND \ - -DDOXYGEN_EXECUTABLE=NOTFOUND \ + -DCMAKE_DISABLE_FIND_PACKAGE_SWIG=YES \ + -DCMAKE_DISABLE_FIND_PACKAGE_Boost=YES \ + -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=YES \ -DBUILD_TOOLS=NO cmake --build build - name: Perform CodeQL Analysis @@ -285,7 +290,6 @@ jobs: patterns: | -src/json.hpp -src/minizip/* - -build/src/xml/* -**:cpp/poorly-documented-function -**:cpp/loop-variable-changed input: sarif-results/cpp.sarif diff --git a/CMakeLists.txt b/CMakeLists.txt index 52e7a7985..46ed99fb8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ endif() if(POLICY CMP0167) cmake_policy(SET CMP0167 NEW) endif() -project(libdigidocpp VERSION 3.18.0) +project(libdigidocpp VERSION 4.0.0) set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) list(APPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}) diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 000000000..9d5e4479e --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,153 @@ +{ + "version": 6, + "configurePresets": [ + { + "name": "default", + "displayName": "Default config", + "description": "Default build using Ninja generator", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build/${presetName}" + }, + { + "name": "base", + "displayName": "macOS base build config", + "hidden": true, + "inherits": "default", + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Darwin" + }, + "environment": { + "DEST": "/Library/libdigidocpp$env{DEST_SUFFIX}" + }, + "installDir": "$env{DEST}", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_FIND_ROOT_PATH": "$env{DEST};/usr/local;/opt/homebrew" + } + }, + { + "name": "macos", + "inherits": "base", + "description": "This macos build is only available on macOS", + "cacheVariables": { + "CMAKE_OSX_ARCHITECTURES": "arm64;x86_64", + "CMAKE_OSX_DEPLOYMENT_TARGET": "12.0" + } + }, + { + "name": "mobile", + "hidden": true, + "inherits": "base", + "environment": { + "DEST_SUFFIX": ".${presetName}" + }, + "cacheVariables": { + "CMAKE_DISABLE_FIND_PACKAGE_Boost": "YES", + "CMAKE_DISABLE_FIND_PACKAGE_Doxygen": "YES", + "BUILD_TOOLS": "NO" + } + }, + { + "name": "ios", + "hidden": true, + "inherits": "mobile", + "cacheVariables": { + "CMAKE_SYSTEM_NAME": "iOS", + "CMAKE_OSX_SYSROOT": "${presetName}", + "CMAKE_OSX_DEPLOYMENT_TARGET": "15.0", + "CMAKE_OSX_ARCHITECTURES": "arm64;x86_64", + "CMAKE_DISABLE_FIND_PACKAGE_SWIG": "YES", + "FRAMEWORK_DESTINATION": "$env{DEST}/lib" + } + }, + { + "name": "iphoneos", + "inherits": "ios", + "description": "This iphoneos build is only available on macOS", + "cacheVariables": { + "CMAKE_OSX_ARCHITECTURES": "arm64" + } + }, + { + "name": "iphonesimulator", + "inherits": "ios", + "description": "This iphonesimulator build is only available on macOS" + }, + { + "name": "iphonecatalyst", + "inherits": "ios", + "description": "This iphonecatalyst build is only available on macOS", + "cacheVariables": { + "CMAKE_OSX_SYSROOT": "macosx" + } + }, + { + "name": "android", + "hidden": true, + "inherits": "mobile", + "cacheVariables": { + "CMAKE_SYSTEM_NAME": "Android", + "CMAKE_SYSTEM_VERSION": "30", + "CMAKE_DISABLE_FIND_PACKAGE_Python3": "YES", + "BUILD_SHARED_LIBS": "NO" + } + }, + { + "name": "androidarm", + "inherits": "android", + "description": "androidarm build is only available on macOS", + "cacheVariables": { + "CMAKE_ANDROID_ARCH_ABI": "armeabi-v7a" + } + }, + { + "name": "androidarm64", + "inherits": "android", + "description": "androidarm64 build is only available on macOS", + "cacheVariables": { + "CMAKE_ANDROID_ARCH_ABI": "arm64-v8a" + } + }, + { + "name": "androidx86_64", + "inherits": "android", + "description": "androidx86_64 build is only available on macOS", + "cacheVariables": { + "CMAKE_ANDROID_ARCH_ABI": "x86_64" + } + } + ], + "buildPresets": + [ + { + "name": "macos", + "configurePreset": "macos" + }, + { + "name": "iphoneos", + "configurePreset": "iphoneos" + }, + { + "name": "iphonesimulator", + "configurePreset": "iphonesimulator" + }, + { + "name": "iphonecatalyst", + "configurePreset": "iphonecatalyst" + }, + { + "name": "androidarm", + "configurePreset": "androidarm" + }, + { + "name": "androidarm64", + "configurePreset": "androidarm64" + }, + { + "name": "androidx86_64", + "configurePreset": "androidx86_64" + } + ] +} diff --git a/COPYING b/COPYING index 8759d39dc..5aa31cc36 100644 --- a/COPYING +++ b/COPYING @@ -86,41 +86,6 @@ src/crypto/signer/pkcs11.h the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -_______________________________________________________________________________ -src/xml/ generated files from xsd schemas - -Copyright (C) 2005-2010 Code Synthesis Tools CC - -This program was generated by CodeSynthesis XSD, an XML Schema to -C++ data binding compiler. - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License version 2 as -published by the Free Software Foundation. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -In addition, as a special exception, Code Synthesis Tools CC gives -permission to link this program with the Xerces-C++ library (or with -modified versions of Xerces-C++ that use the same license as Xerces-C++), -and distribute linked combinations including the two. You must obey -the GNU General Public License version 2 in all respects for all of -the code used other than Xerces-C++. If you modify this copy of the -program, you may extend this exception to your version of the program, -but you are not obligated to do so. If you do not wish to do so, delete -this exception statement from your version. - -Furthermore, Code Synthesis Tools CC makes a special exception for -the Free/Libre and Open Source Software (FLOSS) which is described -in the accompanying FLOSSE file. - _______________________________________________________________________________ examples/DigiDocCSharp diff --git a/README.md b/README.md index 2cc400e92..e6585f10d 100644 --- a/README.md +++ b/README.md @@ -16,15 +16,15 @@ 1. Install dependencies # Ubuntu - sudo apt install cmake xxd libxml-security-c-dev xsdcxx libxml2-dev libssl-dev zlib1g-dev + sudo apt install cmake libxml2-dev libxmlsec1-dev zlib1g-dev # Fedora - sudo dnf install cmake gcc-c++ openssl-devel xerces-c-devel xml-security-c-devel xsd libxml2-devel zlib-devel vim-common + sudo dnf install cmake gcc-c++ openssl-devel libxml2-devel xmlsec1-openssl-devel zlib-devel * doxygen - Optional, for API documentation * libboost-test-dev - Optional, for unittests * swig - Optional, for C#, Java and python bindings - * libpython3-dev, python3-distutils - Optional, for python bindings - * openjdk-8-jdk-headless - Optional, for Java bindings + * libpython3-dev, python3-setuptools - Optional, for python bindings + * openjdk-17-jdk-headless - Optional, for Java bindings 2. Fetch the source @@ -59,23 +59,24 @@ git clone --recursive https://github.com/open-eid/libdigidocpp cd libdigidocpp -3. Prepare dependencies (available targets: osx, ios, iossimulator, androidarm, androidarm64, androidx86_64) +3. Prepare dependencies (available targets: macos, iphoneos, iphonesimulator, androidarm, androidarm64, androidx86_64) - sh prepare_osx_build_environment.sh osx all + sh prepare_osx_build_environment.sh macos all 4. Install dependencies - brew install xsd - brew unlink xerces-c + brew install pkg-config ninja * doxygen - Optional, for API documentation * boost - Optional, for unittests * swig - Optional, for C# and Java bindings * openjdk - Optional, for Java bindings -5. Configure, build and install (available targets: osx, ios, iossimulator, androidarm, androidarm64, androidx86_64) +5. Configure, build and install (available presets: macos, iphoneos, iphonessimulator, androidarm, androidarm64, androidx86_64) - ./build-library.sh osx install + cmake --preset macos + cmake --build --preset macos + sudo cmake --build --preset macos --target install 6. Execute @@ -84,7 +85,7 @@ ### Windows 1. Install dependencies and necessary tools from - * [Visual Studio Community 2017/2019/2022](https://www.visualstudio.com/downloads/) + * [Visual Studio Community 2019/2022](https://www.visualstudio.com/downloads/) * [CMake](http://www.cmake.org) * [vcpkg](https://vcpkg.io/) * [Swig](http://swig.org/download.html) - Optional, for C# and Java bindings @@ -102,37 +103,32 @@ git clone --recursive https://github.com/open-eid/libdigidocpp cd libdigidocpp -3. Prepare - - powershell -ExecutionPolicy ByPass -File prepare_win_build_environment.ps1 -toolset 142 - -4. Configure +3. Configure cmake -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake ` - -DVCPKG_TARGET_TRIPLET=x64-windows-v142 ` + -DVCPKG_TARGET_TRIPLET=x64-windows ` -DVCPKG_MANIFEST_FEATURES=tests ` - -DXSD_ROOT=xsd/libxsd ` -B build -S . Optional CMake parameters: - -DSWIG_EXECUTABLE=C:/swigwin-4.1.1/swig.exe + -DSWIG_EXECUTABLE=C:/swigwin-4.2.1/swig.exe After running the cmake build, digidoc_csharp.dll along with the C# source files will be created, more info at [examples/DigiDocCSharp/README.md](examples/DigiDocCSharp/README.md). -5. Build +4. Build cmake --build build -6. Alternative to steps 4. and 5. - +5. Alternative to steps 4. and 5. - - powershell -ExecutionPolicy ByPass -File build.ps1 -toolset 142 + powershell -ExecutionPolicy ByPass -File build.ps1 -platform x64 - The build script builds executables and installation media for all - platforms (x86 and x64 / Debug and Release with debug symbols) + The build script builds executables and installation media for given + platform (Debug and Release with debug symbols) -7. Execute +6. Execute build/src/digidoc-tool.exe diff --git a/build-library.sh b/build-library.sh deleted file mode 100755 index 044b2cdc6..000000000 --- a/build-library.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/bin/bash - -set -e - -if [ "$#" -eq 0 ]; then - echo "Usage:" - echo " $0 target [maketask]" - echo " target: osx ios iossimulator ioscatalyst androidarm androidarm64 androidx86_64" - echo "To control iOS, macOS builds set environment variables:" - echo " minimum deployment target" - echo " - MACOSX_DEPLOYMENT_TARGET=12.0" - echo " - IPHONEOS_DEPLOYMENT_TARGET=15.0" - echo " archs to build on macOS/iOS" - echo " - ARCHS=\"arm64 x86_64\" (macOS)" - echo " - ARCHS=\"arm64\" (iOS)" - echo " - ARCHS=\"arm64 x86_64\" (iPhoneSimulator)" - exit -fi - -case "$@" in -*android*) - case "$@" in - *x86_64*) - TARGET=androidx86_64 - ARCH="x86_64" - ;; - *arm64*) - TARGET=androidarm64 - ARCH="arm64-v8a" - ;; - *) - TARGET=androidarm - ARCH="armeabi-v7a" - ;; - esac - : ${ANDROID_NDK_HOME:=$(ls -d /Volumes/android-ndk-r*/AndroidNDK*.app/Contents/NDK)} - TARGET_PATH=/Library/libdigidocpp.${TARGET} - CMAKEARGS=" - -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake \ - -DANDROID_PLATFORM=30 \ - -DANDROID_ABI=${ARCH} \ - -DCMAKE_DISABLE_FIND_PACKAGE_Boost=YES \ - -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=YES \ - -DBUILD_TOOLS=NO \ - -DBUILD_SHARED_LIBS=NO" - ;; -*ios*) - : ${IPHONEOS_DEPLOYMENT_TARGET:="15.0"} - export IPHONEOS_DEPLOYMENT_TARGET - case "$@" in - *simulator*) - echo "Building for iOS Simulator" - TARGET=iphonesimulator - CMAKEARGS="-DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_SYSTEM_NAME=iOS" - : ${ARCHS:="arm64 x86_64"} - ;; - *catalyst*) - echo "Building for iOS macOS Catalyst" - TARGET=iphonecatalyst - CMAKEARGS="-DCMAKE_OSX_SYSROOT=macosx" - export CFLAGS="-target x86_64-apple-ios${IPHONEOS_DEPLOYMENT_TARGET}-macabi" - export CXXFLAGS="-target x86_64-apple-ios${IPHONEOS_DEPLOYMENT_TARGET}-macabi" - : ${ARCHS:="arm64 x86_64"} - ;; - *) - echo "Building for iOS" - TARGET=iphoneos - CMAKEARGS="-DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_SYSTEM_NAME=iOS" - : ${ARCHS:="arm64"} - ;; - esac - TARGET_PATH=/Library/libdigidocpp.${TARGET} - CMAKEARGS="${CMAKEARGS} \ - -DCMAKE_OSX_DEPLOYMENT_TARGET=${IPHONEOS_DEPLOYMENT_TARGET} \ - -DCMAKE_DISABLE_FIND_PACKAGE_SWIG=YES \ - -DCMAKE_DISABLE_FIND_PACKAGE_Boost=YES \ - -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=YES \ - -DFRAMEWORK_DESTINATION=${TARGET_PATH}/lib - -DBUILD_TOOLS=NO" - ;; -*) - echo "Building for macOS" - TARGET=macOS - TARGET_PATH=/Library/libdigidocpp - : ${ARCHS:="arm64 x86_64"} - : ${MACOSX_DEPLOYMENT_TARGET:="12.0"} - export MACOSX_DEPLOYMENT_TARGET -esac - -cmake --fresh -B ${TARGET} -S . \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_INSTALL_PREFIX=${TARGET_PATH} \ - -DCMAKE_OSX_ARCHITECTURES="${ARCHS// /;}" \ - -DCMAKE_FIND_ROOT_PATH="${TARGET_PATH};/usr/local;/opt/homebrew" \ - -DOPENSSL_ROOT_DIR=${TARGET_PATH} \ - ${CMAKEARGS} -cmake --build ${TARGET} - -while test $# -gt 0; do - case "$1" in - android*|*ios*|*mac*|*osx*) ;; - install*) sudo cmake --build ${TARGET} --target $1 ;; - *) cmake --build ${TARGET} --target $1 ;; - esac - shift -done diff --git a/build.ps1 b/build.ps1 index b6228e74a..e444888e9 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,9 +1,11 @@ #powershell -ExecutionPolicy ByPass -File build.ps1 param( [string]$libdigidocpp = $PSScriptRoot, + [string]$git = "git.exe", [string]$vcpkg = "vcpkg\vcpkg.exe", [string]$vcpkg_dir = (split-path -parent $vcpkg), [string]$vcpkg_installed = $libdigidocpp, + [string]$vcpkg_installed_platform = "$vcpkg_installed\vcpkg_installed_$platform", [string]$build_number = $(if ($null -eq $env:BUILD_NUMBER) {"0"} else {$env:BUILD_NUMBER}), [string]$msiversion = "3.18.0.$build_number", [string]$platform = "x64", @@ -18,6 +20,20 @@ param( [string]$sign = $null ) +Try { + & $wix > $null +} +Catch { + & dotnet tool install --global --version 5.0.1 wix + & $wix extension add -g WixToolset.UI.wixext/5.0.1 +} + +if(!(Test-Path -Path $vcpkg)) { + & $git clone https://github.com/microsoft/vcpkg $vcpkg_dir + & $vcpkg_dir\bootstrap-vcpkg.bat + & $vcpkg install --clean-after-build --triplet x64-windows --x-feature=tests --x-install-root=$vcpkg_installed_platform +} + $cmakeext = @() $wixext = @() $target = @("all") @@ -41,7 +57,7 @@ foreach($type in @("Debug", "RelWithDebInfo")) { "-DCMAKE_INSTALL_PREFIX=$platform" ` "-DCMAKE_INSTALL_LIBDIR=bin" ` "-DCMAKE_TOOLCHAIN_FILE=$vcpkg_dir/scripts/buildsystems/vcpkg.cmake" ` - "-DVCPKG_INSTALLED_DIR=$vcpkg_installed\vcpkg_installed_$platform" ` + "-DVCPKG_INSTALLED_DIR=$vcpkg_installed_platform" ` "-DSIGNCERT=$sign" ` $cmakeext "&&" $cmake --build $buildpath --target $target "&&" $cmake --install $buildpath } @@ -52,7 +68,7 @@ foreach($type in @("Debug", "RelWithDebInfo")) { -bv "WixUIDialogBmp=$libdigidocpp/cmake/modules/dlgbmp.bmp" ` -d "ICON=$libdigidocpp/cmake/modules/ID.ico" ` -d "MSI_VERSION=$msiversion" ` - -d "vcpkg=$vcpkg_installed/vcpkg_installed_$platform/$platform-windows" ` + -d "vcpkg=$vcpkg_installed_platform/$platform-windows" ` -d "libdigidocpp=$(Get-Location)/$platform" ` $libdigidocpp\libdigidocpp.wxs diff --git a/cmake b/cmake index f2f2e074c..057c95e36 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit f2f2e074cd85388f062c1f68ceeb93d0323bb7f7 +Subproject commit 057c95e365c9d018bd15afe0dc03ab4122b4147b diff --git a/libdigidocpp.dox b/libdigidocpp.dox index f73724789..3e9d3b2ec 100644 --- a/libdigidocpp.dox +++ b/libdigidocpp.dox @@ -39,7 +39,7 @@ The following chapters provides an overview of ASiC-E (XAdES) digitally signed f \subsubsection container ASiC-E (XAdES) container format -The ETSI standard \ref ASiC "EN 319 162-1" called Associated Signature Containers (ASiC) defines format of container for encapsulation of signed files and signatures with extra information. The container type used in case of ASiC-E documents is Associated Signature Extended form. In the container \ref XAdES_EN "XAdES EN 319 132-1" (XML Advanced Electronic Signatures) format signatures are used. +The ETSI standard \ref ASiC "EN 319 162-1" called Associated Signature Containers (ASiC) defines format of container for encapsulation of signed files and signatures with extra information. The container type used in case of ASiC-E documents is Associated Signature Extended form. In the container \ref XAdES "XAdES EN 319 132-1" (XML Advanced Electronic Signatures) format signatures are used. ASiC-E container is a ZIP file consisting of the following objects: - a file named "mimetype", containing only the following value: application/vnd.etsi.asic-e+zip @@ -59,7 +59,7 @@ Original files (which were signed) along with the signature(s), timestamp(s), va \subsubsection profiles Legacy BDOC signature profiles -The format of the BDOC 2.1 digitally signed file is based on ETSI \ref XAdES "XAdES TS 101 903" standard. The XAdES standard defines formats for advanced electronic signatures that remain valid over long periods of time. The ETSI standard \ref XAdES-BP "TS 103 171" "XAdES Baseline Profile" further profiles the XAdES signature by putting limitations on choices. +The format of the BDOC 2.1 digitally signed file is based on ETSI \ref XAdES "XAdES TS 101 903" standard. The XAdES standard defines formats for advanced electronic signatures that remain valid over long periods of time. The ETSI standard \ref XAdES "TS 103 171" "XAdES Baseline Profile" further profiles the XAdES signature by putting limitations on choices. BDOC 2.1 specification defines two profiles of qualified BDOC signatures: BDOC with time-mark and BDOC with time-stamp. Both of the profiles offer long-term validation possibility by incorporating the necessary validation data in the signature. Both of the profiles are compliant to XAdES LT-Level requirements. @@ -154,22 +154,13 @@ XML Signature Syntax and Processing. Version 1.1 http://www.w3.org/TR/xmldsig-core1/
Base Component | Required/optional | Description |
---|---|---|
OpenSSL | required | Used for validating certificates and digest values. |
XercesC | required | Used for validating the documents according to XML Schema, reading and writing XML. |
XalanC | required | Used for handling XPath references in XML |
XmlSecurityC | required | Used for handling signature related components. |
XSD | required | Used for dynamically generating C++ source code according to XML Schemas, only used during building process of the library. Required when building the library from source code. |
libxml2 | required | Used for validating the documents according to XML Schema, reading and writing XML. |
xmlsec | required | Used for handling signature related components. |
ZLIB | required | Used when compressing and extracting ASiC files in ZIP format. |
Minizip | required | Used when creating and opening ZIP container for BDOC file. If the component is not found from system then bundled version with source code is used. Forms a part of ZLIB component. |
PKCS11 | optional | Used for searching for default PKCS#11 driver in the system so that its path could be registered in configuration entries. |
Schema file | Description | -
---|---|
OpenDocument_manifest.xsd | OASIS OpenDocument v1.0 (\ref OpenDocument "OpenDocument") -Defines the structure of META-INF/manifest.xml file in BDOC container. -https://www.oasis-open.org/committees/download.php/12570/OpenDocument-manifest-schema-v1.0-os.rng - |
OpenDocument_dsig.xsd | OASIS OpenDocument v1.0 (\ref OpenDocument "OpenDocument") + |
OpenDocument_manifest.xsd | OASIS OpenDocument v1.2 (\ref OpenDocument "OpenDocument") +Defines the structure of META-INF/manifest.xml file in ASiC container. +https://docs.oasis-open.org/office/v1.2/csd06/OpenDocument-v1.2-csd06-manifest-schema.rng + |
OpenDocument_dsig.xsd | OASIS OpenDocument v1.2 (\ref OpenDocument "OpenDocument") Defines the structure of META-INF/signature.xml file in ADOC container. https://docs.oasis-open.org/office/v1.2/csd06/OpenDocument-v1.2-csd06-dsig-schema.rng |
en_31916201v010101.xsd | Associated Signature Containers (\ref ASiC "ASiC") @@ -406,12 +386,10 @@ Defines the format of container for encapsulating the signed documents, signatur |
xmldsig-core-schema.xsd | XML Signature Core Schema Instance (\ref XML-DSIG "XML-DSIG") Defines XML syntax for digital signatures. http://www.w3.org/TR/2008/REC-xmldsig-core-20080610/xmldsig-core-schema.xsd - |
XAdES01903v132-201601.xsd | XML Advanced Electronic Signatures (\ref XAdES_EN "XAdES EN") + |
XAdES01903v132-201601.xsd | XML Advanced Electronic Signatures (\ref XAdES "XAdES EN") Defines a set of extensions to XML-DSIG making it suitable for advanced electronic signature. http://uri.etsi.org/01903/v1.3.2/XAdES01903v132-201601.xsd - |
XAdES01903v132-201601-relaxed.xsd | Relaxed version of XML Advanced Electronic Signatures (\ref XAdES_EN "XAdES EN") -Allows to list child elements of the SignatureProductionPlace element in any sequence. Schema is used when validating the BDOC documents in order to accept documents produced by DigiDoc4j library version 1.0.3 and earlier. - |
XAdES01903v141-201601.xsd | Defines XML syntax for additional elements of XAdES signatures that were added with version 1.4.1 of the (\ref XAdES_EN "XAdES EN") standard. Needed for implementing archive time-stamp support in the future. + |
XAdES01903v141-201601.xsd | Defines XML syntax for additional elements of XAdES signatures that were added with version 1.4.1 of the (\ref XAdES "XAdES EN") standard. Needed for implementing archive time-stamp support in the future. http://uri.etsi.org/01903/v1.4.1/XAdES01903v141-201601.xsd |
ts_119612v020201_201601xsd.xsd ts_119612v020101_additionaltypes_xsd.xsd ts_119612v020101_sie_xsd.xsd | Defines the format of Trust Service status Lists (\ref TSL) that contain information about trusted CA, OCSP and TSA certificates. |
conf.xsd | Configuration properties’ schema. Defines the Libdigidocpp configuration file’s digidocpp.conf structure (see also \ref conf).
@@ -430,8 +408,13 @@ Modifications are marked between xml comment tags.
1) The schema’s location has been altered so that the imported schema file is looked up from the local file system.
\code{.xml}
- |