mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-14 05:57:41 +00:00
Only run certtool if a new enough gnutls was on system and pkcs7 enabled
This commit is contained in:
parent
6b9f07cbf7
commit
e00d05d033
@ -13,14 +13,16 @@ if gcab.found()
|
||||
)
|
||||
endif
|
||||
|
||||
# generate self-signed detached signature
|
||||
colorhug_pkcs7_signature = custom_target('firmware.bin.p7c',
|
||||
input: 'firmware.bin',
|
||||
output: 'firmware.bin.p7c',
|
||||
command: [certtool, '--p7-detached-sign',
|
||||
'--p7-time',
|
||||
'--load-privkey', pkcs7_privkey,
|
||||
'--load-certificate', pkcs7_certificate,
|
||||
'--infile', '@INPUT@',
|
||||
'--outfile', '@OUTPUT@'],
|
||||
)
|
||||
if get_option('pkcs7')
|
||||
# generate self-signed detached signature
|
||||
colorhug_pkcs7_signature = custom_target('firmware.bin.p7c',
|
||||
input: 'firmware.bin',
|
||||
output: 'firmware.bin.p7c',
|
||||
command: [certtool, '--p7-detached-sign',
|
||||
'--p7-time',
|
||||
'--load-privkey', pkcs7_privkey,
|
||||
'--load-certificate', pkcs7_certificate,
|
||||
'--infile', '@INPUT@',
|
||||
'--outfile', '@OUTPUT@'],
|
||||
)
|
||||
endif
|
||||
|
@ -154,7 +154,7 @@ else
|
||||
endif
|
||||
soup = dependency('libsoup-2.4', version : '>= 2.51.92')
|
||||
if get_option('pkcs7')
|
||||
gnutls = dependency('gnutls')
|
||||
gnutls = dependency('gnutls', version : '>= 3.4.4.1')
|
||||
conf.set('ENABLE_PKCS7', '1')
|
||||
endif
|
||||
if get_option('gpg')
|
||||
|
@ -6,6 +6,7 @@ install_data(['org.freedesktop.fwupd.xml'],
|
||||
|
||||
keyring_deps = []
|
||||
keyring_src = []
|
||||
test_deps = []
|
||||
|
||||
if get_option('gpg')
|
||||
keyring_src += 'fu-keyring-gpg.c'
|
||||
@ -16,6 +17,7 @@ endif
|
||||
if get_option('pkcs7')
|
||||
keyring_src += 'fu-keyring-pkcs7.c'
|
||||
keyring_deps += gnutls
|
||||
test_deps += colorhug_pkcs7_signature
|
||||
endif
|
||||
|
||||
libfwupdprivate = static_library(
|
||||
@ -182,10 +184,10 @@ if get_option('tests')
|
||||
'fu-self-test',
|
||||
resources_src,
|
||||
colorhug_test_firmware,
|
||||
colorhug_pkcs7_signature,
|
||||
builder_test_firmware,
|
||||
hwid_test_firmware,
|
||||
noreqs_test_firmware,
|
||||
test_deps,
|
||||
sources : [
|
||||
keyring_src,
|
||||
'fu-self-test.c',
|
||||
|
Loading…
Reference in New Issue
Block a user