KEYS: x509: remove never-set ->unsupported_key flag
authorEric Biggers <ebiggers@google.com>
Wed, 19 Jan 2022 00:54:35 +0000 (16:54 -0800)
committerJarkko Sakkinen <jarkko@kernel.org>
Tue, 8 Mar 2022 08:33:18 +0000 (10:33 +0200)
commit9f8b3f321f39d6ff63fb40673c3be61b73ba0a1d
treeb779b277d970c05ccdeae764f0d5b7ef8ed8278d
parent7804fe9e8dc70846ff2c683f4781ed75499b12ae
KEYS: x509: remove never-set ->unsupported_key flag

The X.509 parser always sets cert->pub->pkey_algo on success, since
x509_extract_key_data() is a mandatory action in the X.509 ASN.1
grammar, and it returns an error if the algorithm is unknown.  Thus,
remove the dead code which handled this field being NULL.  This results
in the ->unsupported_key flag never being set, so remove that too.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
crypto/asymmetric_keys/pkcs7_verify.c
crypto/asymmetric_keys/x509_parser.h
crypto/asymmetric_keys/x509_public_key.c