diff options
| author | David Howells <dhowells@redhat.com> | 2016-04-06 11:14:24 -0400 |
|---|---|---|
| committer | David Howells <dhowells@redhat.com> | 2016-04-06 11:14:24 -0400 |
| commit | bda850cd214e90b1be0cc25bc48c4f6ac53eb543 (patch) | |
| tree | acb936239ac766592c557295aec265ec9a2d04fb /include | |
| parent | e68503bd6836ba765dc8e0ee77ea675fedc07e41 (diff) | |
PKCS#7: Make trust determination dependent on contents of trust keyring
Make the determination of the trustworthiness of a key dependent on whether
a key that can verify it is present in the supplied ring of trusted keys
rather than whether or not the verifying key has KEY_FLAG_TRUSTED set.
verify_pkcs7_signature() will return -ENOKEY if the PKCS#7 message trust
chain cannot be verified.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/crypto/pkcs7.h | 3 | ||||
| -rw-r--r-- | include/linux/verification.h | 1 |
2 files changed, 1 insertions, 3 deletions
diff --git a/include/crypto/pkcs7.h b/include/crypto/pkcs7.h index 8323e3e57131..583f199400a3 100644 --- a/include/crypto/pkcs7.h +++ b/include/crypto/pkcs7.h | |||
| @@ -33,8 +33,7 @@ extern int pkcs7_get_content_data(const struct pkcs7_message *pkcs7, | |||
| 33 | * pkcs7_trust.c | 33 | * pkcs7_trust.c |
| 34 | */ | 34 | */ |
| 35 | extern int pkcs7_validate_trust(struct pkcs7_message *pkcs7, | 35 | extern int pkcs7_validate_trust(struct pkcs7_message *pkcs7, |
| 36 | struct key *trust_keyring, | 36 | struct key *trust_keyring); |
| 37 | bool *_trusted); | ||
| 38 | 37 | ||
| 39 | /* | 38 | /* |
| 40 | * pkcs7_verify.c | 39 | * pkcs7_verify.c |
diff --git a/include/linux/verification.h b/include/linux/verification.h index bb0fcf941cb7..a10549a6c7cd 100644 --- a/include/linux/verification.h +++ b/include/linux/verification.h | |||
| @@ -33,7 +33,6 @@ struct key; | |||
| 33 | extern int verify_pkcs7_signature(const void *data, size_t len, | 33 | extern int verify_pkcs7_signature(const void *data, size_t len, |
| 34 | const void *raw_pkcs7, size_t pkcs7_len, | 34 | const void *raw_pkcs7, size_t pkcs7_len, |
| 35 | struct key *trusted_keys, | 35 | struct key *trusted_keys, |
| 36 | int untrusted_error, | ||
| 37 | enum key_being_used_for usage, | 36 | enum key_being_used_for usage, |
| 38 | int (*view_content)(void *ctx, | 37 | int (*view_content)(void *ctx, |
| 39 | const void *data, size_t len, | 38 | const void *data, size_t len, |
