• M
    KEYS: fix "ca_keys=" partial key matching · f2b3dee4
    Mimi Zohar 提交于
    The call to asymmetric_key_hex_to_key_id() from ca_keys_setup()
    silently fails with -ENOMEM.  Instead of dynamically allocating
    memory from a __setup function, this patch defines a variable
    and calls __asymmetric_key_hex_to_key_id(), a new helper function,
    directly.
    
    This bug was introduced by 'commit 46963b77 ("KEYS: Overhaul
    key identification when searching for asymmetric keys")'.
    
    Changelog:
    - for clarification, rename hexlen to asciihexlen in
      asymmetric_key_hex_to_key_id()
    - add size argument to __asymmetric_key_hex_to_key_id() - David Howells
    - inline __asymmetric_key_hex_to_key_id() - David Howells
    - remove duplicate strlen() calls
    Acked-by: NDavid Howells <dhowells@redhat.com>
    Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
    Cc: stable@vger.kernel.org # 3.18
    f2b3dee4
asymmetric_keys.h 744 字节