Merge release-23.11 into staging-next-23.11

This commit is contained in:
github-actions[bot]
2024-04-12 00:13:22 +00:00
committed by GitHub
16 changed files with 1412 additions and 53 deletions

View File

@@ -376,7 +376,7 @@ Use the following commands:
```ShellSession
# mkdir -p /mnt/boot
# mount /dev/disk/by-label/boot /mnt/boot
# mount -o umask=077 /dev/disk/by-label/boot /mnt/boot
```
3. If your machine has a limited amount of memory, you may want to
@@ -572,7 +572,7 @@ With a partitioned disk.
# mkfs.fat -F 32 -n boot /dev/sda3 # (for UEFI systems only)
# mount /dev/disk/by-label/nixos /mnt
# mkdir -p /mnt/boot # (for UEFI systems only)
# mount /dev/disk/by-label/boot /mnt/boot # (for UEFI systems only)
# mount -o umask=077 /dev/disk/by-label/boot /mnt/boot # (for UEFI systems only)
# nixos-generate-config --root /mnt
# nano /mnt/etc/nixos/configuration.nix
# nixos-install

View File

@@ -453,6 +453,17 @@ EOF
}
}
# Preserve umask (fmask, dmask) settings for vfat filesystems.
# (The default is to mount these world-readable, but that's a security risk
# for the EFI System Partition.)
if ($fsType eq "vfat") {
for (@superOptions) {
if ($_ =~ /fmask|dmask/) {
push @extraOptions, $_;
}
}
}
# is this a stratis fs?
my $stableDevPath = findStableDevPath $device;
my $stratisPool;

View File

