From: Daan De Meyer Date: Tue, 25 Feb 2025 07:32:33 +0000 (+0100) Subject: bootctl-install: Use i2d_PKCS7() instead of i2d_PKCS7_SIGNED() X-Git-Tag: v258-rc1~1266 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5bfd056c19b589b1322c257702b32add1e209ca;p=thirdparty%2Fsystemd.git bootctl-install: Use i2d_PKCS7() instead of i2d_PKCS7_SIGNED() For a detached signature, these are equivalent so let's use i2d_PKCS7() like we do everywhere else. --- diff --git a/src/bootctl/bootctl-install.c b/src/bootctl/bootctl-install.c index 884521bcfa9..4171e4aeee0 100644 --- a/src/bootctl/bootctl-install.c +++ b/src/bootctl/bootctl-install.c @@ -683,7 +683,7 @@ static int install_secure_boot_auto_enroll(const char *esp, X509 *certificate, E ERR_error_string(ERR_get_error(), NULL)); _cleanup_free_ uint8_t *sig = NULL; - int sigsz = i2d_PKCS7_SIGNED(p7->d.sign, &sig); + int sigsz = i2d_PKCS7(p7, &sig); if (sigsz < 0) return log_error_errno(SYNTHETIC_ERRNO(EIO), "Failed to convert PKCS7 signature to DER: %s", ERR_error_string(ERR_get_error(), NULL));