mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
module: icp: spi: crypto_ops_t: remove unused op types
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12901
This commit is contained in:
@@ -109,62 +109,6 @@ extern int crypto_mac_update(crypto_context_t ctx, crypto_data_t *data,
|
||||
extern int crypto_mac_final(crypto_context_t ctx, crypto_data_t *data,
|
||||
crypto_call_req_t *cr);
|
||||
|
||||
/*
|
||||
* Single and multi-part sign with private key operations.
|
||||
*/
|
||||
extern int crypto_sign(crypto_mechanism_t *mech, crypto_key_t *key,
|
||||
crypto_data_t *data, crypto_ctx_template_t tmpl,
|
||||
crypto_data_t *signature, crypto_call_req_t *cr);
|
||||
extern int crypto_sign_prov(crypto_provider_t, crypto_session_id_t,
|
||||
crypto_mechanism_t *, crypto_key_t *, crypto_data_t *,
|
||||
crypto_ctx_template_t, crypto_data_t *, crypto_call_req_t *);
|
||||
extern int crypto_sign_init(crypto_mechanism_t *mech, crypto_key_t *key,
|
||||
crypto_ctx_template_t tmpl, crypto_context_t *ctxp, crypto_call_req_t *cr);
|
||||
extern int crypto_sign_init_prov(crypto_provider_t, crypto_session_id_t,
|
||||
crypto_mechanism_t *, crypto_key_t *, crypto_ctx_template_t,
|
||||
crypto_context_t *, crypto_call_req_t *);
|
||||
extern int crypto_sign_update(crypto_context_t ctx, crypto_data_t *data,
|
||||
crypto_call_req_t *cr);
|
||||
extern int crypto_sign_final(crypto_context_t ctx, crypto_data_t *signature,
|
||||
crypto_call_req_t *cr);
|
||||
extern int crypto_sign_recover_init_prov(crypto_provider_t,
|
||||
crypto_session_id_t, crypto_mechanism_t *, crypto_key_t *,
|
||||
crypto_ctx_template_t tmpl, crypto_context_t *, crypto_call_req_t *);
|
||||
extern int crypto_sign_recover(crypto_mechanism_t *mech, crypto_key_t *key,
|
||||
crypto_data_t *data, crypto_ctx_template_t tmpl, crypto_data_t *signature,
|
||||
crypto_call_req_t *cr);
|
||||
extern int crypto_sign_recover_prov(crypto_provider_t, crypto_session_id_t,
|
||||
crypto_mechanism_t *, crypto_key_t *, crypto_data_t *,
|
||||
crypto_ctx_template_t, crypto_data_t *, crypto_call_req_t *);
|
||||
|
||||
/*
|
||||
* Single and multi-part verify with public key operations.
|
||||
*/
|
||||
extern int crypto_verify(crypto_mechanism_t *mech, crypto_key_t *key,
|
||||
crypto_data_t *data, crypto_ctx_template_t tmpl, crypto_data_t *signature,
|
||||
crypto_call_req_t *cr);
|
||||
extern int crypto_verify_prov(crypto_provider_t, crypto_session_id_t,
|
||||
crypto_mechanism_t *, crypto_key_t *, crypto_data_t *,
|
||||
crypto_ctx_template_t, crypto_data_t *, crypto_call_req_t *);
|
||||
extern int crypto_verify_init(crypto_mechanism_t *mech, crypto_key_t *key,
|
||||
crypto_ctx_template_t tmpl, crypto_context_t *ctxp, crypto_call_req_t *cr);
|
||||
extern int crypto_verify_init_prov(crypto_provider_t, crypto_session_id_t,
|
||||
crypto_mechanism_t *, crypto_key_t *, crypto_ctx_template_t,
|
||||
crypto_context_t *, crypto_call_req_t *);
|
||||
extern int crypto_verify_update(crypto_context_t ctx, crypto_data_t *data,
|
||||
crypto_call_req_t *cr);
|
||||
extern int crypto_verify_final(crypto_context_t ctx, crypto_data_t *signature,
|
||||
crypto_call_req_t *cr);
|
||||
extern int crypto_verify_recover_init_prov(crypto_provider_t,
|
||||
crypto_session_id_t, crypto_mechanism_t *, crypto_key_t *,
|
||||
crypto_ctx_template_t tmpl, crypto_context_t *, crypto_call_req_t *);
|
||||
extern int crypto_verify_recover(crypto_mechanism_t *mech, crypto_key_t *key,
|
||||
crypto_data_t *signature, crypto_ctx_template_t tmpl, crypto_data_t *data,
|
||||
crypto_call_req_t *cr);
|
||||
extern int crypto_verify_recover_prov(crypto_provider_t, crypto_session_id_t,
|
||||
crypto_mechanism_t *, crypto_key_t *, crypto_data_t *,
|
||||
crypto_ctx_template_t, crypto_data_t *, crypto_call_req_t *);
|
||||
|
||||
/*
|
||||
* Single and multi-part encryption operations.
|
||||
*/
|
||||
@@ -206,149 +150,6 @@ extern int crypto_decrypt_update(crypto_context_t ctx,
|
||||
extern int crypto_decrypt_final(crypto_context_t ctx, crypto_data_t *plaintext,
|
||||
crypto_call_req_t *cr);
|
||||
|
||||
/*
|
||||
* Single and multi-part encrypt/MAC dual operations.
|
||||
*/
|
||||
extern int crypto_encrypt_mac(crypto_mechanism_t *encr_mech,
|
||||
crypto_mechanism_t *mac_mech, crypto_data_t *pt,
|
||||
crypto_key_t *encr_key, crypto_key_t *mac_key,
|
||||
crypto_ctx_template_t encr_tmpl, crypto_ctx_template_t mac_tmpl,
|
||||
crypto_dual_data_t *ct, crypto_data_t *mac, crypto_call_req_t *cr);
|
||||
extern int crypto_encrypt_mac_prov(crypto_provider_t, crypto_session_id_t,
|
||||
crypto_mechanism_t *, crypto_mechanism_t *, crypto_data_t *,
|
||||
crypto_key_t *, crypto_key_t *, crypto_ctx_template_t,
|
||||
crypto_ctx_template_t, crypto_dual_data_t *, crypto_data_t *,
|
||||
crypto_call_req_t *);
|
||||
extern int crypto_encrypt_mac_init(crypto_mechanism_t *encr_mech,
|
||||
crypto_mechanism_t *mac_mech, crypto_key_t *encr_key,
|
||||
crypto_key_t *mac_key, crypto_ctx_template_t encr_tmpl,
|
||||
crypto_ctx_template_t mac_tmpl, crypto_context_t *ctxp,
|
||||
crypto_call_req_t *cr);
|
||||
extern int crypto_encrypt_mac_init_prov(crypto_provider_t, crypto_session_id_t,
|
||||
crypto_mechanism_t *, crypto_mechanism_t *, crypto_key_t *, crypto_key_t *,
|
||||
crypto_ctx_template_t, crypto_ctx_template_t, crypto_context_t *,
|
||||
crypto_call_req_t *);
|
||||
extern int crypto_encrypt_mac_update(crypto_context_t ctx,
|
||||
crypto_data_t *pt, crypto_dual_data_t *ct, crypto_call_req_t *cr);
|
||||
extern int crypto_encrypt_mac_final(crypto_context_t ctx,
|
||||
crypto_dual_data_t *ct, crypto_data_t *mac, crypto_call_req_t *cr);
|
||||
|
||||
/*
|
||||
* Single and multi-part MAC/decrypt dual operations.
|
||||
*/
|
||||
extern int crypto_mac_decrypt(crypto_mechanism_t *mac_mech,
|
||||
crypto_mechanism_t *decr_mech, crypto_dual_data_t *ct,
|
||||
crypto_key_t *mac_key, crypto_key_t *decr_key,
|
||||
crypto_ctx_template_t mac_tmpl, crypto_ctx_template_t decr_tmpl,
|
||||
crypto_data_t *mac, crypto_data_t *pt, crypto_call_req_t *cr);
|
||||
extern int crypto_mac_decrypt_prov(crypto_provider_t, crypto_session_id_t,
|
||||
crypto_mechanism_t *mac_mech, crypto_mechanism_t *decr_mech,
|
||||
crypto_dual_data_t *ct, crypto_key_t *mac_key, crypto_key_t *decr_key,
|
||||
crypto_ctx_template_t mac_tmpl, crypto_ctx_template_t decr_tmpl,
|
||||
crypto_data_t *mac, crypto_data_t *pt, crypto_call_req_t *cr);
|
||||
extern int crypto_mac_verify_decrypt(crypto_mechanism_t *mac_mech,
|
||||
crypto_mechanism_t *decr_mech, crypto_dual_data_t *ct,
|
||||
crypto_key_t *mac_key, crypto_key_t *decr_key,
|
||||
crypto_ctx_template_t mac_tmpl, crypto_ctx_template_t decr_tmpl,
|
||||
crypto_data_t *mac, crypto_data_t *pt, crypto_call_req_t *cr);
|
||||
extern int crypto_mac_verify_decrypt_prov(crypto_provider_t,
|
||||
crypto_session_id_t, crypto_mechanism_t *mac_mech,
|
||||
crypto_mechanism_t *decr_mech, crypto_dual_data_t *ct,
|
||||
crypto_key_t *mac_key, crypto_key_t *decr_key,
|
||||
crypto_ctx_template_t mac_tmpl, crypto_ctx_template_t decr_tmpl,
|
||||
crypto_data_t *mac, crypto_data_t *pt, crypto_call_req_t *cr);
|
||||
extern int crypto_mac_decrypt_init(crypto_mechanism_t *mac_mech,
|
||||
crypto_mechanism_t *decr_mech, crypto_key_t *mac_key,
|
||||
crypto_key_t *decr_key, crypto_ctx_template_t mac_tmpl,
|
||||
crypto_ctx_template_t decr_tmpl, crypto_context_t *ctxp,
|
||||
crypto_call_req_t *cr);
|
||||
extern int crypto_mac_decrypt_init_prov(crypto_provider_t,
|
||||
crypto_session_id_t, crypto_mechanism_t *mac_mech,
|
||||
crypto_mechanism_t *decr_mech, crypto_key_t *mac_key,
|
||||
crypto_key_t *decr_key, crypto_ctx_template_t mac_tmpl,
|
||||
crypto_ctx_template_t decr_tmpl, crypto_context_t *ctxp,
|
||||
crypto_call_req_t *cr);
|
||||
extern int crypto_mac_decrypt_update(crypto_context_t ctx,
|
||||
crypto_dual_data_t *ct, crypto_data_t *pt, crypto_call_req_t *cr);
|
||||
extern int crypto_mac_decrypt_final(crypto_context_t ctx, crypto_data_t *mac,
|
||||
crypto_data_t *pt, crypto_call_req_t *cr);
|
||||
|
||||
/* Session Management */
|
||||
extern int crypto_session_open(crypto_provider_t, crypto_session_id_t *,
|
||||
crypto_call_req_t *);
|
||||
extern int crypto_session_close(crypto_provider_t, crypto_session_id_t,
|
||||
crypto_call_req_t *);
|
||||
extern int crypto_session_login(crypto_provider_t, crypto_session_id_t,
|
||||
crypto_user_type_t, char *, size_t, crypto_call_req_t *);
|
||||
extern int crypto_session_logout(crypto_provider_t, crypto_session_id_t,
|
||||
crypto_call_req_t *);
|
||||
|
||||
/* Object Management */
|
||||
extern int crypto_object_copy(crypto_provider_t, crypto_session_id_t,
|
||||
crypto_object_id_t, crypto_object_attribute_t *, uint_t,
|
||||
crypto_object_id_t *, crypto_call_req_t *);
|
||||
extern int crypto_object_create(crypto_provider_t, crypto_session_id_t,
|
||||
crypto_object_attribute_t *, uint_t, crypto_object_id_t *,
|
||||
crypto_call_req_t *);
|
||||
extern int crypto_object_destroy(crypto_provider_t, crypto_session_id_t,
|
||||
crypto_object_id_t, crypto_call_req_t *);
|
||||
extern int crypto_object_get_attribute_value(crypto_provider_t,
|
||||
crypto_session_id_t, crypto_object_id_t, crypto_object_attribute_t *,
|
||||
uint_t, crypto_call_req_t *);
|
||||
extern int crypto_object_get_size(crypto_provider_t, crypto_session_id_t,
|
||||
crypto_object_id_t, size_t *, crypto_call_req_t *);
|
||||
extern int crypto_object_find_final(crypto_provider_t, void *,
|
||||
crypto_call_req_t *);
|
||||
extern int crypto_object_find_init(crypto_provider_t, crypto_session_id_t,
|
||||
crypto_object_attribute_t *, uint_t, void **, crypto_call_req_t *);
|
||||
extern int crypto_object_find(crypto_provider_t, void *, crypto_object_id_t *,
|
||||
uint_t *, uint_t, crypto_call_req_t *);
|
||||
extern int crypto_object_set_attribute_value(crypto_provider_t,
|
||||
crypto_session_id_t, crypto_object_id_t, crypto_object_attribute_t *,
|
||||
uint_t, crypto_call_req_t *);
|
||||
|
||||
/* Key Management */
|
||||
extern int crypto_key_derive(crypto_provider_t, crypto_session_id_t,
|
||||
crypto_mechanism_t *, crypto_key_t *, crypto_object_attribute_t *,
|
||||
uint_t, crypto_object_id_t *, crypto_call_req_t *);
|
||||
extern int crypto_key_generate(crypto_provider_t, crypto_session_id_t,
|
||||
crypto_mechanism_t *, crypto_object_attribute_t *, uint_t,
|
||||
crypto_object_id_t *, crypto_call_req_t *);
|
||||
extern int crypto_key_generate_pair(crypto_provider_t, crypto_session_id_t,
|
||||
crypto_mechanism_t *, crypto_object_attribute_t *, uint_t,
|
||||
crypto_object_attribute_t *, uint_t, crypto_object_id_t *,
|
||||
crypto_object_id_t *, crypto_call_req_t *);
|
||||
extern int crypto_key_unwrap(crypto_provider_t, crypto_session_id_t,
|
||||
crypto_mechanism_t *, crypto_key_t *, uchar_t *, size_t *,
|
||||
crypto_object_attribute_t *, uint_t, crypto_object_id_t *,
|
||||
crypto_call_req_t *);
|
||||
extern int crypto_key_wrap(crypto_provider_t, crypto_session_id_t,
|
||||
crypto_mechanism_t *, crypto_key_t *, crypto_object_id_t *, uchar_t *,
|
||||
size_t *, crypto_call_req_t *);
|
||||
extern int crypto_key_check_prov(crypto_provider_t, crypto_mechanism_t *mech,
|
||||
crypto_key_t *key);
|
||||
extern int crypto_key_check(crypto_mechanism_t *mech, crypto_key_t *key);
|
||||
|
||||
|
||||
/*
|
||||
* Routines to cancel a single asynchronous request or all asynchronous
|
||||
* requests associated with a particular context.
|
||||
*/
|
||||
extern void crypto_cancel_req(crypto_req_id_t req);
|
||||
extern void crypto_cancel_ctx(crypto_context_t ctx);
|
||||
|
||||
/*
|
||||
* crypto_get_mech_list(9F) allocates and returns the list of currently
|
||||
* supported cryptographic mechanisms.
|
||||
*/
|
||||
extern crypto_mech_name_t *crypto_get_mech_list(uint_t *count, int kmflag);
|
||||
extern void crypto_free_mech_list(crypto_mech_name_t *mech_names,
|
||||
uint_t count);
|
||||
|
||||
extern crypto_provider_t crypto_get_provider(char *, char *, char *);
|
||||
extern int crypto_get_provinfo(crypto_provider_t, crypto_provider_ext_info_t *);
|
||||
extern void crypto_release_provider(crypto_provider_t);
|
||||
|
||||
/*
|
||||
* A kernel consumer can request to be notified when some particular event
|
||||
* occurs. The valid events, callback function type, and functions to
|
||||
|
||||
@@ -253,20 +253,6 @@ typedef struct crypto_data {
|
||||
#define cd_uio cdu.cdu_uio
|
||||
#define cd_mp cdu.cdu_mp
|
||||
|
||||
typedef struct crypto_dual_data {
|
||||
crypto_data_t dd_data; /* The data */
|
||||
off_t dd_offset2; /* Used by dual operation */
|
||||
size_t dd_len2; /* # of bytes to take */
|
||||
} crypto_dual_data_t;
|
||||
|
||||
#define dd_format dd_data.cd_format
|
||||
#define dd_offset1 dd_data.cd_offset
|
||||
#define dd_len1 dd_data.cd_length
|
||||
#define dd_miscdata dd_data.cd_miscdata
|
||||
#define dd_raw dd_data.cd_raw
|
||||
#define dd_uio dd_data.cd_uio
|
||||
#define dd_mp dd_data.cd_mp
|
||||
|
||||
/* The keys, and their contents */
|
||||
|
||||
typedef enum {
|
||||
@@ -430,26 +416,6 @@ typedef void *crypto_provider_t;
|
||||
#define CRYPTO_EXT_SIZE_SERIAL 16
|
||||
#define CRYPTO_EXT_SIZE_TIME 16
|
||||
|
||||
typedef struct crypto_provider_ext_info {
|
||||
uchar_t ei_label[CRYPTO_EXT_SIZE_LABEL];
|
||||
uchar_t ei_manufacturerID[CRYPTO_EXT_SIZE_MANUF];
|
||||
uchar_t ei_model[CRYPTO_EXT_SIZE_MODEL];
|
||||
uchar_t ei_serial_number[CRYPTO_EXT_SIZE_SERIAL];
|
||||
ulong_t ei_flags;
|
||||
ulong_t ei_max_session_count;
|
||||
ulong_t ei_max_pin_len;
|
||||
ulong_t ei_min_pin_len;
|
||||
ulong_t ei_total_public_memory;
|
||||
ulong_t ei_free_public_memory;
|
||||
ulong_t ei_total_private_memory;
|
||||
ulong_t ei_free_private_memory;
|
||||
crypto_version_t ei_hardware_version;
|
||||
crypto_version_t ei_firmware_version;
|
||||
uchar_t ei_time[CRYPTO_EXT_SIZE_TIME];
|
||||
int ei_hash_max_input_len;
|
||||
int ei_hmac_max_input_len;
|
||||
} crypto_provider_ext_info_t;
|
||||
|
||||
typedef uint_t crypto_session_id_t;
|
||||
|
||||
typedef enum cmd_type {
|
||||
@@ -566,16 +532,6 @@ typedef enum cmd_type {
|
||||
*/
|
||||
#define CRYPTO_LAST_ERROR 0x00000053
|
||||
|
||||
/*
|
||||
* Special values that can be used to indicate that information is unavailable
|
||||
* or that there is not practical limit. These values can be used
|
||||
* by fields of the SPI crypto_provider_ext_info(9S) structure.
|
||||
* The value of CRYPTO_UNAVAILABLE_INFO should be the same as
|
||||
* CK_UNAVAILABLE_INFO in the PKCS#11 spec.
|
||||
*/
|
||||
#define CRYPTO_UNAVAILABLE_INFO ((ulong_t)(-1))
|
||||
#define CRYPTO_EFFECTIVELY_INFINITE 0x0
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user