Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | DESCRIPTION = "OpenSSL secure engine based on TPM hardware" |
| 2 | HOMEPAGE = "https://github.com/mgerstner/openssl_tpm_engine" |
| 3 | SECTION = "security/tpm" |
| 4 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 5 | LICENSE = "OpenSSL" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=11f0ee3af475c85b907426e285c9bb52" |
| 7 | |
| 8 | DEPENDS += "openssl trousers" |
| 9 | |
| 10 | SRC_URI = "\ |
Patrick Williams | 53961c2 | 2022-01-20 11:06:23 -0600 | [diff] [blame] | 11 | git://github.com/mgerstner/openssl_tpm_engine.git;branch=master;protocol=https \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 12 | file://0001-create-tpm-key-support-well-known-key-option.patch \ |
| 13 | file://0002-libtpm-support-env-TPM_SRK_PW.patch \ |
| 14 | file://0003-tpm-openssl-tpm-engine-parse-an-encrypted-tpm-SRK-pa.patch \ |
| 15 | file://0004-tpm-openssl-tpm-engine-change-variable-c-type-from-c.patch \ |
| 16 | file://openssl11_build_fix.patch \ |
| 17 | " |
| 18 | SRCREV = "b28de5065e6eb9aa5d5afe2276904f7624c2cbaf" |
| 19 | |
| 20 | S = "${WORKDIR}/git" |
| 21 | |
| 22 | inherit autotools-brokensep pkgconfig |
| 23 | |
| 24 | # The definitions below are used to decrypt the srk password. |
| 25 | # It is allowed to define the values in 3 forms: string, hex number and |
| 26 | # the hybrid, e.g, |
| 27 | # srk_dec_pw = "incendia" |
| 28 | # srk_dec_pw = "\x69\x6e\x63\x65\x6e\x64\x69\x61" |
| 29 | # srk_dec_pw = "\x1""nc""\x3""nd""\x1""a" |
| 30 | # |
| 31 | # Due to the limit of escape character, the hybrid must be written in |
| 32 | # above style. The actual values defined below in C code style are: |
| 33 | # srk_dec_pw[] = { 0x01, 'n', 'c', 0x03, 'n', 'd', 0x01, 'a' }; |
| 34 | # srk_dec_salt[] = { 'r', 0x00, 0x00, 't' }; |
| 35 | srk_dec_pw ?= "\\"\\\x1\\"\\"nc\\"\\"\\\x3\\"\\"nd\\"\\"\\\x1\\"\\"a\\"" |
| 36 | srk_dec_salt ?= "\\"r\\"\\"\\\x00\\\x00\\"\\"t\\"" |
| 37 | |
Patrick Williams | 53961c2 | 2022-01-20 11:06:23 -0600 | [diff] [blame] | 38 | CFLAGS:append = " -DSRK_DEC_PW=${srk_dec_pw} -DSRK_DEC_SALT=${srk_dec_salt}" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 39 | |
| 40 | # Uncomment below line if using the plain srk password for development |
Patrick Williams | 53961c2 | 2022-01-20 11:06:23 -0600 | [diff] [blame] | 41 | #CFLAGS:append = " -DTPM_SRK_PLAIN_PW" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 42 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 43 | do_configure:prepend() { |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 44 | cd ${B} |
| 45 | cp LICENSE COPYING |
| 46 | touch NEWS AUTHORS ChangeLog README |
| 47 | } |
| 48 | |
Patrick Williams | 53961c2 | 2022-01-20 11:06:23 -0600 | [diff] [blame] | 49 | FILES:${PN}-staticdev += "${libdir}/ssl/engines-3/tpm.la" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 50 | FILES:${PN}-dbg += "\ |
Patrick Williams | 53961c2 | 2022-01-20 11:06:23 -0600 | [diff] [blame] | 51 | ${libdir}/ssl/engines-3/.debug \ |
| 52 | ${libdir}/engines-3/.debug \ |
| 53 | ${prefix}/local/ssl/lib/engines-3/.debug \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 54 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 55 | FILES:${PN} += "\ |
Patrick Williams | 53961c2 | 2022-01-20 11:06:23 -0600 | [diff] [blame] | 56 | ${libdir}/ssl/engines-3/tpm.so* \ |
| 57 | ${libdir}/engines-3/tpm.so* \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 58 | ${libdir}/libtpm.so* \ |
Patrick Williams | 53961c2 | 2022-01-20 11:06:23 -0600 | [diff] [blame] | 59 | ${prefix}/local/ssl/lib/engines-3/tpm.so* \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 60 | " |
| 61 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 62 | RDEPENDS:${PN} += "libcrypto libtspi" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 63 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 64 | INSANE_SKIP:${PN} = "libdir" |
| 65 | INSANE_SKIP:${PN}-dbg = "libdir" |