app

Home Download News Documentation FAQ Tutorial API reference Examples XML Digital Signature Online Verifier XML Encryption XML Canonicalization Reporting Bugs Mailing list Related Authors
# app ## Name app -- ## Synopsis
    int         xmlSecCryptoInit                (void);
    int         xmlSecCryptoShutdown            (void);
    int         xmlSecCryptoKeysMngrInit        (xmlSecKeysMngrPtr mngr);
    #define     xmlSecKeyDataAesId
    xmlSecKeyDataId xmlSecKeyDataAesGetKlass    (void);
    #define     xmlSecKeyDataDesId
    xmlSecKeyDataId xmlSecKeyDataDesGetKlass    (void);
    #define     xmlSecKeyDataDsaId
    xmlSecKeyDataId xmlSecKeyDataDsaGetKlass    (void);
    #define     xmlSecKeyDataHmacId
    xmlSecKeyDataId xmlSecKeyDataHmacGetKlass   (void);
    #define     xmlSecKeyDataRsaId
    xmlSecKeyDataId xmlSecKeyDataRsaGetKlass    (void);
    #define     xmlSecKeyDataX509Id
    xmlSecKeyDataId xmlSecKeyDataX509GetKlass   (void);
    #define     xmlSecKeyDataRawX509CertId
    xmlSecKeyDataId xmlSecKeyDataRawX509CertGetKlass
                                                (void);
    #define     xmlSecX509StoreId
    xmlSecKeyDataStoreId xmlSecX509StoreGetKlass
                                                (void);
    #define     xmlSecTransformAes128CbcId
    xmlSecTransformId xmlSecTransformAes128CbcGetKlass
                                                (void);
    #define     xmlSecTransformAes192CbcId
    xmlSecTransformId xmlSecTransformAes192CbcGetKlass
                                                (void);
    #define     xmlSecTransformAes256CbcId
    xmlSecTransformId xmlSecTransformAes256CbcGetKlass
                                                (void);
    #define     xmlSecTransformKWAes128Id
    xmlSecTransformId xmlSecTransformKWAes128GetKlass
                                                (void);
    #define     xmlSecTransformKWAes192Id
    xmlSecTransformId xmlSecTransformKWAes192GetKlass
                                                (void);
    #define     xmlSecTransformKWAes256Id
    xmlSecTransformId xmlSecTransformKWAes256GetKlass
                                                (void);
    #define     xmlSecTransformDes3CbcId
    xmlSecTransformId xmlSecTransformDes3CbcGetKlass
                                                (void);
    #define     xmlSecTransformKWDes3Id
    xmlSecTransformId xmlSecTransformKWDes3GetKlass
                                                (void);
    #define     xmlSecTransformDsaSha1Id
    xmlSecTransformId xmlSecTransformDsaSha1GetKlass
                                                (void);
    #define     xmlSecTransformHmacSha1Id
    xmlSecTransformId xmlSecTransformHmacSha1GetKlass
                                                (void);
    #define     xmlSecTransformHmacRipemd160Id
    xmlSecTransformId xmlSecTransformHmacRipemd160GetKlass
                                                (void);
    #define     xmlSecTransformHmacMd5Id
    xmlSecTransformId xmlSecTransformHmacMd5GetKlass
                                                (void);
    #define     xmlSecTransformRipemd160Id
    xmlSecTransformId xmlSecTransformRipemd160GetKlass
                                                (void);
    #define     xmlSecTransformRsaSha1Id
    xmlSecTransformId xmlSecTransformRsaSha1GetKlass
                                                (void);
    #define     xmlSecTransformRsaPkcs1Id
    xmlSecTransformId xmlSecTransformRsaPkcs1GetKlass
                                                (void);
    #define     xmlSecTransformRsaOaepId
    xmlSecTransformId xmlSecTransformRsaOaepGetKlass
                                                (void);
    #define     xmlSecTransformSha1Id
    xmlSecTransformId xmlSecTransformSha1GetKlass
                                                (void);
    int         xmlSecCryptoAppInit             (const char *config);
    int         xmlSecCryptoAppShutdown         (void);
    int         xmlSecCryptoAppDefaultKeysMngrInit
                                                (xmlSecKeysMngrPtr mngr);
    int         xmlSecCryptoAppDefaultKeysMngrAdoptKey
                                                (xmlSecKeysMngrPtr mngr,
                                                 xmlSecKeyPtr key);
    int         xmlSecCryptoAppDefaultKeysMngrLoad
                                                (xmlSecKeysMngrPtr mngr,
                                                 const char *uri);
    int         xmlSecCryptoAppDefaultKeysMngrSave
                                                (xmlSecKeysMngrPtr mngr,
                                                 const char *filename,
                                                 xmlSecKeyDataType type);
    int         xmlSecCryptoAppKeysMngrCertLoad (xmlSecKeysMngrPtr mngr,
                                                 const char *filename,
                                                 xmlSecKeyDataFormat format,
                                                 xmlSecKeyDataType type);
    xmlSecKeyPtr xmlSecCryptoAppKeyLoad         (const char *filename,
                                                 xmlSecKeyDataFormat format,
                                                 const char *pwd,
                                                 void *pwdCallback,
                                                 void *pwdCallbackCtx);
    xmlSecKeyPtr xmlSecCryptoAppPkcs12Load      (const char *filename,
                                                 const char *pwd,
                                                 void *pwdCallback,
                                                 void *pwdCallbackCtx);
    int         xmlSecCryptoAppKeyCertLoad      (xmlSecKeyPtr key,
                                                 const char *filename,
                                                 xmlSecKeyDataFormat format);
    void*       xmlSecCryptoAppGetDefaultPwdCallback
                                                (void);
