diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2018-06-19 17:19:28 +0200 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2018-06-19 17:19:28 +0200 |
commit | 731e809d3e4a14e49756bd4158b98c69e39a8459 (patch) | |
tree | 66644c715500c88a6f6285cae57a6067f0ed8105 /crypto/asymmetric_keys/restrict.c | |
parent | b2a7f2f2fd3ec48b3d309111b6fe8ddee227539d (diff) | |
parent | 5b5a04065fb5487303869fd6080c30f86530005d (diff) |
Merge branch 'fslc_4.9-1.0.x-imx' into toradex_4.9-1.0.x-imx-next
Diffstat (limited to 'crypto/asymmetric_keys/restrict.c')
-rw-r--r-- | crypto/asymmetric_keys/restrict.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crypto/asymmetric_keys/restrict.c b/crypto/asymmetric_keys/restrict.c index 19d1afb9890f..09b1374dc619 100644 --- a/crypto/asymmetric_keys/restrict.c +++ b/crypto/asymmetric_keys/restrict.c @@ -66,8 +66,9 @@ __setup("ca_keys=", ca_keys_setup); * * Returns 0 if the new certificate was accepted, -ENOKEY if we couldn't find a * matching parent certificate in the trusted list, -EKEYREJECTED if the - * signature check fails or the key is blacklisted and some other error if - * there is a matching certificate but the signature check cannot be performed. + * signature check fails or the key is blacklisted, -ENOPKG if the signature + * uses unsupported crypto, or some other error if there is a matching + * certificate but the signature check cannot be performed. */ int restrict_link_by_signature(struct key *trust_keyring, const struct key_type *type, @@ -86,6 +87,8 @@ int restrict_link_by_signature(struct key *trust_keyring, return -EOPNOTSUPP; sig = payload->data[asym_auth]; + if (!sig) + return -ENOPKG; if (!sig->auth_ids[0] && !sig->auth_ids[1]) return -ENOKEY; |