From 2437b59141238736fa3af1b855c508912a88ad27 Mon Sep 17 00:00:00 2001 From: Dadoum Date: Sat, 21 Oct 2023 00:43:38 +0200 Subject: [PATCH] Fix Arch Linux crash on app selection --- source/cms/cms_dec.d | 5 +---- source/sideload/macho.d | 9 ++++----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/source/cms/cms_dec.d b/source/cms/cms_dec.d index e8a63c7..40764a7 100644 --- a/source/cms/cms_dec.d +++ b/source/cms/cms_dec.d @@ -6,11 +6,8 @@ import botan.asn1.ber_dec; import botan.asn1.oids; import botan.codec.pem; -static this() { - OIDS.setDefaults(); -} - ubyte[] dataFromCMS(DataSource source) { + OIDS.setDefaults(); if (!maybeBER(source) || PEM.matches(source)) { source = cast(DataSource) DataSourceMemory(PEM.decodeCheckLabel(source, "PKCS7")); } diff --git a/source/sideload/macho.d b/source/sideload/macho.d index 26733d4..dcc7f84 100644 --- a/source/sideload/macho.d +++ b/source/sideload/macho.d @@ -42,10 +42,6 @@ version (BigEndian) { static assert(false, "Big endian systems are not supported"); } -static this() { - OIDS.setDefaults(); -} - /// Will only parse little-endian on little-endian /// I have code which is more versatile, but since it's useless (almost everything is little-endian now), /// and is way more complex I won't put it here for now. @@ -770,7 +766,10 @@ class SignatureBlob: Blob { this.hashers = hashers; } - ref DEREncoder encodeBlob(return ref DEREncoder der, ubyte[][] codeDirectories) { // made to match as closely as possible zsign + ref DEREncoder encodeBlob(return ref DEREncoder der, ubyte[][] codeDirectories) { + // made to match as closely as possible zsign + OIDS.setDefaults(); + auto rng = identity.rng; PKSigner signer = PKSigner(identity.privateKey, "EMSA3(SHA-256)");