| 1 |
install_data([ |
| 2 |
'firmware.bin', |
| 3 |
'firmware.bin.asc', |
| 4 |
'firmware.bin.ed25519', |
| 5 |
'firmware.bin.p7b', |
| 6 |
], |
| 7 |
install_dir: join_paths(installed_test_datadir, 'colorhug'), |
| 8 |
) |
| 9 |
|
| 10 |
if certtool.found() |
| 11 |
# generate self-signed detached signature |
| 12 |
colorhug_pkcs7_signature = custom_target('firmware.bin.p7c', |
| 13 |
input: 'firmware.bin', |
| 14 |
output: 'firmware.bin.p7c', |
| 15 |
command: [certtool, '--p7-detached-sign', |
| 16 |
'--p7-time', |
| 17 |
'--load-privkey', pkcs7_privkey, |
| 18 |
'--load-certificate', pkcs7_certificate, |
| 19 |
'--infile', '@INPUT@', |
| 20 |
'--outfile', '@OUTPUT@'], |
| 21 |
install: true, |
| 22 |
install_dir: join_paths(installed_test_datadir, 'colorhug'), |
| 23 |
) |
| 24 |
|
| 25 |
# generate self-signed detached signature *of the checksum* |
| 26 |
colorhug_pkcs7_signature_hash = custom_target('firmware.bin.sha256.p7c', |
| 27 |
input: 'firmware.bin.sha256', |
| 28 |
output: 'firmware.bin.sha256.p7c', |
| 29 |
command: [certtool, '--p7-detached-sign', |
| 30 |
'--p7-time', |
| 31 |
'--load-privkey', pkcs7_privkey, |
| 32 |
'--load-certificate', pkcs7_certificate, |
| 33 |
'--infile', '@INPUT@', |
| 34 |
'--outfile', '@OUTPUT@'], |
| 35 |
install: true, |
| 36 |
install_dir: join_paths(installed_test_datadir, 'colorhug'), |
| 37 |
) |
| 38 |
|
| 39 |
endif |