Reference Guide

Chapter 3: Resource Management 35
RSA BSAFE Crypto-C Micro Edition 3.x to 4.1.4 Migration Guide
For each resource lookup performed, output like the following is displayed.
Search : mod_id(600), res_id(1000000), sub_id(0x000000000)
Found (1) resources
Filter Ri_RES_FILTER_state matches(1) resources
Filter Ri_RES_FILTER_subid matches(1) resources
Filter Ri_RES_FILTER_data matches(1) resources
The Search line shows which resource is being requested and displays the following
information:
mod_id is the module identifier for the resource. All module identifiers are
defined in
bsafe/r_modid.h. For example, module identifier 600 is
R_RES_MOD_ID_CRYPTO which is all the generic cryptographic resources from
the default provider.
res_id is the resource identifier for the resource, which maps to a
module-specific resource identifier. For example, 1000000 in the above example
maps to the
R_CR_CRYPTO_CTX_BASE resource.
sub_id is the required sub identifier. This might be a bit field of required bits, or
an exact match depending on the resource. For example, for a signature object this
might be
R_CR_SUB_SIGN or 0x00000001.
The Filter lists show the number of resources that passed each filter that was applied to
the selection of resources. The filters in the example above will always be present, but
others may also be present.
Ri_RES_FILTER_state only passes resources that are currently active.
Resources from the software provider are always active, but FIPS 140-2
resources and PKCS #11 resources might not be.
Ri_RES_FILTER_subid only passes resources that meet the requirements of
the requested sub identifier.
Ri_RES_FILTER_data only passes resources that indicate they can support the
supplied data. The data is either NULL, an
R_PKEY object, or an R_SKEY object.
An asymmetric key from the PKCS #11 provider might not be usable by a
resource from the FIPS 140-2 or software providers, and therefore those resources
would be removed from the selection by this filter.
You can have other information to display by adding options like
R_TRACE_F_DATA
to the
R_TRACE structure, as shown in the following code example.
const R_TRACER tracer =
{
R_TRACE_VERSION_1,
R_TRACE_LVL_ALL|R_TRACE_F_DATA,
logger,
NULL,
};
This displays information about each resources that was selected or passes each filter.
For more information about tracing in Crypto-C ME, see Tracing in the RSA BSAFE
Crypto-C Micro Edition Developers Guide.