## Description ## Details ### xmlSecCryptoInit ()
    int         xmlSecCryptoInit                (void);
XMLSec library specific crypto engine initialization.
Returns : | 0 on success or a negative value otherwise.
### xmlSecCryptoShutdown ()
    int         xmlSecCryptoShutdown            (void);
XMLSec library specific crypto engine shutdown.
Returns : | 0 on success or a negative value otherwise.
### xmlSecCryptoKeysMngrInit ()
    int         xmlSecCryptoKeysMngrInit        (xmlSecKeysMngrPtr mngr);
Adds crypto specific key data stores in keys manager.
mngr : | the pointer to keys manager.
Returns : | 0 on success or a negative value otherwise.
### xmlSecKeyDataAesId
    #define xmlSecKeyDataAesId			xmlSecKeyDataAesGetKlass()
The AES key klass. ### xmlSecKeyDataAesGetKlass ()
    xmlSecKeyDataId xmlSecKeyDataAesGetKlass    (void);
The AES key data klass.
Returns : | AES key data klass or NULL if an error occurs (xmlsec-crypto library is not loaded or the AES key data klass is not implemented).
### xmlSecKeyDataDesId
    #define xmlSecKeyDataDesId			xmlSecKeyDataDesGetKlass()
The DES key klass. ### xmlSecKeyDataDesGetKlass ()
    xmlSecKeyDataId xmlSecKeyDataDesGetKlass    (void);
The DES key data klass.
Returns : | DES key data klass or NULL if an error occurs (xmlsec-crypto library is not loaded or the DES key data klass is not implemented).
### xmlSecKeyDataDsaId
    #define xmlSecKeyDataDsaId			xmlSecKeyDataDsaGetKlass()
The DSA key klass. ### xmlSecKeyDataDsaGetKlass ()
    xmlSecKeyDataId xmlSecKeyDataDsaGetKlass    (void);
The DSA key data klass.
Returns : | DSA key data klass or NULL if an error occurs (xmlsec-crypto library is not loaded or the DSA key data klass is not implemented).
### xmlSecKeyDataHmacId
    #define xmlSecKeyDataHmacId			xmlSecKeyDataHmacGetKlass()
The DHMAC key klass. ### xmlSecKeyDataHmacGetKlass ()
    xmlSecKeyDataId xmlSecKeyDataHmacGetKlass   (void);