@@ -12,26 +12,26 @@ let
owner = "monero-project";
repo = "supercop";
rev = "633500ad8c8759995049ccd022107d1fa8a1bbc9";
sha256 = "26UmESotSWnQ21VbAYEappLpkEMyl0jiuCaezRYd/sE=";
hash = "sha256-26UmESotSWnQ21VbAYEappLpkEMyl0jiuCaezRYd/sE=";
};
trezor-common = fetchFromGitHub {
owner = "trezor";
repo = "trezor-common";
rev = "bff7fdfe436c727982cc553bdfb29a9021b423b0";
sha256 = "VNypeEz9AV0ts8X3vINwYMOgO8VpNmyUPC4iY3OOuZI=";
rev = "bc28c316d05bf1e9ebfe3d7df1ab25831d98d168";
hash = "sha256-F1Hf1WwHqXMd/5OWrdkpomszACTozDuC7DQXW3p6248=";
};
in
stdenv.mkDerivation rec {
pname = "monero-cli";
version = "0.18.3.1";
version = "0.18.3.3";
src = fetchFromGitHub {
owner = "monero-project";
repo = "monero";
rev = "v${version}";
hash = "sha256-PYcSbwbuQm6/r9RH+vjDy7NW1AiKhK/DG1pYYt4/drg=";
hash = "sha256-1LkKIrud317BEE+713t5wiJV6FcDlJdj4ypXPR0bKTs=";
};
patches = [

View File

@@ -14,13 +14,13 @@
stdenv.mkDerivation rec {
pname = "monero-gui";
version = "0.18.3.1";
version = "0.18.3.3";
src = fetchFromGitHub {
owner = "monero-project";
repo = "monero-gui";
rev = "v${version}";
hash = "sha256-1xgecaScGLFbv0V5QlpettdvCcb9+xu7eO/J9MyPzmY=";
hash = "sha256-6qadBm4bPui11OVY1tLFcHsfswXWBFiJvutIsF6EfX8=";
};
nativeBuildInputs = [

View File

@@ -1,9 +1,9 @@
{
"version" = "1.11.63";
"version" = "1.11.64";
"hashes" = {
"desktopSrcHash" = "sha256-wQSFnF3HzERW4iS5leHP2LZKrJkTPW+LUgmj5b0/KZk=";
"desktopYarnHash" = "003d44psrw09dldvp9lfhsnipmcy1fwbicsvmd48mg7n3vnrg0zw";
"webSrcHash" = "sha256-FjYDwXa+7Lx/K0AERn64mPbjp0QFIoVoYMPx/mG4Zrs=";
"webYarnHash" = "0n7z9y3141rx0c5476zw3ccfck0f4b2jwsaxmq2ff7spwyw81zd2";
"desktopSrcHash" = "sha256-U6vVuc7claPZI4idZmTXpm1GHm+VrmoaJNVgJU0GHMU=";
"desktopYarnHash" = "079jg178cq2m91fhzrdab8x33wrm5a97ga19g0268q118vbnv98l";
"webSrcHash" = "sha256-jphxYlSxHjck6XA3JXofC6AbVb+aVOjsbxLUqo1hRhY=";
"webYarnHash" = "0q91llgx8cy6zxinfqbnrcfkmclqx7czlp08f1ls43x0w2vd8447";
};
}

View File

@@ -6,7 +6,6 @@
, clang
, llvm
, python3
, zlib
, z3
, stp
, cryptominisat
@@ -45,13 +44,13 @@ let
};
in stdenv.mkDerivation rec {
pname = "klee";
version = "3.0";
version = "3.1";
src = fetchFromGitHub {
owner = "klee";
repo = "klee";
rev = "v${version}";
hash = "sha256-y5lWmtIcLAthQ0oHYQNd+ir75YaxHZR9Jgiz+ZUFQjY=";
hash = "sha256-5js1N8qVF0lCkahSU3ojT7+p/a9IaUpPWhIyFHEzqto=";
};
nativeBuildInputs = [ cmake ];
@@ -98,6 +97,9 @@ in stdenv.mkDerivation rec {
patchShebangs .
'';
# https://github.com/klee/klee/issues/1690
hardeningDisable = [ "fortify" ];
doCheck = true;
passthru = {

View File

@@ -26,12 +26,12 @@ let
});
in stdenv.mkDerivation rec {
pname = "klee-uclibc";
version = "1.3";
version = "1.4";
src = fetchFromGitHub {
owner = "klee";
repo = "klee-uclibc";
rev = "klee_uclibc_v${version}";
sha256 = "sha256-xQ8GWa0Gmd3lbwKodJhrsZeuR4j7NT4zIUh+kNhVY/w=";
sha256 = "sha256-sogQK5Ed0k5tf4rrYwCKT4YRKyEovgT25p0BhGvJ1ok=";
};
nativeBuildInputs = [

965
pkgs/by-name/mc/mcumgr-client/Cargo.lock generated Normal file
View File

@@ -0,0 +1,965 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "aho-corasick"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
dependencies = [
"memchr",
]
[[package]]
name = "anstream"
version = "0.6.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon",
"colorchoice",
"utf8parse",
]
[[package]]
name = "anstyle"
version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc"
[[package]]
name = "anstyle-parse"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-query"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648"
dependencies = [
"windows-sys",
]
[[package]]
name = "anstyle-wincon"
version = "3.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7"
dependencies = [
"anstyle",
"windows-sys",
]
[[package]]
name = "anyhow"
version = "1.0.81"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247"
[[package]]
name = "autocfg"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80"
[[package]]
name = "base64"
version = "0.21.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
[[package]]
name = "bincode"
version = "1.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
dependencies = [
"serde",
]
[[package]]
name = "bitflags"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1"
[[package]]
name = "block-buffer"
version = "0.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
dependencies = [
"generic-array",
]
[[package]]
name = "byteorder"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "clap"
version = "4.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b"
dependencies = [
"clap_builder",
"clap_derive",
]
[[package]]
name = "clap_builder"
version = "4.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663"
dependencies = [
"anstream",
"anstyle",
"clap_lex",
"strsim",
]
[[package]]
name = "clap_derive"
version = "4.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442"
dependencies = [
"heck",
"proc-macro2",
"quote",
"syn 2.0.58",
]
[[package]]
name = "clap_lex"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1"
[[package]]
name = "colorchoice"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
[[package]]
name = "console"
version = "0.15.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb"
dependencies = [
"encode_unicode",
"lazy_static",
"libc",
"unicode-width",
"windows-sys",
]
[[package]]
name = "core-foundation-sys"
version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f"
[[package]]
name = "cpufeatures"
version = "0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504"
dependencies = [
"libc",
]
[[package]]
name = "crc16"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "338089f42c427b86394a5ee60ff321da23a5c89c9d89514c829687b26359fcff"
[[package]]
name = "crypto-common"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
dependencies = [
"generic-array",
"typenum",
]
[[package]]
name = "deranged"
version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
dependencies = [
"powerfmt",
]
[[package]]
name = "digest"
version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
dependencies = [
"block-buffer",
"crypto-common",
]
[[package]]
name = "encode_unicode"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
[[package]]
name = "generic-array"
version = "0.14.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
dependencies = [
"typenum",
"version_check",
]
[[package]]
name = "getrandom"
version = "0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5"
dependencies = [
"cfg-if",
"libc",
"wasi",
]
[[package]]
name = "half"
version = "1.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403"
[[package]]
name = "heck"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
[[package]]
name = "hex"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
[[package]]
name = "humantime"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]]
name = "indicatif"
version = "0.17.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3"
dependencies = [
"console",
"instant",
"number_prefix",
"portable-atomic",
"unicode-width",
]
[[package]]
name = "instant"
version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
dependencies = [
"cfg-if",
]
[[package]]
name = "io-kit-sys"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "617ee6cf8e3f66f3b4ea67a4058564628cde41901316e19f559e14c7c72c5e7b"
dependencies = [
"core-foundation-sys",
"mach2",
]
[[package]]
name = "itoa"
version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
[[package]]
name = "lazy_static"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "libc"
version = "0.2.153"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
[[package]]
name = "libudev"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78b324152da65df7bb95acfcaab55e3097ceaab02fb19b228a9eb74d55f135e0"
dependencies = [
"libc",
"libudev-sys",
]
[[package]]
name = "libudev-sys"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c8469b4a23b962c1396b9b451dda50ef5b283e8dd309d69033475fa9b334324"
dependencies = [
"libc",
"pkg-config",
]
[[package]]
name = "log"
version = "0.4.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c"
[[package]]
name = "mach2"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709"
dependencies = [
"libc",
]
[[package]]
name = "mcumgr-client"
version = "0.0.4"
dependencies = [
"anyhow",
"base64",
"bincode",
"byteorder",
"clap",
"crc16",
"hex",
"humantime",
"indicatif",
"lazy_static",
"log",
"num",
"num-derive",
"num-traits",
"rand",
"serde",
"serde_bytes",
"serde_cbor",
"serde_json",
"serde_repr",
"serialport",
"sha2",
"simplelog",
]
[[package]]
name = "memchr"
version = "2.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d"
[[package]]
name = "nix"
version = "0.26.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b"
dependencies = [
"bitflags 1.3.2",
"cfg-if",
"libc",
]
[[package]]
name = "num"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af"
dependencies = [
"num-bigint",
"num-complex",
"num-integer",
"num-iter",
"num-rational",
"num-traits",
]
[[package]]
name = "num-bigint"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0"
dependencies = [
"autocfg",
"num-integer",
"num-traits",
]
[[package]]
name = "num-complex"
version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6"
dependencies = [
"num-traits",
]
[[package]]
name = "num-conv"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
[[package]]
name = "num-derive"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d"
dependencies = [
"proc-macro2",
"quote",
"syn 1.0.109",
]
[[package]]
name = "num-integer"
version = "0.1.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
dependencies = [
"num-traits",
]
[[package]]
name = "num-iter"
version = "0.1.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9"
dependencies = [
"autocfg",
"num-integer",
"num-traits",
]
[[package]]
name = "num-rational"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0"
dependencies = [
"autocfg",
"num-bigint",
"num-integer",
"num-traits",
]
[[package]]
name = "num-traits"
version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a"
dependencies = [
"autocfg",
]
[[package]]
name = "num_threads"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9"
dependencies = [
"libc",
]
[[package]]
name = "number_prefix"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3"
[[package]]
name = "pkg-config"
version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec"
[[package]]
name = "portable-atomic"
version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0"
[[package]]
name = "powerfmt"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
[[package]]
name = "ppv-lite86"
version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
[[package]]
name = "proc-macro2"
version = "1.0.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
dependencies = [
"proc-macro2",
]
[[package]]
name = "rand"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
"libc",
"rand_chacha",
"rand_core",
]
[[package]]
name = "rand_chacha"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [
"ppv-lite86",
"rand_core",
]
[[package]]
name = "rand_core"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [
"getrandom",
]
[[package]]
name = "regex"
version = "1.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c"
dependencies = [
"aho-corasick",
"memchr",
"regex-automata",
"regex-syntax",
]
[[package]]
name = "regex-automata"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea"
dependencies = [
"aho-corasick",
"memchr",
"regex-syntax",
]
[[package]]
name = "regex-syntax"
version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56"
[[package]]
name = "ryu"
version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1"
[[package]]
name = "scopeguard"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "serde"
version = "1.0.197"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_bytes"
version = "0.11.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734"
dependencies = [
"serde",
]
[[package]]
name = "serde_cbor"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5"
dependencies = [
"half",
"serde",
]
[[package]]
name = "serde_derive"
version = "1.0.197"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.58",
]
[[package]]
name = "serde_json"
version = "1.0.115"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd"
dependencies = [
"itoa",
"ryu",
"serde",
]
[[package]]
name = "serde_repr"
version = "0.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.58",
]
[[package]]
name = "serialport"
version = "4.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f5a15d0be940df84846264b09b51b10b931fb2f275becb80934e3568a016828"
dependencies = [
"bitflags 2.5.0",
"cfg-if",
"core-foundation-sys",
"io-kit-sys",
"libudev",
"mach2",
"nix",
"regex",
"scopeguard",
"unescaper",
"winapi",
]
[[package]]
name = "sha2"
version = "0.10.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
dependencies = [
"cfg-if",
"cpufeatures",
"digest",
]
[[package]]
name = "simplelog"
version = "0.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "16257adbfaef1ee58b1363bdc0664c9b8e1e30aed86049635fb5f147d065a9c0"
dependencies = [
"log",
"termcolor",
"time",
]
[[package]]
name = "strsim"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]]
name = "syn"
version = "1.0.109"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "syn"
version = "2.0.58"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "termcolor"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755"
dependencies = [
"winapi-util",
]
[[package]]
name = "thiserror"
version = "1.0.58"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.58"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.58",
]
[[package]]
name = "time"
version = "0.3.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749"
dependencies = [
"deranged",
"itoa",
"libc",
"num-conv",
"num_threads",
"powerfmt",
"serde",
"time-core",
"time-macros",
]
[[package]]
name = "time-core"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
[[package]]
name = "time-macros"
version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774"
dependencies = [
"num-conv",
"time-core",
]
[[package]]
name = "typenum"
version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
[[package]]
name = "unescaper"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0adf6ad32eb5b3cadff915f7b770faaac8f7ff0476633aa29eb0d9584d889d34"
dependencies = [
"thiserror",
]
[[package]]
name = "unicode-ident"
version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
[[package]]
name = "unicode-width"
version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85"
[[package]]
name = "utf8parse"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
[[package]]
name = "version_check"
version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
[[package]]
name = "wasi"
version = "0.11.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "winapi"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
dependencies = [
"winapi-i686-pc-windows-gnu",
"winapi-x86_64-pc-windows-gnu",
]
[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
name = "winapi-util"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596"
dependencies = [
"winapi",
]
[[package]]
name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows-sys"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-targets"
version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675"
[[package]]
name = "windows_i686_gnu"
version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3"
[[package]]
name = "windows_i686_msvc"
version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8"

View File

@@ -0,0 +1,46 @@
{
lib,
rustPlatform,
fetchFromGitHub,
nix-update-script,
pkg-config,
udev,
stdenv,
darwin,
}:
rustPlatform.buildRustPackage rec {
pname = "mcumgr-client";
version = "0.0.4";
src = fetchFromGitHub {
owner = "vouch-opensource";
repo = "mcumgr-client";
rev = "v${version}";
hash = "sha256-MTNMnA5/CzwVrhNhDrfaXOatT4BFmc4nOPhIxTyc248=";
};
cargoLock = {
lockFile = ./Cargo.lock;
};
passthru.updateScript = nix-update-script { };
postPatch = ''
ln -s ${./Cargo.lock} Cargo.lock
'';
nativeBuildInputs = [ pkg-config ];
buildInputs =
lib.optionals stdenv.isLinux [ udev ]
++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.IOKit ];
meta = with lib; {
description = "Client for mcumgr commands";
homepage = "https://github.com/vouch-opensource/mcumgr-client";
license = licenses.asl20;
maintainers = with maintainers; [ otavio ];
mainProgram = "mcumgr-client";
};
}

