1. 03 4月, 2017 1 次提交
    • D
      KEYS: Add a system blacklist keyring · 734114f8
      David Howells 提交于
      Add the following:
      
       (1) A new system keyring that is used to store information about
           blacklisted certificates and signatures.
      
       (2) A new key type (called 'blacklist') that is used to store a
           blacklisted hash in its description as a hex string.  The key accepts
           no payload.
      
       (3) The ability to configure a list of blacklisted hashes into the kernel
           at build time.  This is done by setting
           CONFIG_SYSTEM_BLACKLIST_HASH_LIST to the filename of a list of hashes
           that are in the form:
      
      	"<hash>", "<hash>", ..., "<hash>"
      
           where each <hash> is a hex string representation of the hash and must
           include all necessary leading zeros to pad the hash to the right size.
      
      The above are enabled with CONFIG_SYSTEM_BLACKLIST_KEYRING.
      
      Once the kernel is booted, the blacklist keyring can be listed:
      
      	root@andromeda ~]# keyctl show %:.blacklist
      	Keyring
      	 723359729 ---lswrv      0     0  keyring: .blacklist
      	 676257228 ---lswrv      0     0   \_ blacklist: 123412341234c55c1dcc601ab8e172917706aa32fb5eaf826813547fdf02dd46
      
      The blacklist cannot currently be modified by userspace, but it will be
      possible to load it, for example, from the UEFI blacklist database.
      
      A later commit will make it possible to load blacklisted asymmetric keys in
      here too.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      734114f8
  2. 12 4月, 2016 2 次提交
    • D
      certs: Add a secondary system keyring that can be added to dynamically · d3bfe841
      David Howells 提交于
      Add a secondary system keyring that can be added to by root whilst the
      system is running - provided the key being added is vouched for by a key
      built into the kernel or already added to the secondary keyring.
      
      Rename .system_keyring to .builtin_trusted_keys to distinguish it more
      obviously from the new keyring (called .secondary_trusted_keys).
      
      The new keyring needs to be enabled with CONFIG_SECONDARY_TRUSTED_KEYRING.
      
      If the secondary keyring is enabled, a link is created from that to
      .builtin_trusted_keys so that the the latter will automatically be searched
      too if the secondary keyring is searched.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      d3bfe841
    • D
      KEYS: Make the system trusted keyring depend on the asymmetric key type · 99716b7c
      David Howells 提交于
      Make the system trusted keyring depend on the asymmetric key type as
      there's not a lot of point having it if you can't then load asymmetric keys
      onto it.
      
      This requires the ASYMMETRIC_KEY_TYPE to be made a bool, not a tristate, as
      the Kconfig language doesn't then correctly force ASYMMETRIC_KEY_TYPE to
      'y' rather than 'm' if SYSTEM_TRUSTED_KEYRING is 'y'.
      
      Making SYSTEM_TRUSTED_KEYRING *select* ASYMMETRIC_KEY_TYPE instead doesn't
      work as the Kconfig interpreter then wrongly complains about dependency
      loops.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      99716b7c
  3. 26 2月, 2016 1 次提交
  4. 14 8月, 2015 1 次提交