The HMAC key data klass.
Returns : | HMAC key data klass or NULL if an error occurs (xmlsec-crypto library is not loaded or the HMAC key data klass is not implemented).
### xmlSecKeyDataRsaId
    #define xmlSecKeyDataRsaId			xmlSecKeyDataRsaGetKlass()
The RSA key klass. ### xmlSecKeyDataRsaGetKlass ()
    xmlSecKeyDataId xmlSecKeyDataRsaGetKlass    (void);
The RSA key data klass.
Returns : | RSA key data klass or NULL if an error occurs (xmlsec-crypto library is not loaded or the RSA key data klass is not implemented).
### xmlSecKeyDataX509Id
    #define xmlSecKeyDataX509Id			xmlSecKeyDataX509GetKlass()
The X509 data klass. ### xmlSecKeyDataX509GetKlass ()
    xmlSecKeyDataId xmlSecKeyDataX509GetKlass   (void);
The X509 key data klass.
Returns : | X509 key data klass or NULL if an error occurs (xmlsec-crypto library is not loaded or the X509 key data klass is not implemented).
### xmlSecKeyDataRawX509CertId
    #define xmlSecKeyDataRawX509CertId		xmlSecKeyDataRawX509CertGetKlass()
The raw X509 certificate klass. ### xmlSecKeyDataRawX509CertGetKlass ()
    xmlSecKeyDataId xmlSecKeyDataRawX509CertGetKlass
                                                (void);
The raw X509 cert key data klass.
Returns : | raw x509 cert key data klass or NULL if an error occurs (xmlsec-crypto library is not loaded or the raw X509 cert key data klass is not implemented).
### xmlSecX509StoreId
    #define xmlSecX509StoreId			xmlSecX509StoreGetKlass()
The X509 store klass. ### xmlSecX509StoreGetKlass ()
    xmlSecKeyDataStoreId xmlSecX509StoreGetKlass
                                                (void);
The X509 certificates key data store klass.
Returns : | pointer to X509 certificates key data store klass or NULL if an error occurs (xmlsec-crypto library is not loaded or the raw X509 cert key data klass is not implemented).
### xmlSecTransformAes128CbcId
    #define xmlSecTransformAes128CbcId		xmlSecTransformAes128CbcGetKlass()
The AES128 CBC cipher transform klass. ### xmlSecTransformAes128CbcGetKlass ()
    xmlSecTransformId xmlSecTransformAes128CbcGetKlass
                                                (void);
AES 128 CBC encryption transform klass.
Returns : | pointer to AES 128 CBC encryption transform or NULL if an error occurs (the xmlsec-crypto library is not loaded or this transform is not implemented).
### xmlSecTransformAes192CbcId
    #define xmlSecTransformAes192CbcId		xmlSecTransformAes192CbcGetKlass()
The AES192 CBC cipher transform klass. ### xmlSecTransformAes192CbcGetKlass ()
    xmlSecTransformId xmlSecTransformAes192CbcGetKlass
                                                (void);
AES 192 CBC encryption transform klass.
Returns : | pointer to AES 192 CBC encryption transform or NULL if an error occurs (the xmlsec-crypto library is not loaded or this transform is not implemented).
### xmlSecTransformAes256CbcId
    #define xmlSecTransformAes256CbcId		xmlSecTransformAes256CbcGetKlass()
The AES256 CBC cipher transform klass. ### xmlSecTransformAes256CbcGetKlass ()
    xmlSecTransformId xmlSecTransformAes256CbcGetKlass
                                                (void);
AES 256 CBC encryption transform klass.
Returns : | pointer to AES 256 CBC encryption transform or NULL if an error occurs (the xmlsec-crypto library is not loaded or this transform is not implemented).
### xmlSecTransformKWAes128Id
    #define xmlSecTransformKWAes128Id		xmlSecTransformKWAes128GetKlass()
