mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-14 16:11:22 +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
|
endif
|
||||||
|
|
||||||
# generate self-signed detached signature
|
if get_option('pkcs7')
|
||||||
colorhug_pkcs7_signature = custom_target('firmware.bin.p7c',
|
# generate self-signed detached signature
|
||||||
input: 'firmware.bin',
|
colorhug_pkcs7_signature = custom_target('firmware.bin.p7c',
|
||||||
output: 'firmware.bin.p7c',
|
input: 'firmware.bin',
|
||||||
command: [certtool, '--p7-detached-sign',
|
output: 'firmware.bin.p7c',
|
||||||
'--p7-time',
|
command: [certtool, '--p7-detached-sign',
|
||||||
'--load-privkey', pkcs7_privkey,
|
'--p7-time',
|
||||||
'--load-certificate', pkcs7_certificate,
|
'--load-privkey', pkcs7_privkey,
|
||||||
'--infile', '@INPUT@',
|
'--load-certificate', pkcs7_certificate,
|
||||||
'--outfile', '@OUTPUT@'],
|
'--infile', '@INPUT@',
|
||||||
)
|
'--outfile', '@OUTPUT@'],
|
||||||
|
)
|
||||||
|
endif
|
||||||
|
@ -154,7 +154,7 @@ else
|
|||||||
endif
|
endif
|
||||||
soup = dependency('libsoup-2.4', version : '>= 2.51.92')
|
soup = dependency('libsoup-2.4', version : '>= 2.51.92')
|
||||||
if get_option('pkcs7')
|
if get_option('pkcs7')
|
||||||
gnutls = dependency('gnutls')
|
gnutls = dependency('gnutls', version : '>= 3.4.4.1')
|
||||||
conf.set('ENABLE_PKCS7', '1')
|
conf.set('ENABLE_PKCS7', '1')
|
||||||
endif
|
endif
|
||||||
if get_option('gpg')
|
if get_option('gpg')
|
||||||
|
@ -6,6 +6,7 @@ install_data(['org.freedesktop.fwupd.xml'],
|
|||||||
|
|
||||||
keyring_deps = []
|
keyring_deps = []
|
||||||
keyring_src = []
|
keyring_src = []
|
||||||
|
test_deps = []
|
||||||
|
|
||||||
if get_option('gpg')
|
if get_option('gpg')
|
||||||
keyring_src += 'fu-keyring-gpg.c'
|
keyring_src += 'fu-keyring-gpg.c'
|
||||||
@ -16,6 +17,7 @@ endif
|
|||||||
if get_option('pkcs7')
|
if get_option('pkcs7')
|
||||||
keyring_src += 'fu-keyring-pkcs7.c'
|
keyring_src += 'fu-keyring-pkcs7.c'
|
||||||
keyring_deps += gnutls
|
keyring_deps += gnutls
|
||||||
|
test_deps += colorhug_pkcs7_signature
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libfwupdprivate = static_library(
|
libfwupdprivate = static_library(
|
||||||
@ -182,10 +184,10 @@ if get_option('tests')
|
|||||||
'fu-self-test',
|
'fu-self-test',
|
||||||
resources_src,
|
resources_src,
|
||||||
colorhug_test_firmware,
|
colorhug_test_firmware,
|
||||||
colorhug_pkcs7_signature,
|
|
||||||
builder_test_firmware,
|
builder_test_firmware,
|
||||||
hwid_test_firmware,
|
hwid_test_firmware,
|
||||||
noreqs_test_firmware,
|
noreqs_test_firmware,
|
||||||
|
test_deps,
|
||||||
sources : [
|
sources : [
|
||||||
keyring_src,
|
keyring_src,
|
||||||
'fu-self-test.c',
|
'fu-self-test.c',
|
||||||
|
Loading…
Reference in New Issue
Block a user