Print this page
6640 dca gets the instance number a lot, never actually uses it
*** 412,427 ****
0, /* pi_logical_provider_count */
NULL /* pi_logical_providers */
};
/* Convenience macros */
! /* Retrieve the softc and instance number from a SPI crypto context */
! #define DCA_SOFTC_FROM_CTX(ctx, softc, instance) { \
! (softc) = (dca_t *)(ctx)->cc_provider; \
! (instance) = ddi_get_instance((softc)->dca_dip); \
! }
!
#define DCA_MECH_FROM_CTX(ctx) \
(((dca_request_t *)(ctx)->cc_provider_private)->dr_ctx.ctx_cm_type)
static int dca_bindchains_one(dca_request_t *reqp, size_t cnt, int dr_offset,
caddr_t kaddr, ddi_dma_handle_t handle, uint_t flags,
--- 412,422 ----
0, /* pi_logical_provider_count */
NULL /* pi_logical_providers */
};
/* Convenience macros */
! #define DCA_SOFTC_FROM_CTX(ctx) ((dca_t *)(ctx)->cc_provider)
#define DCA_MECH_FROM_CTX(ctx) \
(((dca_request_t *)(ctx)->cc_provider_private)->dr_ctx.ctx_cm_type)
static int dca_bindchains_one(dca_request_t *reqp, size_t cnt, int dr_offset,
caddr_t kaddr, ddi_dma_handle_t handle, uint_t flags,
*** 3692,3706 ****
crypto_key_t *key, crypto_spi_ctx_template_t ctx_template,
crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
- /* LINTED E_FUNC_SET_NOT_USED */
- int instance;
! /* extract softc and instance number from context */
! DCA_SOFTC_FROM_CTX(ctx, softc, instance);
DBG(softc, DENTRY, "dca_encrypt_init: started");
/* check mechanism */
switch (mechanism->cm_type) {
case DES_CBC_MECH_INFO_TYPE:
--- 3687,3698 ----
crypto_key_t *key, crypto_spi_ctx_template_t ctx_template,
crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
! softc = DCA_SOFTC_FROM_CTX(ctx);
DBG(softc, DENTRY, "dca_encrypt_init: started");
/* check mechanism */
switch (mechanism->cm_type) {
case DES_CBC_MECH_INFO_TYPE:
*** 3735,3752 ****
dca_encrypt(crypto_ctx_t *ctx, crypto_data_t *plaintext,
crypto_data_t *ciphertext, crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
- /* LINTED E_FUNC_SET_NOT_USED */
- int instance;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! /* extract softc and instance number from context */
! DCA_SOFTC_FROM_CTX(ctx, softc, instance);
DBG(softc, DENTRY, "dca_encrypt: started");
/* handle inplace ops */
if (!ciphertext) {
dca_request_t *reqp = ctx->cc_provider_private;
--- 3727,3741 ----
dca_encrypt(crypto_ctx_t *ctx, crypto_data_t *plaintext,
crypto_data_t *ciphertext, crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! softc = DCA_SOFTC_FROM_CTX(ctx);
DBG(softc, DENTRY, "dca_encrypt: started");
/* handle inplace ops */
if (!ciphertext) {
dca_request_t *reqp = ctx->cc_provider_private;
*** 3790,3807 ****
dca_encrypt_update(crypto_ctx_t *ctx, crypto_data_t *plaintext,
crypto_data_t *ciphertext, crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
- /* LINTED E_FUNC_SET_NOT_USED */
- int instance;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! /* extract softc and instance number from context */
! DCA_SOFTC_FROM_CTX(ctx, softc, instance);
DBG(softc, DENTRY, "dca_encrypt_update: started");
/* handle inplace ops */
if (!ciphertext) {
dca_request_t *reqp = ctx->cc_provider_private;
--- 3779,3793 ----
dca_encrypt_update(crypto_ctx_t *ctx, crypto_data_t *plaintext,
crypto_data_t *ciphertext, crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! softc = DCA_SOFTC_FROM_CTX(ctx);
DBG(softc, DENTRY, "dca_encrypt_update: started");
/* handle inplace ops */
if (!ciphertext) {
dca_request_t *reqp = ctx->cc_provider_private;
*** 3836,3853 ****
dca_encrypt_final(crypto_ctx_t *ctx, crypto_data_t *ciphertext,
crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
- /* LINTED E_FUNC_SET_NOT_USED */
- int instance;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! /* extract softc and instance number from context */
! DCA_SOFTC_FROM_CTX(ctx, softc, instance);
DBG(softc, DENTRY, "dca_encrypt_final: started");
/* check mechanism */
switch (DCA_MECH_FROM_CTX(ctx)) {
case DES_CBC_MECH_INFO_TYPE:
--- 3822,3836 ----
dca_encrypt_final(crypto_ctx_t *ctx, crypto_data_t *ciphertext,
crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! softc = DCA_SOFTC_FROM_CTX(ctx);
DBG(softc, DENTRY, "dca_encrypt_final: started");
/* check mechanism */
switch (DCA_MECH_FROM_CTX(ctx)) {
case DES_CBC_MECH_INFO_TYPE:
*** 3926,3940 ****
crypto_key_t *key, crypto_spi_ctx_template_t ctx_template,
crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
- /* LINTED E_FUNC_SET_NOT_USED */
- int instance;
! /* extract softc and instance number from context */
! DCA_SOFTC_FROM_CTX(ctx, softc, instance);
DBG(softc, DENTRY, "dca_decrypt_init: started");
/* check mechanism */
switch (mechanism->cm_type) {
case DES_CBC_MECH_INFO_TYPE:
--- 3909,3920 ----
crypto_key_t *key, crypto_spi_ctx_template_t ctx_template,
crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
! softc = DCA_SOFTC_FROM_CTX(ctx);
DBG(softc, DENTRY, "dca_decrypt_init: started");
/* check mechanism */
switch (mechanism->cm_type) {
case DES_CBC_MECH_INFO_TYPE:
*** 3969,3986 ****
dca_decrypt(crypto_ctx_t *ctx, crypto_data_t *ciphertext,
crypto_data_t *plaintext, crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
- /* LINTED E_FUNC_SET_NOT_USED */
- int instance;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! /* extract softc and instance number from context */
! DCA_SOFTC_FROM_CTX(ctx, softc, instance);
DBG(softc, DENTRY, "dca_decrypt: started");
/* handle inplace ops */
if (!plaintext) {
dca_request_t *reqp = ctx->cc_provider_private;
--- 3949,3963 ----
dca_decrypt(crypto_ctx_t *ctx, crypto_data_t *ciphertext,
crypto_data_t *plaintext, crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! softc = DCA_SOFTC_FROM_CTX(ctx);
DBG(softc, DENTRY, "dca_decrypt: started");
/* handle inplace ops */
if (!plaintext) {
dca_request_t *reqp = ctx->cc_provider_private;
*** 4025,4042 ****
dca_decrypt_update(crypto_ctx_t *ctx, crypto_data_t *ciphertext,
crypto_data_t *plaintext, crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
- /* LINTED E_FUNC_SET_NOT_USED */
- int instance;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! /* extract softc and instance number from context */
! DCA_SOFTC_FROM_CTX(ctx, softc, instance);
DBG(softc, DENTRY, "dca_decrypt_update: started");
/* handle inplace ops */
if (!plaintext) {
dca_request_t *reqp = ctx->cc_provider_private;
--- 4002,4016 ----
dca_decrypt_update(crypto_ctx_t *ctx, crypto_data_t *ciphertext,
crypto_data_t *plaintext, crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! softc = DCA_SOFTC_FROM_CTX(ctx);
DBG(softc, DENTRY, "dca_decrypt_update: started");
/* handle inplace ops */
if (!plaintext) {
dca_request_t *reqp = ctx->cc_provider_private;
*** 4071,4088 ****
dca_decrypt_final(crypto_ctx_t *ctx, crypto_data_t *plaintext,
crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
- /* LINTED E_FUNC_SET_NOT_USED */
- int instance;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! /* extract softc and instance number from context */
! DCA_SOFTC_FROM_CTX(ctx, softc, instance);
DBG(softc, DENTRY, "dca_decrypt_final: started");
/* check mechanism */
switch (DCA_MECH_FROM_CTX(ctx)) {
case DES_CBC_MECH_INFO_TYPE:
--- 4045,4059 ----
dca_decrypt_final(crypto_ctx_t *ctx, crypto_data_t *plaintext,
crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! softc = DCA_SOFTC_FROM_CTX(ctx);
DBG(softc, DENTRY, "dca_decrypt_final: started");
/* check mechanism */
switch (DCA_MECH_FROM_CTX(ctx)) {
case DES_CBC_MECH_INFO_TYPE:
*** 4165,4179 ****
crypto_key_t *key, crypto_spi_ctx_template_t ctx_template,
crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
- /* LINTED E_FUNC_SET_NOT_USED */
- int instance;
! /* extract softc and instance number from context */
! DCA_SOFTC_FROM_CTX(ctx, softc, instance);
DBG(softc, DENTRY, "dca_sign_init: started\n");
if (ctx_template != NULL)
return (CRYPTO_ARGUMENTS_BAD);
--- 4136,4147 ----
crypto_key_t *key, crypto_spi_ctx_template_t ctx_template,
crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
! softc = DCA_SOFTC_FROM_CTX(ctx);
DBG(softc, DENTRY, "dca_sign_init: started\n");
if (ctx_template != NULL)
return (CRYPTO_ARGUMENTS_BAD);
*** 4206,4223 ****
dca_sign(crypto_ctx_t *ctx, crypto_data_t *data,
crypto_data_t *signature, crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
- /* LINTED E_FUNC_SET_NOT_USED */
- int instance;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! /* extract softc and instance number from context */
! DCA_SOFTC_FROM_CTX(ctx, softc, instance);
DBG(softc, DENTRY, "dca_sign: started\n");
/* check mechanism */
switch (DCA_MECH_FROM_CTX(ctx)) {
case RSA_PKCS_MECH_INFO_TYPE:
--- 4174,4188 ----
dca_sign(crypto_ctx_t *ctx, crypto_data_t *data,
crypto_data_t *signature, crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! softc = DCA_SOFTC_FROM_CTX(ctx);
DBG(softc, DENTRY, "dca_sign: started\n");
/* check mechanism */
switch (DCA_MECH_FROM_CTX(ctx)) {
case RSA_PKCS_MECH_INFO_TYPE:
*** 4243,4260 ****
dca_sign_update(crypto_ctx_t *ctx, crypto_data_t *data,
crypto_req_handle_t req)
{
int error = CRYPTO_MECHANISM_INVALID;
dca_t *softc;
- /* LINTED E_FUNC_SET_NOT_USED */
- int instance;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! /* extract softc and instance number from context */
! DCA_SOFTC_FROM_CTX(ctx, softc, instance);
DBG(softc, DENTRY, "dca_sign_update: started\n");
cmn_err(CE_WARN, "dca_sign_update: unexpected mech type "
"0x%llx\n", (unsigned long long)DCA_MECH_FROM_CTX(ctx));
--- 4208,4222 ----
dca_sign_update(crypto_ctx_t *ctx, crypto_data_t *data,
crypto_req_handle_t req)
{
int error = CRYPTO_MECHANISM_INVALID;
dca_t *softc;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! softc = DCA_SOFTC_FROM_CTX(ctx);
DBG(softc, DENTRY, "dca_sign_update: started\n");
cmn_err(CE_WARN, "dca_sign_update: unexpected mech type "
"0x%llx\n", (unsigned long long)DCA_MECH_FROM_CTX(ctx));
*** 4268,4285 ****
dca_sign_final(crypto_ctx_t *ctx, crypto_data_t *signature,
crypto_req_handle_t req)
{
int error = CRYPTO_MECHANISM_INVALID;
dca_t *softc;
- /* LINTED E_FUNC_SET_NOT_USED */
- int instance;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! /* extract softc and instance number from context */
! DCA_SOFTC_FROM_CTX(ctx, softc, instance);
DBG(softc, DENTRY, "dca_sign_final: started\n");
cmn_err(CE_WARN, "dca_sign_final: unexpected mech type "
"0x%llx\n", (unsigned long long)DCA_MECH_FROM_CTX(ctx));
--- 4230,4244 ----
dca_sign_final(crypto_ctx_t *ctx, crypto_data_t *signature,
crypto_req_handle_t req)
{
int error = CRYPTO_MECHANISM_INVALID;
dca_t *softc;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! softc = DCA_SOFTC_FROM_CTX(ctx);
DBG(softc, DENTRY, "dca_sign_final: started\n");
cmn_err(CE_WARN, "dca_sign_final: unexpected mech type "
"0x%llx\n", (unsigned long long)DCA_MECH_FROM_CTX(ctx));
*** 4330,4344 ****
crypto_key_t *key, crypto_spi_ctx_template_t ctx_template,
crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
- /* LINTED E_FUNC_SET_NOT_USED */
- int instance;
! /* extract softc and instance number from context */
! DCA_SOFTC_FROM_CTX(ctx, softc, instance);
DBG(softc, DENTRY, "dca_sign_recover_init: started\n");
if (ctx_template != NULL)
return (CRYPTO_ARGUMENTS_BAD);
--- 4289,4300 ----
crypto_key_t *key, crypto_spi_ctx_template_t ctx_template,
crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
! softc = DCA_SOFTC_FROM_CTX(ctx);
DBG(softc, DENTRY, "dca_sign_recover_init: started\n");
if (ctx_template != NULL)
return (CRYPTO_ARGUMENTS_BAD);
*** 4367,4384 ****
dca_sign_recover(crypto_ctx_t *ctx, crypto_data_t *data,
crypto_data_t *signature, crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
- /* LINTED E_FUNC_SET_NOT_USED */
- int instance;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! /* extract softc and instance number from context */
! DCA_SOFTC_FROM_CTX(ctx, softc, instance);
DBG(softc, DENTRY, "dca_sign_recover: started\n");
/* check mechanism */
switch (DCA_MECH_FROM_CTX(ctx)) {
case RSA_PKCS_MECH_INFO_TYPE:
--- 4323,4337 ----
dca_sign_recover(crypto_ctx_t *ctx, crypto_data_t *data,
crypto_data_t *signature, crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! softc = DCA_SOFTC_FROM_CTX(ctx);
DBG(softc, DENTRY, "dca_sign_recover: started\n");
/* check mechanism */
switch (DCA_MECH_FROM_CTX(ctx)) {
case RSA_PKCS_MECH_INFO_TYPE:
*** 4402,4415 ****
crypto_key_t *key, crypto_data_t *data, crypto_data_t *signature,
crypto_spi_ctx_template_t ctx_template, crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc = (dca_t *)provider;
- /* LINTED E_FUNC_SET_NOT_USED */
- int instance;
- instance = ddi_get_instance(softc->dca_dip);
DBG(softc, DENTRY, "dca_sign_recover_atomic: started\n");
if (ctx_template != NULL)
return (CRYPTO_ARGUMENTS_BAD);
--- 4355,4365 ----
*** 4441,4455 ****
crypto_key_t *key, crypto_spi_ctx_template_t ctx_template,
crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
- /* LINTED E_FUNC_SET_NOT_USED */
- int instance;
! /* extract softc and instance number from context */
! DCA_SOFTC_FROM_CTX(ctx, softc, instance);
DBG(softc, DENTRY, "dca_verify_init: started\n");
if (ctx_template != NULL)
return (CRYPTO_ARGUMENTS_BAD);
--- 4391,4402 ----
crypto_key_t *key, crypto_spi_ctx_template_t ctx_template,
crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
! softc = DCA_SOFTC_FROM_CTX(ctx);
DBG(softc, DENTRY, "dca_verify_init: started\n");
if (ctx_template != NULL)
return (CRYPTO_ARGUMENTS_BAD);
*** 4482,4499 ****
dca_verify(crypto_ctx_t *ctx, crypto_data_t *data, crypto_data_t *signature,
crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
- /* LINTED E_FUNC_SET_NOT_USED */
- int instance;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! /* extract softc and instance number from context */
! DCA_SOFTC_FROM_CTX(ctx, softc, instance);
DBG(softc, DENTRY, "dca_verify: started\n");
/* check mechanism */
switch (DCA_MECH_FROM_CTX(ctx)) {
case RSA_PKCS_MECH_INFO_TYPE:
--- 4429,4443 ----
dca_verify(crypto_ctx_t *ctx, crypto_data_t *data, crypto_data_t *signature,
crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! softc = DCA_SOFTC_FROM_CTX(ctx);
DBG(softc, DENTRY, "dca_verify: started\n");
/* check mechanism */
switch (DCA_MECH_FROM_CTX(ctx)) {
case RSA_PKCS_MECH_INFO_TYPE:
*** 4519,4536 ****
dca_verify_update(crypto_ctx_t *ctx, crypto_data_t *data,
crypto_req_handle_t req)
{
int error = CRYPTO_MECHANISM_INVALID;
dca_t *softc;
- /* LINTED E_FUNC_SET_NOT_USED */
- int instance;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! /* extract softc and instance number from context */
! DCA_SOFTC_FROM_CTX(ctx, softc, instance);
DBG(softc, DENTRY, "dca_verify_update: started\n");
cmn_err(CE_WARN, "dca_verify_update: unexpected mech type "
"0x%llx\n", (unsigned long long)DCA_MECH_FROM_CTX(ctx));
--- 4463,4477 ----
dca_verify_update(crypto_ctx_t *ctx, crypto_data_t *data,
crypto_req_handle_t req)
{
int error = CRYPTO_MECHANISM_INVALID;
dca_t *softc;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! softc = DCA_SOFTC_FROM_CTX(ctx);
DBG(softc, DENTRY, "dca_verify_update: started\n");
cmn_err(CE_WARN, "dca_verify_update: unexpected mech type "
"0x%llx\n", (unsigned long long)DCA_MECH_FROM_CTX(ctx));
*** 4544,4561 ****
dca_verify_final(crypto_ctx_t *ctx, crypto_data_t *signature,
crypto_req_handle_t req)
{
int error = CRYPTO_MECHANISM_INVALID;
dca_t *softc;
- /* LINTED E_FUNC_SET_NOT_USED */
- int instance;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! /* extract softc and instance number from context */
! DCA_SOFTC_FROM_CTX(ctx, softc, instance);
DBG(softc, DENTRY, "dca_verify_final: started\n");
cmn_err(CE_WARN, "dca_verify_final: unexpected mech type "
"0x%llx\n", (unsigned long long)DCA_MECH_FROM_CTX(ctx));
--- 4485,4499 ----
dca_verify_final(crypto_ctx_t *ctx, crypto_data_t *signature,
crypto_req_handle_t req)
{
int error = CRYPTO_MECHANISM_INVALID;
dca_t *softc;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! softc = DCA_SOFTC_FROM_CTX(ctx);
DBG(softc, DENTRY, "dca_verify_final: started\n");
cmn_err(CE_WARN, "dca_verify_final: unexpected mech type "
"0x%llx\n", (unsigned long long)DCA_MECH_FROM_CTX(ctx));
*** 4606,4620 ****
crypto_key_t *key, crypto_spi_ctx_template_t ctx_template,
crypto_req_handle_t req)
{
int error = CRYPTO_MECHANISM_INVALID;
dca_t *softc;
- /* LINTED E_FUNC_SET_NOT_USED */
- int instance;
! /* extract softc and instance number from context */
! DCA_SOFTC_FROM_CTX(ctx, softc, instance);
DBG(softc, DENTRY, "dca_verify_recover_init: started\n");
if (ctx_template != NULL)
return (CRYPTO_ARGUMENTS_BAD);
--- 4544,4555 ----
crypto_key_t *key, crypto_spi_ctx_template_t ctx_template,
crypto_req_handle_t req)
{
int error = CRYPTO_MECHANISM_INVALID;
dca_t *softc;
! softc = DCA_SOFTC_FROM_CTX(ctx);
DBG(softc, DENTRY, "dca_verify_recover_init: started\n");
if (ctx_template != NULL)
return (CRYPTO_ARGUMENTS_BAD);
*** 4642,4659 ****
dca_verify_recover(crypto_ctx_t *ctx, crypto_data_t *signature,
crypto_data_t *data, crypto_req_handle_t req)
{
int error = CRYPTO_MECHANISM_INVALID;
dca_t *softc;
- /* LINTED E_FUNC_SET_NOT_USED */
- int instance;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! /* extract softc and instance number from context */
! DCA_SOFTC_FROM_CTX(ctx, softc, instance);
DBG(softc, DENTRY, "dca_verify_recover: started\n");
/* check mechanism */
switch (DCA_MECH_FROM_CTX(ctx)) {
case RSA_PKCS_MECH_INFO_TYPE:
--- 4577,4591 ----
dca_verify_recover(crypto_ctx_t *ctx, crypto_data_t *signature,
crypto_data_t *data, crypto_req_handle_t req)
{
int error = CRYPTO_MECHANISM_INVALID;
dca_t *softc;
if (!ctx || !ctx->cc_provider || !ctx->cc_provider_private)
return (CRYPTO_OPERATION_NOT_INITIALIZED);
! softc = DCA_SOFTC_FROM_CTX(ctx);
DBG(softc, DENTRY, "dca_verify_recover: started\n");
/* check mechanism */
switch (DCA_MECH_FROM_CTX(ctx)) {
case RSA_PKCS_MECH_INFO_TYPE:
*** 4713,4726 ****
crypto_session_id_t session_id,
uchar_t *buf, size_t len, crypto_req_handle_t req)
{
int error = CRYPTO_FAILED;
dca_t *softc = (dca_t *)provider;
- /* LINTED E_FUNC_SET_NOT_USED */
- int instance;
- instance = ddi_get_instance(softc->dca_dip);
DBG(softc, DENTRY, "dca_generate_random: started");
error = dca_rng(softc, buf, len, req);
DBG(softc, DENTRY, "dca_generate_random: done, err = 0x%x", error);
--- 4645,4655 ----
*** 4735,4749 ****
int
dca_free_context(crypto_ctx_t *ctx)
{
int error = CRYPTO_SUCCESS;
dca_t *softc;
- /* LINTED E_FUNC_SET_NOT_USED */
- int instance;
! /* extract softc and instance number from context */
! DCA_SOFTC_FROM_CTX(ctx, softc, instance);
DBG(softc, DENTRY, "dca_free_context: entered");
if (ctx->cc_provider_private == NULL)
return (error);
--- 4664,4675 ----
int
dca_free_context(crypto_ctx_t *ctx)
{
int error = CRYPTO_SUCCESS;
dca_t *softc;
! softc = DCA_SOFTC_FROM_CTX(ctx);
DBG(softc, DENTRY, "dca_free_context: entered");
if (ctx->cc_provider_private == NULL)
return (error);