The AES 128 key wrap transform klass. ### xmlSecTransformKWAes128GetKlass ()
    xmlSecTransformId xmlSecTransformKWAes128GetKlass
                                                (void);
The AES-128 kew wrapper transform klass.
Returns : | AES-128 kew wrapper transform klass or NULL if an error occurs (the xmlsec-crypto library is not loaded or this transform is not implemented).
### xmlSecTransformKWAes192Id
    #define xmlSecTransformKWAes192Id		xmlSecTransformKWAes192GetKlass()
The AES 192 key wrap transform klass. ### xmlSecTransformKWAes192GetKlass ()
    xmlSecTransformId xmlSecTransformKWAes192GetKlass
                                                (void);
The AES-192 kew wrapper transform klass.
Returns : | AES-192 kew wrapper transform klass or NULL if an error occurs (the xmlsec-crypto library is not loaded or this transform is not implemented).
### xmlSecTransformKWAes256Id
    #define xmlSecTransformKWAes256Id		xmlSecTransformKWAes256GetKlass()
The AES 256 key wrap transform klass. ### xmlSecTransformKWAes256GetKlass ()
    xmlSecTransformId xmlSecTransformKWAes256GetKlass
                                                (void);
The AES-256 kew wrapper transform klass.
Returns : | AES-256 kew wrapper transform klass or NULL if an error occurs (the xmlsec-crypto library is not loaded or this transform is not implemented).
### xmlSecTransformDes3CbcId
    #define xmlSecTransformDes3CbcId		xmlSecTransformDes3CbcGetKlass()
The Triple DES encryption transform klass. ### xmlSecTransformDes3CbcGetKlass ()
    xmlSecTransformId xmlSecTransformDes3CbcGetKlass
                                                (void);
Triple DES CBC encryption transform klass.
Returns : | pointer to Triple DES encryption transform or NULL if an error occurs (the xmlsec-crypto library is not loaded or this transform is not implemented).
### xmlSecTransformKWDes3Id
    #define xmlSecTransformKWDes3Id			xmlSecTransformKWDes3GetKlass()
The DES3 CBC cipher transform klass. ### xmlSecTransformKWDes3GetKlass ()
    xmlSecTransformId xmlSecTransformKWDes3GetKlass
                                                (void);
The Triple DES key wrapper transform klass.
Returns : | Triple DES key wrapper transform klass or NULL if an error occurs (the xmlsec-crypto library is not loaded or this transform is not implemented).
### xmlSecTransformDsaSha1Id
    #define xmlSecTransformDsaSha1Id		xmlSecTransformDsaSha1GetKlass()
The DSA-SHA1 signature transform klass. ### xmlSecTransformDsaSha1GetKlass ()
    xmlSecTransformId xmlSecTransformDsaSha1GetKlass
                                                (void);
The DSA-SHA1 signature transform klass.
Returns : | DSA-SHA1 signature transform klass or NULL if an error occurs (the xmlsec-crypto library is not loaded or this transform is not implemented).
### xmlSecTransformHmacSha1Id
    #define xmlSecTransformHmacSha1Id		xmlSecTransformHmacSha1GetKlass()
The HMAC with SHA1 signature transform klass. ### xmlSecTransformHmacSha1GetKlass ()
    xmlSecTransformId xmlSecTransformHmacSha1GetKlass
                                                (void);
The HMAC-SHA1 transform klass.
Returns : | the HMAC-SHA1 transform klass or NULL if an error occurs (the xmlsec-crypto library is not loaded or this transform is not implemented).
### xmlSecTransformHmacRipemd160Id
    #define xmlSecTransformHmacRipemd160Id		xmlSecTransformHmacRipemd160GetKlass()
The HMAC with RipeMD160 signature transform klass. ### xmlSecTransformHmacRipemd160GetKlass ()
    xmlSecTransformId xmlSecTransformHmacRipemd160GetKlass
                                                (void);
The HMAC-RIPEMD160 transform klass.
Returns : | the HMAC-RIPEMD160 transform klass or NULL if an error occurs (the xmlsec-crypto library is not loaded or this transform is not implemented).
### xmlSecTransformHmacMd5Id
    #define xmlSecTransformHmacMd5Id		xmlSecTransformHmacMd5GetKlass()
