Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "A PKCS#11 interface for TPM2 hardware" |
| 2 | DESCRIPTION = "PKCS #11 is a Public-Key Cryptography Standard that defines a standard method to access cryptographic services from tokens/ devices such as hardware security modules (HSM), smart cards, etc. In this project we intend to use a TPM2 device as the cryptographic token." |
| 3 | SECTION = "security/tpm" |
| 4 | LICENSE = "BSD-2-Clause" |
Andrew Geissler | 064f75b | 2020-06-27 00:14:46 -0500 | [diff] [blame] | 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=0fc19f620a102768d6dbd1e7166e78ab" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 6 | |
William A. Kennington III | ee32beb | 2021-06-02 12:48:35 -0700 | [diff] [blame] | 7 | DEPENDS = "autoconf-archive pkgconfig dstat sqlite3 openssl libtss2-dev tpm2-tools libyaml p11-kit python3-setuptools-native" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 8 | |
Patrick Williams | 53961c2 | 2022-01-20 11:06:23 -0600 | [diff] [blame^] | 9 | SRC_URI = "git://github.com/tpm2-software/tpm2-pkcs11.git;branch=master;protocol=https \ |
Andrew Geissler | d1d22e6 | 2020-10-16 10:14:32 -0500 | [diff] [blame] | 10 | file://bootstrap_fixup.patch \ |
William A. Kennington III | ee32beb | 2021-06-02 12:48:35 -0700 | [diff] [blame] | 11 | file://0001-remove-local-binary-checkes.patch \ |
Patrick Williams | 53961c2 | 2022-01-20 11:06:23 -0600 | [diff] [blame^] | 12 | file://0001-ssl-compile-against-OSSL-3.0.patch \ |
| 13 | file://0002-ossl-require-version-1.1.0-or-greater.patch \ |
William A. Kennington III | ee32beb | 2021-06-02 12:48:35 -0700 | [diff] [blame] | 14 | " |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 15 | |
Patrick Williams | 53961c2 | 2022-01-20 11:06:23 -0600 | [diff] [blame^] | 16 | SRCREV = "11fd2532ce10e97834a57dfb25bff6c613a5a851" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 17 | |
| 18 | S = "${WORKDIR}/git" |
| 19 | |
Andrew Geissler | 015e6aa | 2021-01-08 16:10:30 -0600 | [diff] [blame] | 20 | inherit autotools-brokensep pkgconfig python3native |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 21 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 22 | do_configure:prepend () { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 23 | ${S}/bootstrap |
| 24 | } |
Andrew Geissler | d1d22e6 | 2020-10-16 10:14:32 -0500 | [diff] [blame] | 25 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 26 | do_compile:append() { |
Andrew Geissler | 015e6aa | 2021-01-08 16:10:30 -0600 | [diff] [blame] | 27 | cd ${S}/tools |
| 28 | python3 setup.py build |
| 29 | } |
| 30 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 31 | do_install:append() { |
William A. Kennington III | ee32beb | 2021-06-02 12:48:35 -0700 | [diff] [blame] | 32 | install -d ${D}${libdir}/pkcs11 |
| 33 | install -d ${D}${datadir}/p11-kit |
| 34 | rm -f ${D}${libdir}/pkcs11/libtpm2_pkcs11.so |
| 35 | |
Andrew Geissler | 015e6aa | 2021-01-08 16:10:30 -0600 | [diff] [blame] | 36 | cd ${S}/tools |
| 37 | export PYTHONPATH="${D}${PYTHON_SITEPACKAGES_DIR}" |
| 38 | ${PYTHON_PN} setup.py install --root="${D}" --prefix="${prefix}" --install-lib="${PYTHON_SITEPACKAGES_DIR}" --optimize=1 --skip-build |
| 39 | |
| 40 | sed -i -e "s:${PYTHON}:${USRBINPATH}/env ${PYTHON_PN}:g" "${D}${bindir}"/tpm2_ptool |
| 41 | } |
| 42 | |
Andrew Geissler | 015e6aa | 2021-01-08 16:10:30 -0600 | [diff] [blame] | 43 | PACKAGES =+ "${PN}-tools" |
Andrew Geissler | 015e6aa | 2021-01-08 16:10:30 -0600 | [diff] [blame] | 44 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 45 | FILES:${PN}-tools = "\ |
Andrew Geissler | 015e6aa | 2021-01-08 16:10:30 -0600 | [diff] [blame] | 46 | ${bindir}/tpm2_ptool \ |
| 47 | ${libdir}/${PYTHON_DIR}/* \ |
William A. Kennington III | ee32beb | 2021-06-02 12:48:35 -0700 | [diff] [blame] | 48 | " |
| 49 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 50 | FILES:${PN} += "\ |
William A. Kennington III | ee32beb | 2021-06-02 12:48:35 -0700 | [diff] [blame] | 51 | ${libdir}/pkcs11/* \ |
| 52 | ${datadir}/p11-kit/* \ |
| 53 | " |
| 54 | |
| 55 | RDEPNDS_${PN} = "tpm2-tools" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 56 | RDEPENDS:${PN}-tools += "${PYTHON_PN}-setuptools ${PYTHON_PN}-pyyaml ${PYTHON_PN}-cryptography ${PYTHON_PN}-pyasn1-modules" |