Reference Guide

Chapter 3: Resource Management 17
RSA BSAFE Crypto-C Micro Edition 3.x to 4.1.4 Migration Guide
Providers
In Crypto-C ME 4.1.4 resources can be added to the library context in three ways:
When created as an array of resources, as in Crypto-C ME 3.x.
After creation as a single resource, or array of resources.
After creation from a provider.
In Crypto-C ME 4.1.4, unlike 3.x, resources can be added to the library context
multiple times, in each of the different ways, and they are all available for use.
Providers present a consistent interface for resources management in the application
and the library. Providers also implement the interfaces by which specific sources of
resources can be configured. After providers are created and configured, they can be
added to one or more library contexts where their resources become available for use.
Because all providers can be used in Crypto-C ME 4.1.4 by linking against the various
provider libraries files, the functions
PRODUCT_LIBRARY_NEW() and
PRODUCT_DEFAULT_RESOURCE_LIST(), which were recommended for use prior to
Crypto-C ME 4.1.4, are now deprecated.
PRODUCT_DEFAULT_RESOURCE_LIST()
can still be used, but maps to the default software providers resource list regardless of
which provider library the application is linked against.
The following table lists the library context creation and resource list functions for
Crypto-C ME 3.x and Crypto-C ME 4.1.4.
Crypto-C ME 4.1.4 supplies the software, FIPS 140-2, and PKCS #11 providers as the
replacement for static resource lists.
Table 4 Library Initialization
Crypto-C ME 3.x Crypto-C ME 4.1.4
PRODUCT_LIBRARY_NEW() R_LIB_CTX_new() or R_LIB_CTX_new_ef()
PRODUCT_DEFAULT_RESOURCE_LIST()
PRODUCT_FIPS140_MODE_RESOURCE_LIST()
PRODUCT_NON_FIPS140_MODE_RESOURCE_
LIST()
PRODUCT_FIPS140_SSL_MODE_RESOURCE_
LIST()
PRODUCT_NON_FIPS140_ECC_MODE_
RESOURCE_LIST()
PRODUCT_FIPS140_SSL_ECC_MODE_
RESOURCE_LIST()
R_PROV_get_default_resource_list()
R_PROV_SOFTWARE_get_default_resource_list()
R_PROV_SOFTWARE_get_default_fast_resource_
list()
R_PROV_SOFTWARE_get_default_small_resource_
list()
R_PROV_FIPS140_new()
or R_LIB_CTX_add_
provider()
R_PROV_PKCS11_new()
or R_LIB_CTX_add_
provider()
R_LIB_CTX_set_mode()