summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/sys/crypto/impl.h
diff options
context:
space:
mode:
authormcpowers <none@none>2007-05-13 21:38:23 -0700
committermcpowers <none@none>2007-05-13 21:38:23 -0700
commit034448fe565200cb042559f50fab6cf751f182c5 (patch)
tree94d2d94141b76820898ff085dfd70f43961b7726 /usr/src/uts/common/sys/crypto/impl.h
parenta68d064c8efa6a3a0ff9d022e866e947eb7242f4 (diff)
downloadillumos-joyent-034448fe565200cb042559f50fab6cf751f182c5.tar.gz
PSARC 2007/092 key generation and derivation for providers without keystore
6462782 Metaslot needs to generate a token object from a session object. 6462780 Softtoken keystore needs to store keys ECC objects 6339802 support keygen operations by acceleration only providers
Diffstat (limited to 'usr/src/uts/common/sys/crypto/impl.h')
-rw-r--r--usr/src/uts/common/sys/crypto/impl.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/usr/src/uts/common/sys/crypto/impl.h b/usr/src/uts/common/sys/crypto/impl.h
index 107e7652fc..9f26e3c8d6 100644
--- a/usr/src/uts/common/sys/crypto/impl.h
+++ b/usr/src/uts/common/sys/crypto/impl.h
@@ -541,6 +541,8 @@ extern rctl_hndl_t rc_project_crypto_mem;
#define KCF_PROV_KEY_OPS(pd) ((pd)->pd_ops_vector->co_key_ops)
#define KCF_PROV_PROVIDER_OPS(pd) ((pd)->pd_ops_vector->co_provider_ops)
#define KCF_PROV_MECH_OPS(pd) ((pd)->pd_ops_vector->co_mech_ops)
+#define KCF_PROV_NOSTORE_KEY_OPS(pd) \
+ ((pd)->pd_ops_vector->co_nostore_key_ops)
/*
* Wrappers for crypto_control_ops(9S) entry points.
@@ -1160,6 +1162,36 @@ extern rctl_hndl_t rc_project_crypto_mem;
CRYPTO_NOT_SUPPORTED)
/*
+ * Wrappers for crypto_nostore_key_ops(9S) entry points.
+ */
+
+#define KCF_PROV_NOSTORE_KEY_GENERATE(pd, session, mech, template, count, \
+ out_template, out_count, req) ( \
+ (KCF_PROV_NOSTORE_KEY_OPS(pd) && \
+ KCF_PROV_NOSTORE_KEY_OPS(pd)->nostore_key_generate) ? \
+ KCF_PROV_NOSTORE_KEY_OPS(pd)->nostore_key_generate( \
+ (pd)->pd_prov_handle, session, mech, template, count, \
+ out_template, out_count, req) : CRYPTO_NOT_SUPPORTED)
+
+#define KCF_PROV_NOSTORE_KEY_GENERATE_PAIR(pd, session, mech, pub_template, \
+ pub_count, priv_template, priv_count, out_pub_template, \
+ out_pub_count, out_priv_template, out_priv_count, req) ( \
+ (KCF_PROV_NOSTORE_KEY_OPS(pd) && \
+ KCF_PROV_NOSTORE_KEY_OPS(pd)->nostore_key_generate_pair) ? \
+ KCF_PROV_NOSTORE_KEY_OPS(pd)->nostore_key_generate_pair( \
+ (pd)->pd_prov_handle, session, mech, pub_template, pub_count, \
+ priv_template, priv_count, out_pub_template, out_pub_count, \
+ out_priv_template, out_priv_count, req) : CRYPTO_NOT_SUPPORTED)
+
+#define KCF_PROV_NOSTORE_KEY_DERIVE(pd, session, mech, base_key, template, \
+ count, out_template, out_count, req) ( \
+ (KCF_PROV_NOSTORE_KEY_OPS(pd) && \
+ KCF_PROV_NOSTORE_KEY_OPS(pd)->nostore_key_derive) ? \
+ KCF_PROV_NOSTORE_KEY_OPS(pd)->nostore_key_derive( \
+ (pd)->pd_prov_handle, session, mech, base_key, template, count, \
+ out_template, out_count, req) : CRYPTO_NOT_SUPPORTED)
+
+/*
* The following routines are exported by the kcf module (/kernel/misc/kcf)
* to the crypto and cryptoadmin modules.
*/