The HMAC with MD5 signature transform klass. ### xmlSecTransformHmacMd5GetKlass ()
    xmlSecTransformId xmlSecTransformHmacMd5GetKlass
                                                (void);
The HMAC-MD5 transform klass.
Returns : | the HMAC-MD5 transform klass or NULL if an error occurs (the xmlsec-crypto library is not loaded or this transform is not implemented).
### xmlSecTransformRipemd160Id
    #define xmlSecTransformRipemd160Id		xmlSecTransformRipemd160GetKlass()
The RIPEMD160 digest transform klass. ### xmlSecTransformRipemd160GetKlass ()
    xmlSecTransformId xmlSecTransformRipemd160GetKlass
                                                (void);
RIPEMD-160 digest transform klass.
Returns : | pointer to RIPEMD-160 digest transform klass or NULL if an error occurs (the xmlsec-crypto library is not loaded or this transform is not implemented).
### xmlSecTransformRsaSha1Id
    #define xmlSecTransformRsaSha1Id		xmlSecTransformRsaSha1GetKlass()
The RSA-SHA1 signature transform klass. ### xmlSecTransformRsaSha1GetKlass ()
    xmlSecTransformId xmlSecTransformRsaSha1GetKlass
                                                (void);
The RSA-SHA1 signature transform klass.
Returns : | RSA-SHA1 signature transform klass or NULL if an error occurs (the xmlsec-crypto library is not loaded or this transform is not implemented).
### xmlSecTransformRsaPkcs1Id
    #define xmlSecTransformRsaPkcs1Id		xmlSecTransformRsaPkcs1GetKlass()
The RSA PKCS1 key transport transform klass. ### xmlSecTransformRsaPkcs1GetKlass ()
    xmlSecTransformId xmlSecTransformRsaPkcs1GetKlass
                                                (void);
The RSA-PKCS1 key transport transform klass.
Returns : | RSA-PKCS1 key transport transform klass or NULL if an error occurs (the xmlsec-crypto library is not loaded or this transform is not implemented).
### xmlSecTransformRsaOaepId
    #define xmlSecTransformRsaOaepId		xmlSecTransformRsaOaepGetKlass()
The RSA PKCS1 key transport transform klass. ### xmlSecTransformRsaOaepGetKlass ()
    xmlSecTransformId xmlSecTransformRsaOaepGetKlass
                                                (void);
The RSA-OAEP key transport transform klass.
Returns : | RSA-OAEP key transport transform klass or NULL if an error occurs (the xmlsec-crypto library is not loaded or this transform is not implemented).
### xmlSecTransformSha1Id
    #define xmlSecTransformSha1Id			xmlSecTransformSha1GetKlass()
The SHA1 digest transform klass. ### xmlSecTransformSha1GetKlass ()
    xmlSecTransformId xmlSecTransformSha1GetKlass
                                                (void);
SHA-1 digest transform klass.
Returns : | pointer to SHA-1 digest transform klass or NULL if an error occurs (the xmlsec-crypto library is not loaded or this transform is not implemented).
### xmlSecCryptoAppInit ()
    int         xmlSecCryptoAppInit             (const char *config);
General crypto engine initialization. This function is used by XMLSec command line utility and called before xmlSecInit function.
config : | the path to crypto library configuration.
Returns : | 0 on success or a negative value otherwise.
### xmlSecCryptoAppShutdown ()
    int         xmlSecCryptoAppShutdown         (void);
General crypto engine shutdown. This function is used by XMLSec command line utility and called after xmlSecShutdown function.
Returns : | 0 on success or a negative value otherwise.
### xmlSecCryptoAppDefaultKeysMngrInit ()
    int         xmlSecCryptoAppDefaultKeysMngrInit
                                                (xmlSecKeysMngrPtr mngr);
