31 Commits

Author SHA1 Message Date
Kai Kang 1a74be5b36 cryptfs-tpm2: fix ld warnings with binutils 2.39
Add ld option '-z noexecstack' for cryptfs-tpm2 to fix link warnings:

  ld: warning: secret_area.o: missing .note.GNU-stack section implies executable stack
  ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker

Signed-off-by: Kai Kang <kai.kang@windriver.com>
2022-08-24 21:22:50 +08:00
Yi Zhao fea6a37625 recipes: update SRC_URI branch and protocols
Update SRC_URIs using git to include branch=master if no branch is set
and also to use protocol=https for github urls.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2021-11-15 09:56:02 +08:00
Yi Zhao 4ddcbda60d cryptfs-tpm2: upgrade to latest git rev
Drop backported patches.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2021-11-12 16:52:32 +08:00
Yi Zhao b988150cf3 cryptfs-tpm2: fix encrypt_secret.py for python3
Fixes:
encrypt_secret.py -i "H31i05" > "primary_key.secret" || exit 1
ERROR: Unable to encrypt the secret

Suggested-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2021-08-20 18:36:08 +08:00
Yi Zhao e004d37650 cryptfs-tpm2: fix LDFLAGS expansion
When LDFLAGS expands, The -fmacro-prefix-map and -fdebug-prefix-map will
be prefixed with -Wl, which will cause compilation error:
ld: -f may not be used without -shared

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2021-08-20 15:59:51 +08:00
Yi Zhao 4042043742 meta-secure-core: Convert to new override syntax
Converting the metadata to use ":" as the override character instead of "_".

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2021-08-09 18:51:13 +08:00
Yi Zhao 6768abc7d4 cryptfs-tpm2: fix build reproducibility issue
Fixes:
| main.c: In function 'show_banner':
| main.c:43:62: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
|    43 |         info_cont("Build Time: " __DATE__ " " __TIME__ "\n\n");
|       |                                                              ^
| main.c:43:34: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
|    43 |         info_cont("Build Time: " __DATE__ " " __TIME__ "\n\n");
|       |                                  ^~~~~~~~
| cc1: all warnings being treated as errors

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2021-08-09 18:51:13 +08:00
Yi Zhao ddbcb4722a cyrptfs-tpm2: set correct soname for libcryptfs-tpm2
The current soname of libcryptfs-tpm2 is libcryptfs-tpm2.so:
$ readelf -d libcryptfs-tpm2.so.0.7.0 | grep SONAME
0x000000000000000e (SONAME)    Library soname: [libcryptfs-tpm2.so]

The libcryptfs-tpm2.so is a symbolic link of libcryptfs-tmp2.so.0.7.0
and it is not installed by default because it is packaged to dev
package. Then we will encounter an error when run command cryptfs-tpm2:
$ cryptfs-tpm2
cryptfs-tpm2: error while loading shared libraries: libcryptfs-tpm2.so:
cannot open shared object file: No such file or directory
$ ldd cryptfs-tpm2 | grep libcryptfs-tpm2
    libcryptfs-tpm2.so => not found

Set the soname to libcryptfs-tpm2.so.$(MAJOR_VERSION) to fix the issue.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2020-07-18 20:46:44 +08:00
richard 3590e302df update tpm2-tools_3.2.1 -> tpm2-tools_4.1.1.bb, tpm2-abrmd_2.0.3 -> tpm2-abrmd_2.3.0, tpm2-tss_2.2.3.bb -> tpm2-tss_2.3.2.bb 2020-06-27 19:01:35 +08:00
Yi Zhao e8e80fb7c4 cryptfs-tpm2: convert the script to python3
Convert the script to python3 to fix the do_compile failure.

