Commit Graph

170 Commits

Author SHA1 Message Date
Jia Zhang aa14422754 meta-ids: install packagegroup-ids if the feature ids configured
Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
2017-08-24 21:01:32 +08:00
Guojian 5a24b8f94f key-store: Fix two key-store-rpm-pubkey user key issues (#13)
1. user key pub rpm package also could be created.
2. The latest bitbake could not support the d.getVar() function nest
call. Such as the following function call always return "None"
d.getVar(d.getVar('RPM_KEY_DIR', True) + '/RPM-GPG-KEY-*', True)
It caused the key-store-rpm-pubkey rpm package could not be created in
the latest oe-core project.

Signed-off-by: Guojian Zhou <guojian.zhou@windriver.com>
2017-08-24 19:52:34 +08:00
Wenzong Fan 90fd1b523a meta-ids: initial commit for IDS support (#11)
* Add new layer for IDS support
* Add package mtree to provide basic IDS functions

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
2017-08-24 17:21:52 +08:00
Wenzong Fan c41b36ea73 meta-integrity: add tpm2, tpm as LAYERRECOMMENDS (#9)
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
2017-08-24 13:34:03 +08:00
Jia Zhang c2962bba6d sign_rpm_ext: make sure all target recipes are signed
Placing the key import logic under signing-keys cannot ensure all
target recipes are always signed. Instead, place it before
do_package_write_rpm.

Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
2017-08-24 08:18:01 +08:00
Jia Zhang 6fd5d7be55 meta-integrity: remove INHERIT += "sign_rpm_ext"
This definition should be placed in local.conf.

Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
2017-08-23 17:38:01 +08:00
Jia Zhang c1cdc3d466 secure-core-image: install dnf by default
Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
2017-08-23 17:37:33 +08:00
Jia Zhang 1106a2c325 secure-core-image-initramfs: enlarge the max size
Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
2017-08-23 11:43:18 +08:00
Jia Zhang 8637f3bd63 meta-signing-key: replace the sample RPM signing key
The previous cannot be handled by gpg v2 properly when importing it.

Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
2017-08-23 07:17:46 +08:00
Jia Zhang bfd800fe02 shim: sync up with upstream
Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
2017-08-23 05:16:38 +08:00
Guojian 6ad9a338e6 Fix the user rpm sign key can not be found issue (#5)
When the SIGNING_MODEL is set to "user", the signing-keys recipes will
run failed on the get_public_keys task. uks_rpm_keys_dir() function
could not return the right rpm_keys directory when the
SIGNING_MODEL is set to "user".

Signed-off-by: Guojian Zhou <guojian.zhou@windriver.com>
2017-08-22 15:14:21 +08:00
Jia Zhang ab05be3c9c signing-keys: fix the race condition when concurrent import operations occur
Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
2017-08-20 22:42:32 +08:00
Jia Zhang ddb0b8d6d2 meta-tpm: tss 1.x always depends on openssl 1.0.x
Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
2017-08-20 20:31:58 +08: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
Jia Zhang cbdefad44c create-user-key-store.sh: support gpg 2.x used to generate rpm signing key
Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
2017-08-20 15:06:22 +08:00
Jia Zhang 038aa54bc2 signing-keys: fix gpg key import failure due to wrong option position
Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
2017-08-20 15:03:18 +08:00
Jia Zhang 373d7276bc signing-keys: clean up
Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
2017-08-20 15:02:15 +08:00
Jia Zhang 6b7e09b444 sign_rpm_ext: define the location of default gpg keyring to TMPDIR
Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
2017-08-20 15:00:05 +08:00
Jia Zhang 5c584cb628 sign_rpm_ext: fix permission warning
Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
2017-08-20 11:18:24 +08:00
Jia Zhang d5ca542dfb signing-keys: fix gpg key import failure
Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
2017-08-20 02:17:32 +08:00
Jia Zhang 820376c2b5 sign_rpm_ext.bbclass: clean up
Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
2017-08-19 21:52:51 +08:00
Guojian 050cc889bb sign_rpm_ext: Fix the GPG_PATH directory not exist issue (#4)
If "GPG_PATH" is set in the init script, then "signing-keys"
get_public_keys task will execute failed.

So the "GPG_PATH" directory would be created when "GPG_PATH" is set.

The do_get_public_keys failed to import gpg key error information is as following:
----------------------------------------------------------------------------------------
ERROR: signing-keys-1.0-r0 do_get_public_keys: Function failed: Failed to import gpg key
(layers/meta-secure-core/meta-signing-key/files/rpm_keys/RPM-GPG-PRIVKEY-SecureCore):
gpg: fatal: can't create directory
`tmp/deploy/images/intel-corei7-64/.gnupg': No such file or directory

Signed-off-by: Guojian Zhou <guojian.zhou@windriver.com>
2017-08-19 15:18:58 +08:00
Guojian b8fd1f0fef keyutils: Fix keyutils man7 files conflict with man-pages same name files (#3)
The keyutils-doc package supply some same name man7 files with
man-pages, it will cause the rpm package installation or upgrade failed.

The keyutils-doc and man-pages rpm packages' transction check error
information is as following:
--------------------------------------------------------------------
Running transaction test
Error: Transaction check error:
  file /usr/share/man/man7/keyrings.7 from install of
keyutils-doc-1.5.9+git0+9209a0c8fd-r0.0.core2_64 conflicts with file
from package man-pages-4.11-r0.0.core2_64
  file /usr/share/man/man7/persistent-keyring.7 from install of
keyutils-doc-1.5.9+git0+9209a0c8fd-r0.0.core2_64 conflicts with file
from package man-pages-4.11-r0.0.core2_64
  file /usr/share/man/man7/process-keyring.7 from install of
keyutils-doc-1.5.9+git0+9209a0c8fd-r0.0.core2_64 conflicts with file
from package man-pages-4.11-r0.0.core2_64
  file /usr/share/man/man7/session-keyring.7 from install of
keyutils-doc-1.5.9+git0+9209a0c8fd-r0.0.core2_64 conflicts with file
from package man-pages-4.11-r0.0.core2_64
  file /usr/share/man/man7/thread-keyring.7 from install of
keyutils-doc-1.5.9+git0+9209a0c8fd-r0.0.core2_64 conflicts with file
from package man-pages-4.11-r0.0.core2_64
  file /usr/share/man/man7/user-keyring.7 from install of
keyutils-doc-1.5.9+git0+9209a0c8fd-r0.0.core2_64 conflicts with file
from package man-pages-4.11-r0.0.core2_64
  file /usr/share/man/man7/user-session-keyring.7 from install of
keyutils-doc-1.5.9+git0+9209a0c8fd-r0.0.core2_64 conflicts with file
from package man-pages-4.11-r0.0.core2_64

Signed-off-by: Guojian Zhou <guojian.zhou@windriver.com>
2017-08-19 15:17:38 +08:00
Jia Zhang 8544d2a4a5 sign_rpm_ext.bbclass: use the default setting from meta-signing-key
Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
2017-08-19 12:54:19 +08:00
yunguowei e3f58965ab sign_rpm_ext: set default GPG_PATH if it is not specified (#2)
commit 52bf3b6636f95a(meta-integrity: move gpg keyring initialization
to signing-keys) tried to initialize keyring in the task check_public_keys
of the recipe signing-keys. However, it does work with the recipe
signing-keys only, and GPG_PATH can't be passed to other recipes.

We bring the python anonymous function back, and it makes sure GPG_PATH
is set before signing the packages for every recipe.

Signed-off-by: Yunguo Wei <yunguo.wei@windriver.com>
2017-08-19 12:44:39 +08:00
Jia Zhang 60588ac929 grub-efi: remove the unused patch
Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
2017-08-18 13:24:21 +08:00
Jia Zhang 52bf3b6636 meta-integrity: move gpg keyring initialization to signing-keys
Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
2017-08-17 23:29:26 +08:00
Jia Zhang e11a0bd8de efitools: fix searching openssl.cnf for target build
Currently, OPENSSL_LIB is only used for locating openssl.cnf in order
to work around openssl-1.1.x.

Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
2017-08-17 20:39:48 +08:00
Lans Zhang 464433a169 sign_rpm_ext: support RPM signing
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-08-17 11:22:49 +08:00
Lans Zhang d5a4de8f09 efitools: support to build with openssl-1.1.x
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-08-16 23:01:13 +08:00
Lans Zhang 8ff4d25a90 ima-evm-utils: support to build with openssl-1.1.x
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-08-16 14:56:23 +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 b7705a7587 README.md: update reference links
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-08-16 10:57:24 +08:00
Lans Zhang 9fc35f2627 meta-integrity/README.md: update
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-08-16 10:47:33 +08:00
Lans Zhang 4b41056970 sbsigntool: fix build failure with openssl-1.0.x
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-08-16 10:12:21 +08:00
Lans Zhang eb08a619d8 init.ima: clean up and allow to load extra IMA policies from the real rootfs
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-08-15 16:15:38 +08:00
Lans Zhang 656706373f ima_policy: update the comment
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-08-15 16:14:31 +08:00
Lans Zhang c8fff6a0ff meta-integrity/README.md: update
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-08-15 14:13:23 +08:00
Lans Zhang c912483e87 sbsigntool: update to support openssl-1.1.0
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-08-15 13:12:38 +08:00
Lans Zhang 2c265a6fc3 meta-integrity/README.md: update
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-08-15 10:16:41 +08:00
Lans Zhang 09f1239567 meta-signing-key: clean up the default values of sample RPM signing key
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-08-15 09:23:09 +08:00
Lans Zhang b2c2716c20 meta-signing-key: renew the sample keys for UEFI Secure Boot
The DB and KEK now are self-signed.

Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-08-14 15:07:57 +08:00
Lans Zhang 4a676cd301 create-user-key-store.sh: gpg key creation updates
- code style fixup
- remove gen_rpm_keyring script
- check gpg version

Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-08-11 16:39:22 +08:00
Lans Zhang 104a01a25d shim: refresh fallback patchset
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-08-11 14:14:39 +08:00
Lans Zhang 0951a620b5 init: don't explicitly set the LUKS partition name
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-08-09 10:54:48 +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 03a5d21586 shim: sync up with upstream
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-08-09 10:25:25 +08:00
Lans Zhang 1098d813ed systemd: work around circular dependency chains found if systemd is configured to enable cryptsetup
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-08-09 09:52:17 +08:00
Lans Zhang e8d6e006e7 systemd: fix the conditions of PACKAGECONFIG for ima and cryptsetup
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-08-04 22:03:45 +08:00
Lans Zhang dd9a695df8 systemd: enable ima and cryptsetup
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-08-04 17:01:00 +08:00