diff options
author | Lans Zhang <jia.zhang@windriver.com> | 2017-07-20 10:58:22 +0800 |
---|---|---|
committer | Lans Zhang <jia.zhang@windriver.com> | 2017-07-20 10:58:22 +0800 |
commit | 6fd899a8669c9b0f15bbeae9f62ad6c895cab186 (patch) | |
tree | f1090f5844b17a3916e447863fb1c8a8587cd924 | |
parent | 6f7bf76d94519cc390737468e6508c1704f27311 (diff) | |
download | meta-secure-core-6fd899a8669c9b0f15bbeae9f62ad6c895cab186.tar.gz |
openssl-tpm-engine: update to the latest and code style fixup
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
-rw-r--r-- | meta-tpm/recipes-tpm/openssl-tpm-engine/openssl-tpm-engine_git.bb (renamed from meta-tpm/recipes-tpm/openssl-tpm-engine/openssl-tpm-engine_0.4.2.bb) | 82 |
1 files changed, 45 insertions, 37 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_git.bb index 419bb27..987fc7a 100644 --- 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_git.bb | |||
@@ -1,24 +1,45 @@ | |||
1 | DESCRIPTION = " OpenSSL secure engine based on TPM hardware" | 1 | DESCRIPTION = "OpenSSL secure engine based on TPM hardware" |
2 | HOMEPAGE = "http://www.openssl.org/" | 2 | HOMEPAGE = "http://www.openssl.org/" |
3 | SECTION = "libs/network" | 3 | SECTION = "security/tpm" |
4 | |||
4 | LICENSE = "openssl" | 5 | LICENSE = "openssl" |
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=11f0ee3af475c85b907426e285c9bb52" | ||
5 | 7 | ||
6 | DEPENDS += "openssl trousers" | 8 | DEPENDS += "openssl trousers" |
7 | RDEPENDS_${PN} += "libcrypto libtspi" | 9 | |
10 | PV = "0.4.2+git${SRCPV}" | ||
8 | 11 | ||
9 | SRC_URI = "\ | 12 | SRC_URI = "\ |
10 | http://sourceforge.net/projects/trousers/files/OpenSSL%20TPM%20Engine/0.4.2/openssl_tpm_engine-0.4.2.tar.gz \ | 13 | git://git.code.sf.net/p/trousers/openssl_tpm_engine \ |
11 | file://0001-create-tpm-key-support-well-known-key-option.patch \ | 14 | file://0001-create-tpm-key-support-well-known-key-option.patch \ |
12 | file://0002-libtpm-support-env-TPM_SRK_PW.patch \ | 15 | file://0002-libtpm-support-env-TPM_SRK_PW.patch \ |
13 | file://0003-Fix-not-building-libtpm.la.patch \ | 16 | file://0003-Fix-not-building-libtpm.la.patch \ |
17 | file://0003-tpm-openssl-tpm-engine-parse-an-encrypted-tpm-SRK-pa.patch \ | ||
14 | " | 18 | " |
15 | SRC_URI[md5sum] = "5bc8d66399e517dde25ff55ce4c6560f" | 19 | SRCREV = "bbc2b1af809f20686e0d3553a62f0175742c0d60" |
16 | SRC_URI[sha256sum] = "2df697e583053f7047a89daa4585e21fc67cf4397ee34ece94cf2d4b4f7ab49c" | 20 | |
17 | LIC_FILES_CHKSUM = "file://LICENSE;md5=11f0ee3af475c85b907426e285c9bb52" | 21 | S = "${WORKDIR}/git" |
18 | 22 | ||
19 | inherit autotools-brokensep | 23 | inherit autotools-brokensep |
20 | 24 | ||
21 | S = "${WORKDIR}/openssl_tpm_engine-${PV}" | 25 | # The definitions below are used to decrypt the srk password. |
26 | # It is allowed to define the values in 3 forms: string, hex number and | ||
27 | # the hybrid, e.g, | ||
28 | # srk_dec_pw = "incendia" | ||
29 | # srk_dec_pw = "\x69\x6e\x63\x65\x6e\x64\x69\x61" | ||
30 | # srk_dec_pw = "\x1""nc""\x3""nd""\x1""a" | ||
31 | # | ||
32 | # Due to the limit of escape character, the hybrid must be written in | ||
33 | # above style. The actual values defined below in C code style are: | ||
34 | # srk_dec_pw[] = { 0x01, 'n', 'c', 0x03, 'n', 'd', 0x01, 'a' }; | ||
35 | # srk_dec_salt[] = { 'r', 0x00, 0x00, 't' }; | ||
36 | srk_dec_pw ?= "\\"\\\x1\\"\\"nc\\"\\"\\\x3\\"\\"nd\\"\\"\\\x1\\"\\"a\\"" | ||
37 | srk_dec_salt ?= "\\"r\\"\\"\\\x00\\\x00\\"\\"t\\"" | ||
38 | |||
39 | CFLAGS_append += "-DSRK_DEC_PW=${srk_dec_pw} -DSRK_DEC_SALT=${srk_dec_salt}" | ||
40 | |||
41 | # Uncomment below line if using the plain srk password for development | ||
42 | #CFLAGS_append += "-DTPM_SRK_PLAIN_PW" | ||
22 | 43 | ||
23 | do_configure_prepend() { | 44 | do_configure_prepend() { |
24 | cd "${S}" | 45 | cd "${S}" |
@@ -26,17 +47,6 @@ do_configure_prepend() { | |||
26 | touch NEWS AUTHORS ChangeLog | 47 | touch NEWS AUTHORS ChangeLog |
27 | } | 48 | } |
28 | 49 | ||
29 | FILES_${PN}-staticdev += "${libdir}/ssl/engines/libtpm.la" | ||
30 | FILES_${PN}-dbg += "${libdir}/ssl/engines/.debug \ | ||
31 | ${libdir}/engines/.debug \ | ||
32 | ${prefix}/local/ssl/lib/engines/.debug \ | ||
33 | " | ||
34 | FILES_${PN} += "${libdir}/ssl/engines/libtpm.so* \ | ||
35 | ${libdir}/engines/libtpm.so* \ | ||
36 | ${libdir}/libtpm.so* \ | ||
37 | ${prefix}/local/ssl/lib/engines/libtpm.so* \ | ||
38 | " | ||
39 | |||
40 | do_install_append() { | 50 | do_install_append() { |
41 | install -m 0755 -d "${D}${libdir}/engines" | 51 | install -m 0755 -d "${D}${libdir}/engines" |
42 | install -m 0755 -d "${D}${prefix}/local/ssl/lib/engines" | 52 | install -m 0755 -d "${D}${prefix}/local/ssl/lib/engines" |
@@ -50,24 +60,22 @@ do_install_append() { | |||
50 | rm -rf "${D}${libdir}/openssl" | 60 | rm -rf "${D}${libdir}/openssl" |
51 | } | 61 | } |
52 | 62 | ||
53 | INSANE_SKIP_${PN} = "libdir" | 63 | FILES_${PN}-staticdev += "${libdir}/ssl/engines/libtpm.la" |
54 | INSANE_SKIP_${PN}-dbg = "libdir" | 64 | FILES_${PN}-dbg += "\ |
65 | ${libdir}/ssl/engines/.debug \ | ||
66 | ${libdir}/engines/.debug \ | ||
67 | ${prefix}/local/ssl/lib/engines/.debug \ | ||
68 | " | ||
69 | FILES_${PN} += "\ | ||
70 | ${libdir}/ssl/engines/libtpm.so* \ | ||
71 | ${libdir}/engines/libtpm.so* \ | ||
72 | ${libdir}/libtpm.so* \ | ||
73 | ${prefix}/local/ssl/lib/engines/libtpm.so* \ | ||
74 | " | ||
55 | 75 | ||
56 | # The definitions below are used to decrypt the srk password. | 76 | RDEPENDS_${PN} += "libcrypto libtspi" |
57 | # It is allowed to define the values in 3 forms: string, hex number and | ||
58 | # the hybrid, e.g, | ||
59 | # srk_dec_pw = "incendia" | ||
60 | # srk_dec_pw = "\x69\x6e\x63\x65\x6e\x64\x69\x61" | ||
61 | # srk_dec_pw = "\x1""nc""\x3""nd""\x1""a" | ||
62 | # | ||
63 | # Due to the limit of escape character, the hybrid must be written in | ||
64 | # above style. The actual values defined below in C code style are: | ||
65 | # srk_dec_pw[] = { 0x01, 'n', 'c', 0x03, 'n', 'd', 0x01, 'a' }; | ||
66 | # srk_dec_salt[] = { 'r', 0x00, 0x00, 't' }; | ||
67 | srk_dec_pw ?= "\\"\\\x1\\"\\"nc\\"\\"\\\x3\\"\\"nd\\"\\"\\\x1\\"\\"a\\"" | ||
68 | srk_dec_salt ?= "\\"r\\"\\"\\\x00\\\x00\\"\\"t\\"" | ||
69 | 77 | ||
70 | CFLAGS_append += "-DSRK_DEC_PW=${srk_dec_pw} -DSRK_DEC_SALT=${srk_dec_salt}" | 78 | INSANE_SKIP_${PN} = "libdir" |
79 | INSANE_SKIP_${PN}-dbg = "libdir" | ||
71 | 80 | ||
72 | # Uncomment below line if using the plain srk password for development | 81 | RDEPENDS_${PN} += "libcrypto libtspi" |
73 | #CFLAGS_append += "-DTPM_SRK_PLAIN_PW" | ||