/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* mdb dcmds for selected structures from
*
* Also the mdb module housekeeping
*/
#include <sys/mdb_modapi.h>
#include "crypto_cmds.h"
{ "CRYPTO_EXTF_WRITE_PROTECTED", CRYPTO_EXTF_WRITE_PROTECTED,
{ "CRYPTO_EXTF_LOGIN_REQUIRED", CRYPTO_EXTF_LOGIN_REQUIRED,
{ "CRYPTO_EXTF_USER_PIN_INITIALIZED", CRYPTO_EXTF_USER_PIN_INITIALIZED,
{ "CRYPTO_EXTF_CLOCK_ON_TOKEN", CRYPTO_EXTF_CLOCK_ON_TOKEN,
{ "CRYPTO_EXTF_PROTECTED_AUTHENTICATION_PATH",
{ "CRYPTO_EXTF_DUAL_CRYPTO_OPERATIONS",
{ "CRYPTO_EXTF_TOKEN_INITIALIZED", CRYPTO_EXTF_TOKEN_INITIALIZED,
{ "CRYPTO_EXTF_USER_PIN_COUNT_LOW", CRYPTO_EXTF_USER_PIN_COUNT_LOW,
{ "CRYPTO_EXTF_USER_PIN_FINAL_TRY", CRYPTO_EXTF_USER_PIN_FINAL_TRY,
{ "CRYPTO_EXTF_USER_PIN_LOCKED", CRYPTO_EXTF_USER_PIN_LOCKED,
{ "CRYPTO_EXTF_USER_PIN_TO_BE_CHANGED",
{ "CRYPTO_EXTF_SO_PIN_COUNT_LOW", CRYPTO_EXTF_SO_PIN_COUNT_LOW,
{ "CRYPTO_EXTF_SO_PIN_FINAL_TRY", CRYPTO_EXTF_SO_PIN_FINAL_TRY,
{ "CRYPTO_EXTF_SO_PIN_LOCKED", CRYPTO_EXTF_SO_PIN_LOCKED,
{ "CRYPTO_EXTF_SO_PIN_TO_BE_CHANGED", CRYPTO_EXTF_SO_PIN_TO_BE_CHANGED,
{ NULL, 0, 0 }
};
/*ARGSUSED*/
int
{
/*
* 33 is 1 + MAX(CRYPTO_EXT_SIZE_LABEL, CRYPTO_EXT_SIZE_MANUF,
* CRYPTO_EXT_SIZE_MODEL, CRYPTO_EXT_SIZE_SERIAL)
*/
if (!(flags & DCMD_ADDRSPEC))
return (DCMD_USAGE);
== -1) {
mdb_warn("cannot read addr");
return (DCMD_ERR);
}
mdb_printf("ei_max_session_count\t%lu\n",
mdb_printf("ei_total_public_memory\t%lu\n",
mdb_printf("ei_free_public_memory\t%lu\n",
mdb_printf("ei_total_private_memory\t%lu\n",
mdb_printf("ei_free_private_memory\t%lu\n",
mdb_printf("ei_hardware_version\tmajor %c minor %c\n",
mdb_printf("ei_firmware_version\tmajor %c minor %c\n",
return (DCMD_OK);
}
{ "CRYPTO_FG_SIGN_RECOVER", CRYPTO_FG_SIGN_RECOVER,
{ "CRYPTO_FG_VERIFY_RECOVER", CRYPTO_FG_VERIFY_RECOVER,
{ "CRYPTO_FG_GENERATE_KEY_PAIR", CRYPTO_FG_GENERATE_KEY_PAIR,
{ "CRYPTO_FG_ENCRYPT_MAC", CRYPTO_FG_ENCRYPT_MAC,
{ "CRYPTO_FG_MAC_DECRYPT", CRYPTO_FG_MAC_DECRYPT,
{ "CRYPTO_FG_ENCRYPT_ATOMIC", CRYPTO_FG_ENCRYPT_ATOMIC,
{ "CRYPTO_FG_DECRYPT_ATOMIC", CRYPTO_FG_DECRYPT_ATOMIC,
{ "CRYPTO_FG_DIGEST_ATOMIC", CRYPTO_FG_DIGEST_ATOMIC,
{ "CRYPTO_FG_SIGN_ATOMIC", CRYPTO_FG_SIGN_ATOMIC,
{ "CRYPTO_FG_SIGN_RECOVER_ATOMIC", CRYPTO_FG_SIGN_RECOVER_ATOMIC,
{ "CRYPTO_FG_VERIFY_ATOMIC", CRYPTO_FG_VERIFY_ATOMIC,
{ "CRYPTO_FG_VERIFY_RECOVER_ATOMIC", CRYPTO_FG_VERIFY_RECOVER_ATOMIC,
{ "CRYPTO_FG_ENCRYPT_MAC_ATOMIC", CRYPTO_FG_ENCRYPT_MAC_ATOMIC,
{ "CRYPTO_FG_MAC_DECRYPT_ATOMIC", CRYPTO_FG_MAC_DECRYPT_ATOMIC,
{ NULL, 0, 0 }
};
/*ARGSUSED*/
int
{
if (! flags & DCMD_ADDRSPEC)
return (DCMD_USAGE);
== -1) {
return (DCMD_ERR);
}
mdb_printf("cm_func_group_mask\t0x%x:\t<%b>\n",
unit = "bytes";
unit);
unit);
return (DCMD_OK);
}
/*
* MDB module linkage information:
*
* We declare a list of structures describing our dcmds, and a function
* named _mdb_init to return a pointer to our module information.
*/
/* spi.c */
{ "crypto_provider_ext_info", ":",
"module-private crypto provider info",
{ "crypto_mech_info", ":",
"print as crypto_mech_info",
crypto_mech_info, NULL },
/* common.c */
{ "crypto_mechanism", ":",
{ "crypto_data", ":",
"print as crypto_data",
crypto_data, NULL },
{ "crypto_dual_data", ":",
"print as crypto_dual_data",
crypto_dual_data, NULL },
{ "crypto_key", ":",
/* impl.c */
{ "kcf_provider_desc", ":",
{ "prov_tab", "",
{ "policy_tab", "",
/* sched_impl.c */
{ "kcf_areq_node", ":[-v]",
"print asynchronous crypto request struct, [ verbose ]",
kcf_areq_node, NULL },
{ "kcf_global_swq", "?[-v]",
"global or addr global crypto queue. [ -v = verbose ]",
kcf_global_swq, NULL },
{ "crypto_find_reqid", "?[-v] reqid",
"look for reqid, print if found [ -v = verbose ]",
{ "kcf_reqid_table", ":[-v]",
"print contents of a request ID hash table [ -v = verbose ]",
{ "kcf_soft_conf_entry", "?",
"head or addr of configured software crypto providers",
{ "kcf_policy_desc", ":", "policy descriptors for crypto",
kcf_policy_desc, NULL },
{ NULL }
};
{ "an_next", "walk kcf_areq_node's by an_next",
{ "an_prev", "walk kcf_areq_node's by an_prev",
{ "an_idnext", "walk kcf_areq_node's by an_idnext",
{ "an_idprev", "walk kcf_areq_node's by an_idprev",
{ "an_ctxchain_next",
"walk kcf_areq_node's by an_ctxchain_next",
{ "kcf_reqid_table", "table of asynchronous crypto requests",
{ "soft_conf_entry", "table of software providers or addr",
{ NULL }
};
};
const mdb_modinfo_t *
_mdb_init(void)
{
return (&modinfo);
}