diff options
Diffstat (limited to 'meta-tpm/recipes-tpm/openssl-tpm-engine/openssl-tpm-engine_0.4.2.bb')
-rw-r--r-- | meta-tpm/recipes-tpm/openssl-tpm-engine/openssl-tpm-engine_0.4.2.bb | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/meta-tpm/recipes-tpm/openssl-tpm-engine/openssl-tpm-engine_0.4.2.bb b/meta-tpm/recipes-tpm/openssl-tpm-engine/openssl-tpm-engine_0.4.2.bb new file mode 100644 index 0000000..4854f70 --- /dev/null +++ b/meta-tpm/recipes-tpm/openssl-tpm-engine/openssl-tpm-engine_0.4.2.bb | |||
@@ -0,0 +1,78 @@ | |||
1 | DESCRIPTION = "OpenSSL secure engine based on TPM hardware" | ||
2 | HOMEPAGE = "https://sourceforge.net/projects/trousers/" | ||
3 | SECTION = "security/tpm" | ||
4 | |||
5 | LICENSE = "openssl" | ||
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=11f0ee3af475c85b907426e285c9bb52" | ||
7 | |||
8 | DEPENDS += "openssl trousers" | ||
9 | |||
10 | SRC_URI = "\ | ||
11 | git://git.code.sf.net/p/trousers/openssl_tpm_engine \ | ||
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-Fix-not-building-libtpm.la.patch \ | ||
15 | file://0003-tpm-openssl-tpm-engine-parse-an-encrypted-tpm-SRK-pa.patch \ | ||
16 | file://0004-tpm-openssl-tpm-engine-change-variable-c-type-from-c.patch \ | ||
17 | " | ||
18 | SRCREV = "bbc2b1af809f20686e0d3553a62f0175742c0d60" | ||
19 | |||
20 | S = "${WORKDIR}/git" | ||
21 | |||
22 | inherit autotools-brokensep | ||
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 | |||
38 | CFLAGS_append += "-DSRK_DEC_PW=${srk_dec_pw} -DSRK_DEC_SALT=${srk_dec_salt}" | ||
39 | |||
40 | # Uncomment below line if using the plain srk password for development | ||
41 | #CFLAGS_append += "-DTPM_SRK_PLAIN_PW" | ||
42 | |||
43 | do_configure_prepend() { | ||
44 | cd "${S}" | ||
45 | cp LICENSE COPYING | ||
46 | touch NEWS AUTHORS ChangeLog | ||
47 | } | ||
48 | |||
49 | do_install_append() { | ||
50 | install -m 0755 -d "${D}${libdir}/engines" | ||
51 | install -m 0755 -d "${D}${prefix}/local/ssl/lib/engines" | ||
52 | install -m 0755 -d "${D}${libdir}/ssl/engines" | ||
53 | |||
54 | cp -f "${D}${libdir}/openssl/engines/libtpm.so.0.0.0" "${D}${libdir}/libtpm.so.0" | ||
55 | cp -f "${D}${libdir}/openssl/engines/libtpm.so.0.0.0" "${D}${libdir}/engines/libtpm.so" | ||
56 | cp -f "${D}${libdir}/openssl/engines/libtpm.so.0.0.0" "${D}${prefix}/local/ssl/lib/engines/libtpm.so" | ||
57 | mv -f "${D}${libdir}/openssl/engines/libtpm.so.0.0.0" "${D}${libdir}/ssl/engines/libtpm.so" | ||
58 | mv -f "${D}${libdir}/openssl/engines/libtpm.la" "${D}${libdir}/ssl/engines/libtpm.la" | ||
59 | rm -rf "${D}${libdir}/openssl" | ||
60 | } | ||
61 | |||
62 | FILES_${PN}-staticdev += "${libdir}/ssl/engines/libtpm.la" | ||
63 | FILES_${PN}-dbg += "\ | ||
64 | ${libdir}/ssl/engines/.debug \ | ||
65 | ${libdir}/engines/.debug \ | ||
66 | ${prefix}/local/ssl/lib/engines/.debug \ | ||
67 | " | ||
68 | FILES_${PN} += "\ | ||
69 | ${libdir}/ssl/engines/libtpm.so* \ | ||
70 | ${libdir}/engines/libtpm.so* \ | ||
71 | ${libdir}/libtpm.so* \ | ||
72 | ${prefix}/local/ssl/lib/engines/libtpm.so* \ | ||
73 | " | ||
74 | |||
75 | RDEPENDS_${PN} += "libcrypto libtspi" | ||
76 | |||
77 | INSANE_SKIP_${PN} = "libdir" | ||
78 | INSANE_SKIP_${PN}-dbg = "libdir" | ||