summaryrefslogtreecommitdiff
path: root/crypto/asymmetric_keys/x509_public_key.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-04-06 16:14:25 +0100
committerDavid Howells <dhowells@redhat.com>2016-04-11 22:42:27 +0100
commite8f6844c41df70c438e46aa74bda80791ffc05b5 (patch)
tree244e92a1b0cba50bf3acb07c43f7996329bcf044 /crypto/asymmetric_keys/x509_public_key.c
parent5e3641dcbb58078d5f5230f527106b76738cbdfa (diff)
downloadlinux-crypto-e8f6844c41df70c438e46aa74bda80791ffc05b5.tar.gz
linux-crypto-e8f6844c41df70c438e46aa74bda80791ffc05b5.zip
X.509: Use verify_signature() if we have a struct key * to use
We should call verify_signature() rather than directly calling public_key_verify_signature() if we have a struct key to use as we shouldn't be poking around in the private data of the key struct as that's subtype dependent. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'crypto/asymmetric_keys/x509_public_key.c')
-rw-r--r--crypto/asymmetric_keys/x509_public_key.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/asymmetric_keys/x509_public_key.c b/crypto/asymmetric_keys/x509_public_key.c
index 9c8483ef..117a6ee7 100644
--- a/crypto/asymmetric_keys/x509_public_key.c
+++ b/crypto/asymmetric_keys/x509_public_key.c
@@ -220,8 +220,7 @@ static int x509_validate_trust(struct x509_certificate *cert,
if (!use_builtin_keys ||
test_bit(KEY_FLAG_BUILTIN, &key->flags)) {
- ret = public_key_verify_signature(
- key->payload.data[asym_crypto], cert->sig);
+ ret = verify_signature(key, cert->sig);
if (ret == -ENOPKG)
cert->unsupported_sig = true;
}