diff options
| author | Harald Freudenberger <freude@linux.ibm.com> | 2026-01-15 15:00:23 +0300 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2026-01-31 05:52:30 +0300 |
| commit | cf0840cc7f578c21e64810ef85e838d44d275d9c (patch) | |
| tree | 4363aaedb74ba4f705ab51f23f5c7ebdd518f115 /include | |
| parent | 9c5582db77199f8fbcf45e531198df5b97d5ee7f (diff) | |
| download | linux-cf0840cc7f578c21e64810ef85e838d44d275d9c.tar.xz | |
crypto: skcipher - Add new helper function crypto_skcipher_tested
Add a new helper function crypto_skcipher_tested() which evaluates
the CRYPTO_ALG_TESTED flag from the tfm base cra_flags field.
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Holger Dengler <dengler@linux.ibm.com>
Reviewed-by: Ingo Franzki <ifranzki@linux.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include')
| -rw-r--r-- | include/crypto/internal/skcipher.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/crypto/internal/skcipher.h b/include/crypto/internal/skcipher.h index 0cad8e7364c8..a965b6aabf61 100644 --- a/include/crypto/internal/skcipher.h +++ b/include/crypto/internal/skcipher.h @@ -242,6 +242,13 @@ static inline void *crypto_skcipher_ctx_dma(struct crypto_skcipher *tfm) return crypto_tfm_ctx_dma(&tfm->base); } +static inline bool crypto_skcipher_tested(struct crypto_skcipher *tfm) +{ + struct crypto_tfm *tfm_base = crypto_skcipher_tfm(tfm); + + return tfm_base->__crt_alg->cra_flags & CRYPTO_ALG_TESTED; +} + static inline void *skcipher_request_ctx(struct skcipher_request *req) { return req->__ctx; |