Initializes mngr with simple keys store xmlSecSimpleKeysStoreId and a default crypto key data stores.
mngr : | the pointer to keys manager.
Returns : | 0 on success or a negative value otherwise.
### xmlSecCryptoAppDefaultKeysMngrAdoptKey ()
    int         xmlSecCryptoAppDefaultKeysMngrAdoptKey
                                                (xmlSecKeysMngrPtr mngr,
                                                 xmlSecKeyPtr key);
Adds key to the keys manager mngr created with xmlSecCryptoAppDefaultKeysMngrInit function.
mngr : | the pointer to keys manager.
key : | the pointer to key.
Returns : | 0 on success or a negative value otherwise.
### xmlSecCryptoAppDefaultKeysMngrLoad ()
    int         xmlSecCryptoAppDefaultKeysMngrLoad
                                                (xmlSecKeysMngrPtr mngr,
                                                 const char *uri);
Loads XML keys file from uri to the keys manager mngr created with xmlSecCryptoAppDefaultKeysMngrInit function.
mngr : | the pointer to keys manager.
uri : | the uri.
Returns : | 0 on success or a negative value otherwise.
### xmlSecCryptoAppDefaultKeysMngrSave ()
    int         xmlSecCryptoAppDefaultKeysMngrSave
                                                (xmlSecKeysMngrPtr mngr,
                                                 const char *filename,
                                                 xmlSecKeyDataType type);
Saves keys from mngr to XML keys file.
mngr : | the pointer to keys manager.
filename : | the destination filename.
type : | the type of keys to save (public/private/symmetric).
Returns : | 0 on success or a negative value otherwise.
### xmlSecCryptoAppKeysMngrCertLoad ()
    int         xmlSecCryptoAppKeysMngrCertLoad (xmlSecKeysMngrPtr mngr,
                                                 const char *filename,
                                                 xmlSecKeyDataFormat format,
                                                 xmlSecKeyDataType type);
Reads cert from filename and adds to the list of trusted or known untrusted certs in store.
mngr : | the keys manager.
filename : | the certificate file.
format : | the certificate file format.
type : | the flag that indicates is the certificate in filename trusted or not.
Returns : | 0 on success or a negative value otherwise.
### xmlSecCryptoAppKeyLoad ()
    xmlSecKeyPtr xmlSecCryptoAppKeyLoad         (const char *filename,
                                                 xmlSecKeyDataFormat format,
                                                 const char *pwd,
                                                 void *pwdCallback,
                                                 void *pwdCallbackCtx);
Reads key from the a file.
filename : | the key filename.
format : | the key file format.
pwd : | the key file password.
pwdCallback : | the key password callback.
pwdCallbackCtx : | the user context for password callback.
Returns : | pointer to the key or NULL if an error occurs.
### xmlSecCryptoAppPkcs12Load ()
    xmlSecKeyPtr xmlSecCryptoAppPkcs12Load      (const char *filename,
                                                 const char *pwd,
                                                 void *pwdCallback,
                                                 void *pwdCallbackCtx);
Reads key and all associated certificates from the PKCS12 file. For uniformity, call xmlSecCryptoAppKeyLoad instead of this function. Pass in format=xmlSecKeyDataFormatPkcs12.
filename : | the PKCS12 key filename.
pwd : | the PKCS12 file password.
pwdCallback : | the password callback.
pwdCallbackCtx : | the user context for password callback.
Returns : | pointer to the key or NULL if an error occurs.
### xmlSecCryptoAppKeyCertLoad ()
    int         xmlSecCryptoAppKeyCertLoad      (xmlSecKeyPtr key,
                                                 const char *filename,
                                                 xmlSecKeyDataFormat format);
Reads the certificate from $filename and adds it to key.
key : | the pointer to key.
filename : | the certificate filename.
format : | the certificate file format.
Returns : | 0 on success or a negative value otherwise.
### xmlSecCryptoAppGetDefaultPwdCallback ()
    void*       xmlSecCryptoAppGetDefaultPwdCallback
                                                (void);
Gets default password callback.
Aleksey Sanin