From a36159eec6ca17402b0e146b86efaf76568dc353 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Fri, 20 Sep 2024 01:41:23 +0000 Subject: [PATCH] 重命名 AX88772C_eeprom/asix.c 为 asix_mac.c --- kernel/crypto/asymmetric_keys/x509_public_key.c | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/kernel/crypto/asymmetric_keys/x509_public_key.c b/kernel/crypto/asymmetric_keys/x509_public_key.c index 9338b45..b8135c3 100644 --- a/kernel/crypto/asymmetric_keys/x509_public_key.c +++ b/kernel/crypto/asymmetric_keys/x509_public_key.c @@ -1,12 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* Instantiate a public key crypto key from an X.509 Certificate * * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public Licence - * as published by the Free Software Foundation; either version - * 2 of the Licence, or (at your option) any later version. */ #define pr_fmt(fmt) "X.509: "fmt @@ -33,6 +29,9 @@ int ret; pr_devel("==>%s()\n", __func__); + + sig->data = cert->tbs; + sig->data_size = cert->tbs_size; if (!cert->pub->pkey_algo) cert->unsupported_key = true; @@ -77,7 +76,6 @@ goto error; desc->tfm = tfm; - desc->flags = CRYPTO_TFM_REQ_MAY_SLEEP; ret = crypto_shash_digest(desc, cert->tbs, cert->tbs_size, sig->digest); if (ret < 0) @@ -134,6 +132,11 @@ if (strcmp(cert->pub->pkey_algo, cert->sig->pkey_algo) != 0) goto out; + if (cert->unsupported_sig) { + ret = 0; + goto out; + } + ret = public_key_verify_signature(cert->pub, cert->sig); if (ret < 0) { if (ret == -ENOPKG) { -- Gitblit v1.6.2