aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sys/crypto/api.h83
-rw-r--r--include/sys/crypto/common.h3
-rw-r--r--module/icp/api/kcf_mac.c3
3 files changed, 3 insertions, 86 deletions
diff --git a/include/sys/crypto/api.h b/include/sys/crypto/api.h
index f31018892..b2106e0c8 100644
--- a/include/sys/crypto/api.h
+++ b/include/sys/crypto/api.h
@@ -33,21 +33,14 @@ extern "C" {
#include <sys/zfs_context.h>
#include <sys/crypto/common.h>
-typedef long crypto_req_id_t;
-typedef void *crypto_bc_t;
typedef void *crypto_context_t;
typedef void *crypto_ctx_template_t;
-typedef struct {
- void (*cr_callback_func)(void *, int);
- void *cr_callback_arg;
- crypto_req_id_t cr_reqid;
-} crypto_call_req_t;
+typedef struct {} crypto_call_req_t;
/*
* Returns the mechanism type corresponding to a mechanism name.
*/
-
#define CRYPTO_MECH_INVALID ((uint64_t)-1)
extern crypto_mech_type_t crypto_mech2id(const char *name);
@@ -70,87 +63,15 @@ 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);
/*
- * Single and multi-part encryption operations.
+ * Single-part encryption/decryption operations.
*/
extern int crypto_encrypt(crypto_mechanism_t *mech, crypto_data_t *plaintext,
crypto_key_t *key, crypto_ctx_template_t tmpl, crypto_data_t *ciphertext,
crypto_call_req_t *cr);
-
-/*
- * Single and multi-part decryption operations.
- */
extern int crypto_decrypt(crypto_mechanism_t *mech, crypto_data_t *ciphertext,
crypto_key_t *key, crypto_ctx_template_t tmpl, crypto_data_t *plaintext,
crypto_call_req_t *cr);
-/*
- * A kernel consumer can request to be notified when some particular event
- * occurs. The valid events, callback function type, and functions to
- * be called to register or unregister for notification are defined below.
- */
-
-#define CRYPTO_EVENT_MECHS_CHANGED 0x00000001
-#define CRYPTO_EVENT_PROVIDER_REGISTERED 0x00000002
-#define CRYPTO_EVENT_PROVIDER_UNREGISTERED 0x00000004
-
-typedef enum {
- CRYPTO_MECH_ADDED = 1,
- CRYPTO_MECH_REMOVED
-} crypto_event_change_t;
-
-/* The event_arg argument structure for CRYPTO_EVENT_PROVIDERS_CHANGE event */
-typedef struct crypto_notify_event_change {
- crypto_mech_name_t ec_mech_name;
- crypto_event_change_t ec_change;
-} crypto_notify_event_change_t;
-
-typedef void *crypto_notify_handle_t;
-typedef void (*crypto_notify_callback_t)(uint32_t event_mask, void *event_arg);
-
-extern crypto_notify_handle_t crypto_notify_events(
- crypto_notify_callback_t nf, uint32_t event_mask);
-extern void crypto_unnotify_events(crypto_notify_handle_t);
-
-/*
- * crypto_bufcall(9F) group of routines.
- */
-extern crypto_bc_t crypto_bufcall_alloc(void);
-extern int crypto_bufcall_free(crypto_bc_t bc);
-extern int crypto_bufcall(crypto_bc_t bc, void (*func)(void *arg), void *arg);
-extern int crypto_unbufcall(crypto_bc_t bc);
-
-/*
- * To obtain the list of key size ranges supported by a mechanism.
- */
-
-#define CRYPTO_MECH_USAGE_ENCRYPT 0x00000001
-#define CRYPTO_MECH_USAGE_DECRYPT 0x00000002
-#define CRYPTO_MECH_USAGE_MAC 0x00000004
-
-typedef uint32_t crypto_mech_usage_t;
-
-typedef struct crypto_mechanism_info {
- size_t mi_min_key_size;
- size_t mi_max_key_size;
- crypto_keysize_unit_t mi_keysize_unit; /* for mi_xxx_key_size */
- crypto_mech_usage_t mi_usage;
-} crypto_mechanism_info_t;
-
-#ifdef _SYSCALL32
-
-typedef struct crypto_mechanism_info32 {
- size32_t mi_min_key_size;
- size32_t mi_max_key_size;
- crypto_keysize_unit_t mi_keysize_unit; /* for mi_xxx_key_size */
- crypto_mech_usage_t mi_usage;
-} crypto_mechanism_info32_t;
-
-#endif /* _SYSCALL32 */
-
-extern int crypto_get_all_mech_info(crypto_mech_type_t,
- crypto_mechanism_info_t **, uint_t *, int);
-extern void crypto_free_all_mech_info(crypto_mechanism_info_t *, uint_t);
-
#ifdef __cplusplus
}
#endif
diff --git a/include/sys/crypto/common.h b/include/sys/crypto/common.h
index 064240931..e8d7f0e54 100644
--- a/include/sys/crypto/common.h
+++ b/include/sys/crypto/common.h
@@ -93,9 +93,6 @@ typedef uint32_t crypto_keysize_unit_t;
/*
* The following bit flags are valid in cm_mech_flags field in
* the crypto_mech_info_t structure of the SPI.
- *
- * Only the first two bit flags are valid in mi_keysize_unit
- * field in the crypto_mechanism_info_t structure of the API.
*/
#define CRYPTO_KEYSIZE_UNIT_IN_BITS 0x00000001
#define CRYPTO_KEYSIZE_UNIT_IN_BYTES 0x00000002
diff --git a/module/icp/api/kcf_mac.c b/module/icp/api/kcf_mac.c
index 7bf0c499e..0249fe87f 100644
--- a/module/icp/api/kcf_mac.c
+++ b/module/icp/api/kcf_mac.c
@@ -45,8 +45,7 @@
* CRYPTO_INVALID_DATA for bogus 'data'
* CRYPTO_HOST_MEMORY for failure to allocate memory to handle this work.
* CRYPTO_INVALID_CONTEXT: Not a valid context.
- * CRYPTO_BUSY: Cannot process the request now. Schedule a
- * crypto_bufcall(), or try later.
+ * CRYPTO_BUSY: Cannot process the request now. Try later.
* CRYPTO_NOT_SUPPORTED and CRYPTO_MECH_NOT_SUPPORTED: No provider is
* capable of a function or a mechanism.
* CRYPTO_INVALID_KEY: bogus 'key' argument.