XML Security Library Structure.

In order to provide the an ability to use different crypto engines, the XML Security Library is splitted in two parts: core library (xmlsec) and crypto library (xmlsec-openssl, xmlsec-mscrypt, xmlsec-mscng, xmlsec-gnutls, xmlsec-gcrypt, xmlsec-nss, ...).

Figure 1. The library structure and dependencies.

The library structure and dependencies.

The core library has no dependency on any crypto library and provides implementation of all the engines as well as support for all the non crypto transforms (xml parser, c14n transforms, xpath and xslt transforms,...). The XML Security Crypto library provides implementations for crypto transforms, crypto keys data and key data stores. Application is linked with particular XML Security Crypto library (or even libraries), but the actual application code might be general enough so switching crypto engine would be a matter of changing several #include directives.