diff options
Diffstat (limited to 'crypto/asymmetric_keys/pkcs7_trust.c')
-rw-r--r-- | crypto/asymmetric_keys/pkcs7_trust.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crypto/asymmetric_keys/pkcs7_trust.c b/crypto/asymmetric_keys/pkcs7_trust.c index fad888ea4fad..09197e50fa82 100644 --- a/crypto/asymmetric_keys/pkcs7_trust.c +++ b/crypto/asymmetric_keys/pkcs7_trust.c | |||
@@ -49,8 +49,7 @@ static int pkcs7_validate_trust_one(struct pkcs7_message *pkcs7, | |||
49 | /* Look to see if this certificate is present in the trusted | 49 | /* Look to see if this certificate is present in the trusted |
50 | * keys. | 50 | * keys. |
51 | */ | 51 | */ |
52 | key = x509_request_asymmetric_key(trust_keyring, x509->subject, | 52 | key = x509_request_asymmetric_key(trust_keyring, x509->id); |
53 | x509->fingerprint); | ||
54 | if (!IS_ERR(key)) | 53 | if (!IS_ERR(key)) |
55 | /* One of the X.509 certificates in the PKCS#7 message | 54 | /* One of the X.509 certificates in the PKCS#7 message |
56 | * is apparently the same as one we already trust. | 55 | * is apparently the same as one we already trust. |
@@ -82,8 +81,7 @@ static int pkcs7_validate_trust_one(struct pkcs7_message *pkcs7, | |||
82 | return -ENOKEY; | 81 | return -ENOKEY; |
83 | } | 82 | } |
84 | 83 | ||
85 | key = x509_request_asymmetric_key(trust_keyring, last->issuer, | 84 | key = x509_request_asymmetric_key(trust_keyring, last->authority); |
86 | last->authority); | ||
87 | if (IS_ERR(key)) | 85 | if (IS_ERR(key)) |
88 | return PTR_ERR(key) == -ENOMEM ? -ENOMEM : -ENOKEY; | 86 | return PTR_ERR(key) == -ENOMEM ? -ENOMEM : -ENOKEY; |
89 | x509 = last; | 87 | x509 = last; |