mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 19:28:53 +03:00
module: icp: fold away all key formats except CRYPTO_KEY_RAW
It's the only one actually used Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12901
This commit is contained in:
@@ -737,9 +737,6 @@ sha2_mac_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism,
|
||||
return (CRYPTO_MECHANISM_INVALID);
|
||||
}
|
||||
|
||||
if (key->ck_format != CRYPTO_KEY_RAW)
|
||||
return (CRYPTO_ARGUMENTS_BAD);
|
||||
|
||||
ctx->cc_provider_private = kmem_alloc(sizeof (sha2_hmac_ctx_t),
|
||||
crypto_kmflag(req));
|
||||
if (ctx->cc_provider_private == NULL)
|
||||
@@ -971,10 +968,6 @@ sha2_mac_atomic(crypto_provider_handle_t provider,
|
||||
return (CRYPTO_MECHANISM_INVALID);
|
||||
}
|
||||
|
||||
/* Add support for key by attributes (RFE 4706552) */
|
||||
if (key->ck_format != CRYPTO_KEY_RAW)
|
||||
return (CRYPTO_ARGUMENTS_BAD);
|
||||
|
||||
if (ctx_template != NULL) {
|
||||
/* reuse context template */
|
||||
bcopy(ctx_template, &sha2_hmac_ctx, sizeof (sha2_hmac_ctx_t));
|
||||
@@ -1109,10 +1102,6 @@ sha2_mac_verify_atomic(crypto_provider_handle_t provider,
|
||||
return (CRYPTO_MECHANISM_INVALID);
|
||||
}
|
||||
|
||||
/* Add support for key by attributes (RFE 4706552) */
|
||||
if (key->ck_format != CRYPTO_KEY_RAW)
|
||||
return (CRYPTO_ARGUMENTS_BAD);
|
||||
|
||||
if (ctx_template != NULL) {
|
||||
/* reuse context template */
|
||||
bcopy(ctx_template, &sha2_hmac_ctx, sizeof (sha2_hmac_ctx_t));
|
||||
@@ -1287,10 +1276,6 @@ sha2_create_ctx_template(crypto_provider_handle_t provider,
|
||||
return (CRYPTO_MECHANISM_INVALID);
|
||||
}
|
||||
|
||||
/* Add support for key by attributes (RFE 4706552) */
|
||||
if (key->ck_format != CRYPTO_KEY_RAW)
|
||||
return (CRYPTO_ARGUMENTS_BAD);
|
||||
|
||||
/*
|
||||
* Allocate and initialize SHA2 context.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user