View File

@@ -1,10 +1,10 @@
{
"darwin": {
"hash": "sha256-aOw/c6Y+4x6kwxcwnajHh92ZZDeaM/Y1df76HgUjVn8=",
"version": "0.2024.03.19.08.01.stable_01"
"hash": "sha256-tNNT8FqMvrjGFuyhizbyd2gAimbd5SLyCMVt6bFcbyQ=",
"version": "0.2024.04.02.08.02.stable_01"
},
"linux": {
"hash": "sha256-efnYh48xcLneeotH9iSY0xQRgMXI/erM6F2fIH38yjY=",
"version": "0.2024.03.19.08.01.stable_01"
"hash": "sha256-xnXRg23AdfCk2TKBr+PZ3wDYqTN4+8wLSodWpmh3D/Y=",
"version": "0.2024.04.02.08.02.stable_01"
}
}

View File

@@ -10,12 +10,12 @@
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "raycast";
version = "1.70.3";
version = "1.71.1";
src = fetchurl {
name = "Raycast.dmg";
url = "https://releases.raycast.com/releases/${finalAttrs.version}/download?build=universal";
hash = "sha256-BSeWkopuBszBAITiaAPIwUvP7I7sZTl1laQXWIN4qRE=";
hash = "sha256-TJBBguUMgH0QM8h6GMHrQmfmREB1O8k4tp3YMywYeXY=";
};
dontPatch = true;

