diff options
author | Eric Biggers <ebiggers@google.com> | 2017-12-08 15:13:28 +0000 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2017-12-08 15:13:28 +0000 |
commit | de0774deaa6781bdae3fa62e80d0f6208bb55980 (patch) | |
tree | 6c9d2ac40e9be9a8782161d5a59413e0df28cbe7 /crypto/khazad.c | |
parent | a27417a9c9997c295887ef4bb966db5cd92e5224 (diff) | |
download | linux-crypto-de0774deaa6781bdae3fa62e80d0f6208bb55980.tar.gz linux-crypto-de0774deaa6781bdae3fa62e80d0f6208bb55980.zip |
pkcs7: fix check for self-signed certificate
pkcs7_validate_trust_one() used 'x509->next == x509' to identify a
self-signed certificate. That's wrong; ->next is simply the link in the
linked list of certificates in the PKCS#7 message. It should be
checking ->signer instead. Fix it.
Fortunately this didn't actually matter because when we re-visited
'x509' on the next iteration via 'x509->signer', it was already seen and
not verified, so we returned -ENOKEY anyway.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: James Morris <james.l.morris@oracle.com>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions