Initial commit
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
# Ignore BPM archives and signatures
|
||||
*.bpm
|
||||
*.bpm.sig
|
||||
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Github repository
|
||||
REPO="mtrojnar/osslsigncode"
|
||||
|
||||
# Get tag name using Github Rest API
|
||||
TAG_NAME=$(curl -s -L -H "X-GitHub-Api-Version: 2022-11-28" -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/"$REPO"/releases/latest | jq -r '.tag_name')
|
||||
|
||||
echo "$TAG_NAME"
|
||||
@@ -0,0 +1,24 @@
|
||||
name: osslsigncode
|
||||
description: OpenSSL-based Authenticode signing for PE, CAB, CAT, MSI, APPX, and script files
|
||||
version: "2.13"
|
||||
revision: 1
|
||||
url: https://github.com/mtrojnar/osslsigncode
|
||||
license: GPL-3.0-or-later
|
||||
maintainers:
|
||||
- [email protected]
|
||||
architecture: any
|
||||
type: source
|
||||
depends:
|
||||
- curl
|
||||
- openssl
|
||||
make_depends:
|
||||
- cmake
|
||||
- perl
|
||||
- python3
|
||||
check_depends:
|
||||
- libfaketime
|
||||
downloads:
|
||||
- url: https://github.com/mtrojnar/osslsigncode/archive/refs/tags/${BPM_PKG_VERSION}.tar.gz
|
||||
extract_to: ${BPM_SOURCE}
|
||||
extract_strip_components: 1
|
||||
checksum: ee95638b8bec0c019ddf28cb14988645abbd180dcd017536338b7d0d5eaaea96
|
||||
@@ -0,0 +1,35 @@
|
||||
# This is the recipe.sh script. It is executed by BPM in a temporary directory when compiling a source package
|
||||
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
|
||||
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
|
||||
|
||||
# The prepare function is executed in the root of the temp directory
|
||||
# This function is used for putting downloaded files to the correct location or applying patches
|
||||
prepare() {
|
||||
cd "$BPM_SOURCE"
|
||||
patch -Np1 -i "$BPM_WORKDIR"/support-for-python-cryptography-43.patch
|
||||
}
|
||||
|
||||
# The build function is executed in the source directory
|
||||
# This function is used to compile the source code
|
||||
build() {
|
||||
cmake -B build -DCMAKE_INSTALL_PREFIX=/usr
|
||||
cmake --build build
|
||||
}
|
||||
|
||||
# The check function is executed in the source directory
|
||||
# This function is used to run tests to verify the package has been compiled correctly
|
||||
check() {
|
||||
ctest --test-dir build Release
|
||||
}
|
||||
|
||||
# The package function is executed in the source directory
|
||||
# This function is used to move the compiled files into the output directory
|
||||
package() {
|
||||
DESTDIR="$BPM_OUTPUT" cmake --install build
|
||||
|
||||
# Cleanup http server started by cmake
|
||||
python Testing/client_http.py || true 2> /dev/null
|
||||
|
||||
# Install package license
|
||||
install -Dm644 "$BPM_SOURCE"/COPYING.txt "$BPM_OUTPUT"/usr/share/licenses/osslsigncode/COPYING
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
From a8c1bf9838610bbb8362b1d425cdd3e2ecfecc8b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20Van=C4=9Bk?= <[email protected]>
|
||||
Date: Sun, 1 Sep 2024 14:59:49 +0200
|
||||
Subject: [PATCH] tests: add import for python-cryptography >= 43.0.0
|
||||
|
||||
write_pkcs12_container method raises following error message with
|
||||
python-cryptography-43.0.0:
|
||||
|
||||
Error: module 'cryptography.hazmat.primitives.serialization' has no attribute 'pkcs12'
|
||||
|
||||
Explicit import of the pkcs12 module resolves the issue.
|
||||
---
|
||||
tests/make_certificates.py | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/tests/make_certificates.py b/tests/make_certificates.py
|
||||
index 6fb03ac2..ea14a7ed 100644
|
||||
--- a/tests/make_certificates.py
|
||||
+++ b/tests/make_certificates.py
|
||||
@@ -10,6 +10,8 @@
|
||||
from cryptography.hazmat.primitives import serialization
|
||||
from cryptography.hazmat.primitives.asymmetric import rsa
|
||||
|
||||
+import cryptography.hazmat.primitives.serialization.pkcs12
|
||||
+
|
||||
RESULT_PATH = os.getcwd()
|
||||
CERTS_PATH = os.path.join(RESULT_PATH, "./Testing/certs/")
|
||||
|
||||
Reference in New Issue
Block a user