Reference Guide

Chapter 3: Resource Management 25
RSA BSAFE Crypto-C Micro Edition 3.x to 4.1.4 Migration Guide
Loading a PKCS #11 provider queries the PKCS #11 driver library file to determine
the slots and tokens available on the device. This can also be done manually by calling
R_PROV_PKCS11_update_full() on the R_PROV provider object. Any
newly-discovered slots and tokens are added to the provider list, and ones no longer
present are removed.
PKCS #11 Sample Programs
In Crypto-C ME 3.x, information about a PKCS #11 driver or device was set or
retrieved through the
R_HW interface. In Crypto-C ME 4.1.4, this interface is replaced
by the
R_PROV interface.
For sample programs that demonstrate setting and retrieving hardware information,
and a range of data and key operations on hardware, see Sample Programs >
Hardware Operations in the RSA BSAFE Crypto-C Micro Edition Developers
Guide.
Function Mapping
The following table maps the Crypto-C ME 3.x R_HW function names to the
Crypto-C ME 4.1.4
R_PROV_PKCS11 function names.
Table 6 PKCS #11 Function Mapping
Crypto-C ME 3.x Crypto-C ME 4.1.4
R_HW_CTX_build_device_handle_list() R_PROV_PKCS11_update_full()
R_HW_CTX_free()
No equivalent
R_HW_CTX_get_device_handle_list()
No equivalent
R_HW_CTX_get_device_handle_list_count() R_PROV_PKCS11_get_slot_count()
R_HW_CTX_get_device_handle_list_handle()
No equivalent
R_HW_CTX_get_info()
No equivalent
R_HW_CTX_iterate_devices()
No equivalent
R_HW_CTX_new()
No equivalent
R_HW_CTX_probe_devices() R_PROV_PKCS11_update()
R_HW_CTX_set_info()
No equivalent
R_CR_get_crypto_provider_name()
No equivalent
R_HW_DEV_get_crypto_provider_name_R_CR()
No equivalent (Calls
R_CR_get_crypto_provider_name())
R_HW_DEV_get_device_driver_id() R_PROV_PKCS11_get_slot_driver_id()
R_HW_DEV_get_device_name() R_PROV_PKCS11_get_slot_name()