X.509: Fix modular build of public_key_sm2

The sm2 code was split out of public_key.c in a way that breaks
modular builds.  This patch moves the code back into the same file
as the original motivation was to minimise ifdefs and that has
nothing to do with splitting the code out.

Fixes: 2155256396 ("X.509: support OSCCA SM2-with-SM3...")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Herbert Xu
2020-10-07 17:05:45 +11:00
parent 10b0f78a73
commit 3093e7c16e
4 changed files with 57 additions and 76 deletions

View File

@@ -84,16 +84,4 @@ extern int verify_signature(const struct key *,
int public_key_verify_signature(const struct public_key *pkey,
const struct public_key_signature *sig);
#if IS_REACHABLE(CONFIG_CRYPTO_SM2)
int cert_sig_digest_update(const struct public_key_signature *sig,
struct crypto_akcipher *tfm_pkey);
#else
static inline
int cert_sig_digest_update(const struct public_key_signature *sig,
struct crypto_akcipher *tfm_pkey)
{
return -ENOTSUPP;
}
#endif
#endif /* _LINUX_PUBLIC_KEY_H */