1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-19 22:50:17 +03:00

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.
This commit is contained in:
Daan De Meyer 2025-02-25 08:32:33 +01:00 committed by Luca Boccassi
parent 1930f5afe6
commit a5bfd056c1

View File

@ -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));