View File

@@ -9,7 +9,7 @@
}:
let
version = "0.1.2";
version = "0.1.3";
in buildGoModule {
pname = "owncast";
inherit version;
@@ -17,9 +17,9 @@ in buildGoModule {
owner = "owncast";
repo = "owncast";
rev = "v${version}";
hash = "sha256-pPBY2PcXe3k9G6kjj/vF5VB6DEmiwKDUrK4VGR4xNzU=";
hash = "sha256-VoItAV/8hzrqj4bIgMum9Drr/kAafH63vXw3GO6nSOc=";
};
vendorHash = "sha256-7HxiZh5X5AZVMiZT6B8DfOy6stJ3+dFEixwJYv5X0dY=";
vendorHash = "sha256-JitvKfCLSravW5WRE0QllJTrRPLaaBg1GxJi3kmtiIU=";
propagatedBuildInputs = [ ffmpeg ];

View File

@@ -31,16 +31,16 @@ let
in
buildGoModule rec {
pname = "netbird";
version = "0.26.0";
version = "0.27.2";
src = fetchFromGitHub {
owner = "netbirdio";
repo = pname;
rev = "v${version}";
hash = "sha256-hZnxemBoMAol0m9XZPMEh/Lf0woxoLNH97bRyg8xtv4=";
hash = "sha256-W31eKA6v7pAJZ9El/CxEDMONTcpRfzn/Ldh1yIql+NQ=";
};
vendorHash = "sha256-csa83P74Y9fHsPg5VgPfR9WMg4VKOXcIR0pOMzh0QoA=";
vendorHash = "sha256-HJEZ1VrKS1MXKtpDjVorMiecb94+f1mBWPkWng4YqZk=";
nativeBuildInputs = [ installShellFiles ] ++ lib.optional ui pkg-config;
@@ -73,9 +73,9 @@ buildGoModule rec {
postPatch = ''
# make it compatible with systemd's RuntimeDirectory
substituteInPlace client/cmd/root.go \
--replace 'unix:///var/run/netbird.sock' 'unix:///var/run/netbird/sock'
--replace-fail 'unix:///var/run/netbird.sock' 'unix:///var/run/netbird/sock'
substituteInPlace client/ui/client_ui.go \
--replace 'unix:///var/run/netbird.sock' 'unix:///var/run/netbird/sock'
--replace-fail 'unix:///var/run/netbird.sock' 'unix:///var/run/netbird/sock'
'';
postInstall = lib.concatStringsSep "\n"
@@ -90,13 +90,13 @@ buildGoModule rec {
'')
modules) + lib.optionalString (stdenv.isLinux && ui) ''
mkdir -p $out/share/pixmaps
cp $src/client/ui/netbird-systemtray-default.png $out/share/pixmaps/netbird.png
cp $src/client/ui/netbird-systemtray-connected.png $out/share/pixmaps/netbird.png
mkdir -p $out/share/applications
cp $src/client/ui/netbird.desktop $out/share/applications/netbird.desktop
substituteInPlace $out/share/applications/netbird.desktop \
--replace "Exec=/usr/bin/netbird-ui" "Exec=$out/bin/netbird-ui"
--replace-fail "Exec=/usr/bin/netbird-ui" "Exec=$out/bin/netbird-ui"
'';
passthru = {

View File

@@ -6,7 +6,7 @@
, meson
, ninja
, pkg-config
, gradle_7
, gradle_8
, curl
, cryptopp
, fontconfig
@@ -20,16 +20,16 @@
let
pname = "cie-middleware-linux";
version = "1.5.0";
version = "1.5.2";
src = fetchFromGitHub {
owner = "M0rf30";
repo = pname;
rev = version;
sha256 = "sha256-Z8K2Ibg5bBfSql5HEapKgdfiCf/EIKTTD15oVeysQGk=";
sha256 = "sha256-M3Xwg3G2ZZhPRV7uhFVXQPyvuuY4zI5Z+D/Dt26KVM0=";
};
gradle = gradle_7;
gradle = gradle_8;
# Shared libraries needed by the Java application
libraries = lib.makeLibraryPath [ ghostscript ];
@@ -44,7 +44,6 @@ let
buildPhase = ''
# Run the fetchDeps task
export GRADLE_USER_HOME=$(mktemp -d)
ls -l
gradle --no-daemon -b cie-java/build.gradle fetchDeps
'';
@@ -61,7 +60,7 @@ let
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "sha256-jtaH8dBpnx8KMJe+jzJfkvcx1NO4nL5jsRO4+GI+d0c=";
outputHash = "sha256-fxrjo4iduXzTgMqmQGwdI1vLMA4EZLObsHyKGZ6b14I=";
};
in
@@ -71,35 +70,31 @@ stdenv.mkDerivation {
hardeningDisable = [ "format" ];
outputs = [ "out" "dev" ];
nativeBuildInputs = [
makeWrapper
strip-nondeterminism
meson
ninja
pkg-config
gradle
strip-nondeterminism
];
buildInputs = [
cryptopp
fontconfig
podofo.dev
podofo
openssl
pcsclite
curl
libxml2
];
patches = [ ./use-system-podofo.patch ];
postPatch = ''
# substitute the cieid command with this $out/bin/cieid
substituteInPlace libs/pkcs11/src/CSP/AbilitaCIE.cpp \
--replace 'file = "cieid"' 'file = "'$out'/bin/cieid"'
# revert https://github.com/M0Rf30/cie-middleware-linux/commit/1a389d8
sed -i libs/meson.build \
-e "s@podofo_dep = .\+@podofo_dep = dependency('libpodofo')@g"
'';
# Note: we use pushd/popd to juggle between the
@@ -150,9 +145,6 @@ stdenv.mkDerivation {
'';
postFixup = ''
# Move static libraries to the dev output
mv -t "$dev/lib" "$out/lib/"*.a
# Make the jar deterministic (mainly, sorting its files)
strip-nondeterminism "$out/share/cieid/cieid.jar"
'';

View File

@@ -0,0 +1,343 @@
commit c9ac4243a6def08790bbf5552bb31894169596ca
Author: rnhmjoj <rnhmjoj@inventati.org>
Date: Wed Apr 3 12:54:58 2024 +0200
use system podofo
diff --git a/libs/meson.build b/libs/meson.build
index 3ee31c1..5022ba8 100644
--- a/libs/meson.build
+++ b/libs/meson.build
@@ -16,21 +16,15 @@ curl_dep = dependency('libcurl')
fontconfig_dep = dependency('fontconfig')
freetype_dep = dependency('freetype2')
png_dep = dependency('libpng')
-podofo_dep = cpp.find_library('libpodofo', dirs: libdir)
+podofo_dep = dependency('libpodofo')
libxml2_dep = dependency('libxml-2.0', required: false)
xml2_dep = dependency('xml2', required: false)
zlib_dep = dependency('zlib')
inc_so = include_directories('pkcs11/src/.', 'shared/src/')
-inc_a = include_directories(
- 'sign-sdk/include',
- 'sign-sdk/include/podofo',
- 'sign-sdk/include/podofo/include',
- 'sign-sdk/include/podofo/include/podofo',
- 'sign-sdk/src',
- 'shared/src/',
-)
+inc_a = include_directories('sign-sdk/include', 'sign-sdk/src', 'shared/src/')
+
cie_pkcs11_sources = [
'shared/src/Util/log.cpp',
'shared/src/Util/funccallinfo.cpp',
diff --git a/libs/sign-sdk/include/PdfSignatureGenerator.h b/libs/sign-sdk/include/PdfSignatureGenerator.h
index 93ab445..65d438f 100644
--- a/libs/sign-sdk/include/PdfSignatureGenerator.h
+++ b/libs/sign-sdk/include/PdfSignatureGenerator.h
@@ -10,9 +10,7 @@
#ifndef _PDFSIGNATUREGENERATOR_H_
#define _PDFSIGNATUREGENERATOR_H_
#include "Util/UUCByteArray.h"
-#include "podofo/doc/PdfSignOutputDevice.h"
-#include "podofo/doc/PdfSignatureField.h"
-#include "podofo/podofo.h"
+#include <podofo/podofo.h>
using namespace PoDoFo;
using namespace std;
@@ -60,7 +58,11 @@ class PdfSignatureGenerator {
const double getHeight(int pageIndex);
private:
- PdfMemDocument* m_pPdfDocument;
+ PdfDocument* m_pPdfDocument;
+
+ PdfMemDocument* m_pPdfMemDocument;
+
+ PdfWriter* m_pPdfWriter;
PdfSignatureField* m_pSignatureField;
diff --git a/libs/sign-sdk/src/PdfSignatureGenerator.cpp b/libs/sign-sdk/src/PdfSignatureGenerator.cpp
index 44ef54a..e8b8c8e 100644
--- a/libs/sign-sdk/src/PdfSignatureGenerator.cpp
+++ b/libs/sign-sdk/src/PdfSignatureGenerator.cpp
@@ -27,7 +27,7 @@ int GetNumberOfSignatures(PdfMemDocument* pPdfDocument);
USE_LOG;
PdfSignatureGenerator::PdfSignatureGenerator()
- : m_pPdfDocument(NULL),
+ : m_pPdfMemDocument(NULL),
m_pSignatureField(NULL),
m_pSignOutputDevice(NULL),
m_pFinalOutDevice(NULL),
@@ -37,7 +37,7 @@ PdfSignatureGenerator::PdfSignatureGenerator()
}
PdfSignatureGenerator::~PdfSignatureGenerator() {
- if (m_pPdfDocument) delete m_pPdfDocument;
+ if (m_pPdfMemDocument) delete m_pPdfMemDocument;
if (m_pSignatureField) delete m_pSignatureField;
@@ -51,21 +51,21 @@ PdfSignatureGenerator::~PdfSignatureGenerator() {
}
int PdfSignatureGenerator::Load(const char* pdf, int len) {
- if (m_pPdfDocument) delete m_pPdfDocument;
+ if (m_pPdfMemDocument) delete m_pPdfMemDocument;
try {
printf("PDF LENGTH");
printf("%i", len);
printf("STOP");
- m_pPdfDocument = new PdfMemDocument();
- m_pPdfDocument->Load(pdf, len);
- printf("OK m_pPdfDocument");
- int nSigns = PDFVerifier::GetNumberOfSignatures(m_pPdfDocument);
+ m_pPdfMemDocument = new PdfMemDocument();
+ m_pPdfMemDocument->Load(pdf);
+ printf("OK m_pPdfMemDocument");
+ int nSigns = PDFVerifier::GetNumberOfSignatures(m_pPdfMemDocument);
printf("OK nSigns: %d", nSigns);
if (nSigns > 0) {
- m_pPdfDocument->SetIncrementalUpdates(true);
+ m_pPdfWriter->PdfWriter::SetIncrementalUpdate(true);
}
m_actualLen = len;
@@ -82,14 +82,8 @@ void PdfSignatureGenerator::AddFont(const char* szFontName,
// printf(szFontName);
// printf(szFontPath);
- m_pPdfDocument->CreateFont(
- szFontName, false, false,
- PdfEncodingFactory::GlobalWinAnsiEncodingInstance(),
- PdfFontCache::eFontCreationFlags_AutoSelectBase14, true, szFontPath);
- m_pPdfDocument->CreateFont(
- szFontName, true, false,
- PdfEncodingFactory::GlobalWinAnsiEncodingInstance(),
- PdfFontCache::eFontCreationFlags_AutoSelectBase14, true, szFontPath);
+ m_pPdfDocument->PoDoFo::PdfDocument::CreateFont( szFontName, false, PdfEncodingFactory::GlobalWinAnsiEncodingInstance(), PdfFontCache::eFontCreationFlags_AutoSelectBase14, true);
+ m_pPdfDocument->PoDoFo::PdfDocument::CreateFont( szFontName, true, PdfEncodingFactory::GlobalWinAnsiEncodingInstance(), PdfFontCache::eFontCreationFlags_AutoSelectBase14, true);
}
void PdfSignatureGenerator::InitSignature(
@@ -130,7 +124,7 @@ void PdfSignatureGenerator::InitSignature(
if (m_pSignatureField) delete m_pSignatureField;
- PdfPage* pPage = m_pPdfDocument->GetPage(pageIndex);
+ PdfPage* pPage = m_pPdfMemDocument->GetPage(pageIndex);
PdfRect cropBox = pPage->GetCropBox();
float left0 = left * cropBox.GetWidth();
@@ -145,15 +139,14 @@ void PdfSignatureGenerator::InitSignature(
LOG_DBG((0, "InitSignature", "PdfSignatureField"));
- m_pSignatureField = new PdfSignatureField(
- pPage, rect, m_pPdfDocument, PdfString(szFieldName), szSubFilter);
+ m_pSignatureField = new PdfSignatureField(pPage, rect, m_pPdfMemDocument);
LOG_DBG((0, "InitSignature", "PdfSignatureField OK"));
if (szReason && szReason[0]) {
PdfString reason(szReason);
PdfString reasonLabel(szReasonLabel);
- m_pSignatureField->SetSignatureReason(reasonLabel, reason);
+ m_pSignatureField->SetSignatureReason(reason);
}
LOG_DBG((0, "InitSignature", "szReason OK"));
@@ -161,7 +154,7 @@ void PdfSignatureGenerator::InitSignature(
if (szLocation && szLocation[0]) {
PdfString location(szLocation);
PdfString locationLabel(szLocationLabel);
- m_pSignatureField->SetSignatureLocation(locationLabel, location);
+ m_pSignatureField->SetSignatureLocation(location);
}
LOG_DBG((0, "InitSignature", "szLocation OK"));
@@ -171,54 +164,42 @@ void PdfSignatureGenerator::InitSignature(
LOG_DBG((0, "InitSignature", "Date OK"));
- if (szName && szName[0]) {
- PdfString name(szName);
- PdfString nameLabel(szNameLabel);
- m_pSignatureField->SetSignatureName(nameLabel, name);
- }
-
- LOG_DBG((0, "InitSignature", "szName OK"));
-
- m_pSignatureField->SetSignatureSize(SIGNATURE_SIZE);
+ m_pSignOutputDevice->PdfSignOutputDevice::SetSignatureSize(SIGNATURE_SIZE);
LOG_DBG((0, "InitSignature", "SIGNATURE_SIZE OK"));
- // if((szImagePath && szImagePath[0]) || (szDescription && szDescription[0]))
- if (width * height > 0) {
- try {
- // m_pSignatureField->SetFontSize(5);
- m_pSignatureField->SetAppearance(szImagePath, szDescription);
- LOG_DBG((0, "InitSignature", "SetAppearance OK"));
- } catch (PdfError& error) {
- LOG_ERR((0, "InitSignature", "SetAppearance error: %s, %s",
- PdfError::ErrorMessage(error.GetError()), error.what()));
- } catch (PdfError* perror) {
- LOG_ERR((0, "InitSignature", "SetAppearance error2: %s, %s",
- PdfError::ErrorMessage(perror->GetError()), perror->what()));
- } catch (std::exception& ex) {
- LOG_ERR(
- (0, "InitSignature", "SetAppearance std exception, %s", ex.what()));
- } catch (std::exception* pex) {
- LOG_ERR((0, "InitSignature", "SetAppearance std exception2, %s",
- pex->what()));
- } catch (...) {
- LOG_ERR((0, "InitSignature", "SetAppearance unknown error"));
- }
- }
+ // if (width * height > 0) {
+ // try {
+ // m_pSignatureField->SetAppearance(szImagePath, szDescription);
+ // LOG_DBG((0, "InitSignature", "SetAppearance OK"));
+ // } catch (PdfError& error) {
+ // LOG_ERR((0, "InitSignature", "SetAppearance error: %s, %s",
+ // PdfError::ErrorMessage(error.GetError()), error.what()));
+ // } catch (PdfError* perror) {
+ // LOG_ERR((0, "InitSignature", "SetAppearance error2: %s, %s",
+ // PdfError::ErrorMessage(perror->GetError()), perror->what()));
+ // } catch (std::exception& ex) {
+ // LOG_ERR(
+ // (0, "InitSignature", "SetAppearance std exception, %s",
+ // ex.what()));
+ // } catch (std::exception* pex) {
+ // LOG_ERR((0, "InitSignature", "SetAppearance std exception2, %s",
+ // pex->what()));
+ // } catch (...) {
+ // LOG_ERR((0, "InitSignature", "SetAppearance unknown error"));
+ // }
+ // }
- if (szGraphometricData && szGraphometricData[0])
- m_pSignatureField->SetGraphometricData(
- PdfString("Aruba_Sign_Biometric_Data"), PdfString(szGraphometricData),
- PdfString(szVersion));
+ // if (szGraphometricData && szGraphometricData[0])
+ // m_pSignatureField->SetGraphometricData(
+ // PdfString("Aruba_Sign_Biometric_Data"),
+ // PdfString(szGraphometricData), PdfString(szVersion));
- LOG_DBG((0, "InitSignature", "szGraphometricData OK"));
+ // LOG_DBG((0, "InitSignature", "szGraphometricData OK"));
LOG_DBG((0, "InitSignature", "m_actualLen %d", m_actualLen));
// crea il nuovo doc con il campo di firma
- int fulllen = m_actualLen * 2 + SIGNATURE_SIZE * 2 +
- (szGraphometricData
- ? (strlen(szGraphometricData) + strlen(szVersion) + 100)
- : 0);
+ int fulllen = m_actualLen * 2 + SIGNATURE_SIZE * 2;
int mainDoclen = 0;
m_pMainDocbuffer = NULL;
@@ -227,7 +208,7 @@ void PdfSignatureGenerator::InitSignature(
LOG_DBG((0, "InitSignature", "fulllen %d", fulllen));
m_pMainDocbuffer = new char[fulllen];
PdfOutputDevice pdfOutDevice(m_pMainDocbuffer, fulllen);
- m_pPdfDocument->Write(&pdfOutDevice);
+ m_pPdfMemDocument->Write(&pdfOutDevice);
mainDoclen = pdfOutDevice.GetLength();
} catch (::PoDoFo::PdfError err) {
if (m_pMainDocbuffer) {
@@ -301,32 +282,32 @@ void PdfSignatureGenerator::GetSignedPdf(UUCByteArray& signedPdf) {
}
const double PdfSignatureGenerator::getWidth(int pageIndex) {
- if (m_pPdfDocument) {
- PdfPage* pPage = m_pPdfDocument->GetPage(pageIndex);
+ if (m_pPdfMemDocument) {
+ PdfPage* pPage = m_pPdfMemDocument->GetPage(pageIndex);
return pPage->GetPageSize().GetWidth();
}
return 0;
}
const double PdfSignatureGenerator::getHeight(int pageIndex) {
- if (m_pPdfDocument) {
- PdfPage* pPage = m_pPdfDocument->GetPage(pageIndex);
+ if (m_pPdfMemDocument) {
+ PdfPage* pPage = m_pPdfMemDocument->GetPage(pageIndex);
return pPage->GetPageSize().GetHeight();
}
return 0;
}
const double PdfSignatureGenerator::lastSignatureY(int left, int bottom) {
- if (!m_pPdfDocument) return -1;
+ if (!m_pPdfMemDocument) return -1;
/// Find the document catalog dictionary
- const PdfObject* const trailer = m_pPdfDocument->GetTrailer();
+ const PdfObject* const trailer = m_pPdfMemDocument->GetTrailer();
if (!trailer->IsDictionary()) return -1;
const PdfObject* const catalogRef =
trailer->GetDictionary().GetKey(PdfName("Root"));
if (catalogRef == 0 || !catalogRef->IsReference())
return -2; // throw std::invalid_argument("Invalid /Root entry");
const PdfObject* const catalog =
- m_pPdfDocument->GetObjects().GetObject(catalogRef->GetReference());
+ m_pPdfMemDocument->GetObjects().GetObject(catalogRef->GetReference());
if (catalog == 0 || !catalog->IsDictionary())
return -3; // throw std::invalid_argument("Invalid or non-dictionary
// referenced by /Root entry");
@@ -336,8 +317,8 @@ const double PdfSignatureGenerator::lastSignatureY(int left, int bottom) {
catalog->GetDictionary().GetKey(PdfName("AcroForm"));
if (acroFormValue == 0) return bottom;
if (acroFormValue->IsReference())
- acroFormValue =
- m_pPdfDocument->GetObjects().GetObject(acroFormValue->GetReference());
+ acroFormValue = m_pPdfMemDocument->GetObjects().GetObject(
+ acroFormValue->GetReference());
if (!acroFormValue->IsDictionary()) return bottom;
@@ -346,8 +327,8 @@ const double PdfSignatureGenerator::lastSignatureY(int left, int bottom) {
if (fieldsValue == 0) return bottom;
if (fieldsValue->IsReference())
- fieldsValue =
- m_pPdfDocument->GetObjects().GetObject(acroFormValue->GetReference());
+ fieldsValue = m_pPdfMemDocument->GetObjects().GetObject(
+ acroFormValue->GetReference());
if (!fieldsValue->IsArray()) return bottom;
@@ -360,8 +341,8 @@ const double PdfSignatureGenerator::lastSignatureY(int left, int bottom) {
for (unsigned int i = 0; i < array.size(); i++) {
const PdfObject* pObj =
- m_pPdfDocument->GetObjects().GetObject(array[i].GetReference());
- if (IsSignatureField(m_pPdfDocument, pObj)) {
+ m_pPdfMemDocument->GetObjects().GetObject(array[i].GetReference());
+ if (IsSignatureField(m_pPdfMemDocument, pObj)) {
const PdfObject* const keyRect =
pObj->GetDictionary().GetKey(PdfName("Rect"));
if (keyRect == 0) {
diff --git a/libs/sign-sdk/src/disigonsdk.cpp b/libs/sign-sdk/src/disigonsdk.cpp
index 250c93f..84e1b0b 100644
--- a/libs/sign-sdk/src/disigonsdk.cpp
+++ b/libs/sign-sdk/src/disigonsdk.cpp
@@ -5,6 +5,7 @@
#include <libxml/tree.h>
#include <libxml/xmlmemory.h>
+#include <podofo/podofo.h>
#include <stdlib.h>
#include <string.h>

View File

@@ -33151,7 +33151,7 @@ with pkgs;
klayout = libsForQt5.callPackage ../applications/misc/klayout { };
klee = callPackage ../applications/science/logic/klee (with llvmPackages_12; {
klee = callPackage ../applications/science/logic/klee (with llvmPackages_13; {
clang = clang;
llvm = llvm;
stdenv = stdenv;