Fixes:
/buildarea/poky/build/tmp/work/core2-64-poky-linux/cryptfs-tpm2/0.7.0+gitAUTOINC+888c46c827-r0/git/scripts/encrypt_secret.py -i "H31i05" > "primary_key.secret" || exit 1
/usr/bin/env: ‘python’: No such file or directory
Makefile:64: recipe for target 'primary_key.secret' failed

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2020-03-19 10:47:24 +08:00
Jason Wessel e19748f11e cryptfs-tpm2: Add support for QEMU swtpm tpm2
The device nodes are in a different place when using the swtpm + ovfm
+ qemu.  The luks-setup.sh needs to look in an additional location to
properly support qemu.

[ Issue: LINUXEXEC-2450 ]

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
2019-11-08 13:27:23 +08:00
Jia Zhang 74af5e3644 cryptfs-tpm2: Fix build faiure due to -fstack-protector-strong
SECURITY_LDFLAGS includes -fstack-protector-strong which cannot work
with CCLD. To work around this issue, filter out it from LDFLAGS.

Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
2018-09-17 09:31:31 -04:00
Jia Zhang b3f12e7803 cryptfs-tpm2: Update to the latest
- Follow up the regular way to include header file.
- Use CCLD to build executable and library.

Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
2018-09-17 09:29:52 -04:00
Yunguo Wei cc40f6c890 cryptfs-tpm2: uprev to 0.7
Now cryptfs-tpm2 supports both TSS 1.x and 2.x API.

Please specify "TSS2_VER=1" in EXTRA_OEMAKE to support 1.x API.

Signed-off-by: Yunguo Wei <yunguo.wei@windriver.com>
2018-09-12 17:49:31 +08:00
Jia Zhang a4fda23803 cryptfs-tpm2: update to 0.6.3
Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
2018-06-16 22:16:02 -04:00
Trevor Woerner 6ca33b325d tpm2.0-tss: rename -> tpm2-tss
Unify how the TPM2 recipes are named.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2018-05-30 09:38:05 +08:00
Trevor Woerner 4b2c94fb64 tpm2.0-tools: rename -> tpm2-tools
Unify how the TPM2 recipes are named.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2018-05-30 09:38:05 +08:00
Jia Zhang 387a9bf500 cryptfs-tpm2: Update the upstream URL
Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
2018-03-13 08:43:45 -04:00
Jia Zhang 365a400ed9 meta-secure-core: update TSS 2.0 to the latest stable version
Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
2018-02-19 04:39:19 -05:00
Jia Zhang b1e14f4e88 encrypted-storage: use luks as the feature name for current implementation
encrypted-storage layer will include more security features about encrypted
storage so the term "encrypted-storage" won't be used to specify a dedicated
technology term such as "LUKS".

Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
2017-08-20 15:31:11 +08:00
Lans Zhang ead58497c8 cryptfs-tpm2: sync up with upstream
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-08-16 11:20:18 +08:00
Lans Zhang aa9b435b55 cryptfs-tpm2: sync up with upstream
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-08-09 10:53:47 +08:00
Lans Zhang 7610abb4c8 cryptfs-tpm2: fix RDEPENDS
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-08-04 14:43:09 +08:00
Lans Zhang a654b0702f cryptfs-tpm2: change the SECTION
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-07-20 10:29:04 +08:00
Lans Zhang fe026e84a4 cryptfs-tpm2: add author and homepage info
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-07-13 13:11:47 +08:00
Lans Zhang 6d7f0155e3 seloader, libsign, cryptfs-tpm2: code style fixup
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-07-13 10:27:45 +08:00
Lans Zhang 7c83acd861 Clean up RDEPENDS
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-07-05 10:52:10 +08:00
Lans Zhang 487c89348d cryptfs-tpm2: sync up with upstream
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-07-05 09:40:11 +08:00
Lans Zhang 35fb18863a cryptfs-tpm2: code style fixup
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-07-05 09:29:09 +08:00
Lans Zhang d82dc56d88 cryptfs-tpm2: sync up with upstream
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-06-26 11:42:18 +08:00
Lans Zhang 1b3e594449 meta-secure-core: initial commit
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-06-22 15:24:04 +08:00