The XML Security Library allows application to load multiple "xmlsec-<crypto> libraries. To prevent symbol conflicts, all "xmlsec-mycrypto" library names MUST start with "xmlSecMyCrypto". However, in some applications (for example, the xmlsec command line utility) that can use any crypto library, would prefer to use a generic function names where possible. The "include/xmlsec/crypto.h" and "include/xmlsec/mycrypto/symbols.h" include files do the magic by mapping "xmlSecMyCrypto*" to "xmlSecCrypto*" names using "XMLSEC_CRYPTO_*" defines.
In order to build xmlsec command line utility, the "xmlsec-<crypto>" library must implement several functions. The stubs for all these functions are provided in the "skeleton" we've created. While these functions are not required to be implemented by "xmlsec-<crypto>" library, you should consider doing so (if possible) to simplify testing (thru xmlsec command line utility) and application development.
In adition to xmlSecCryptoApp* functions, the xmlsec-<crypto> library MUST implement following xmlSecCrypto* functions:
Table 1. xmlSecCrypto* functions.
|xmlSecCryptoInit()||Initializes xmlsec-<crypto> library: registers cryptographic transforms implemented by the library, keys, etc. Please note, that the application might want to intialize the cryprographic library by itself. The default cryprographic library initialization (for example, used by xmlsec utility) is implemented in xmlSecCryptoAppInit() function.|
|xmlSecCryptoShutdown()||Shuts down xmlsec-<crypto> library. Please note, that the application might want to shutdown the cryprographic library by itself. The default cryprographic library shutdown (for example, used by xmlsec utility) is implemented in xmlSecCryptoAppShutdown() function.|
|xmlSecCryptoKeysMngrInit()||Adds keys stores implemented by the xmlsec-<crypto> library to the keys manager object.|