app.h   app.h 
skipping to change at line 38 skipping to change at line 38
#include <xmlsec/keys.h> #include <xmlsec/keys.h>
#include <xmlsec/keysmngr.h> #include <xmlsec/keysmngr.h>
#include <xmlsec/transforms.h> #include <xmlsec/transforms.h>
#include <xmlsec/dl.h> #include <xmlsec/dl.h>
/********************************************************************** /**********************************************************************
* *
* Crypto Init/shutdown * Crypto Init/shutdown
* *
*********************************************************************/ *********************************************************************/
XMLSEC_EXPORT int xmlSecCryptoInit XMLSEC_EXPORT int xmlSecCryptoInit
(void); (void);
XMLSEC_EXPORT int xmlSecCryptoShutdown XMLSEC_EXPORT int xmlSecCryptoShutdown
(void); (void);
XMLSEC_EXPORT int xmlSecCryptoKeysMngrInit XMLSEC_EXPORT int xmlSecCryptoKeysMngrInit
(xmlSecKeysMngrPtr mngr); (xmlSecKeysMngrPtr mngr);
/********************************************************************* /*********************************************************************
* *
* Key data ids * Key data ids
* *
********************************************************************/ ********************************************************************/
/** /**
* xmlSecKeyDataAesId: * xmlSecKeyDataAesId:
* *
* The AES key klass. * The AES key klass.
*/ */
#define xmlSecKeyDataAesId xmlSecKeyDataAesGetKlass() #define xmlSecKeyDataAesId xmlSecKeyDataAesGetKlass()
XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataAesGetKlass XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataAesGetKlass
(void); (void);
/** /**
* xmlSecKeyDataDesId: * xmlSecKeyDataDesId:
* *
* The DES key klass. * The DES key klass.
*/ */
#define xmlSecKeyDataDesId xmlSecKeyDataDesGetKlass() #define xmlSecKeyDataDesId xmlSecKeyDataDesGetKlass()
XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataDesGetKlass XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataDesGetKlass
(void); (void);
/** /**
* xmlSecKeyDataDsaId: * xmlSecKeyDataDsaId:
* *
* The DSA key klass. * The DSA key klass.
*/ */
#define xmlSecKeyDataDsaId xmlSecKeyDataDsaGetKlass() #define xmlSecKeyDataDsaId xmlSecKeyDataDsaGetKlass()
XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataDsaGetKlass XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataDsaGetKlass
(void); (void);
/** /**
* xmlSecKeyDataGost2001Id: * xmlSecKeyDataGost2001Id:
* *
* The GOST2001 key klass. * The GOST2001 key klass.
*/ */
#define xmlSecKeyDataGost2001Id xmlSecKeyDataGost200 #define xmlSecKeyDataGost2001Id xmlSecKeyDataGost2001GetKla
1GetKlass() ss()
XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataGost2001GetKlas XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataGost2001GetKla
s (void); ss (void);
/** /**
* xmlSecKeyDataHmacId: * xmlSecKeyDataHmacId:
* *
* The DHMAC key klass. * The DHMAC key klass.
*/ */
#define xmlSecKeyDataHmacId xmlSecKeyDataHmacGetKlass() #define xmlSecKeyDataHmacId xmlSecKeyDataHmacGetKlass()
XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataHmacGetKlass XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataHmacGetKlass
(void); (void);
/** /**
* xmlSecKeyDataRsaId: * xmlSecKeyDataRsaId:
* *
* The RSA key klass. * The RSA key klass.
*/ */
#define xmlSecKeyDataRsaId xmlSecKeyDataRsaGetKlass() #define xmlSecKeyDataRsaId xmlSecKeyDataRsaGetKlass()
XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataRsaGetKlass XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataRsaGetKlass
(void); (void);
/** /**
* xmlSecKeyDataX509Id: * xmlSecKeyDataX509Id:
* *
* The X509 data klass. * The X509 data klass.
*/ */
#define xmlSecKeyDataX509Id xmlSecKeyDataX509GetKlass() #define xmlSecKeyDataX509Id xmlSecKeyDataX509GetKlass()
XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataX509GetKlass XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataX509GetKlass
(void); (void);
/** /**
* xmlSecKeyDataRawX509CertId: * xmlSecKeyDataRawX509CertId:
* *
* The raw X509 certificate klass. * The raw X509 certificate klass.
*/ */
#define xmlSecKeyDataRawX509CertId xmlSecKeyDataRawX509CertGetK #define xmlSecKeyDataRawX509CertId xmlSecKeyDataRawX509CertGet
lass() Klass()
XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataRawX509CertGetK XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataRawX509CertGet
lass(void); Klass(void);
/********************************************************************* /*********************************************************************
* *
* Key data store ids * Key data store ids
* *
********************************************************************/ ********************************************************************/
/** /**
* xmlSecX509StoreId: * xmlSecX509StoreId:
* *
* The X509 store klass. * The X509 store klass.
*/ */
#define xmlSecX509StoreId xmlSecX509StoreGetKlass() #define xmlSecX509StoreId xmlSecX509StoreGetKlass()
XMLSEC_EXPORT xmlSecKeyDataStoreId xmlSecX509StoreGetKlass XMLSEC_EXPORT xmlSecKeyDataStoreId xmlSecX509StoreGetKlass
(void); (void);
/********************************************************************* /*********************************************************************
* *
* Crypto transforms ids * Crypto transforms ids
* *
********************************************************************/ ********************************************************************/
/** /**
* xmlSecTransformAes128CbcId: * xmlSecTransformAes128CbcId:
* *
* The AES128 CBC cipher transform klass. * The AES128 CBC cipher transform klass.
*/ */
#define xmlSecTransformAes128CbcId xmlSecTransformAes128CbcGetK #define xmlSecTransformAes128CbcId xmlSecTransformAes128CbcGet
lass() Klass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformAes12 XMLSEC_EXPORT xmlSecTransformId xmlSecTransformAes128CbcGet
8CbcGetKlass(void); Klass(void);
/** /**
* xmlSecTransformAes192CbcId: * xmlSecTransformAes192CbcId:
* *
* The AES192 CBC cipher transform klass. * The AES192 CBC cipher transform klass.
*/ */
#define xmlSecTransformAes192CbcId xmlSecTransformAes192CbcGetK #define xmlSecTransformAes192CbcId xmlSecTransformAes192CbcGet
lass() Klass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformAes19 XMLSEC_EXPORT xmlSecTransformId xmlSecTransformAes192CbcGet
2CbcGetKlass(void); Klass(void);
/** /**
* xmlSecTransformAes256CbcId: * xmlSecTransformAes256CbcId:
* *
* The AES256 CBC cipher transform klass. * The AES256 CBC cipher transform klass.
*/ */
#define xmlSecTransformAes256CbcId xmlSecTransformAes256CbcGetK #define xmlSecTransformAes256CbcId xmlSecTransformAes256CbcGet
lass() Klass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformAes25 XMLSEC_EXPORT xmlSecTransformId xmlSecTransformAes256CbcGet
6CbcGetKlass(void); Klass(void);
/** /**
* xmlSecTransformKWAes128Id: * xmlSecTransformKWAes128Id:
* *
* The AES 128 key wrap transform klass. * The AES 128 key wrap transform klass.
*/ */
#define xmlSecTransformKWAes128Id xmlSecTransformKWAes128GetKl #define xmlSecTransformKWAes128Id xmlSecTransformKWAes128GetK
ass() lass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformKWAes XMLSEC_EXPORT xmlSecTransformId xmlSecTransformKWAes128GetK
128GetKlass (void); lass (void);
/** /**
* xmlSecTransformKWAes192Id: * xmlSecTransformKWAes192Id:
* *
* The AES 192 key wrap transform klass. * The AES 192 key wrap transform klass.
*/ */
#define xmlSecTransformKWAes192Id xmlSecTransformKWAes192GetKl #define xmlSecTransformKWAes192Id xmlSecTransformKWAes192GetK
ass() lass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformKWAes XMLSEC_EXPORT xmlSecTransformId xmlSecTransformKWAes192GetK
192GetKlass (void); lass (void);
/** /**
* xmlSecTransformKWAes256Id: * xmlSecTransformKWAes256Id:
* *
* The AES 256 key wrap transform klass. * The AES 256 key wrap transform klass.
*/ */
#define xmlSecTransformKWAes256Id xmlSecTransformKWAes256GetKl #define xmlSecTransformKWAes256Id xmlSecTransformKWAes256GetK
ass() lass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformKWAes XMLSEC_EXPORT xmlSecTransformId xmlSecTransformKWAes256GetK
256GetKlass (void); lass (void);
/** /**
* xmlSecTransformDes3CbcId: * xmlSecTransformDes3CbcId:
* *
* The Triple DES encryption transform klass. * The Triple DES encryption transform klass.
*/ */
#define xmlSecTransformDes3CbcId xmlSecTransformDes3CbcGetKla #define xmlSecTransformDes3CbcId xmlSecTransformDes3CbcGetKl
ss() ass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformDes3C XMLSEC_EXPORT xmlSecTransformId xmlSecTransformDes3CbcGetKl
bcGetKlass (void); ass (void);
/** /**
* xmlSecTransformKWDes3Id: * xmlSecTransformKWDes3Id:
* *
* The DES3 CBC cipher transform klass. * The DES3 CBC cipher transform klass.
*/ */
#define xmlSecTransformKWDes3Id xmlSecTransformKWDes #define xmlSecTransformKWDes3Id xmlSecTransformKWDes3GetKla
3GetKlass() ss()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformKWDes XMLSEC_EXPORT xmlSecTransformId xmlSecTransformKWDes3GetKla
3GetKlass (void); ss (void);
/** /**
* xmlSecTransformDsaSha1Id: * xmlSecTransformDsaSha1Id:
* *
* The DSA-SHA1 signature transform klass. * The DSA-SHA1 signature transform klass.
*/ */
#define xmlSecTransformDsaSha1Id xmlSecTransformDsaSha1GetKla #define xmlSecTransformDsaSha1Id xmlSecTransformDsaSha1GetKl
ss() ass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformDsaSh XMLSEC_EXPORT xmlSecTransformId xmlSecTransformDsaSha1GetKl
a1GetKlass (void); ass (void);
/** /**
* xmlSecTransformGost2001GostR3411_94Id: * xmlSecTransformGost2001GostR3411_94Id:
* *
* The GOST2001-GOSTR3411_94 signature transform klass. * The GOST2001-GOSTR3411_94 signature transform klass.
*/ */
#define xmlSecTransformGost2001GostR3411_94Id xmlSecTransformGost2 #define xmlSecTransformGost2001GostR3411_94Id xmlSecTransformGost
001GostR3411_94GetKlass() 2001GostR3411_94GetKlass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformGost2 XMLSEC_EXPORT xmlSecTransformId xmlSecTransformGost2001Gost
001GostR3411_94GetKlass (void); R3411_94GetKlass (void);
/** /**
* xmlSecTransformHmacMd5Id: * xmlSecTransformHmacMd5Id:
* *
* The HMAC with MD5 signature transform klass. * The HMAC with MD5 signature transform klass.
*/ */
#define xmlSecTransformHmacMd5Id xmlSecTransformHmacMd5GetKla #define xmlSecTransformHmacMd5Id xmlSecTransformHmacMd5GetKl
ss() ass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacM XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacMd5GetKl
d5GetKlass (void); ass (void);
/** /**
* xmlSecTransformHmacRipemd160Id: * xmlSecTransformHmacRipemd160Id:
* *
* The HMAC with RipeMD160 signature transform klass. * The HMAC with RipeMD160 signature transform klass.
*/ */
#define xmlSecTransformHmacRipemd160Id xmlSecTransformHmacRipemd160 #define xmlSecTransformHmacRipemd160Id xmlSecTransformHmacRipemd16
GetKlass() 0GetKlass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacR XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacRipemd16
ipemd160GetKlass(void); 0GetKlass(void);
/** /**
* xmlSecTransformHmacSha1Id: * xmlSecTransformHmacSha1Id:
* *
* The HMAC with SHA1 signature transform klass. * The HMAC with SHA1 signature transform klass.
*/ */
#define xmlSecTransformHmacSha1Id xmlSecTransformHmacSha1GetKl #define xmlSecTransformHmacSha1Id xmlSecTransformHmacSha1GetK
ass() lass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacS XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacSha1GetK
ha1GetKlass (void); lass (void);
/** /**
* xmlSecTransformHmacSha224Id: * xmlSecTransformHmacSha224Id:
* *
* The HMAC with SHA224 signature transform klass. * The HMAC with SHA224 signature transform klass.
*/ */
#define xmlSecTransformHmacSha224Id xmlSecTransformHmacSha224Get #define xmlSecTransformHmacSha224Id xmlSecTransformHmacSha224Ge
Klass() tKlass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacS XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacSha224Ge
ha224GetKlass (void); tKlass (void);
/** /**
* xmlSecTransformHmacSha256Id: * xmlSecTransformHmacSha256Id:
* *
* The HMAC with SHA256 signature transform klass. * The HMAC with SHA256 signature transform klass.
*/ */
#define xmlSecTransformHmacSha256Id xmlSecTransformHmacSha256Get #define xmlSecTransformHmacSha256Id xmlSecTransformHmacSha256Ge
Klass() tKlass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacS XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacSha256Ge
ha256GetKlass (void); tKlass (void);
/** /**
* xmlSecTransformHmacSha384Id: * xmlSecTransformHmacSha384Id:
* *
* The HMAC with SHA384 signature transform klass. * The HMAC with SHA384 signature transform klass.
*/ */
#define xmlSecTransformHmacSha384Id xmlSecTransformHmacSha384Get #define xmlSecTransformHmacSha384Id xmlSecTransformHmacSha384Ge
Klass() tKlass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacS XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacSha384Ge
ha384GetKlass (void); tKlass (void);
/** /**
* xmlSecTransformHmacSha512Id: * xmlSecTransformHmacSha512Id:
* *
* The HMAC with SHA512 signature transform klass. * The HMAC with SHA512 signature transform klass.
*/ */
#define xmlSecTransformHmacSha512Id xmlSecTransformHmacSha512Get #define xmlSecTransformHmacSha512Id xmlSecTransformHmacSha512Ge
Klass() tKlass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacS XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacSha512Ge
ha512GetKlass (void); tKlass (void);
/** /**
* xmlSecTransformMd5Id: * xmlSecTransformMd5Id:
* *
* The MD5 digest transform klass. * The MD5 digest transform klass.
*/ */
#define xmlSecTransformMd5Id xmlSecTransformMd5GetKlass() #define xmlSecTransformMd5Id xmlSecTransformMd5GetKlass(
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformMd5Ge )
tKlass(void); XMLSEC_EXPORT xmlSecTransformId xmlSecTransformMd5GetKlass(
void);
/** /**
* xmlSecTransformRipemd160Id: * xmlSecTransformRipemd160Id:
* *
* The RIPEMD160 digest transform klass. * The RIPEMD160 digest transform klass.
*/ */
#define xmlSecTransformRipemd160Id xmlSecTransformRipemd160GetK #define xmlSecTransformRipemd160Id xmlSecTransformRipemd160Get
lass() Klass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRipem XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRipemd160Get
d160GetKlass(void); Klass(void);
/** /**
* xmlSecTransformRsaMd5Id: * xmlSecTransformRsaMd5Id:
* *
* The RSA-MD5 signature transform klass. * The RSA-MD5 signature transform klass.
*/ */
#define xmlSecTransformRsaMd5Id xmlSecTransformRsaMd #define xmlSecTransformRsaMd5Id xmlSecTransformRsaMd5GetKla
5GetKlass() ss()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaMd XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaMd5GetKla
5GetKlass (void); ss (void);
/** /**
* xmlSecTransformRsaRipemd160Id: * xmlSecTransformRsaRipemd160Id:
* *
* The RSA-RIPEMD160 signature transform klass. * The RSA-RIPEMD160 signature transform klass.
*/ */
#define xmlSecTransformRsaRipemd160Id xmlSecTransformRsaRipemd160G #define xmlSecTransformRsaRipemd160Id xmlSecTransformRsaRipemd160
etKlass() GetKlass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaRi XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaRipemd160
pemd160GetKlass (void); GetKlass (void);
/** /**
* xmlSecTransformRsaSha1Id: * xmlSecTransformRsaSha1Id:
* *
* The RSA-SHA1 signature transform klass. * The RSA-SHA1 signature transform klass.
*/ */
#define xmlSecTransformRsaSha1Id xmlSecTransformRsaSha1GetKla #define xmlSecTransformRsaSha1Id xmlSecTransformRsaSha1GetKl
ss() ass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaSh XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaSha1GetKl
a1GetKlass (void); ass (void);
/** /**
* xmlSecTransformRsaSha224Id: * xmlSecTransformRsaSha224Id:
* *
* The RSA-SHA224 signature transform klass. * The RSA-SHA224 signature transform klass.
*/ */
#define xmlSecTransformRsaSha224Id xmlSecTransformRsaSha224GetK #define xmlSecTransformRsaSha224Id xmlSecTransformRsaSha224Get
lass() Klass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaSh XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaSha224Get
a224GetKlass (void); Klass (void);
/** /**
* xmlSecTransformRsaSha256Id: * xmlSecTransformRsaSha256Id:
* *
* The RSA-SHA256 signature transform klass. * The RSA-SHA256 signature transform klass.
*/ */
#define xmlSecTransformRsaSha256Id xmlSecTransformRsaSha256GetK #define xmlSecTransformRsaSha256Id xmlSecTransformRsaSha256Get
lass() Klass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaSh XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaSha256Get
a256GetKlass (void); Klass (void);
/** /**
* xmlSecTransformRsaSha384Id: * xmlSecTransformRsaSha384Id:
* *
* The RSA-SHA384 signature transform klass. * The RSA-SHA384 signature transform klass.
*/ */
#define xmlSecTransformRsaSha384Id xmlSecTransformRsaSha384GetK #define xmlSecTransformRsaSha384Id xmlSecTransformRsaSha384Get
lass() Klass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaSh XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaSha384Get
a384GetKlass (void); Klass (void);
/** /**
* xmlSecTransformRsaSha512Id: * xmlSecTransformRsaSha512Id:
* *
* The RSA-SHA512 signature transform klass. * The RSA-SHA512 signature transform klass.
*/ */
#define xmlSecTransformRsaSha512Id xmlSecTransformRsaSha512GetK #define xmlSecTransformRsaSha512Id xmlSecTransformRsaSha512Get
lass() Klass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaSh XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaSha512Get
a512GetKlass (void); Klass (void);
/** /**
* xmlSecTransformRsaPkcs1Id: * xmlSecTransformRsaPkcs1Id:
* *
* The RSA PKCS1 key transport transform klass. * The RSA PKCS1 key transport transform klass.
*/ */
#define xmlSecTransformRsaPkcs1Id xmlSecTransformRsaPkcs1GetKl #define xmlSecTransformRsaPkcs1Id xmlSecTransformRsaPkcs1GetK
ass() lass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaPk XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaPkcs1GetK
cs1GetKlass (void); lass (void);
/** /**
* xmlSecTransformRsaOaepId: * xmlSecTransformRsaOaepId:
* *
* The RSA PKCS1 key transport transform klass. * The RSA PKCS1 key transport transform klass.
*/ */
#define xmlSecTransformRsaOaepId xmlSecTransformRsaOaepGetKla #define xmlSecTransformRsaOaepId xmlSecTransformRsaOaepGetKl
ss() ass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaOa XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaOaepGetKl
epGetKlass (void); ass (void);
/** /**
* xmlSecTransformGostR3411_94Id: * xmlSecTransformGostR3411_94Id:
* *
* The GOSTR3411_94 digest transform klass. * The GOSTR3411_94 digest transform klass.
*/ */
#define xmlSecTransformGostR3411_94Id xmlSecTransformGostR #define xmlSecTransformGostR3411_94Id xmlSecTransformGost
3411_94GetKlass() R3411_94GetKlass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformGostR XMLSEC_EXPORT xmlSecTransformId xmlSecTransformGostR3411_94
3411_94GetKlass (void); GetKlass (void);
/** /**
* xmlSecTransformSha1Id: * xmlSecTransformSha1Id:
* *
* The SHA1 digest transform klass. * The SHA1 digest transform klass.
*/ */
#define xmlSecTransformSha1Id xmlSecTransformSha1GetKlass( #define xmlSecTransformSha1Id xmlSecTransformSha1GetKlass
) ()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformSha1G XMLSEC_EXPORT xmlSecTransformId xmlSecTransformSha1GetKlass
etKlass (void); (void);
/** /**
* xmlSecTransformSha224Id: * xmlSecTransformSha224Id:
* *
* The SHA224 digest transform klass. * The SHA224 digest transform klass.
*/ */
#define xmlSecTransformSha224Id xmlSecTransformSha22 #define xmlSecTransformSha224Id xmlSecTransformSha224GetKla
4GetKlass() ss()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformSha22 XMLSEC_EXPORT xmlSecTransformId xmlSecTransformSha224GetKla
4GetKlass (void); ss (void);
/** /**
* xmlSecTransformSha256Id: * xmlSecTransformSha256Id:
* *
* The SHA256 digest transform klass. * The SHA256 digest transform klass.
*/ */
#define xmlSecTransformSha256Id xmlSecTransformSha25 #define xmlSecTransformSha256Id xmlSecTransformSha256GetKla
6GetKlass() ss()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformSha25 XMLSEC_EXPORT xmlSecTransformId xmlSecTransformSha256GetKla
6GetKlass (void); ss (void);
/** /**
* xmlSecTransformSha384Id: * xmlSecTransformSha384Id:
* *
* The SHA384 digest transform klass. * The SHA384 digest transform klass.
*/ */
#define xmlSecTransformSha384Id xmlSecTransformSha38 #define xmlSecTransformSha384Id xmlSecTransformSha384GetKla
4GetKlass() ss()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformSha38 XMLSEC_EXPORT xmlSecTransformId xmlSecTransformSha384GetKla
4GetKlass (void); ss (void);
/** /**
* xmlSecTransformSha512Id: * xmlSecTransformSha512Id:
* *
* The SHA512 digest transform klass. * The SHA512 digest transform klass.
*/ */
#define xmlSecTransformSha512Id xmlSecTransformSha51 #define xmlSecTransformSha512Id xmlSecTransformSha512GetKla
2GetKlass() ss()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformSha51 XMLSEC_EXPORT xmlSecTransformId xmlSecTransformSha512GetKla
2GetKlass (void); ss (void);
/********************************************************************* /*********************************************************************
* *
* High level routines form xmlsec command line utility * High level routines form xmlsec command line utility
* *
********************************************************************/ ********************************************************************/
XMLSEC_EXPORT int xmlSecCryptoAppInit XMLSEC_EXPORT int xmlSecCryptoAppInit
(const char* config); (const char* config);
XMLSEC_EXPORT int xmlSecCryptoAppShutdown XMLSEC_EXPORT int xmlSecCryptoAppShutdown
(void); (void);
XMLSEC_EXPORT int xmlSecCryptoAppDefaultKeysMn XMLSEC_EXPORT int xmlSecCryptoAppDefaultKeysM
grInit (xmlSecKeysMngrPtr mngr); ngrInit (xmlSecKeysMngrPtr mngr);
XMLSEC_EXPORT int xmlSecCryptoAppDefaultKeysMn XMLSEC_EXPORT int xmlSecCryptoAppDefaultKeysM
grAdoptKey (xmlSecKeysMngrPtr mngr, ngrAdoptKey (xmlSecKeysMngrPtr mngr,
xmlSecKeyPtr key); xmlSecKeyPtr key);
XMLSEC_EXPORT int xmlSecCryptoAppDefaultKeysMn XMLSEC_EXPORT int xmlSecCryptoAppDefaultKeysM
grLoad (xmlSecKeysMngrPtr mngr, ngrLoad (xmlSecKeysMngrPtr mngr,
const char* uri); const char* uri);
XMLSEC_EXPORT int xmlSecCryptoAppDefaultKeysMn XMLSEC_EXPORT int xmlSecCryptoAppDefaultKeysM
grSave (xmlSecKeysMngrPtr mngr, ngrSave (xmlSecKeysMngrPtr mngr,
const char* filename, const char* filename,
xmlSecKeyDataType type); xmlSecKeyDataType type);
XMLSEC_EXPORT int xmlSecCryptoAppKeysMngrCertL XMLSEC_EXPORT int xmlSecCryptoAppKeysMngrCert
oad (xmlSecKeysMngrPtr mngr, Load (xmlSecKeysMngrPtr mngr,
const char *filename, const char *filename,
xmlSecKeyDataFormat format, xmlSecKeyDataFormat format,
xmlSecKeyDataType type); xmlSecKeyDataType type);
XMLSEC_EXPORT int xmlSecCryptoAppKeysMngrCertL XMLSEC_EXPORT int xmlSecCryptoAppKeysMngrCert
oadMemory(xmlSecKeysMngrPtr mngr, LoadMemory(xmlSecKeysMngrPtr mngr,
const xmlSecByte* data, const xmlSecByte* data,
xmlSecSize dataSize, xmlSecSize dataSize,
xmlSecKeyDataFormat format, xmlSecKeyDataFormat format,
xmlSecKeyDataType type); xmlSecKeyDataType type);
XMLSEC_EXPORT xmlSecKeyPtr xmlSecCryptoAppKeyLoad XMLSEC_EXPORT xmlSecKeyPtr xmlSecCryptoAppKeyLoad
(const char *filename, (const char *filename,
xmlSecKeyDataFormat format, xmlSecKeyDataFormat format,
const char *pwd, const char *pwd,
void* pwdCallback, void* pwdCallback,
void* pwdCallbackCtx); void* pwdCallbackCtx);
XMLSEC_EXPORT xmlSecKeyPtr xmlSecCryptoAppKeyLoadMemory XMLSEC_EXPORT xmlSecKeyPtr xmlSecCryptoAppKeyLoadMemor
(const xmlSecByte* data, y (const xmlSecByte* data,
xmlSecSize dataSize, xmlSecSize dataSize,
xmlSecKeyDataFormat format, xmlSecKeyDataFormat format,
const char *pwd, const char *pwd,
void* pwdCallback, void* pwdCallback,
void* pwdCallbackCtx); void* pwdCallbackCtx);
XMLSEC_EXPORT xmlSecKeyPtr xmlSecCryptoAppPkcs12Load XMLSEC_EXPORT xmlSecKeyPtr xmlSecCryptoAppPkcs12Load
(const char* filename, (const char* filename,
const char* pwd, const char* pwd,
void* pwdCallback, void* pwdCallback,
void* pwdCallbackCtx); void* pwdCallbackCtx);
XMLSEC_EXPORT xmlSecKeyPtr xmlSecCryptoAppPkcs12LoadMem XMLSEC_EXPORT xmlSecKeyPtr xmlSecCryptoAppPkcs12LoadMe
ory (const xmlSecByte* data, mory (const xmlSecByte* data,
xmlSecSize dataSize, xmlSecSize dataSize,
const char *pwd, const char *pwd,
void* pwdCallback, void* pwdCallback,
void* pwdCallbackCtx); void* pwdCallbackCtx);
XMLSEC_EXPORT int xmlSecCryptoAppKeyCertLoad XMLSEC_EXPORT int xmlSecCryptoAppKeyCertLoad
(xmlSecKeyPtr key, (xmlSecKeyPtr key,
const char* filename, const char* filename,
xmlSecKeyDataFormat format); xmlSecKeyDataFormat format);
XMLSEC_EXPORT int xmlSecCryptoAppKeyCertLoadMe XMLSEC_EXPORT int xmlSecCryptoAppKeyCertLoadM
mory(xmlSecKeyPtr key, emory(xmlSecKeyPtr key,
const xmlSecByte* data, const xmlSecByte* data,
xmlSecSize dataSize, xmlSecSize dataSize,
xmlSecKeyDataFormat format); xmlSecKeyDataFormat format);
XMLSEC_EXPORT void* xmlSecCryptoAppGetDefaultPwd XMLSEC_EXPORT void* xmlSecCryptoAppGetDefaultPw
Callback(void); dCallback(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* XMLSEC_NO_CRYPTO_DYNAMIC_LOADING */ #endif /* XMLSEC_NO_CRYPTO_DYNAMIC_LOADING */
#endif /* __XMLSEC_APP_H__ */ #endif /* __XMLSEC_APP_H__ */
 End of changes. 45 change blocks. 
264 lines changed or deleted 265 lines changed or added


 base64.h   base64.h 
skipping to change at line 28 skipping to change at line 28
#include <libxml/tree.h> #include <libxml/tree.h>
#include <xmlsec/xmlsec.h> #include <xmlsec/xmlsec.h>
#include <xmlsec/transforms.h> #include <xmlsec/transforms.h>
/** /**
* XMLSEC_BASE64_LINESIZE: * XMLSEC_BASE64_LINESIZE:
* *
* The default maximum base64 encoded line size. * The default maximum base64 encoded line size.
*/ */
#define XMLSEC_BASE64_LINESIZE 64 #define XMLSEC_BASE64_LINESIZE 64
XMLSEC_EXPORT int xmlSecBase64GetDefaultLineSize (void); XMLSEC_EXPORT int xmlSecBase64GetDefaultLineSize (void);
XMLSEC_EXPORT void xmlSecBase64SetDefaultLineSize (int columns XMLSEC_EXPORT void xmlSecBase64SetDefaultLineSize (int column
); s);
/* Base64 Context */ /* Base64 Context */
typedef struct _xmlSecBase64Ctx xmlSecBase64 typedef struct _xmlSecBase64Ctx xmlSecBase6
Ctx, 4Ctx,
*xmlSecBase6 *xmlSecBase
4CtxPtr; 64CtxPtr;
XMLSEC_EXPORT xmlSecBase64CtxPtr xmlSecBase64CtxCreate (int encode, XMLSEC_EXPORT xmlSecBase64CtxPtr xmlSecBase64CtxCreate (int encode
int columns ,
); int column
XMLSEC_EXPORT void xmlSecBase64CtxDestroy (xmlSecBase6 s);
4CtxPtr ctx); XMLSEC_EXPORT void xmlSecBase64CtxDestroy (xmlSecBase
XMLSEC_EXPORT int xmlSecBase64CtxInitialize (xmlSecBase6 64CtxPtr ctx);
4CtxPtr ctx, XMLSEC_EXPORT int xmlSecBase64CtxInitialize (xmlSecBase
int encode, 64CtxPtr ctx,
int columns int encode
); ,
XMLSEC_EXPORT void xmlSecBase64CtxFinalize (xmlSecBase6 int column
4CtxPtr ctx); s);
XMLSEC_EXPORT int xmlSecBase64CtxUpdate (xmlSecBase6 XMLSEC_EXPORT void xmlSecBase64CtxFinalize (xmlSecBase
4CtxPtr ctx, 64CtxPtr ctx);
const xmlSe XMLSEC_EXPORT int xmlSecBase64CtxUpdate (xmlSecBase
cByte *in, 64CtxPtr ctx,
xmlSecSize const xmlS
inSize, ecByte *in,
xmlSecByte xmlSecSize
*out, inSize,
xmlSecSize xmlSecByte
outSize); *out,
XMLSEC_EXPORT int xmlSecBase64CtxFinal (xmlSecBase6 xmlSecSize
4CtxPtr ctx, outSize);
xmlSecByte XMLSEC_EXPORT int xmlSecBase64CtxFinal (xmlSecBase
*out, 64CtxPtr ctx,
xmlSecSize xmlSecByte
outSize); *out,
xmlSecSize
outSize);
/* Standalone routines to do base64 encode/decode "at once" */ /* Standalone routines to do base64 encode/decode "at once" */
XMLSEC_EXPORT xmlChar* xmlSecBase64Encode (const xmlSe XMLSEC_EXPORT xmlChar* xmlSecBase64Encode (const xmlS
cByte *buf, ecByte *buf,
xmlSecSize xmlSecSize
len, len,
int columns int column
); s);
XMLSEC_EXPORT int xmlSecBase64Decode (const xmlCh XMLSEC_EXPORT int xmlSecBase64Decode (const xmlC
ar* str, har* str,
xmlSecByte xmlSecByte
*buf, *buf,
xmlSecSize xmlSecSize
len); len);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XMLSEC_BASE64_H__ */ #endif /* __XMLSEC_BASE64_H__ */
 End of changes. 5 change blocks. 
48 lines changed or deleted 50 lines changed or added


 bignum.h   bignum.h 
skipping to change at line 25 skipping to change at line 25
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
#include <libxml/tree.h> #include <libxml/tree.h>
#include <nspr.h> #include <nspr.h>
#include <nss.h> #include <nss.h>
#include <xmlsec/xmlsec.h> #include <xmlsec/xmlsec.h>
XMLSEC_CRYPTO_EXPORT SECItem* xmlSecNssNodeGetBigNumValue (PRArenaPool XMLSEC_CRYPTO_EXPORT SECItem* xmlSecNssNodeGetBigNumValue (PRArenaPoo
*arena, l *arena,
const xmlNo const xmlN
dePtr cur, odePtr cur,
SECItem *a) SECItem *a
; );
XMLSEC_CRYPTO_EXPORT int xmlSecNssNodeSetBigNumValue (xmlNodePtr XMLSEC_CRYPTO_EXPORT int xmlSecNssNodeSetBigNumValue (xmlNodePtr
cur, cur,
const SECIt const SECI
em *a, tem *a,
int addLine int addLin
Breaks); eBreaks);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XMLSEC_NSS_BIGNUM_H__ */ #endif /* __XMLSEC_NSS_BIGNUM_H__ */
 End of changes. 1 change blocks. 
12 lines changed or deleted 12 lines changed or added


 bn.h   bn.h 
skipping to change at line 22 skipping to change at line 22
#define __XMLSEC_BN_H__ #define __XMLSEC_BN_H__
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
#include <libxml/tree.h> #include <libxml/tree.h>
#include <xmlsec/xmlsec.h> #include <xmlsec/xmlsec.h>
#include <xmlsec/buffer.h> #include <xmlsec/buffer.h>
typedef xmlSecBuffer xmlSecBn, typedef xmlSecBuffer xmlSecBn,
*xmlSecBnPtr *xmlSecBnPt
; r;
/** /**
* xmlSecBnFormat: * xmlSecBnFormat:
* @xmlSecBnBase64: the base64 decoded binary blob. * @xmlSecBnBase64: the base64 decoded binary blob.
* @xmlSecBnHex: the hex number. * @xmlSecBnHex: the hex number.
* @xmlSecBnDec: the decimal number. * @xmlSecBnDec: the decimal number.
* *
* The big numbers formats. * The big numbers formats.
*/ */
typedef enum { typedef enum {
xmlSecBnBase64, xmlSecBnBase64,
xmlSecBnHex, xmlSecBnHex,
xmlSecBnDec xmlSecBnDec
} xmlSecBnFormat; } xmlSecBnFormat;
XMLSEC_EXPORT xmlSecBnPtr xmlSecBnCreate (xmlSecSize XMLSEC_EXPORT xmlSecBnPtr xmlSecBnCreate (xmlSecSize
size); size);
XMLSEC_EXPORT void xmlSecBnDestroy (xmlSecBnPtr XMLSEC_EXPORT void xmlSecBnDestroy (xmlSecBnPt
bn); r bn);
XMLSEC_EXPORT int xmlSecBnInitialize (xmlSecBnPtr XMLSEC_EXPORT int xmlSecBnInitialize (xmlSecBnPt
bn, r bn,
xmlSecSize xmlSecSize
size); size);
XMLSEC_EXPORT void xmlSecBnFinalize (xmlSecBnPtr XMLSEC_EXPORT void xmlSecBnFinalize (xmlSecBnPt
bn); r bn);
XMLSEC_EXPORT xmlSecByte* xmlSecBnGetData (xmlSecBnPtr XMLSEC_EXPORT xmlSecByte* xmlSecBnGetData (xmlSecBnPt
bn); r bn);
XMLSEC_EXPORT int xmlSecBnSetData (xmlSecBnPtr XMLSEC_EXPORT int xmlSecBnSetData (xmlSecBnPt
bn, r bn,
const xmlSe const xmlS
cByte* data, ecByte* data,
xmlSecSize xmlSecSize
size); size);
XMLSEC_EXPORT xmlSecSize xmlSecBnGetSize (xmlSecBnPtr XMLSEC_EXPORT xmlSecSize xmlSecBnGetSize (xmlSecBnPt
bn); r bn);
XMLSEC_EXPORT void xmlSecBnZero (xmlSecBnPtr XMLSEC_EXPORT void xmlSecBnZero (xmlSecBnPt
bn); r bn);
XMLSEC_EXPORT int xmlSecBnFromString (xmlSecBnPtr XMLSEC_EXPORT int xmlSecBnFromString (xmlSecBnPt
bn, r bn,
const xmlCh const xmlC
ar* str, har* str,
xmlSecSize xmlSecSize
base); base);
XMLSEC_EXPORT xmlChar* xmlSecBnToString (xmlSecBnPtr XMLSEC_EXPORT xmlChar* xmlSecBnToString (xmlSecBnPt
bn, r bn,
xmlSecSize xmlSecSize
base); base);
XMLSEC_EXPORT int xmlSecBnFromHexString (xmlSecBnPtr XMLSEC_EXPORT int xmlSecBnFromHexString (xmlSecBnPt
bn, r bn,
const xmlCh const xmlC
ar* str); har* str);
XMLSEC_EXPORT xmlChar* xmlSecBnToHexString (xmlSecBnPtr XMLSEC_EXPORT xmlChar* xmlSecBnToHexString (xmlSecBnPt
bn); r bn);
XMLSEC_EXPORT int xmlSecBnFromDecString (xmlSecBnPtr XMLSEC_EXPORT int xmlSecBnFromDecString (xmlSecBnPt
bn, r bn,
const xmlCh const xmlC
ar* str); har* str);
XMLSEC_EXPORT xmlChar* xmlSecBnToDecString (xmlSecBnPtr XMLSEC_EXPORT xmlChar* xmlSecBnToDecString (xmlSecBnPt
bn); r bn);
XMLSEC_EXPORT int xmlSecBnMul (xmlSecBnPtr XMLSEC_EXPORT int xmlSecBnMul (xmlSecBnPt
bn, r bn,
int multipl int multip
ier); lier);
XMLSEC_EXPORT int xmlSecBnDiv (xmlSecBnPtr XMLSEC_EXPORT int xmlSecBnDiv (xmlSecBnPt
bn, r bn,
int divider int divide
, r,
int* mod); int* mod);
XMLSEC_EXPORT int xmlSecBnAdd (xmlSecBnPtr XMLSEC_EXPORT int xmlSecBnAdd (xmlSecBnPt
bn, r bn,
int delta); int delta)
XMLSEC_EXPORT int xmlSecBnReverse (xmlSecBnPtr ;
bn); XMLSEC_EXPORT int xmlSecBnReverse (xmlSecBnPt
XMLSEC_EXPORT int xmlSecBnCompare (xmlSecBnPtr r bn);
bn, XMLSEC_EXPORT int xmlSecBnCompare (xmlSecBnPt
const xmlSe r bn,
cByte* data, const xmlS
xmlSecSize ecByte* data,
dataSize); xmlSecSize
XMLSEC_EXPORT int xmlSecBnCompareReverse (xmlSecBnPtr dataSize);
bn, XMLSEC_EXPORT int xmlSecBnCompareReverse (xmlSecBnPt
const xmlSe r bn,
cByte* data, const xmlS
xmlSecSize ecByte* data,
dataSize); xmlSecSize
XMLSEC_EXPORT int xmlSecBnGetNodeValue (xmlSecBnPtr dataSize);
bn, XMLSEC_EXPORT int xmlSecBnGetNodeValue (xmlSecBnPt
xmlNodePtr r bn,
cur, xmlNodePtr
xmlSecBnFor cur,
mat format, xmlSecBnFo
int reverse rmat format,
); int revers
XMLSEC_EXPORT int xmlSecBnSetNodeValue (xmlSecBnPtr e);
bn, XMLSEC_EXPORT int xmlSecBnSetNodeValue (xmlSecBnPt
xmlNodePtr r bn,
cur, xmlNodePtr
xmlSecBnFor cur,
mat format, xmlSecBnFo
int reverse rmat format,
, int revers
int addLine e,
Breaks); int addLin
XMLSEC_EXPORT int xmlSecBnBlobSetNodeValue (const xmlSe eBreaks);
cByte* data, XMLSEC_EXPORT int xmlSecBnBlobSetNodeValue (const xmlS
xmlSecSize ecByte* data,
dataSize, xmlSecSize
xmlNodePtr dataSize,
cur, xmlNodePtr
xmlSecBnFor cur,
mat format, xmlSecBnFo
int reverse rmat format,
, int revers
int addLine e,
Breaks); int addLin
eBreaks);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XMLSEC_BN_H__ */ #endif /* __XMLSEC_BN_H__ */
 End of changes. 6 change blocks. 
106 lines changed or deleted 107 lines changed or added


 buffer.h   buffer.h 
skipping to change at line 21 skipping to change at line 21
#ifndef __XMLSEC_BUFFER_H__ #ifndef __XMLSEC_BUFFER_H__
#define __XMLSEC_BUFFER_H__ #define __XMLSEC_BUFFER_H__
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
#include <libxml/tree.h> #include <libxml/tree.h>
#include <xmlsec/xmlsec.h> #include <xmlsec/xmlsec.h>
typedef struct _xmlSecBuffer xmlSecBuffer typedef struct _xmlSecBuffer xmlSecBuffe
, r,
*xmlSecBuffe *xmlSecBuff
rPtr; erPtr;
/** /**
* xmlSecAllocMode: * xmlSecAllocMode:
* @xmlSecAllocModeExact: the memory allocation mode that minimizes to * @xmlSecAllocModeExact: the memory allocation mode that minimizes t
tal otal
* allocated memory size. * allocated memory size.
* @xmlSecAllocModeDouble: the memory allocation mode that tries to min * @xmlSecAllocModeDouble: the memory allocation mode that tries to mi
imize nimize
* the number of malloc calls. * the number of malloc calls.
* *
* The memory allocation mode (used by @xmlSecBuffer and @xmlSecList). * The memory allocation mode (used by @xmlSecBuffer and @xmlSecList).
*/ */
typedef enum { typedef enum {
xmlSecAllocModeExact = 0, xmlSecAllocModeExact = 0,
xmlSecAllocModeDouble xmlSecAllocModeDouble
} xmlSecAllocMode; } xmlSecAllocMode;
/************************************************************************** *** /************************************************************************** ***
* *
skipping to change at line 54 skipping to change at line 54
/** /**
* xmlSecBuffer: * xmlSecBuffer:
* @data: the pointer to buffer data. * @data: the pointer to buffer data.
* @size: the current data size. * @size: the current data size.
* @maxSize: the max data size (allocated buffer size). * @maxSize: the max data size (allocated buffer size).
* @allocMode: the buffer memory allocation mode. * @allocMode: the buffer memory allocation mode.
* *
* Binary data buffer. * Binary data buffer.
*/ */
struct _xmlSecBuffer { struct _xmlSecBuffer {
xmlSecByte* data; xmlSecByte* data;
xmlSecSize size; xmlSecSize size;
xmlSecSize maxSize; xmlSecSize maxSize;
xmlSecAllocMode allocMode; xmlSecAllocMode allocMode;
}; };
XMLSEC_EXPORT void xmlSecBufferSetDefaultAllocMode (xmlSecAlloc XMLSEC_EXPORT void xmlSecBufferSetDefaultAllocMode (xmlSecAllo
Mode defAllocMode, cMode defAllocMode,
xmlSecSize xmlSecSize
defInitialSize); defInitialSize);
XMLSEC_EXPORT xmlSecBufferPtr xmlSecBufferCreate (xmlSecSize XMLSEC_EXPORT xmlSecBufferPtr xmlSecBufferCreate (xmlSecSize
size); size);
XMLSEC_EXPORT void xmlSecBufferDestroy (xmlSecBuffe XMLSEC_EXPORT void xmlSecBufferDestroy (xmlSecBuff
rPtr buf); erPtr buf);
XMLSEC_EXPORT int xmlSecBufferInitialize (xmlSecBuffe XMLSEC_EXPORT int xmlSecBufferInitialize (xmlSecBuff
rPtr buf, erPtr buf,
xmlSecSize xmlSecSize
size); size);
XMLSEC_EXPORT void xmlSecBufferFinalize (xmlSecBuffe XMLSEC_EXPORT void xmlSecBufferFinalize (xmlSecBuff
rPtr buf); erPtr buf);
XMLSEC_EXPORT xmlSecByte* xmlSecBufferGetData (xmlSecBuffe XMLSEC_EXPORT xmlSecByte* xmlSecBufferGetData (xmlSecBuff
rPtr buf); erPtr buf);
XMLSEC_EXPORT int xmlSecBufferSetData (xmlSecBuffe XMLSEC_EXPORT int xmlSecBufferSetData (xmlSecBuff
rPtr buf, erPtr buf,
const xmlSe const xmlS
cByte* data, ecByte* data,
xmlSecSize xmlSecSize
size); size);
XMLSEC_EXPORT xmlSecSize xmlSecBufferGetSize (xmlSecBuffe XMLSEC_EXPORT xmlSecSize xmlSecBufferGetSize (xmlSecBuff
rPtr buf); erPtr buf);
XMLSEC_EXPORT int xmlSecBufferSetSize (xmlSecBuffe XMLSEC_EXPORT int xmlSecBufferSetSize (xmlSecBuff
rPtr buf, erPtr buf,
xmlSecSize xmlSecSize
size); size);
XMLSEC_EXPORT xmlSecSize xmlSecBufferGetMaxSize (xmlSecBuffe XMLSEC_EXPORT xmlSecSize xmlSecBufferGetMaxSize (xmlSecBuff
rPtr buf); erPtr buf);
XMLSEC_EXPORT int xmlSecBufferSetMaxSize (xmlSecBuffe XMLSEC_EXPORT int xmlSecBufferSetMaxSize (xmlSecBuff
rPtr buf, erPtr buf,
xmlSecSize xmlSecSize
size); size);
XMLSEC_EXPORT void xmlSecBufferEmpty (xmlSecBuffe XMLSEC_EXPORT void xmlSecBufferEmpty (xmlSecBuff
rPtr buf); erPtr buf);
XMLSEC_EXPORT int xmlSecBufferAppend (xmlSecBuffe XMLSEC_EXPORT int xmlSecBufferAppend (xmlSecBuff
rPtr buf, erPtr buf,
const xmlSe const xmlS
cByte* data, ecByte* data,
xmlSecSize xmlSecSize
size); size);
XMLSEC_EXPORT int xmlSecBufferPrepend (xmlSecBuffe XMLSEC_EXPORT int xmlSecBufferPrepend (xmlSecBuff
rPtr buf, erPtr buf,
const xmlSe const xmlS
cByte* data, ecByte* data,
xmlSecSize xmlSecSize
size); size);
XMLSEC_EXPORT int xmlSecBufferRemoveHead (xmlSecBuffe XMLSEC_EXPORT int xmlSecBufferRemoveHead (xmlSecBuff
rPtr buf, erPtr buf,
xmlSecSize xmlSecSize
size); size);
XMLSEC_EXPORT int xmlSecBufferRemoveTail (xmlSecBuffe XMLSEC_EXPORT int xmlSecBufferRemoveTail (xmlSecBuff
rPtr buf, erPtr buf,
xmlSecSize xmlSecSize
size); size);
XMLSEC_EXPORT int xmlSecBufferReadFile (xmlSecBuffe XMLSEC_EXPORT int xmlSecBufferReadFile (xmlSecBuff
rPtr buf, erPtr buf,
const char* const char
filename); * filename);
XMLSEC_EXPORT int xmlSecBufferBase64NodeContentRead(xmlSecBuff XMLSEC_EXPORT int xmlSecBufferBase64NodeContentRead(xmlSecBuf
erPtr buf, ferPtr buf,
xmlNodePtr xmlNodePtr
node); node);
XMLSEC_EXPORT int xmlSecBufferBase64NodeContentWrite(xmlSecBuf XMLSEC_EXPORT int xmlSecBufferBase64NodeContentWrite(xmlSecBu
ferPtr buf, fferPtr buf,
xmlNodePtr xmlNodePtr
node, node,
int columns int column
); s);
XMLSEC_EXPORT xmlOutputBufferPtr xmlSecBufferCreateOutputBuffer (xml SecBufferPtr buf); XMLSEC_EXPORT xmlOutputBufferPtr xmlSecBufferCreateOutputBuffer (xmlSecBuff erPtr buf);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XMLSEC_BUFFER_H__ */ #endif /* __XMLSEC_BUFFER_H__ */
 End of changes. 8 change blocks. 
85 lines changed or deleted 85 lines changed or added


 dl.h   dl.h 
skipping to change at line 17 skipping to change at line 17
* *
* Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com> * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
*/ */
#ifndef __XMLSEC_DL_H__ #ifndef __XMLSEC_DL_H__
#define __XMLSEC_DL_H__ #define __XMLSEC_DL_H__
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
typedef struct _xmlSecCryptoDLFunctions xmlSecCryptoDLFunctions, typedef struct _xmlSecCryptoDLFunctions xmlSecCryptoDLFunctions,
*xmlSecCryptoDLFunctionsPtr; *xmlSecCryptoDLFunctionsPtr
;
XMLSEC_EXPORT int xmlSecCryptoDLFunctionsRegis XMLSEC_EXPORT int xmlSecCryptoDLFunctionsRegi
terKeyDataAndTransforms sterKeyDataAndTransforms
(xmlSecCryptoDLFunctionsPtr functions); (xmlSecCryptoDLFunctionsPtr functions);
#ifndef XMLSEC_NO_CRYPTO_DYNAMIC_LOADING #ifndef XMLSEC_NO_CRYPTO_DYNAMIC_LOADING
#include <libxml/tree.h> #include <libxml/tree.h>
#include <libxml/xmlIO.h> #include <libxml/xmlIO.h>
#include <xmlsec/xmlsec.h> #include <xmlsec/xmlsec.h>
#include <xmlsec/keysdata.h> #include <xmlsec/keysdata.h>
#include <xmlsec/keys.h> #include <xmlsec/keys.h>
#include <xmlsec/keysmngr.h> #include <xmlsec/keysmngr.h>
#include <xmlsec/transforms.h> #include <xmlsec/transforms.h>
/** /**************************************************************************
**
*
* Dynamic load functions * Dynamic load functions
*/ *
XMLSEC_EXPORT int xmlSecCryptoDLInit **************************************************************************
(void); **/
XMLSEC_EXPORT int xmlSecCryptoDLShutdown XMLSEC_EXPORT int xmlSecCryptoDLInit
(void); (void);
XMLSEC_EXPORT int xmlSecCryptoDLShutdown
(void);
XMLSEC_EXPORT int xmlSecCryptoDLLoadLibrary XMLSEC_EXPORT int xmlSecCryptoDLLoadLibrary
(const xmlChar* crypto); (const xmlChar* crypto);
XMLSEC_EXPORT xmlSecCryptoDLFunctionsPtr xmlSecCryptoDLGetLibraryFunc XMLSEC_EXPORT xmlSecCryptoDLFunctionsPtr xmlSecCryptoDLGetLibraryFun
tions(const xmlChar* crypto); ctions(const xmlChar* crypto);
XMLSEC_EXPORT int xmlSecCryptoDLUnloadLibrary XMLSEC_EXPORT int xmlSecCryptoDLUnloadLibrary
(const xmlChar* crypto); (const xmlChar* crypto);
XMLSEC_EXPORT int xmlSecCryptoDLSetFunctions XMLSEC_EXPORT int xmlSecCryptoDLSetFunctions
(xmlSecCryptoDLFunctionsPtr functions); (xmlSecCryptoDLFunctionsPtr functions);
XMLSEC_EXPORT xmlSecCryptoDLFunctionsPtr xmlSecCryptoDLGetFunctions XMLSEC_EXPORT xmlSecCryptoDLFunctionsPtr xmlSecCryptoDLGetFunctions
(void); (void);
#endif /* XMLSEC_NO_CRYPTO_DYNAMIC_LOADING */ #endif /* XMLSEC_NO_CRYPTO_DYNAMIC_LOADING */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XMLSEC_APP_H__ */ #endif /* __XMLSEC_APP_H__ */
 End of changes. 6 change blocks. 
22 lines changed or deleted 27 lines changed or added


 errors.h   errors.h 
skipping to change at line 28 skipping to change at line 28
/*************************************************************** /***************************************************************
* *
* Error codes * Error codes
* *
**************************************************************/ **************************************************************/
/** /**
* XMLSEC_ERRORS_R_XMLSEC_FAILED: * XMLSEC_ERRORS_R_XMLSEC_FAILED:
* *
* An XMLSec function failed (error subject is the failed function). * An XMLSec function failed (error subject is the failed function).
*/ */
#define XMLSEC_ERRORS_R_XMLSEC_FAILED 1 #define XMLSEC_ERRORS_R_XMLSEC_FAILED 1
/** /**
* XMLSEC_ERRORS_R_MALLOC_FAILED: * XMLSEC_ERRORS_R_MALLOC_FAILED:
* *
* Failed to allocate memory error. * Failed to allocate memory error.
*/ */
#define XMLSEC_ERRORS_R_MALLOC_FAILED 2 #define XMLSEC_ERRORS_R_MALLOC_FAILED 2
/** /**
* XMLSEC_ERRORS_R_STRDUP_FAILED: * XMLSEC_ERRORS_R_STRDUP_FAILED:
* *
* Failed to duplicate string error. * Failed to duplicate string error.
*/ */
#define XMLSEC_ERRORS_R_STRDUP_FAILED 3 #define XMLSEC_ERRORS_R_STRDUP_FAILED 3
/** /**
* XMLSEC_ERRORS_R_CRYPTO_FAILED: * XMLSEC_ERRORS_R_CRYPTO_FAILED:
* *
* Crypto (OpenSSL) function failed (error subject is the failed function). * Crypto (OpenSSL) function failed (error subject is the failed function).
*/ */
#define XMLSEC_ERRORS_R_CRYPTO_FAILED 4 #define XMLSEC_ERRORS_R_CRYPTO_FAILED 4
/** /**
* XMLSEC_ERRORS_R_XML_FAILED: * XMLSEC_ERRORS_R_XML_FAILED:
* *
* LibXML function failed (error subject is the failed function). * LibXML function failed (error subject is the failed function).
*/ */
#define XMLSEC_ERRORS_R_XML_FAILED 5 #define XMLSEC_ERRORS_R_XML_FAILED 5
/** /**
* XMLSEC_ERRORS_R_XSLT_FAILED: * XMLSEC_ERRORS_R_XSLT_FAILED:
* *
* LibXSLT function failed (error subject is the failed function). * LibXSLT function failed (error subject is the failed function).
*/ */
#define XMLSEC_ERRORS_R_XSLT_FAILED 6 #define XMLSEC_ERRORS_R_XSLT_FAILED 6
/** /**
* XMLSEC_ERRORS_R_IO_FAILED: * XMLSEC_ERRORS_R_IO_FAILED:
* *
* IO operation failed. * IO operation failed.
*/ */
#define XMLSEC_ERRORS_R_IO_FAILED 7 #define XMLSEC_ERRORS_R_IO_FAILED 7
/** /**
* XMLSEC_ERRORS_R_DISABLED: * XMLSEC_ERRORS_R_DISABLED:
* *
* The feature is disabled during compilation. * The feature is disabled during compilation.
* Check './configure --help' for details on how to * Check './configure --help' for details on how to
* enable it. * enable it.
*/ */
#define XMLSEC_ERRORS_R_DISABLED 8 #define XMLSEC_ERRORS_R_DISABLED 8
/** /**
* XMLSEC_ERRORS_R_NOT_IMPLEMENTED: * XMLSEC_ERRORS_R_NOT_IMPLEMENTED:
* *
* Feature is not implemented. * Feature is not implemented.
*/ */
#define XMLSEC_ERRORS_R_NOT_IMPLEMENTED 9 #define XMLSEC_ERRORS_R_NOT_IMPLEMENTED 9
/** /**
* XMLSEC_ERRORS_R_INVALID_SIZE: * XMLSEC_ERRORS_R_INVALID_SIZE:
* *
* Invalid size. * Invalid size.
*/ */
#define XMLSEC_ERRORS_R_INVALID_SIZE 11 #define XMLSEC_ERRORS_R_INVALID_SIZE 11
/** /**
* XMLSEC_ERRORS_R_INVALID_DATA: * XMLSEC_ERRORS_R_INVALID_DATA:
* *
* Invalid data. * Invalid data.
*/ */
#define XMLSEC_ERRORS_R_INVALID_DATA 12 #define XMLSEC_ERRORS_R_INVALID_DATA 12
/** /**
* XMLSEC_ERRORS_R_INVALID_RESULT: * XMLSEC_ERRORS_R_INVALID_RESULT:
* *
* Invalid result. * Invalid result.
*/ */
#define XMLSEC_ERRORS_R_INVALID_RESULT 13 #define XMLSEC_ERRORS_R_INVALID_RESULT 13
/** /**
* XMLSEC_ERRORS_R_INVALID_TYPE: * XMLSEC_ERRORS_R_INVALID_TYPE:
* *
* Invalid type. * Invalid type.
*/ */
#define XMLSEC_ERRORS_R_INVALID_TYPE 14 #define XMLSEC_ERRORS_R_INVALID_TYPE 14
/** /**
* XMLSEC_ERRORS_R_INVALID_OPERATION: * XMLSEC_ERRORS_R_INVALID_OPERATION:
* *
* Invalid operation. * Invalid operation.
*/ */
#define XMLSEC_ERRORS_R_INVALID_OPERATION 15 #define XMLSEC_ERRORS_R_INVALID_OPERATION 15
/** /**
* XMLSEC_ERRORS_R_INVALID_STATUS: * XMLSEC_ERRORS_R_INVALID_STATUS:
* *
* Invalid status. * Invalid status.
*/ */
#define XMLSEC_ERRORS_R_INVALID_STATUS 16 #define XMLSEC_ERRORS_R_INVALID_STATUS 16
/** /**
* XMLSEC_ERRORS_R_INVALID_FORMAT: * XMLSEC_ERRORS_R_INVALID_FORMAT:
* *
* Invalid format. * Invalid format.
*/ */
#define XMLSEC_ERRORS_R_INVALID_FORMAT 17 #define XMLSEC_ERRORS_R_INVALID_FORMAT 17
/** /**
* XMLSEC_ERRORS_R_DATA_NOT_MATCH: * XMLSEC_ERRORS_R_DATA_NOT_MATCH:
* *
* The data do not match our expectation. * The data do not match our expectation.
*/ */
#define XMLSEC_ERRORS_R_DATA_NOT_MATCH 18 #define XMLSEC_ERRORS_R_DATA_NOT_MATCH 18
/** /**
* XMLSEC_ERRORS_R_INVALID_NODE: * XMLSEC_ERRORS_R_INVALID_NODE:
* *
* Invalid node (error subject is the node name). * Invalid node (error subject is the node name).
*/ */
#define XMLSEC_ERRORS_R_INVALID_NODE 21 #define XMLSEC_ERRORS_R_INVALID_NODE 21
/** /**
* XMLSEC_ERRORS_R_INVALID_NODE_CONTENT: * XMLSEC_ERRORS_R_INVALID_NODE_CONTENT:
* *
* Invalid node content (error subject is the node name). * Invalid node content (error subject is the node name).
*/ */
#define XMLSEC_ERRORS_R_INVALID_NODE_CONTENT 22 #define XMLSEC_ERRORS_R_INVALID_NODE_CONTENT 22
/** /**
* XMLSEC_ERRORS_R_INVALID_NODE_ATTRIBUTE: * XMLSEC_ERRORS_R_INVALID_NODE_ATTRIBUTE:
* *
* Invalid node attribute (error subject is the node name). * Invalid node attribute (error subject is the node name).
*/ */
#define XMLSEC_ERRORS_R_INVALID_NODE_ATTRIBUTE 23 #define XMLSEC_ERRORS_R_INVALID_NODE_ATTRIBUTE 23
/** /**
* XMLSEC_ERRORS_R_MISSING_NODE_ATTRIBUTE: * XMLSEC_ERRORS_R_MISSING_NODE_ATTRIBUTE:
* *
* Missing node attribute (error subject is the node name). * Missing node attribute (error subject is the node name).
*/ */
#define XMLSEC_ERRORS_R_MISSING_NODE_ATTRIBUTE 25 #define XMLSEC_ERRORS_R_MISSING_NODE_ATTRIBUTE 25
/** /**
* XMLSEC_ERRORS_R_NODE_ALREADY_PRESENT: * XMLSEC_ERRORS_R_NODE_ALREADY_PRESENT:
* *
* Node already present, * Node already present,
*/ */
#define XMLSEC_ERRORS_R_NODE_ALREADY_PRESENT 26 #define XMLSEC_ERRORS_R_NODE_ALREADY_PRESENT 26
/** /**
* XMLSEC_ERRORS_R_UNEXPECTED_NODE: * XMLSEC_ERRORS_R_UNEXPECTED_NODE:
* *
* Unexpected node (error subject is the node name). * Unexpected node (error subject is the node name).
*/ */
#define XMLSEC_ERRORS_R_UNEXPECTED_NODE 27 #define XMLSEC_ERRORS_R_UNEXPECTED_NODE 27
/** /**
* XMLSEC_ERRORS_R_NODE_NOT_FOUND: * XMLSEC_ERRORS_R_NODE_NOT_FOUND:
* *
* Node not found (error subject is the required node name). * Node not found (error subject is the required node name).
*/ */
#define XMLSEC_ERRORS_R_NODE_NOT_FOUND 28 #define XMLSEC_ERRORS_R_NODE_NOT_FOUND 28
/** /**
* XMLSEC_ERRORS_R_INVALID_TRANSFORM: * XMLSEC_ERRORS_R_INVALID_TRANSFORM:
* *
* This transform is invlaid here. * This transform is invlaid here.
*/ */
#define XMLSEC_ERRORS_R_INVALID_TRANSFORM 31 #define XMLSEC_ERRORS_R_INVALID_TRANSFORM 31
/** /**
* XMLSEC_ERRORS_R_INVALID_TRANSFORM_KEY: * XMLSEC_ERRORS_R_INVALID_TRANSFORM_KEY:
* *
* Key is invalid for this transform. * Key is invalid for this transform.
*/ */
#define XMLSEC_ERRORS_R_INVALID_TRANSFORM_KEY 32 #define XMLSEC_ERRORS_R_INVALID_TRANSFORM_KEY 32
/** /**
* XMLSEC_ERRORS_R_INVALID_URI_TYPE: * XMLSEC_ERRORS_R_INVALID_URI_TYPE:
* *
* Invalid URI type. * Invalid URI type.
*/ */
#define XMLSEC_ERRORS_R_INVALID_URI_TYPE 33 #define XMLSEC_ERRORS_R_INVALID_URI_TYPE 33
/** /**
* XMLSEC_ERRORS_R_TRANSFORM_SAME_DOCUMENT_REQUIRED: * XMLSEC_ERRORS_R_TRANSFORM_SAME_DOCUMENT_REQUIRED:
* *
* The transform requires the input document to be the same as context. * The transform requires the input document to be the same as context.
*/ */
#define XMLSEC_ERRORS_R_TRANSFORM_SAME_DOCUMENT_REQUIRED 34 #define XMLSEC_ERRORS_R_TRANSFORM_SAME_DOCUMENT_REQUIRED 34
/** /**
* XMLSEC_ERRORS_R_TRANSFORM_DISABLED: * XMLSEC_ERRORS_R_TRANSFORM_DISABLED:
* *
* The transform is disabled. * The transform is disabled.
*/ */
#define XMLSEC_ERRORS_R_TRANSFORM_DISABLED 35 #define XMLSEC_ERRORS_R_TRANSFORM_DISABLED 35
/** /**
* XMLSEC_ERRORS_R_INVALID_KEY_DATA: * XMLSEC_ERRORS_R_INVALID_KEY_DATA:
* *
* Key data is invalid. * Key data is invalid.
*/ */
#define XMLSEC_ERRORS_R_INVALID_KEY_DATA 41 #define XMLSEC_ERRORS_R_INVALID_KEY_DATA 41
/** /**
* XMLSEC_ERRORS_R_KEY_DATA_NOT_FOUND: * XMLSEC_ERRORS_R_KEY_DATA_NOT_FOUND:
* *
* Data is not found (error subject is the data name). * Data is not found (error subject is the data name).
*/ */
#define XMLSEC_ERRORS_R_KEY_DATA_NOT_FOUND 42 #define XMLSEC_ERRORS_R_KEY_DATA_NOT_FOUND 42
/** /**
* XMLSEC_ERRORS_R_KEY_DATA_ALREADY_EXIST: * XMLSEC_ERRORS_R_KEY_DATA_ALREADY_EXIST:
* *
* The key data is already exist. * The key data is already exist.
*/ */
#define XMLSEC_ERRORS_R_KEY_DATA_ALREADY_EXIST 43 #define XMLSEC_ERRORS_R_KEY_DATA_ALREADY_EXIST 43
/** /**
* XMLSEC_ERRORS_R_INVALID_KEY_DATA_SIZE: * XMLSEC_ERRORS_R_INVALID_KEY_DATA_SIZE:
* *
* Invalid key size. * Invalid key size.
*/ */
#define XMLSEC_ERRORS_R_INVALID_KEY_DATA_SIZE 44 #define XMLSEC_ERRORS_R_INVALID_KEY_DATA_SIZE 44
/** /**
* XMLSEC_ERRORS_R_KEY_NOT_FOUND: * XMLSEC_ERRORS_R_KEY_NOT_FOUND:
* *
* Key not found. * Key not found.
*/ */
#define XMLSEC_ERRORS_R_KEY_NOT_FOUND 45 #define XMLSEC_ERRORS_R_KEY_NOT_FOUND 45
/** /**
* XMLSEC_ERRORS_R_KEYDATA_DISABLED: * XMLSEC_ERRORS_R_KEYDATA_DISABLED:
* *
* The key data type disabled. * The key data type disabled.
*/ */
#define XMLSEC_ERRORS_R_KEYDATA_DISABLED 46 #define XMLSEC_ERRORS_R_KEYDATA_DISABLED 46
/** /**
* XMLSEC_ERRORS_R_MAX_RETRIEVALS_LEVEL: * XMLSEC_ERRORS_R_MAX_RETRIEVALS_LEVEL:
* *
* Max allowed retrievals level reached. * Max allowed retrievals level reached.
*/ */
#define XMLSEC_ERRORS_R_MAX_RETRIEVALS_LEVEL 51 #define XMLSEC_ERRORS_R_MAX_RETRIEVALS_LEVEL 51
/** /**
* XMLSEC_ERRORS_R_MAX_RETRIEVAL_TYPE_MISMATCH: * XMLSEC_ERRORS_R_MAX_RETRIEVAL_TYPE_MISMATCH:
* *
* The retrieved key data type does not match the one specified * The retrieved key data type does not match the one specified
* in the <dsig:RetrievalMethod/> node. * in the <dsig:RetrievalMethod/> node.
*/ */
#define XMLSEC_ERRORS_R_MAX_RETRIEVAL_TYPE_MISMATCH 52 #define XMLSEC_ERRORS_R_MAX_RETRIEVAL_TYPE_MISMATCH 52
/** /**
* XMLSEC_ERRORS_R_MAX_ENCKEY_LEVEL: * XMLSEC_ERRORS_R_MAX_ENCKEY_LEVEL:
* *
* Max EncryptedKey level reached. * Max EncryptedKey level reached.
*/ */
#define XMLSEC_ERRORS_R_MAX_ENCKEY_LEVEL 61 #define XMLSEC_ERRORS_R_MAX_ENCKEY_LEVEL 61
/** /**
* XMLSEC_ERRORS_R_CERT_VERIFY_FAILED: * XMLSEC_ERRORS_R_CERT_VERIFY_FAILED:
* *
* Certificate verification failed. * Certificate verification failed.
*/ */
#define XMLSEC_ERRORS_R_CERT_VERIFY_FAILED 71 #define XMLSEC_ERRORS_R_CERT_VERIFY_FAILED 71
/** /**
* XMLSEC_ERRORS_R_CERT_NOT_FOUND: * XMLSEC_ERRORS_R_CERT_NOT_FOUND:
* *
* Requested certificate is not found. * Requested certificate is not found.
*/ */
#define XMLSEC_ERRORS_R_CERT_NOT_FOUND 72 #define XMLSEC_ERRORS_R_CERT_NOT_FOUND 72
/** /**
* XMLSEC_ERRORS_R_CERT_REVOKED: * XMLSEC_ERRORS_R_CERT_REVOKED:
* *
* The certificate is revoked. * The certificate is revoked.
*/ */
#define XMLSEC_ERRORS_R_CERT_REVOKED 73 #define XMLSEC_ERRORS_R_CERT_REVOKED 73
/** /**
* XMLSEC_ERRORS_R_CERT_ISSUER_FAILED: * XMLSEC_ERRORS_R_CERT_ISSUER_FAILED:
* *
* Failed to get certificate issuer. * Failed to get certificate issuer.
*/ */
#define XMLSEC_ERRORS_R_CERT_ISSUER_FAILED 74 #define XMLSEC_ERRORS_R_CERT_ISSUER_FAILED 74
/** /**
* XMLSEC_ERRORS_R_CERT_NOT_YET_VALID: * XMLSEC_ERRORS_R_CERT_NOT_YET_VALID:
* *
* "Not valid before" verification failed. * "Not valid before" verification failed.
*/ */
#define XMLSEC_ERRORS_R_CERT_NOT_YET_VALID 75 #define XMLSEC_ERRORS_R_CERT_NOT_YET_VALID 75
/** /**
* XMLSEC_ERRORS_R_CERT_HAS_EXPIRED: * XMLSEC_ERRORS_R_CERT_HAS_EXPIRED:
* *
* "Not valid after" verification failed. * "Not valid after" verification failed.
*/ */
#define XMLSEC_ERRORS_R_CERT_HAS_EXPIRED 76 #define XMLSEC_ERRORS_R_CERT_HAS_EXPIRED 76
/** /**
* XMLSEC_ERRORS_R_DSIG_NO_REFERENCES: * XMLSEC_ERRORS_R_DSIG_NO_REFERENCES:
* *
* The <dsig:Reference> nodes not found. * The <dsig:Reference> nodes not found.
*/ */
#define XMLSEC_ERRORS_R_DSIG_NO_REFERENCES 81 #define XMLSEC_ERRORS_R_DSIG_NO_REFERENCES 81
/** /**
* XMLSEC_ERRORS_R_DSIG_INVALID_REFERENCE: * XMLSEC_ERRORS_R_DSIG_INVALID_REFERENCE:
* *
* The <dsig:Reference> validation failed. * The <dsig:Reference> validation failed.
*/ */
#define XMLSEC_ERRORS_R_DSIG_INVALID_REFERENCE 82 #define XMLSEC_ERRORS_R_DSIG_INVALID_REFERENCE 82
/** /**
* XMLSEC_ERRORS_R_ASSERTION: * XMLSEC_ERRORS_R_ASSERTION:
* *
* Invalid assertion. * Invalid assertion.
*/ */
#define XMLSEC_ERRORS_R_ASSERTION 100 #define XMLSEC_ERRORS_R_ASSERTION 100
/** /**
* XMLSEC_ERRORS_MAX_NUMBER: * XMLSEC_ERRORS_MAX_NUMBER:
* *
* The maximum xmlsec errors number. * The maximum xmlsec errors number.
*/ */
#define XMLSEC_ERRORS_MAX_NUMBER 256 #define XMLSEC_ERRORS_MAX_NUMBER 256
/******************************************************************* /*******************************************************************
* *
* Error functions * Error functions
* *
*******************************************************************/ *******************************************************************/
/** /**
* xmlSecErrorsCallback: * xmlSecErrorsCallback:
* @file: the error location file name (__FILE__ macro). * @file: the error location file name (__FILE__ macro).
* @line: the error location line number (__LINE__ macro). * @line: the error location line number (__LINE__ macro).
* @func: the error location function name (__FUNCTION__ macro * @func: the error location function name (__FUNCTION__ macr
). o).
* @errorObject: the error specific error object * @errorObject: the error specific error object
* @errorSubject: the error specific error subject. * @errorSubject: the error specific error subject.
* @reason: the error code. * @reason: the error code.
* @msg: the additional error message. * @msg: the additional error message.
* *
* The errors reporting callback function. * The errors reporting callback function.
*/ */
typedef void (*xmlSecErrorsCallback) (const char* typedef void (*xmlSecErrorsCallback) (const char
file, * file,
int line, int line,
const char* const char
func, * func,
const char* const char
errorObject, * errorObject,
const char* const char
errorSubject, * errorSubject,
int reason, int reason
const char* ,
msg); const char
* msg);
XMLSEC_EXPORT void xmlSecErrorsInit (void); XMLSEC_EXPORT void xmlSecErrorsInit (void);
XMLSEC_EXPORT void xmlSecErrorsShutdown (void); XMLSEC_EXPORT void xmlSecErrorsShutdown (void);
XMLSEC_EXPORT void xmlSecErrorsSetCallback (xmlSecError XMLSEC_EXPORT void xmlSecErrorsSetCallback (xmlSecErro
sCallback callback); rsCallback callback);
XMLSEC_EXPORT void xmlSecErrorsDefaultCallback (const char* XMLSEC_EXPORT void xmlSecErrorsDefaultCallback (const char
file, * file,
int line, int line,
const char* const char
func, * func,
const char* const char
errorObject, * errorObject,
const char* const char
errorSubject, * errorSubject,
int reason, int reason
const char* ,
msg); const char
XMLSEC_EXPORT void xmlSecErrorsDefaultCallbackEnableOutput * msg);
(int enabled XMLSEC_EXPORT void xmlSecErrorsDefaultCallbackEnableOutput
); (int enable
d);
XMLSEC_EXPORT int xmlSecErrorsGetCode (xmlSecSize XMLSEC_EXPORT int xmlSecErrorsGetCode (xmlSecSize
pos); pos);
XMLSEC_EXPORT const char* xmlSecErrorsGetMsg (xmlSecSize XMLSEC_EXPORT const char* xmlSecErrorsGetMsg (xmlSecSize
pos); pos);
/* __FUNCTION__ is defined for MSC compiler < MS VS .NET 2003 */ /* __FUNCTION__ is defined for MSC compiler < MS VS .NET 2003 */
#if defined(_MSC_VER) && (_MSC_VER >= 1300) #if defined(_MSC_VER) && (_MSC_VER >= 1300)
#define __XMLSEC_FUNCTION__ __FUNCTION__ #define __XMLSEC_FUNCTION__ __FUNCTION__
#endif /* _MSC_VER */ #endif /* _MSC_VER */
/* fallback for __FUNCTION__ */ /* fallback for __FUNCTION__ */
#if !defined(__XMLSEC_FUNCTION__) #if !defined(__XMLSEC_FUNCTION__)
#define __XMLSEC_FUNCTION__ "" #define __XMLSEC_FUNCTION__ ""
#endif /*!defined(__XMLSEC_FUNCTION__) */ #endif /*!defined(__XMLSEC_FUNCTION__) */
/** /**
* XMLSEC_ERRORS_HERE: * XMLSEC_ERRORS_HERE:
* *
* The macro that specifies the location (file, line and function) * The macro that specifies the location (file, line and function)
* for the xmlSecError() function. * for the xmlSecError() function.
*/ */
#define XMLSEC_ERRORS_HERE __FILE__,__LINE__,__XMLSEC_F UNCTION__ #define XMLSEC_ERRORS_HERE __FILE__,__LINE__,__XMLSEC_ FUNCTION__
#ifdef __GNUC__ #ifdef __GNUC__
#define XMLSEC_ERRORS_PRINTF_ATTRIBUTE __attribute__ ((form at (printf, 7, 8))) #define XMLSEC_ERRORS_PRINTF_ATTRIBUTE __attribute__ ((format (pri ntf, 7, 8)))
#else /* __GNUC__ */ #else /* __GNUC__ */
#define XMLSEC_ERRORS_PRINTF_ATTRIBUTE #define XMLSEC_ERRORS_PRINTF_ATTRIBUTE
#endif /* __GNUC__ */ #endif /* __GNUC__ */
/** /**
* xmlSecErrorsSafeString: * xmlSecErrorsSafeString:
* @str: the string. * @str: the string.
* *
* Macro. Returns @str if it is not NULL or pointer to "NULL" otherwise. * Macro. Returns @str if it is not NULL or pointer to "NULL" otherwise.
*/ */
#define xmlSecErrorsSafeString(str) \ #define xmlSecErrorsSafeString(str) \
(((str) != NULL) ? ((char*)(str)) : (char*)"NULL") (((str) != NULL) ? ((char*)(str)) : (char*)"NULL")
/** /**
* XMLSEC_ERRORS_NO_MESSAGE: * XMLSEC_ERRORS_NO_MESSAGE:
* *
* Empty error message " ". * Empty error message " ".
*/ */
#define XMLSEC_ERRORS_NO_MESSAGE " " #define XMLSEC_ERRORS_NO_MESSAGE " "
XMLSEC_EXPORT void xmlSecError (const char* file, XMLSEC_EXPORT void xmlSecError (const char* file,
int line, int line,
const char* func, const char* func,
const char* errorOb const char* errorO
ject, bject,
const char* errorSu const char* errorS
bject, ubject,
int reason, int reason,
const char* msg, .. const char* msg, .
.) XMLSEC_ERRORS_PRINTF_ATTRIBUTE; ..) XMLSEC_ERRORS_PRINTF_ATTRIBUTE;
/********************************************************************** /**********************************************************************
* *
* Assertions * Assertions
* *
**********************************************************************/ **********************************************************************/
/** /**
* xmlSecAssert: * xmlSecAssert:
* @p: the expression. * @p: the expression.
* *
* Macro. Verifies that @p is true and calls return() otherwise. * Macro. Verifies that @p is true and calls return() otherwise.
*/ */
#define xmlSecAssert( p ) \ #define xmlSecAssert( p ) \
if(!( p ) ) { \ if(!( p ) ) { \
xmlSecError(XMLSEC_ERRORS_HERE, \ xmlSecError(XMLSEC_ERRORS_HERE, \
NULL, \ NULL, \
#p, \ #p, \
XMLSEC_ERRORS_R_ASSERTION, \ XMLSEC_ERRORS_R_ASSERTION, \
XMLSEC_ERRORS_NO_MESSAGE); \ XMLSEC_ERRORS_NO_MESSAGE); \
return; \ return; \
} }
/** /**
* xmlSecAssert2: * xmlSecAssert2:
* @p: the expression. * @p: the expression.
* @ret: the return value. * @ret: the return value.
* *
* Macro. Verifies that @p is true and calls return(@ret) otherwise. * Macro. Verifies that @p is true and calls return(@ret) otherwise.
*/ */
#define xmlSecAssert2( p, ret ) \ #define xmlSecAssert2( p, ret ) \
if(!( p ) ) { \ if(!( p ) ) { \
xmlSecError(XMLSEC_ERRORS_HERE, \ xmlSecError(XMLSEC_ERRORS_HERE, \
NULL, \ NULL, \
#p, \ #p, \
XMLSEC_ERRORS_R_ASSERTION, \ XMLSEC_ERRORS_R_ASSERTION, \
XMLSEC_ERRORS_NO_MESSAGE); \ XMLSEC_ERRORS_NO_MESSAGE); \
return(ret); \ return(ret); \
} }
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XMLSEC_ERRORS_H__ */ #endif /* __XMLSEC_ERRORS_H__ */
 End of changes. 60 change blocks. 
122 lines changed or deleted 124 lines changed or added


 evp.h   evp.h 
skipping to change at line 24 skipping to change at line 24
#endif /* __cplusplus */ #endif /* __cplusplus */
#include <openssl/evp.h> #include <openssl/evp.h>
#include <xmlsec/xmlsec.h> #include <xmlsec/xmlsec.h>
#include <xmlsec/keys.h> #include <xmlsec/keys.h>
#include <xmlsec/transforms.h> #include <xmlsec/transforms.h>
#include <xmlsec/openssl/crypto.h> #include <xmlsec/openssl/crypto.h>
XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLEvpKeyDataAdoptEvp (xml XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLEvpKeyDataAdoptEvp (xm
SecKeyDataPtr data, lSecKeyDataPtr data,
EVP EV
_PKEY* pKey); P_PKEY* pKey);
XMLSEC_CRYPTO_EXPORT EVP_PKEY* xmlSecOpenSSLEvpKeyDataGetEv XMLSEC_CRYPTO_EXPORT EVP_PKEY* xmlSecOpenSSLEvpKeyDataGetEvp (xm
p (xmlSecKeyDataPtr data); lSecKeyDataPtr data);
/************************************************************************** **** /************************************************************************** ****
* *
* EVP helper functions * EVP helper functions
* *
************************************************************************** ***/ ************************************************************************** ***/
XMLSEC_CRYPTO_EXPORT EVP_PKEY* xmlSecOpenSSLEvpKeyDup (EVP XMLSEC_CRYPTO_EXPORT EVP_PKEY* xmlSecOpenSSLEvpKeyDup (EV
_PKEY* pKey); P_PKEY* pKey);
XMLSEC_CRYPTO_EXPORT xmlSecKeyDataPtr xmlSecOpenSSLEvpKeyAdopt (EVP XMLSEC_CRYPTO_EXPORT xmlSecKeyDataPtr xmlSecOpenSSLEvpKeyAdopt (EV
_PKEY *pKey); P_PKEY *pKey);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XMLSEC_OPENSSL_EVP_H__ */ #endif /* __XMLSEC_OPENSSL_EVP_H__ */
 End of changes. 2 change blocks. 
10 lines changed or deleted 10 lines changed or added


 io.h   io.h 
skipping to change at line 24 skipping to change at line 24
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
#include <libxml/tree.h> #include <libxml/tree.h>
#include <libxml/xmlIO.h> #include <libxml/xmlIO.h>
#include <xmlsec/xmlsec.h> #include <xmlsec/xmlsec.h>
#include <xmlsec/transforms.h> #include <xmlsec/transforms.h>
XMLSEC_EXPORT int xmlSecIOInit (void); XMLSEC_EXPORT int xmlSecIOInit (void);
XMLSEC_EXPORT void xmlSecIOShutdown (void); XMLSEC_EXPORT void xmlSecIOShutdown (void);
XMLSEC_EXPORT void xmlSecIOCleanupCallbacks (void); XMLSEC_EXPORT void xmlSecIOCleanupCallbacks (void);
XMLSEC_EXPORT int xmlSecIORegisterDefaultCallbacks (void); XMLSEC_EXPORT int xmlSecIORegisterDefaultCallbacks (void);
XMLSEC_EXPORT int xmlSecIORegisterCallbacks (xmlInputMat XMLSEC_EXPORT int xmlSecIORegisterCallbacks (xmlInputMa
chCallback matchFunc, tchCallback matchFunc,
xmlInputOpe xmlInputOp
nCallback openFunc, enCallback openFunc,
xmlInputRea xmlInputRe
dCallback readFunc, adCallback readFunc,
xmlInputClo xmlInputCl
seCallback closeFunc); oseCallback closeFunc);
/******************************************************************** /********************************************************************
* *
* Input URI transform * Input URI transform
* *
*******************************************************************/ *******************************************************************/
/** /**
* xmlSecTransformInputURIId: * xmlSecTransformInputURIId:
* *
* The Input URI transform id. * The Input URI transform id.
*/ */
#define xmlSecTransformInputURIId \ #define xmlSecTransformInputURIId \
xmlSecTransformInputURIGetKlass() xmlSecTransformInputURIGetKlass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformInputURIGetKlass (voi XMLSEC_EXPORT xmlSecTransformId xmlSecTransformInputURIGetKlass (void);
d); XMLSEC_EXPORT int xmlSecTransformInputURIOpen (xmlSecTran
XMLSEC_EXPORT int xmlSecTransformInputURIOpen (xmlSecTrans sformPtr transform,
formPtr transform, const xmlC
const xmlCh har* uri);
ar* uri);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XMLSEC_IO_H__ */ #endif /* __XMLSEC_IO_H__ */
 End of changes. 2 change blocks. 
19 lines changed or deleted 18 lines changed or added


 keyinfo.h   keyinfo.h 
skipping to change at line 29 skipping to change at line 29
#include <time.h> #include <time.h>
#include <libxml/tree.h> #include <libxml/tree.h>
#include <xmlsec/xmlsec.h> #include <xmlsec/xmlsec.h>
#include <xmlsec/list.h> #include <xmlsec/list.h>
#include <xmlsec/keysdata.h> #include <xmlsec/keysdata.h>
#include <xmlsec/keys.h> #include <xmlsec/keys.h>
#include <xmlsec/transforms.h> #include <xmlsec/transforms.h>
/** /**************************************************************************
* Hi level functions **
*/ *
XMLSEC_EXPORT int xmlSecKeyInfoNodeRead (xmlNodePtr * High-level functions
keyInfoNode, *
xmlSecKeyPt **************************************************************************
r key, **/
xmlSecKeyIn XMLSEC_EXPORT int xmlSecKeyInfoNodeRead (xmlNodePtr
foCtxPtr keyInfoCtx); keyInfoNode,
XMLSEC_EXPORT int xmlSecKeyInfoNodeWrite (xmlNodePtr xmlSecKeyP
keyInfoNode, tr key,
xmlSecKeyPt xmlSecKeyI
r key, nfoCtxPtr keyInfoCtx);
xmlSecKeyIn XMLSEC_EXPORT int xmlSecKeyInfoNodeWrite (xmlNodePtr
foCtxPtr keyInfoCtx); keyInfoNode,
xmlSecKeyP
tr key,
xmlSecKeyI
nfoCtxPtr keyInfoCtx);
/** /**
* xmlSecKeyInfoMode: * xmlSecKeyInfoMode:
* @xmlSecKeyInfoModeRead: read <dsig:KeyInfo /> element. * @xmlSecKeyInfoModeRead: read <dsig:KeyInfo /> element.
* @xmlSecKeyInfoModeWrite: write <dsig:KeyInfo /> element. * @xmlSecKeyInfoModeWrite: write <dsig:KeyInfo /> element.
* *
* The @xmlSecKeyInfoCtx operation mode (read or write). * The @xmlSecKeyInfoCtx operation mode (read or write).
*/ */
typedef enum { typedef enum {
xmlSecKeyInfoModeRead = 0, xmlSecKeyInfoModeRead = 0,
xmlSecKeyInfoModeWrite xmlSecKeyInfoModeWrite
} xmlSecKeyInfoMode; } xmlSecKeyInfoMode;
/** /**
* XMLSEC_KEYINFO_FLAGS_DONT_STOP_ON_KEY_FOUND: * XMLSEC_KEYINFO_FLAGS_DONT_STOP_ON_KEY_FOUND:
* *
* If flag is set then we will continue reading <dsig:KeyInfo /> * If flag is set then we will continue reading <dsig:KeyInfo />
* element even when key is already found. * element even when key is already found.
*/ */
#define XMLSEC_KEYINFO_FLAGS_DONT_STOP_ON_KEY_FOUND 0x00000001 #define XMLSEC_KEYINFO_FLAGS_DONT_STOP_ON_KEY_FOUND 0x00000001
/** /**
* XMLSEC_KEYINFO_FLAGS_STOP_ON_UNKNOWN_CHILD: * XMLSEC_KEYINFO_FLAGS_STOP_ON_UNKNOWN_CHILD:
* *
* If flag is set then we abort if an unknown <dsig:KeyInfo /> * If flag is set then we abort if an unknown <dsig:KeyInfo />
* child is found. * child is found.
*/ */
#define XMLSEC_KEYINFO_FLAGS_STOP_ON_UNKNOWN_CHILD 0x00000002 #define XMLSEC_KEYINFO_FLAGS_STOP_ON_UNKNOWN_CHILD 0x00000002
/** /**
* XMLSEC_KEYINFO_FLAGS_KEYNAME_STOP_ON_UNKNOWN: * XMLSEC_KEYINFO_FLAGS_KEYNAME_STOP_ON_UNKNOWN:
* *
* If flags is set then we abort if an unknown key name * If flags is set then we abort if an unknown key name
* (content of <dsig:KeyName /> element) is found. * (content of <dsig:KeyName /> element) is found.
*/ */
#define XMLSEC_KEYINFO_FLAGS_KEYNAME_STOP_ON_UNKNOWN 0x00000004 #define XMLSEC_KEYINFO_FLAGS_KEYNAME_STOP_ON_UNKNOWN 0x00000004
/** /**
* XMLSEC_KEYINFO_FLAGS_KEYVALUE_STOP_ON_UNKNOWN_CHILD: * XMLSEC_KEYINFO_FLAGS_KEYVALUE_STOP_ON_UNKNOWN_CHILD:
* *
* If flags is set then we abort if an unknown <dsig:KeyValue /> * If flags is set then we abort if an unknown <dsig:KeyValue />
* child is found. * child is found.
*/ */
#define XMLSEC_KEYINFO_FLAGS_KEYVALUE_STOP_ON_UNKNOWN_CHILD 0x00000008 #define XMLSEC_KEYINFO_FLAGS_KEYVALUE_STOP_ON_UNKNOWN_CHILD 0x00000008
/** /**
* XMLSEC_KEYINFO_FLAGS_RETRMETHOD_STOP_ON_UNKNOWN_HREF: * XMLSEC_KEYINFO_FLAGS_RETRMETHOD_STOP_ON_UNKNOWN_HREF:
* *
* If flag is set then we abort if an unknown href attribute * If flag is set then we abort if an unknown href attribute
* of <dsig:RetrievalMethod /> element is found. * of <dsig:RetrievalMethod /> element is found.
*/ */
#define XMLSEC_KEYINFO_FLAGS_RETRMETHOD_STOP_ON_UNKNOWN_HREF 0x00000010 #define XMLSEC_KEYINFO_FLAGS_RETRMETHOD_STOP_ON_UNKNOWN_HREF 0x00000010
/** /**
* XMLSEC_KEYINFO_FLAGS_RETRMETHOD_STOP_ON_MISMATCH_HREF: * XMLSEC_KEYINFO_FLAGS_RETRMETHOD_STOP_ON_MISMATCH_HREF:
* *
* If flag is set then we abort if an href attribute <dsig:RetrievalMethod /> * If flag is set then we abort if an href attribute <dsig:RetrievalMethod />
* element does not match the real key data type. * element does not match the real key data type.
*/ */
#define XMLSEC_KEYINFO_FLAGS_RETRMETHOD_STOP_ON_MISMATCH_HREF 0x00000020 #define XMLSEC_KEYINFO_FLAGS_RETRMETHOD_STOP_ON_MISMATCH_HREF 0x00000020
/** /**
* XMLSEC_KEYINFO_FLAGS_X509DATA_STOP_ON_UNKNOWN_CHILD: * XMLSEC_KEYINFO_FLAGS_X509DATA_STOP_ON_UNKNOWN_CHILD:
* *
* If flags is set then we abort if an unknown <dsig:X509Data /> * If flags is set then we abort if an unknown <dsig:X509Data />
* child is found. * child is found.
*/ */
#define XMLSEC_KEYINFO_FLAGS_X509DATA_STOP_ON_UNKNOWN_CHILD 0x00000100 #define XMLSEC_KEYINFO_FLAGS_X509DATA_STOP_ON_UNKNOWN_CHILD 0x00000100
/** /**
* XMLSEC_KEYINFO_FLAGS_X509DATA_DONT_VERIFY_CERTS: * XMLSEC_KEYINFO_FLAGS_X509DATA_DONT_VERIFY_CERTS:
* *
* If flag is set then we'll load certificates from <dsig:X509Data /> * If flag is set then we'll load certificates from <dsig:X509Data />
* element without verification. * element without verification.
*/ */
#define XMLSEC_KEYINFO_FLAGS_X509DATA_DONT_VERIFY_CERTS 0x00 000200 #define XMLSEC_KEYINFO_FLAGS_X509DATA_DONT_VERIFY_CERTS 0x00000200
/** /**
* XMLSEC_KEYINFO_FLAGS_X509DATA_STOP_ON_UNKNOWN_CERT: * XMLSEC_KEYINFO_FLAGS_X509DATA_STOP_ON_UNKNOWN_CERT:
* *
* If flag is set then we'll stop when we could not resolve reference * If flag is set then we'll stop when we could not resolve reference
* to certificate from <dsig:X509IssuerSerial />, <dsig:X509SKI /> or * to certificate from <dsig:X509IssuerSerial />, <dsig:X509SKI /> or
* <dsig:X509SubjectName /> elements. * <dsig:X509SubjectName /> elements.
*/ */
#define XMLSEC_KEYINFO_FLAGS_X509DATA_STOP_ON_UNKNOWN_CERT 0x00000400 #define XMLSEC_KEYINFO_FLAGS_X509DATA_STOP_ON_UNKNOWN_CERT 0x00000400
/** /**
* XMLSEC_KEYINFO_FLAGS_X509DATA_STOP_ON_INVALID_CERT: * XMLSEC_KEYINFO_FLAGS_X509DATA_STOP_ON_INVALID_CERT:
* *
* If the flag is set then we'll stop when <dsig:X509Data /> element * If the flag is set then we'll stop when <dsig:X509Data /> element
* processing does not return a verified certificate. * processing does not return a verified certificate.
*/ */
#define XMLSEC_KEYINFO_FLAGS_X509DATA_STOP_ON_INVALID_CERT 0x00000800 #define XMLSEC_KEYINFO_FLAGS_X509DATA_STOP_ON_INVALID_CERT 0x00000800
/** /**
* XMLSEC_KEYINFO_FLAGS_ENCKEY_DONT_STOP_ON_FAILED_DECRYPTION: * XMLSEC_KEYINFO_FLAGS_ENCKEY_DONT_STOP_ON_FAILED_DECRYPTION:
* *
* If the flag is set then we'll stop when <enc:EncryptedKey /> element * If the flag is set then we'll stop when <enc:EncryptedKey /> element
* processing fails. * processing fails.
*/ */
#define XMLSEC_KEYINFO_FLAGS_ENCKEY_DONT_STOP_ON_FAILED_DECRYPTION 0x000010 00 #define XMLSEC_KEYINFO_FLAGS_ENCKEY_DONT_STOP_ON_FAILED_DECRYPTION 0x000010 00
/** /**
* XMLSEC_KEYINFO_FLAGS_STOP_ON_EMPTY_NODE: * XMLSEC_KEYINFO_FLAGS_STOP_ON_EMPTY_NODE:
* *
* If the flag is set then we'll stop when we found an empty node. * If the flag is set then we'll stop when we found an empty node.
* Otherwise we just ignore it. * Otherwise we just ignore it.
*/ */
#define XMLSEC_KEYINFO_FLAGS_STOP_ON_EMPTY_NODE 0x00 002000 #define XMLSEC_KEYINFO_FLAGS_STOP_ON_EMPTY_NODE 0x00002000
/** /**
* XMLSEC_KEYINFO_FLAGS_X509DATA_SKIP_STRICT_CHECKS: * XMLSEC_KEYINFO_FLAGS_X509DATA_SKIP_STRICT_CHECKS:
* *
* If the flag is set then we'll skip strict checking of certs and CRLs * If the flag is set then we'll skip strict checking of certs and CRLs
*/ */
#define XMLSEC_KEYINFO_FLAGS_X509DATA_SKIP_STRICT_CHECKS 0x00004000 #define XMLSEC_KEYINFO_FLAGS_X509DATA_SKIP_STRICT_CHECKS 0x00004000
/** /**
* xmlSecKeyInfoCtx: * xmlSecKeyInfoCtx:
* @userData: the pointer to user data (xmlsec and xmlsec-crypto * @userData: the pointer to user data (xmlsec and xmlsec-crypto
* never touch this). * never touch this).
* @flags: the bit mask for flags that control processin. * @flags: the bit mask for flags that control processin.
* @flags2: reserved for future. * @flags2: reserved for future.
* @mode: do we read or write <dsig:KeyInfo /> element. * @mode: do we read or write <dsig:KeyInfo /> element.
* @keysMngr: the pointer to current keys manager. * @keysMngr: the pointer to current keys manager.
* @enabledKeyData: the list of enabled @xmlSecKeyDataId (if list is * @enabledKeyData: the list of enabled @xmlSecKeyDataId (if list is
* empty then all data ids are enabled). * empty then all data ids are enabled).
* @base64LineSize: the max columns size for base64 encoding. * @base64LineSize: the max columns size for base64 encoding.
* @retrievalMethodCtx: the transforms context for <dsig:RetrievalMethod /> * @retrievalMethodCtx: the transforms context for <dsig:RetrievalMethod />
* element processing. * element processing.
* @maxRetrievalMethodLevel: the max recursion level when processing * @maxRetrievalMethodLevel: the max recursion level when processing
* <dsig:RetrievalMethod /> element; default level is 1 * <dsig:RetrievalMethod /> element; default level is
* (see also @curRetrievalMethodLevel). 1
* @encCtx: the encryption context for <dsig:EncryptedKey /> ele * (see also @curRetrievalMethodLevel).
ment * @encCtx: the encryption context for <dsig:EncryptedKey /> el
* processing. ement
* processing.
* @maxEncryptedKeyLevel: the max recursion level when processing * @maxEncryptedKeyLevel: the max recursion level when processing
* <enc:EncryptedKey /> element; default level is 1 * <enc:EncryptedKey /> element; default level is 1
* (see @curEncryptedKeyLevel). * (see @curEncryptedKeyLevel).
* @certsVerificationTime: the time to use for X509 certificates verificati on * @certsVerificationTime: the time to use for X509 certificates verificati on
* ("not valid before" and "not valid after" checks); * ("not valid before" and "not valid after" checks);
* if @certsVerificationTime is equal to 0 (default) * if @certsVerificationTime is equal to 0 (default)
* then we verify certificates against the system's * then we verify certificates against the system's
* clock "now". * clock "now".
* @certsVerificationDepth: the max certifications chain length (default is 9). * @certsVerificationDepth: the max certifications chain length (default is 9).
* @pgpReserved: reserved for PGP. * @pgpReserved: reserved for PGP.
* @curRetrievalMethodLevel: the current <dsig:RetrievalMethod /> element * @curRetrievalMethodLevel: the current <dsig:RetrievalMethod /> element
* processing level (see @maxRetrievalMethodLevel). * processing level (see @maxRetrievalMethodLevel).
* @curEncryptedKeyLevel: the current <enc:EncryptedKey /> element * @curEncryptedKeyLevel: the current <enc:EncryptedKey /> element
* processing level (see @maxEncryptedKeyLevel). * processing level (see @maxEncryptedKeyLevel).
* @keyReq: the current key requirements. * @keyReq: the current key requirements.
* @reserved0: reserved for the future. * @reserved0: reserved for the future.
* @reserved1: reserved for the future. * @reserved1: reserved for the future.
* *
* The <dsig:KeyInfo /> reading or writing context. * The <dsig:KeyInfo /> reading or writing context.
*/ */
struct _xmlSecKeyInfoCtx { struct _xmlSecKeyInfoCtx {
void* userData; void* userData;
unsigned int flags; unsigned int flags;
unsigned int flags2; unsigned int flags2;
xmlSecKeysMngrPtr keysMngr; xmlSecKeysMngrPtr keysMngr;
xmlSecKeyInfoMode mode; xmlSecKeyInfoMode mode;
xmlSecPtrList enabledKeyData; xmlSecPtrList enabledKeyData;
int base64LineSize; int base64LineSize;
/* RetrievalMethod */ /* RetrievalMethod */
xmlSecTransformCtx retrievalMethodCtx; xmlSecTransformCtx retrievalMethodCtx;
int maxRetrievalMethodLevel; int maxRetrievalMethodLevel;
#ifndef XMLSEC_NO_XMLENC #ifndef XMLSEC_NO_XMLENC
/* EncryptedKey */ /* EncryptedKey */
xmlSecEncCtxPtr encCtx; xmlSecEncCtxPtr encCtx;
int maxEncryptedKeyLevel; int maxEncryptedKeyLevel;
#endif /* XMLSEC_NO_XMLENC */ #endif /* XMLSEC_NO_XMLENC */
#ifndef XMLSEC_NO_X509 #ifndef XMLSEC_NO_X509
/* x509 certificates */ /* x509 certificates */
time_t certsVerificationTime; time_t certsVerificationTime;
int certsVerificationDepth; int certsVerificationDepth;
#endif /* XMLSEC_NO_X509 */ #endif /* XMLSEC_NO_X509 */
/* PGP */ /* PGP */
void* pgpReserved; /* TODO */ void* pgpReserved; /* TODO */
/* internal data */ /* internal data */
int curRetrievalMethodLevel; int curRetrievalMethodLevel;
int curEncryptedKeyLevel; int curEncryptedKeyLevel;
xmlSecKeyReq keyReq; xmlSecKeyReq keyReq;
/* for the future */ /* for the future */
void* reserved0; void* reserved0;
void* reserved1; void* reserved1;
}; };
XMLSEC_EXPORT xmlSecKeyInfoCtxPtr xmlSecKeyInfoCtxCreate (xml XMLSEC_EXPORT xmlSecKeyInfoCtxPtr xmlSecKeyInfoCtxCreate (xm
SecKeysMngrPtr keysMngr); lSecKeysMngrPtr keysMngr);
XMLSEC_EXPORT void xmlSecKeyInfoCtxDestroy (xml XMLSEC_EXPORT void xmlSecKeyInfoCtxDestroy (xm
SecKeyInfoCtxPtr keyInfoCtx); lSecKeyInfoCtxPtr keyInfoCtx);
XMLSEC_EXPORT int xmlSecKeyInfoCtxInitialize (xml XMLSEC_EXPORT int xmlSecKeyInfoCtxInitialize (xm
SecKeyInfoCtxPtr keyInfoCtx, lSecKeyInfoCtxPtr keyInfoCtx,
xml xm
SecKeysMngrPtr keysMngr); lSecKeysMngrPtr keysMngr);
XMLSEC_EXPORT void xmlSecKeyInfoCtxFinalize (xml XMLSEC_EXPORT void xmlSecKeyInfoCtxFinalize (xm
SecKeyInfoCtxPtr keyInfoCtx); lSecKeyInfoCtxPtr keyInfoCtx);
XMLSEC_EXPORT void xmlSecKeyInfoCtxReset (xml XMLSEC_EXPORT void xmlSecKeyInfoCtxReset (xm
SecKeyInfoCtxPtr keyInfoCtx); lSecKeyInfoCtxPtr keyInfoCtx);
XMLSEC_EXPORT int xmlSecKeyInfoCtxCopyUserPref (xml XMLSEC_EXPORT int xmlSecKeyInfoCtxCopyUserPref (xm
SecKeyInfoCtxPtr dst, lSecKeyInfoCtxPtr dst,
xml xm
SecKeyInfoCtxPtr src); lSecKeyInfoCtxPtr src);
XMLSEC_EXPORT int xmlSecKeyInfoCtxCreateEncCtx (xml XMLSEC_EXPORT int xmlSecKeyInfoCtxCreateEncCtx (xm
SecKeyInfoCtxPtr keyInfoCtx); lSecKeyInfoCtxPtr keyInfoCtx);
XMLSEC_EXPORT void xmlSecKeyInfoCtxDebugDump (xml XMLSEC_EXPORT void xmlSecKeyInfoCtxDebugDump (xm
SecKeyInfoCtxPtr keyInfoCtx, lSecKeyInfoCtxPtr keyInfoCtx,
FIL FI
E* output); LE* output);
XMLSEC_EXPORT void xmlSecKeyInfoCtxDebugXmlDump (xml XMLSEC_EXPORT void xmlSecKeyInfoCtxDebugXmlDump (xm
SecKeyInfoCtxPtr keyInfoCtx, lSecKeyInfoCtxPtr keyInfoCtx,
FIL FI
E* output); LE* output);
/** /**
* xmlSecKeyDataNameId * xmlSecKeyDataNameId
* *
* The <dsig:KeyName> processing class. * The <dsig:KeyName> processing class.
*/ */
#define xmlSecKeyDataNameId xmlSecKeyDataNameGetKlass() #define xmlSecKeyDataNameId xmlSecKeyDataNameGetKlass()
XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataNameGetKlass (voi XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataNameGetKlass (vo
d); id);
/** /**
* xmlSecKeyDataValueId * xmlSecKeyDataValueId
* *
* The <dsig:KeyValue> processing class. * The <dsig:KeyValue> processing class.
*/ */
#define xmlSecKeyDataValueId xmlSecKeyDataValueGetKlass() #define xmlSecKeyDataValueId xmlSecKeyDataValueGetKlass()
XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataValueGetKlass (voi XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataValueGetKlass (vo
d); id);
/** /**
* xmlSecKeyDataRetrievalMethodId * xmlSecKeyDataRetrievalMethodId
* *
* The <dsig:RetrievalMethod> processing class. * The <dsig:RetrievalMethod> processing class.
*/ */
#define xmlSecKeyDataRetrievalMethodId xmlSecKeyDataRetrievalMethodGetKlass #define xmlSecKeyDataRetrievalMethodId xmlSecKeyDataRetrievalMethodGetKlas
() s()
XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataRetrievalMethodGetKlass XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataRetrievalMethodGetKlas
(void); s(void);
#ifndef XMLSEC_NO_XMLENC #ifndef XMLSEC_NO_XMLENC
/** /**
* xmlSecKeyDataEncryptedKeyId * xmlSecKeyDataEncryptedKeyId
* *
* The <enc:EncryptedKey> processing class. * The <enc:EncryptedKey> processing class.
*/ */
#define xmlSecKeyDataEncryptedKeyId xmlSecKeyDataEncryptedKeyGetKlass() #define xmlSecKeyDataEncryptedKeyId xmlSecKeyDataEncryptedKeyGetKlass()
XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataEncryptedKeyGetKlass(vo XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataEncryptedKeyGetKlass(v
id); oid);
#endif /* XMLSEC_NO_XMLENC */ #endif /* XMLSEC_NO_XMLENC */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XMLSEC_KEYINFO_H__ */ #endif /* __XMLSEC_KEYINFO_H__ */
 End of changes. 33 change blocks. 
112 lines changed or deleted 117 lines changed or added


 keys.h   keys.h 
skipping to change at line 29 skipping to change at line 29
#include <xmlsec/xmlsec.h> #include <xmlsec/xmlsec.h>
#include <xmlsec/list.h> #include <xmlsec/list.h>
#include <xmlsec/keysdata.h> #include <xmlsec/keysdata.h>
/** /**
* xmlSecKeyUsage: * xmlSecKeyUsage:
* *
* The key usage. * The key usage.
*/ */
typedef unsigned int xmlSecKeyUsage; typedef unsigned int xmlSecKeyUsage;
/** /**
* xmlSecKeyUsageSign: * xmlSecKeyUsageSign:
* *
* Key can be used in any way. * Key can be used in any way.
*/ */
#define xmlSecKeyUsageSign 0x00000001 #define xmlSecKeyUsageSign 0x00000001
/** /**
* xmlSecKeyUsageVerify: * xmlSecKeyUsageVerify:
* *
* Key for signing. * Key for signing.
*/ */
#define xmlSecKeyUsageVerify 0x00000002 #define xmlSecKeyUsageVerify 0x00000002
/** /**
* xmlSecKeyUsageEncrypt: * xmlSecKeyUsageEncrypt:
* *
* Key for signature verification. * Key for signature verification.
*/ */
#define xmlSecKeyUsageEncrypt 0x00000004 #define xmlSecKeyUsageEncrypt 0x00000004
/** /**
* xmlSecKeyUsageDecrypt: * xmlSecKeyUsageDecrypt:
* *
* An encryption key. * An encryption key.
*/ */
#define xmlSecKeyUsageDecrypt 0x00000008 #define xmlSecKeyUsageDecrypt 0x00000008
/** /**
* xmlSecKeyUsageKeyExchange: * xmlSecKeyUsageKeyExchange:
* *
* The key is used for key exchange. * The key is used for key exchange.
*/ */
#define xmlSecKeyUsageKeyExchange 0x00000010 #define xmlSecKeyUsageKeyExchange 0x00000010
/** /**
* xmlSecKeyUsageAny: * xmlSecKeyUsageAny:
* *
* A decryption key. * A decryption key.
*/ */
#define xmlSecKeyUsageAny 0xFFFFFFFF #define xmlSecKeyUsageAny 0xFFFFFFFF
/************************************************************************** /**************************************************************************
* *
* xmlSecKeyUseWith * xmlSecKeyUseWith
* *
*************************************************************************/ *************************************************************************/
typedef struct _xmlSecKeyUseWith xmlSecKeyUseWith, *xmlSecKey typedef struct _xmlSecKeyUseWith xmlSecKeyUseWith, *xmlSecKe
UseWithPtr; yUseWithPtr;
XMLSEC_EXPORT int xmlSecKeyUseWithInitialize (xmlSecKeyUs XMLSEC_EXPORT int xmlSecKeyUseWithInitialize (xmlSecKeyU
eWithPtr keyUseWith); seWithPtr keyUseWith);
XMLSEC_EXPORT void xmlSecKeyUseWithFinalize (xmlSecKeyUs XMLSEC_EXPORT void xmlSecKeyUseWithFinalize (xmlSecKeyU
eWithPtr keyUseWith); seWithPtr keyUseWith);
XMLSEC_EXPORT void xmlSecKeyUseWithReset (xmlSecKeyUs XMLSEC_EXPORT void xmlSecKeyUseWithReset (xmlSecKeyU
eWithPtr keyUseWith); seWithPtr keyUseWith);
XMLSEC_EXPORT int xmlSecKeyUseWithCopy (xmlSecKeyUs XMLSEC_EXPORT int xmlSecKeyUseWithCopy (xmlSecKeyU
eWithPtr dst, seWithPtr dst,
xmlSecKeyUs xmlSecKeyU
eWithPtr src); seWithPtr src);
XMLSEC_EXPORT xmlSecKeyUseWithPtr xmlSecKeyUseWithCreate (const xmlCh XMLSEC_EXPORT xmlSecKeyUseWithPtr xmlSecKeyUseWithCreate (const xmlC
ar* application, har* application,
const xmlC har* identifier); const xmlC har* identifier);
XMLSEC_EXPORT xmlSecKeyUseWithPtr xmlSecKeyUseWithDuplicate (xmlSecKeyUs XMLSEC_EXPORT xmlSecKeyUseWithPtr xmlSecKeyUseWithDuplicate (xmlSecKeyU
eWithPtr keyUseWith); seWithPtr keyUseWith);
XMLSEC_EXPORT void xmlSecKeyUseWithDestroy (xmlSecKeyUs XMLSEC_EXPORT void xmlSecKeyUseWithDestroy (xmlSecKeyU
eWithPtr keyUseWith); seWithPtr keyUseWith);
XMLSEC_EXPORT int xmlSecKeyUseWithSet (xmlSecKeyUs XMLSEC_EXPORT int xmlSecKeyUseWithSet (xmlSecKeyU
eWithPtr keyUseWith, seWithPtr keyUseWith,
const xmlCh const xmlC
ar* application, har* application,
const xmlC har* identifier); const xmlC har* identifier);
XMLSEC_EXPORT void xmlSecKeyUseWithDebugDump (xmlSecKeyUs XMLSEC_EXPORT void xmlSecKeyUseWithDebugDump (xmlSecKeyU
eWithPtr keyUseWith, seWithPtr keyUseWith,
FILE* outpu FILE* outp
t); ut);
XMLSEC_EXPORT void xmlSecKeyUseWithDebugXmlDump (xmlSecKeyUs XMLSEC_EXPORT void xmlSecKeyUseWithDebugXmlDump (xmlSecKeyU
eWithPtr keyUseWith, seWithPtr keyUseWith,
FILE* outpu FILE* outp
t); ut);
/** /**
* xmlSecKeyUseWith: * xmlSecKeyUseWith:
* @application: the application. * @application: the application.
* @identifier: the identifier. * @identifier: the identifier.
* @reserved1: reserved for future use. * @reserved1: reserved for future use.
* @reserved2: reserved for future use. * @reserved2: reserved for future use.
* *
* Information about application and user of the key. * Information about application and user of the key.
*/ */
struct _xmlSecKeyUseWith { struct _xmlSecKeyUseWith {
xmlChar* application; xmlChar* application;
xmlChar* identifier; xmlChar* identifier;
void* reserved1; void* reserved1;
void* reserved2; void* reserved2;
}; };
/** /**
* xmlSecKeyUseWithPtrListId: * xmlSecKeyUseWithPtrListId:
* *
* The keys list klass. * The keys list klass.
*/ */
#define xmlSecKeyUseWithPtrListId xmlSecKeyUseWithPtrListGetKlass() #define xmlSecKeyUseWithPtrListId xmlSecKeyUseWithPtrListGetKlass()
XMLSEC_EXPORT xmlSecPtrListId xmlSecKeyUseWithPtrListGetKlass (void); XMLSEC_EXPORT xmlSecPtrListId xmlSecKeyUseWithPtrListGetKlass (void);
/************************************************************************** /**************************************************************************
* *
* xmlSecKeyReq - what key are we looking for? * xmlSecKeyReq - what key are we looking for?
* *
*************************************************************************/ *************************************************************************/
typedef struct _xmlSecKeyReq xmlSecKeyReq, *xmlSecKeyReqP tr; typedef struct _xmlSecKeyReq xmlSecKeyReq, *xmlSecKeyReq Ptr;
/** /**
* xmlSecKeyReq: * xmlSecKeyReq:
* @keyId: the desired key value klass. * @keyId: the desired key value klass.
* @keyType: the desired key type. * @keyType: the desired key type.
* @keyUsage: the desired key usage. * @keyUsage: the desired key usage.
* @keyBitsSize: the desired key size (in bits!). * @keyBitsSize: the desired key size (in bits!).
* @keyUseWithList: the desired key use with application/identifier inf ormation. * @keyUseWithList: the desired key use with application/identifier inf ormation.
* @reserved1: reserved for future use. * @reserved1: reserved for future use.
* @reserved2: reserved for future use. * @reserved2: reserved for future use.
* *
* The key requirements information. * The key requirements information.
*/ */
struct _xmlSecKeyReq { struct _xmlSecKeyReq {
xmlSecKeyDataId keyId; xmlSecKeyDataId keyId;
xmlSecKeyDataType keyType; xmlSecKeyDataType keyType;
xmlSecKeyUsage keyUsage; xmlSecKeyUsage keyUsage;
xmlSecSize keyBitsSize; xmlSecSize keyBitsSize;
xmlSecPtrList keyUseWithList; xmlSecPtrList keyUseWithList;
void* reserved1; void* reserved1;
void* reserved2; void* reserved2;
}; };
XMLSEC_EXPORT int xmlSecKeyReqInitialize (xmlSecKeyRe XMLSEC_EXPORT int xmlSecKeyReqInitialize (xmlSecKeyR
qPtr keyReq); eqPtr keyReq);
XMLSEC_EXPORT void xmlSecKeyReqFinalize (xmlSecKeyRe XMLSEC_EXPORT void xmlSecKeyReqFinalize (xmlSecKeyR
qPtr keyReq); eqPtr keyReq);
XMLSEC_EXPORT void xmlSecKeyReqReset (xmlSecKeyRe XMLSEC_EXPORT void xmlSecKeyReqReset (xmlSecKeyR
qPtr keyReq); eqPtr keyReq);
XMLSEC_EXPORT int xmlSecKeyReqCopy (xmlSecKeyRe XMLSEC_EXPORT int xmlSecKeyReqCopy (xmlSecKeyR
qPtr dst, eqPtr dst,
xmlSecKeyRe xmlSecKeyR
qPtr src); eqPtr src);
XMLSEC_EXPORT int xmlSecKeyReqMatchKey (xmlSecKeyRe XMLSEC_EXPORT int xmlSecKeyReqMatchKey (xmlSecKeyR
qPtr keyReq, eqPtr keyReq,
xmlSecKeyPt xmlSecKeyP
r key); tr key);
XMLSEC_EXPORT int xmlSecKeyReqMatchKeyValue (xmlSecKeyRe XMLSEC_EXPORT int xmlSecKeyReqMatchKeyValue (xmlSecKeyR
qPtr keyReq, eqPtr keyReq,
xmlSecKeyDa xmlSecKeyD
taPtr value); ataPtr value);
XMLSEC_EXPORT void xmlSecKeyReqDebugDump (xmlSecKeyRe XMLSEC_EXPORT void xmlSecKeyReqDebugDump (xmlSecKeyR
qPtr keyReq, eqPtr keyReq,
FILE* outpu FILE* outp
t); ut);
XMLSEC_EXPORT void xmlSecKeyReqDebugXmlDump (xmlSecKeyRe XMLSEC_EXPORT void xmlSecKeyReqDebugXmlDump (xmlSecKeyR
qPtr keyReq, eqPtr keyReq,
FILE* outpu FILE* outp
t); ut);
/** /**
* xmlSecKey: * xmlSecKey:
* @name: the key name. * @name: the key name.
* @value: the key value. * @value: the key value.
* @dataList: the key data list. * @dataList: the key data list.
* @usage: the key usage. * @usage: the key usage.
* @notValidBefore: the start key validity interval. * @notValidBefore: the start key validity interval.
* @notValidAfter: the end key validity interval. * @notValidAfter: the end key validity interval.
* *
* The key. * The key.
*/ */
struct _xmlSecKey { struct _xmlSecKey {
xmlChar* name; xmlChar* name;
xmlSecKeyDataPtr value; xmlSecKeyDataPtr value;
xmlSecPtrListPtr dataList; xmlSecPtrListPtr dataList;
xmlSecKeyUsage usage; xmlSecKeyUsage usage;
time_t notValidBefore; time_t notValidBefore;
time_t notValidAfter; time_t notValidAfter;
}; };
XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyCreate (void); XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyCreate (void);
XMLSEC_EXPORT void xmlSecKeyDestroy (xmlSecKeyPtr key); XMLSEC_EXPORT void xmlSecKeyDestroy (xmlSecKeyPtr key);
XMLSEC_EXPORT void xmlSecKeyEmpty (xmlSecKeyPtr key); XMLSEC_EXPORT void xmlSecKeyEmpty (xmlSecKeyPtr key);
XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyDuplicate (xmlSecKeyPtr key); XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyDuplicate (xmlSecKeyPtr key);
XMLSEC_EXPORT int xmlSecKeyCopy (xmlSecKeyPtr keyDst XMLSEC_EXPORT int xmlSecKeyCopy (xmlSecKeyPtr keyDs
, t,
xmlSecKeyPtr keySrc xmlSecKeyPtr keySr
); c);
XMLSEC_EXPORT const xmlChar* xmlSecKeyGetName (xmlSecKeyPtr key); XMLSEC_EXPORT const xmlChar* xmlSecKeyGetName (xmlSecKeyPtr key);
XMLSEC_EXPORT int xmlSecKeySetName (xmlSecKeyPtr key, XMLSEC_EXPORT int xmlSecKeySetName (xmlSecKeyPtr key,
const xmlChar* name const xmlChar* nam
); e);
XMLSEC_EXPORT xmlSecKeyDataType xmlSecKeyGetType (xmlSecKeyPt r key); XMLSEC_EXPORT xmlSecKeyDataType xmlSecKeyGetType (xmlSecKeyPtr key);
XMLSEC_EXPORT xmlSecKeyDataPtr xmlSecKeyGetValue (xmlSecKeyPtr key); XMLSEC_EXPORT xmlSecKeyDataPtr xmlSecKeyGetValue (xmlSecKeyPtr key);
XMLSEC_EXPORT int xmlSecKeySetValue (xmlSecKeyPtr key, XMLSEC_EXPORT int xmlSecKeySetValue (xmlSecKeyPtr key,
xmlSecKeyDataPtr va xmlSecKeyDataPtr v
lue); alue);
XMLSEC_EXPORT xmlSecKeyDataPtr xmlSecKeyGetData (xmlSecKeyPt XMLSEC_EXPORT xmlSecKeyDataPtr xmlSecKeyGetData (xmlSecKeyPtr key,
r key, xmlSecKeyDataId da
xmlSecKeyDataId dat taId);
aId); XMLSEC_EXPORT xmlSecKeyDataPtr xmlSecKeyEnsureData (xmlSecKeyPtr key,
XMLSEC_EXPORT xmlSecKeyDataPtr xmlSecKeyEnsureData (xmlSecKeyPt xmlSecKeyDataId da
r key, taId);
xmlSecKeyDataId dat XMLSEC_EXPORT int xmlSecKeyAdoptData (xmlSecKeyPtr key,
aId); xmlSecKeyDataPtr d
XMLSEC_EXPORT int xmlSecKeyAdoptData (xmlSecKeyPtr key, ata);
xmlSecKeyDataPtr da
ta);
XMLSEC_EXPORT void xmlSecKeyDebugDump (xmlSecKeyPtr key, XMLSEC_EXPORT void xmlSecKeyDebugDump (xmlSecKeyPtr key,
FILE *output); FILE *output);
XMLSEC_EXPORT void xmlSecKeyDebugXmlDump (xmlSecKeyPtr key, XMLSEC_EXPORT void xmlSecKeyDebugXmlDump (xmlSecKeyPtr key,
FILE *output); FILE *output);
XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyGenerate (xmlSecKeyDataId dat XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyGenerate (xmlSecKeyDataId da
aId, taId,
xmlSecSize sizeBits xmlSecSize sizeBit
, s,
xmlSecKeyDataType t xmlSecKeyDataType
ype); type);
XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyGenerateByName (const xmlChar* name XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyGenerateByName (const xmlChar* nam
, e,
xmlSecSize sizeBits xmlSecSize sizeBit
, s,
xmlSecKeyDataType t xmlSecKeyDataType
ype); type);
XMLSEC_EXPORT int xmlSecKeyMatch (xmlSecKeyPtr key, XMLSEC_EXPORT int xmlSecKeyMatch (xmlSecKeyPtr key,
const xmlChar *name const xmlChar *nam
, e,
xmlSecKeyReqPtr key xmlSecKeyReqPtr ke
Req); yReq);
XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyReadBuffer (xmlSecKeyDataId dat XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyReadBuffer (xmlSecKeyDataId da
aId, taId,
xmlSecBuffer* buffe xmlSecBuffer* buff
r); er);
XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyReadBinaryFile (xmlSecKeyDataId dat XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyReadBinaryFile (xmlSecKeyDataId da
aId, taId,
const char* filenam const char* filena
e); me);
XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyReadMemory (xmlSecKeyDataId dat XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyReadMemory (xmlSecKeyDataId da
aId, taId,
const xmlSecByte* d const xmlSecByte*
ata, data,
xmlSecSize dataSize xmlSecSize dataSiz
); e);
/** /**
* xmlSecKeyIsValid: * xmlSecKeyIsValid:
* @key: the pointer to key. * @key: the pointer to key.
* *
* Macro. Returns 1 if @key is not NULL and @key->id is not NULL * Macro. Returns 1 if @key is not NULL and @key->id is not NULL
* or 0 otherwise. * or 0 otherwise.
*/ */
#define xmlSecKeyIsValid(key) \ #define xmlSecKeyIsValid(key) \
((( key ) != NULL) && \ ((( key ) != NULL) && \
(( key )->value != NULL) && \ (( key )->value != NULL) && \
((( key )->value->id) != NULL)) ((( key )->value->id) != NULL))
/** /**
* xmlSecKeyCheckId: * xmlSecKeyCheckId:
* @key: the pointer to key. * @key: the pointer to key.
* @keyId: the key Id. * @keyId: the key Id.
* *
* Macro. Returns 1 if @key is valid and @key's id is equal to @keyId. * Macro. Returns 1 if @key is valid and @key's id is equal to @keyId.
*/ */
#define xmlSecKeyCheckId(key, keyId) \ #define xmlSecKeyCheckId(key, keyId) \
(xmlSecKeyIsValid(( key )) && \ (xmlSecKeyIsValid(( key )) && \
((( key )->value->id) == ( keyId ))) ((( key )->value->id) == ( keyId )))
/*********************************************************************** /***********************************************************************
* *
* Keys list * Keys list
* *
**********************************************************************/ **********************************************************************/
/** /**
* xmlSecKeyPtrListId: * xmlSecKeyPtrListId:
* *
* The keys list klass. * The keys list klass.
*/ */
#define xmlSecKeyPtrListId xmlSecKeyPtrListGetKlass() #define xmlSecKeyPtrListId xmlSecKeyPtrListGetKlass()
XMLSEC_EXPORT xmlSecPtrListId xmlSecKeyPtrListGetKlass (voi XMLSEC_EXPORT xmlSecPtrListId xmlSecKeyPtrListGetKlass (vo
d); id);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XMLSEC_KEYS_H__ */ #endif /* __XMLSEC_KEYS_H__ */
 End of changes. 30 change blocks. 
161 lines changed or deleted 159 lines changed or added


 keysdata.h   keysdata.h 
skipping to change at line 24 skipping to change at line 24
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
#include <libxml/tree.h> #include <libxml/tree.h>
#include <xmlsec/xmlsec.h> #include <xmlsec/xmlsec.h>
#include <xmlsec/buffer.h> #include <xmlsec/buffer.h>
#include <xmlsec/list.h> #include <xmlsec/list.h>
/** /**************************************************************************
**
*
* Forward declarations * Forward declarations
*/ *
typedef const struct _xmlSecKeyDataKlass xmlSecKeyDataKlass, **************************************************************************
*xmlSecKeyDataId; **/
typedef const struct _xmlSecKeyDataStoreKlass xmlSecKeyDataStoreKl typedef const struct _xmlSecKeyDataKlass xmlSecKeyDataKlass,
ass, *xmlSecKeyDataId;
*xmlSecKeyDataStoreI typedef const struct _xmlSecKeyDataStoreKlass xmlSecKeyDataStoreK
d; lass,
typedef struct _xmlSecKeyDataList xmlSecKeyDataList, *xmlSecKeyDataStore
*xmlSecKeyDataListPt Id;
r; typedef struct _xmlSecKeyDataList xmlSecKeyDataList,
*xmlSecKeyDataListP
tr;
/************************************************************************** /**************************************************************************
* *
* xmlSecKeyDataUsage * xmlSecKeyDataUsage
* *
*************************************************************************/ *************************************************************************/
/** /**
* xmlSecKeyDataUsage: * xmlSecKeyDataUsage:
* *
* The bits mask that determines possible keys data usage. * The bits mask that determines possible keys data usage.
*/ */
typedef unsigned int xmlSecKeyDataUsage; typedef unsigned int xmlSecKeyDataUsage;
/** /**
* xmlSecKeyDataUsageUnknown: * xmlSecKeyDataUsageUnknown:
* *
* The key data usage is unknown. * The key data usage is unknown.
*/ */
#define xmlSecKeyDataUsageUnknown 0x00000 #define xmlSecKeyDataUsageUnknown 0x00000
/** /**
* xmlSecKeyDataUsageKeyInfoNodeRead: * xmlSecKeyDataUsageKeyInfoNodeRead:
* *
* The key data could be read from a <dsig:KeyInfo/> child. * The key data could be read from a <dsig:KeyInfo/> child.
*/ */
#define xmlSecKeyDataUsageKeyInfoNodeRead 0x00001 #define xmlSecKeyDataUsageKeyInfoNodeRead 0x00001
/** /**
* xmlSecKeyDataUsageKeyInfoNodeWrite: * xmlSecKeyDataUsageKeyInfoNodeWrite:
* *
* The key data could be written to a <dsig:KeyInfo /> child. * The key data could be written to a <dsig:KeyInfo /> child.
*/ */
#define xmlSecKeyDataUsageKeyInfoNodeWrite 0x00002 #define xmlSecKeyDataUsageKeyInfoNodeWrite 0x00002
/** /**
* xmlSecKeyDataUsageKeyValueNodeRead: * xmlSecKeyDataUsageKeyValueNodeRead:
* *
* The key data could be read from a <dsig:KeyValue /> child. * The key data could be read from a <dsig:KeyValue /> child.
*/ */
#define xmlSecKeyDataUsageKeyValueNodeRead 0x00004 #define xmlSecKeyDataUsageKeyValueNodeRead 0x00004
/** /**
* xmlSecKeyDataUsageKeyValueNodeWrite: * xmlSecKeyDataUsageKeyValueNodeWrite:
* *
* The key data could be written to a <dsig:KeyValue /> child. * The key data could be written to a <dsig:KeyValue /> child.
*/ */
#define xmlSecKeyDataUsageKeyValueNodeWrite 0x00008 #define xmlSecKeyDataUsageKeyValueNodeWrite 0x00008
/** /**
* xmlSecKeyDataUsageRetrievalMethodNodeXml: * xmlSecKeyDataUsageRetrievalMethodNodeXml:
* *
* The key data could be retrieved using <dsig:RetrievalMethod /> node * The key data could be retrieved using <dsig:RetrievalMethod /> node
* in XML format. * in XML format.
*/ */
#define xmlSecKeyDataUsageRetrievalMethodNodeXml 0x00010 #define xmlSecKeyDataUsageRetrievalMethodNodeXml 0x00010
/** /**
* xmlSecKeyDataUsageRetrievalMethodNodeBin: * xmlSecKeyDataUsageRetrievalMethodNodeBin:
* *
* The key data could be retrieved using <dsig:RetrievalMethod /> node * The key data could be retrieved using <dsig:RetrievalMethod /> node
* in binary format. * in binary format.
*/ */
#define xmlSecKeyDataUsageRetrievalMethodNodeBin 0x00020 #define xmlSecKeyDataUsageRetrievalMethodNodeBin 0x00020
/** /**
* xmlSecKeyDataUsageAny: * xmlSecKeyDataUsageAny:
* *
* Any key data usage. * Any key data usage.
*/ */
#define xmlSecKeyDataUsageAny 0xFFFFF #define xmlSecKeyDataUsageAny 0xFFFFF
/** /**
* xmlSecKeyDataUsageKeyInfoNode: * xmlSecKeyDataUsageKeyInfoNode:
* *
* The key data could be read and written from/to a <dsig:KeyInfo /> child. * The key data could be read and written from/to a <dsig:KeyInfo /> child.
*/ */
#define xmlSecKeyDataUsageKeyInfoNode \ #define xmlSecKeyDataUsageKeyInfoNode \
(xmlSecKeyDataUsageKeyInfoNodeRead | xmlSecKeyDataUsageKeyInfoNodeWr (xmlSecKeyDataUsageKeyInfoNodeRead | xmlSecKeyDataUsageKeyInfoNodeW
ite) rite)
/** /**
* xmlSecKeyDataUsageKeyValueNode: * xmlSecKeyDataUsageKeyValueNode:
* *
* The key data could be read and written from/to a <dsig:KeyValue /> child . * The key data could be read and written from/to a <dsig:KeyValue /> child .
*/ */
#define xmlSecKeyDataUsageKeyValueNode \ #define xmlSecKeyDataUsageKeyValueNode \
(xmlSecKeyDataUsageKeyValueNodeRead | xmlSecKeyDataUsageKeyValueNode (xmlSecKeyDataUsageKeyValueNodeRead | xmlSecKeyDataUsageKeyValueNod
Write) eWrite)
/** /**
* xmlSecKeyDataUsageRetrievalMethodNode: * xmlSecKeyDataUsageRetrievalMethodNode:
* *
* The key data could be retrieved using <dsig:RetrievalMethod /> node * The key data could be retrieved using <dsig:RetrievalMethod /> node
* in any format. * in any format.
*/ */
#define xmlSecKeyDataUsageRetrievalMethodNode \ #define xmlSecKeyDataUsageRetrievalMethodNode \
(xmlSecKeyDataUsageRetrievalMethodNodeXml | xmlSecKeyDataUsageRetrie (xmlSecKeyDataUsageRetrievalMethodNodeXml | xmlSecKeyDataUsageRetri
valMethodNodeBin) evalMethodNodeBin)
/************************************************************************** /**************************************************************************
* *
* xmlSecKeyDataType * xmlSecKeyDataType
* *
*************************************************************************/ *************************************************************************/
/** /**
* xmlSecKeyDataType: * xmlSecKeyDataType:
* *
* The key data type (public/private, session/permanet, etc.). * The key data type (public/private, session/permanet, etc.).
*/ */
typedef unsigned int xmlSecKeyDataType; typedef unsigned int xmlSecKeyDataType;
/** /**
* xmlSecKeyDataTypeUnknown: * xmlSecKeyDataTypeUnknown:
* *
* The key data type is unknown (same as #xmlSecKeyDataTypeNone). * The key data type is unknown (same as #xmlSecKeyDataTypeNone).
*/ */
#define xmlSecKeyDataTypeUnknown 0x0000 #define xmlSecKeyDataTypeUnknown 0x0000
/** /**
* xmlSecKeyDataTypeNone: * xmlSecKeyDataTypeNone:
* *
* The key data type is unknown (same as #xmlSecKeyDataTypeUnknown). * The key data type is unknown (same as #xmlSecKeyDataTypeUnknown).
*/ */
#define xmlSecKeyDataTypeNone xmlSecKeyDataTypeUnk nown #define xmlSecKeyDataTypeNone xmlSecKeyDataTypeUn known
/** /**
* xmlSecKeyDataTypePublic: * xmlSecKeyDataTypePublic:
* *
* The key data contain a public key. * The key data contain a public key.
*/ */
#define xmlSecKeyDataTypePublic 0x0001 #define xmlSecKeyDataTypePublic 0x0001
/** /**
* xmlSecKeyDataTypePrivate: * xmlSecKeyDataTypePrivate:
* *
* The key data contain a private key. * The key data contain a private key.
*/ */
#define xmlSecKeyDataTypePrivate 0x0002 #define xmlSecKeyDataTypePrivate 0x0002
/** /**
* xmlSecKeyDataTypeSymmetric: * xmlSecKeyDataTypeSymmetric:
* *
* The key data contain a symmetric key. * The key data contain a symmetric key.
*/ */
#define xmlSecKeyDataTypeSymmetric 0x0004 #define xmlSecKeyDataTypeSymmetric 0x0004
/** /**
* xmlSecKeyDataTypeSession: * xmlSecKeyDataTypeSession:
* *
* The key data contain session key (one time key, not stored in keys manag er). * The key data contain session key (one time key, not stored in keys manag er).
*/ */
#define xmlSecKeyDataTypeSession 0x0008 #define xmlSecKeyDataTypeSession 0x0008
/** /**
* xmlSecKeyDataTypePermanent: * xmlSecKeyDataTypePermanent:
* *
* The key data contain permanent key (stored in keys manager). * The key data contain permanent key (stored in keys manager).
*/ */
#define xmlSecKeyDataTypePermanent 0x0010 #define xmlSecKeyDataTypePermanent 0x0010
/** /**
* xmlSecKeyDataTypeTrusted: * xmlSecKeyDataTypeTrusted:
* *
* The key data is trusted. * The key data is trusted.
*/ */
#define xmlSecKeyDataTypeTrusted 0x0100 #define xmlSecKeyDataTypeTrusted 0x0100
/** /**
* xmlSecKeyDataTypeAny: * xmlSecKeyDataTypeAny:
* *
* Any key data. * Any key data.
*/ */
#define xmlSecKeyDataTypeAny 0xFFFF #define xmlSecKeyDataTypeAny 0xFFFF
/************************************************************************** /**************************************************************************
* *
* xmlSecKeyDataFormat * xmlSecKeyDataFormat
* *
*************************************************************************/ *************************************************************************/
/** /**
* xmlSecKeyDataFormat: * xmlSecKeyDataFormat:
* @xmlSecKeyDataFormatUnknown: the key data format is unkno * @xmlSecKeyDataFormatUnknown: the key data format is unknown.
wn. * @xmlSecKeyDataFormatBinary: the binary key data.
* @xmlSecKeyDataFormatBinary: the binary key data. * @xmlSecKeyDataFormatPem: the PEM key data (cert or public/pr
* @xmlSecKeyDataFormatPem: the PEM key data (cert or public/pri ivate key).
vate key). * @xmlSecKeyDataFormatDer: the DER key data (cert or public/pr
* @xmlSecKeyDataFormatDer: the DER key data (cert or public/pri ivate key).
vate key). * @xmlSecKeyDataFormatPkcs8Pem: the PKCS8 PEM private key.
* @xmlSecKeyDataFormatPkcs8Pem: the PKCS8 PEM private key. * @xmlSecKeyDataFormatPkcs8Der: the PKCS8 DER private key.
* @xmlSecKeyDataFormatPkcs8Der: the PKCS8 DER private key. * @xmlSecKeyDataFormatPkcs12: the PKCS12 format (bag of keys and
* @xmlSecKeyDataFormatPkcs12: the PKCS12 format (bag of keys and c certs)
erts) * @xmlSecKeyDataFormatCertPem: the PEM cert.
* @xmlSecKeyDataFormatCertPem: the PEM cert. * @xmlSecKeyDataFormatCertDer: the DER cert.
* @xmlSecKeyDataFormatCertDer: the DER cert.
* *
* The key data format (binary, der, pem, etc.). * The key data format (binary, der, pem, etc.).
*/ */
typedef enum { typedef enum {
xmlSecKeyDataFormatUnknown = 0, xmlSecKeyDataFormatUnknown = 0,
xmlSecKeyDataFormatBinary, xmlSecKeyDataFormatBinary,
xmlSecKeyDataFormatPem, xmlSecKeyDataFormatPem,
xmlSecKeyDataFormatDer, xmlSecKeyDataFormatDer,
xmlSecKeyDataFormatPkcs8Pem, xmlSecKeyDataFormatPkcs8Pem,
xmlSecKeyDataFormatPkcs8Der, xmlSecKeyDataFormatPkcs8Der,
xmlSecKeyDataFormatPkcs12, xmlSecKeyDataFormatPkcs12,
xmlSecKeyDataFormatCertPem, xmlSecKeyDataFormatCertPem,
xmlSecKeyDataFormatCertDer xmlSecKeyDataFormatCertDer
} xmlSecKeyDataFormat; } xmlSecKeyDataFormat;
/************************************************************************** /**************************************************************************
* *
* Global xmlSecKeyDataIds methods * Global xmlSecKeyDataIds methods
* *
*************************************************************************/ *************************************************************************/
XMLSEC_EXPORT xmlSecPtrListPtr xmlSecKeyDataIdsGet (void); XMLSEC_EXPORT xmlSecPtrListPtr xmlSecKeyDataIdsGet (void);
XMLSEC_EXPORT int xmlSecKeyDataIdsInit (void); XMLSEC_EXPORT int xmlSecKeyDataIdsInit (void);
XMLSEC_EXPORT void xmlSecKeyDataIdsShutdown (void); XMLSEC_EXPORT void xmlSecKeyDataIdsShutdown (void);
XMLSEC_EXPORT int xmlSecKeyDataIdsRegisterDefault (void); XMLSEC_EXPORT int xmlSecKeyDataIdsRegisterDefault (void);
XMLSEC_EXPORT int xmlSecKeyDataIdsRegister (xmlSecKeyDa XMLSEC_EXPORT int xmlSecKeyDataIdsRegister (xmlSecKeyD
taId id); ataId id);
/************************************************************************** /**************************************************************************
* *
* xmlSecKeyData * xmlSecKeyData
* *
*************************************************************************/ *************************************************************************/
/** /**
* xmlSecKeyData: * xmlSecKeyData:
* @id: the data id (#xmlSecKeyDataId). * @id: the data id (#xmlSecKeyDataId).
* @reserved0: reserved for the future. * @reserved0: reserved for the future.
* @reserved1: reserved for the future. * @reserved1: reserved for the future.
* *
* The key data: key value (crypto material), x509 data, pgp data, etc. * The key data: key value (crypto material), x509 data, pgp data, etc.
*/ */
struct _xmlSecKeyData { struct _xmlSecKeyData {
xmlSecKeyDataId id; xmlSecKeyDataId id;
void* reserved0; void* reserved0;
void* reserved1; void* reserved1;
}; };
XMLSEC_EXPORT xmlSecKeyDataPtr xmlSecKeyDataCreate (xmlSecKeyDa XMLSEC_EXPORT xmlSecKeyDataPtr xmlSecKeyDataCreate (xmlSecKeyD
taId id); ataId id);
XMLSEC_EXPORT xmlSecKeyDataPtr xmlSecKeyDataDuplicate (xmlSecKeyDa XMLSEC_EXPORT xmlSecKeyDataPtr xmlSecKeyDataDuplicate (xmlSecKeyD
taPtr data); ataPtr data);
XMLSEC_EXPORT void xmlSecKeyDataDestroy (xmlSecKeyDa XMLSEC_EXPORT void xmlSecKeyDataDestroy (xmlSecKeyD
taPtr data); ataPtr data);
XMLSEC_EXPORT int xmlSecKeyDataGenerate (xmlSecKeyDa XMLSEC_EXPORT int xmlSecKeyDataGenerate (xmlSecKeyD
taPtr data, ataPtr data,
xmlSecSize xmlSecSize
sizeBits, sizeBits,
xmlSecKeyDa xmlSecKeyD
taType type); ataType type);
XMLSEC_EXPORT xmlSecKeyDataType xmlSecKeyDataGetType (xml XMLSEC_EXPORT xmlSecKeyDataType xmlSecKeyDataGetType (xmlSecKeyD
SecKeyDataPtr data); ataPtr data);
XMLSEC_EXPORT xmlSecSize xmlSecKeyDataGetSize (xmlSecKeyDa XMLSEC_EXPORT xmlSecSize xmlSecKeyDataGetSize (xmlSecKeyD
taPtr data); ataPtr data);
XMLSEC_EXPORT const xmlChar* xmlSecKeyDataGetIdentifier (xmlSecKeyDa XMLSEC_EXPORT const xmlChar* xmlSecKeyDataGetIdentifier (xmlSecKeyD
taPtr data); ataPtr data);
XMLSEC_EXPORT void xmlSecKeyDataDebugDump (xmlSecKeyDa XMLSEC_EXPORT void xmlSecKeyDataDebugDump (xmlSecKeyD
taPtr data, ataPtr data,
FILE *outpu FILE *outp
t); ut);
XMLSEC_EXPORT void xmlSecKeyDataDebugXmlDump (xmlSecKeyDa XMLSEC_EXPORT void xmlSecKeyDataDebugXmlDump (xmlSecKeyD
taPtr data, ataPtr data,
FILE *outpu FILE *outp
t); ut);
XMLSEC_EXPORT int xmlSecKeyDataXmlRead (xmlSecKeyDa XMLSEC_EXPORT int xmlSecKeyDataXmlRead (xmlSecKeyD
taId id, ataId id,
xmlSecKeyPt xmlSecKeyP
r key, tr key,
xmlNodePtr xmlNodePtr
node, node,
xmlSecKeyIn xmlSecKeyI
foCtxPtr keyInfoCtx); nfoCtxPtr keyInfoCtx);
XMLSEC_EXPORT int xmlSecKeyDataXmlWrite (xmlSecKeyDa XMLSEC_EXPORT int xmlSecKeyDataXmlWrite (xmlSecKeyD
taId id, ataId id,
xmlSecKeyPt xmlSecKeyP
r key, tr key,
xmlNodePtr xmlNodePtr
node, node,
xmlSecKeyIn xmlSecKeyI
foCtxPtr keyInfoCtx); nfoCtxPtr keyInfoCtx);
XMLSEC_EXPORT int xmlSecKeyDataBinRead (xmlSecKeyDa XMLSEC_EXPORT int xmlSecKeyDataBinRead (xmlSecKeyD
taId id, ataId id,
xmlSecKeyPt xmlSecKeyP
r key, tr key,
const xmlSe const xmlS
cByte* buf, ecByte* buf,
xmlSecSize xmlSecSize
bufSize, bufSize,
xmlSecKeyIn xmlSecKeyI
foCtxPtr keyInfoCtx); nfoCtxPtr keyInfoCtx);
XMLSEC_EXPORT int xmlSecKeyDataBinWrite (xmlSecKeyDa XMLSEC_EXPORT int xmlSecKeyDataBinWrite (xmlSecKeyD
taId id, ataId id,
xmlSecKeyPt xmlSecKeyP
r key, tr key,
xmlSecByte* xmlSecByte
* buf, ** buf,
xmlSecSize* xmlSecSize
bufSize, * bufSize,
xmlSecKeyIn xmlSecKeyI
foCtxPtr keyInfoCtx); nfoCtxPtr keyInfoCtx);
/** /**
* xmlSecKeyDataGetName: * xmlSecKeyDataGetName:
* @data: the pointer to key data. * @data: the pointer to key data.
* *
* Macro. Returns the key data name. * Macro. Returns the key data name.
*/ */
#define xmlSecKeyDataGetName(data) \ #define xmlSecKeyDataGetName(data) \
((xmlSecKeyDataIsValid((data))) ? \ ((xmlSecKeyDataIsValid((data))) ? \
xmlSecKeyDataKlassGetName((data)->id) : NULL) xmlSecKeyDataKlassGetName((data)->id) : NULL)
/** /**
* xmlSecKeyDataIsValid: * xmlSecKeyDataIsValid:
* @data: the pointer to data. * @data: the pointer to data.
* *
* Macro. Returns 1 if @data is not NULL and @data->id is not NULL * Macro. Returns 1 if @data is not NULL and @data->id is not NULL
* or 0 otherwise. * or 0 otherwise.
*/ */
#define xmlSecKeyDataIsValid(data) \ #define xmlSecKeyDataIsValid(data) \
((( data ) != NULL) && \ ((( data ) != NULL) && \
(( data )->id != NULL) && \ (( data )->id != NULL) && \
(( data )->id->klassSize >= sizeof(xmlSecKeyDataKlass)) && \ (( data )->id->klassSize >= sizeof(xmlSecKeyDataKlass)) && \
(( data )->id->objSize >= sizeof(xmlSecKeyData)) && \ (( data )->id->objSize >= sizeof(xmlSecKeyData)) && \
(( data )->id->name != NULL)) (( data )->id->name != NULL))
/** /**
* xmlSecKeyDataCheckId: * xmlSecKeyDataCheckId:
* @data: the pointer to data. * @data: the pointer to data.
* @dataId: the data Id. * @dataId: the data Id.
* *
* Macro. Returns 1 if @data is valid and @data's id is equal to @dataId. * Macro. Returns 1 if @data is valid and @data's id is equal to @dataId.
*/ */
#define xmlSecKeyDataCheckId(data, dataId) \ #define xmlSecKeyDataCheckId(data, dataId) \
(xmlSecKeyDataIsValid(( data )) && \ (xmlSecKeyDataIsValid(( data )) && \
((( data )->id) == ( dataId ))) ((( data )->id) == ( dataId )))
/** /**
* xmlSecKeyDataCheckUsage: * xmlSecKeyDataCheckUsage:
* @data: the pointer to data. * @data: the pointer to data.
* @usg: the data usage. * @usg: the data usage.
* *
* Macro. Returns 1 if @data is valid and could be used for @usg. * Macro. Returns 1 if @data is valid and could be used for @usg.
*/ */
#define xmlSecKeyDataCheckUsage(data, usg) \ #define xmlSecKeyDataCheckUsage(data, usg) \
(xmlSecKeyDataIsValid(( data )) && \ (xmlSecKeyDataIsValid(( data )) && \
(((( data )->id->usage) & ( usg )) != 0)) (((( data )->id->usage) & ( usg )) != 0))
/** /**
* xmlSecKeyDataCheckSize: * xmlSecKeyDataCheckSize:
* @data: the pointer to data. * @data: the pointer to data.
* @size: the expected size. * @size: the expected size.
* *
* Macro. Returns 1 if @data is valid and @data's object has at least @size bytes. * Macro. Returns 1 if @data is valid and @data's object has at least @size bytes.
*/ */
#define xmlSecKeyDataCheckSize(data, size) \ #define xmlSecKeyDataCheckSize(data, size) \
(xmlSecKeyDataIsValid(( data )) && \ (xmlSecKeyDataIsValid(( data )) && \
(( data )->id->objSize >= size)) (( data )->id->objSize >= size))
/************************************************************************** /**************************************************************************
* *
* xmlSecKeyDataKlass * xmlSecKeyDataKlass
* *
*************************************************************************/ *************************************************************************/
/** /**
* xmlSecKeyDataIdUnknown: * xmlSecKeyDataIdUnknown:
* *
* The "unknown" id. * The "unknown" id.
*/ */
#define xmlSecKeyDataIdUnknown ((xmlSecKeyDataId)NU LL) #define xmlSecKeyDataIdUnknown ((xmlSecKeyDataId)NULL)
/** /**
* xmlSecKeyDataInitMethod: * xmlSecKeyDataInitMethod:
* @data: the pointer to key data. * @data: the pointer to key data.
* *
* Key data specific initialization method. * Key data specific initialization method.
* *
* Returns: 0 on success or a negative value if an error occurs. * Returns: 0 on success or a negative value if an error occurs.
*/ */
typedef int (*xmlSecKeyDataInitMethod) (xmlSecKeyDa taPtr data); typedef int (*xmlSecKeyDataInitMethod) (xmlSecKeyD ataPtr data);
/** /**
* xmlSecKeyDataDuplicateMethod: * xmlSecKeyDataDuplicateMethod:
* @dst: the pointer to destination key data. * @dst: the pointer to destination key data.
* @src: the poiniter to source key data. * @src: the poiniter to source key data.
* *
* Key data specific duplication (copy) method. * Key data specific duplication (copy) method.
* *
* Returns: 0 on success or a negative value if an error occurs. * Returns: 0 on success or a negative value if an error occurs.
*/ */
typedef int (*xmlSecKeyDataDuplicateMethod) (xmlSecKeyDa typedef int (*xmlSecKeyDataDuplicateMethod) (xmlSecKeyD
taPtr dst, ataPtr dst,
xmlSecKeyDa xmlSecKeyD
taPtr src); ataPtr src);
/** /**
* xmlSecKeyDataFinalizeMethod: * xmlSecKeyDataFinalizeMethod:
* @data: the data. * @data: the data.
* *
* Key data specific finalization method. All the objects and resources all ocated * Key data specific finalization method. All the objects and resources all ocated
* by the key data object must be freed inside this method. * by the key data object must be freed inside this method.
*/ */
typedef void (*xmlSecKeyDataFinalizeMethod) (xmlSecKeyDa taPtr data); typedef void (*xmlSecKeyDataFinalizeMethod) (xmlSecKeyD ataPtr data);
/** /**
* xmlSecKeyDataXmlReadMethod: * xmlSecKeyDataXmlReadMethod:
* @id: the data id. * @id: the data id.
* @key: the key. * @key: the key.
* @node: the pointer to data's value XML node. * @node: the pointer to data's value XML node.
* @keyInfoCtx: the <dsig:KeyInfo/> node processing context. * @keyInfoCtx: the <dsig:KeyInfo/> node processing context.
* *
* Key data specific method for reading XML node. * Key data specific method for reading XML node.
* *
* Returns: 0 on success or a negative value if an error occurs. * Returns: 0 on success or a negative value if an error occurs.
*/ */
typedef int (*xmlSecKeyDataXmlReadMethod) (xmlSecKeyDa typedef int (*xmlSecKeyDataXmlReadMethod) (xmlSecKeyD
taId id, ataId id,
xmlSecKeyPt xmlSecKeyP
r key, tr key,
xmlNodePtr xmlNodePtr
node, node,
xmlSecKeyIn xmlSecKeyI
foCtxPtr keyInfoCtx); nfoCtxPtr keyInfoCtx);
/** /**
* xmlSecKeyDataXmlWriteMethod: * xmlSecKeyDataXmlWriteMethod:
* @id: the data id. * @id: the data id.
* @key: the key. * @key: the key.
* @node: the pointer to data's value XML node. * @node: the pointer to data's value XML node.
* @keyInfoCtx: the <dsig:KeyInfo> node processing context. * @keyInfoCtx: the <dsig:KeyInfo> node processing context.
* *
* Key data specific method for writing XML node. * Key data specific method for writing XML node.
* *
* Returns: 0 on success or a negative value if an error occurs. * Returns: 0 on success or a negative value if an error occurs.
*/ */
typedef int (*xmlSecKeyDataXmlWriteMethod) (xmlSecKeyDa typedef int (*xmlSecKeyDataXmlWriteMethod) (xmlSecKeyD
taId id, ataId id,
xmlSecKeyPt xmlSecKeyP
r key, tr key,
xmlNodePtr xmlNodePtr
node, node,
xmlSecKeyIn xmlSecKeyI
foCtxPtr keyInfoCtx); nfoCtxPtr keyInfoCtx);
/** /**
* xmlSecKeyDataBinReadMethod: * xmlSecKeyDataBinReadMethod:
* @id: the data id. * @id: the data id.
* @key: the key. * @key: the key.
* @buf: the input buffer. * @buf: the input buffer.
* @bufSize: the buffer size. * @bufSize: the buffer size.
* @keyInfoCtx: the <dsig:KeyInfo/> node processing context. * @keyInfoCtx: the <dsig:KeyInfo/> node processing context.
* *
* Key data specific method for reading binary buffer. * Key data specific method for reading binary buffer.
* *
* Returns: 0 on success or a negative value if an error occurs. * Returns: 0 on success or a negative value if an error occurs.
*/ */
typedef int (*xmlSecKeyDataBinReadMethod) (xmlSecKeyDa typedef int (*xmlSecKeyDataBinReadMethod) (xmlSecKeyD
taId id, ataId id,
xmlSecKeyPt xmlSecKeyP
r key, tr key,
const xmlSe const xmlS
cByte* buf, ecByte* buf,
xmlSecSize xmlSecSize
bufSize, bufSize,
xmlSecKeyIn xmlSecKeyI
foCtxPtr keyInfoCtx); nfoCtxPtr keyInfoCtx);
/** /**
* xmlSecKeyDataBinWriteMethod: * xmlSecKeyDataBinWriteMethod:
* @id: the data id. * @id: the data id.
* @key: the key. * @key: the key.
* @buf: the output buffer. * @buf: the output buffer.
* @bufSize: the buffer size. * @bufSize: the buffer size.
* @keyInfoCtx: the <dsig:KeyInfo/> node processing context. * @keyInfoCtx: the <dsig:KeyInfo/> node processing context.
* *
* Key data specific method for reading binary buffer. * Key data specific method for reading binary buffer.
* *
* Returns: 0 on success or a negative value if an error occurs. * Returns: 0 on success or a negative value if an error occurs.
*/ */
typedef int (*xmlSecKeyDataBinWriteMethod) (xmlSecKeyDa typedef int (*xmlSecKeyDataBinWriteMethod) (xmlSecKeyD
taId id, ataId id,
xmlSecKeyPt xmlSecKeyP
r key, tr key,
xmlSecByte* xmlSecByte
* buf, ** buf,
xmlSecSize* xmlSecSize
bufSize, * bufSize,
xmlSecKeyIn xmlSecKeyI
foCtxPtr keyInfoCtx); nfoCtxPtr keyInfoCtx);
/** /**
* xmlSecKeyDataGenerateMethod: * xmlSecKeyDataGenerateMethod:
* @data: the pointer to key data. * @data: the pointer to key data.
* @sizeBits: the key data specific size. * @sizeBits: the key data specific size.
* @type: the required key type (session/permanent, etc.) * @type: the required key type (session/permanent, etc.)
* *
* Key data specific method for generating new key data. * Key data specific method for generating new key data.
* *
* Returns: 0 on success or a negative value if an error occurs. * Returns: 0 on success or a negative value if an error occurs.
*/ */
typedef int (*xmlSecKeyDataGenerateMethod) (xmlSecKeyDa typedef int (*xmlSecKeyDataGenerateMethod) (xmlSecKeyD
taPtr data, ataPtr data,
xmlSecSize xmlSecSize
sizeBits, sizeBits,
xmlSecKeyDa xmlSecKeyD
taType type); ataType type);
/** /**
* xmlSecKeyDataGetTypeMethod: * xmlSecKeyDataGetTypeMethod:
* @data: the data. * @data: the data.
* *
* Key data specific method to get the key type. * Key data specific method to get the key type.
* *
* Returns: the key type. * Returns: the key type.
*/ */
typedef xmlSecKeyDataType (*xmlSecKeyDataGetTypeMethod) (xmlSecKeyDa taPtr data); typedef xmlSecKeyDataType (*xmlSecKeyDataGetTypeMethod) (xmlSecKeyD ataPtr data);
/** /**
* xmlSecKeyDataGetSizeMethod: * xmlSecKeyDataGetSizeMethod:
* @data: the pointer to key data. * @data: the pointer to key data.
* *
* Key data specific method to get the key size. * Key data specific method to get the key size.
* *
* Returns: the key size in bits. * Returns: the key size in bits.
*/ */
typedef xmlSecSize (*xmlSecKeyDataGetSizeMethod) (xmlSecKeyDa taPtr data); typedef xmlSecSize (*xmlSecKeyDataGetSizeMethod) (xmlSecKeyD ataPtr data);
/** /**
* xmlSecKeyDataGetIdentifierMethod: * xmlSecKeyDataGetIdentifierMethod:
* @data: the pointer to key data. * @data: the pointer to key data.
* *
* Key data specific method to get the key data identifier string (for exam ple, * Key data specific method to get the key data identifier string (for exam ple,
* X509 data identifier is the subject of the verified cert). * X509 data identifier is the subject of the verified cert).
* *
* Returns: the identifier string or NULL if an error occurs. * Returns: the identifier string or NULL if an error occurs.
*/ */
typedef const xmlChar* (*xmlSecKeyDataGetIdentifierMethod) (xmlSecK eyDataPtr data); typedef const xmlChar* (*xmlSecKeyDataGetIdentifierMethod) (xmlSec KeyDataPtr data);
/** /**
* xmlSecKeyDataDebugDumpMethod: * xmlSecKeyDataDebugDumpMethod:
* @data: the data. * @data: the data.
* @output: the FILE to print debug info (should be open for wri * @output: the FILE to print debug info (should be open for wr
ting). iting).
* *
* Key data specific method for printing debug info. * Key data specific method for printing debug info.
*/ */
typedef void (*xmlSecKeyDataDebugDumpMethod) (xmlSecKeyDa typedef void (*xmlSecKeyDataDebugDumpMethod) (xmlSecKeyD
taPtr data, ataPtr data,
FILE* outpu FILE* outp
t); ut);
/** /**
* xmlSecKeyDataKlass: * xmlSecKeyDataKlass:
* @klassSize: the klass size. * @klassSize: the klass size.
* @objSize: the object size. * @objSize: the object size.
* @name: the object name. * @name: the object name.
* @usage: the allowed data usage. * @usage: the allowed data usage.
* @href: the identification string (href). * @href: the identification string (href).
* @dataNodeName: the data's XML node name. * @dataNodeName: the data's XML node name.
* @dataNodeNs: the data's XML node namespace. * @dataNodeNs: the data's XML node namespace.
* @initialize: the initialization method. * @initialize: the initialization method.
* @duplicate: the duplicate (copy) method. * @duplicate: the duplicate (copy) method.
* @finalize: the finalization (destroy) method. * @finalize: the finalization (destroy) method.
* @generate: the new data generation method. * @generate: the new data generation method.
* @getType: the method to access data's type information. * @getType: the method to access data's type information.
* @getSize: the method to access data's size. * @getSize: the method to access data's size.
* @getIdentifier: the method to access data's string identifier. * @getIdentifier: the method to access data's string identifier.
* @xmlRead: the method for reading data from XML node. * @xmlRead: the method for reading data from XML node.
* @xmlWrite: the method for writing data to XML node. * @xmlWrite: the method for writing data to XML node.
* @binRead: the method for reading data from a binary buffer. * @binRead: the method for reading data from a binary buffer.
* @binWrite: the method for writing data to binary buffer. * @binWrite: the method for writing data to binary buffer.
* @debugDump: the method for printing debug data informati * @debugDump: the method for printing debug data information.
on. * @debugXmlDump: the method for printing debug data information in X
* @debugXmlDump: the method for printing debug data information in XM ML format.
L format. * @reserved0: reserved for the future.
* @reserved0: reserved for the future. * @reserved1: reserved for the future.
* @reserved1: reserved for the future.
* *
* The data id (klass). * The data id (klass).
*/ */
struct _xmlSecKeyDataKlass { struct _xmlSecKeyDataKlass {
xmlSecSize klassSize; xmlSecSize klassSize;
xmlSecSize objSize; xmlSecSize objSize;
/* data */ /* data */
const xmlChar* name; const xmlChar* name;
xmlSecKeyDataUsage usage; xmlSecKeyDataUsage usage;
const xmlChar* href; const xmlChar* href;
const xmlChar* dataNodeName; const xmlChar* dataNodeName;
const xmlChar* dataNodeNs; const xmlChar* dataNodeNs;
/* constructors/destructor */ /* constructors/destructor */
xmlSecKeyDataInitMethod initialize; xmlSecKeyDataInitMethod initialize;
xmlSecKeyDataDuplicateMethod duplicate; xmlSecKeyDataDuplicateMethod duplicate;
xmlSecKeyDataFinalizeMethod finalize; xmlSecKeyDataFinalizeMethod finalize;
xmlSecKeyDataGenerateMethod generate; xmlSecKeyDataGenerateMethod generate;
/* get info */ /* get info */
xmlSecKeyDataGetTypeMethod getType; xmlSecKeyDataGetTypeMethod getType;
xmlSecKeyDataGetSizeMethod getSize; xmlSecKeyDataGetSizeMethod getSize;
xmlSecKeyDataGetIdentifierMethod getIdentifier; xmlSecKeyDataGetIdentifierMethod getIdentifier;
/* read/write */ /* read/write */
xmlSecKeyDataXmlReadMethod xmlRead; xmlSecKeyDataXmlReadMethod xmlRead;
xmlSecKeyDataXmlWriteMethod xmlWrite; xmlSecKeyDataXmlWriteMethod xmlWrite;
xmlSecKeyDataBinReadMethod binRead; xmlSecKeyDataBinReadMethod binRead;
xmlSecKeyDataBinWriteMethod binWrite; xmlSecKeyDataBinWriteMethod binWrite;
/* debug */ /* debug */
xmlSecKeyDataDebugDumpMethod debugDump; xmlSecKeyDataDebugDumpMethod debugDump;
xmlSecKeyDataDebugDumpMethod debugXmlDump; xmlSecKeyDataDebugDumpMethod debugXmlDump;
/* for the future */ /* for the future */
void* reserved0; void* reserved0;
void* reserved1; void* reserved1;
}; };
/** /**
* xmlSecKeyDataKlassGetName: * xmlSecKeyDataKlassGetName:
* @klass: the data klass. * @klass: the data klass.
* *
* Macro. Returns data klass name. * Macro. Returns data klass name.
*/ */
#define xmlSecKeyDataKlassGetName(klass) \ #define xmlSecKeyDataKlassGetName(klass) \
(((klass)) ? ((klass)->name) : NULL) (((klass)) ? ((klass)->name) : NULL)
/*********************************************************************** /***********************************************************************
* *
* Key Data list * Key Data list
* *
**********************************************************************/ **********************************************************************/
/** /**
* xmlSecKeyDataListId: * xmlSecKeyDataListId:
* *
* *
* The key data klasses list klass id. * The key data klasses list klass id.
*/ */
#define xmlSecKeyDataListId xmlSecKeyDataListGetKlass() #define xmlSecKeyDataListId xmlSecKeyDataListGetKlass()
XMLSEC_EXPORT xmlSecPtrListId xmlSecKeyDataListGetKlass (void); XMLSEC_EXPORT xmlSecPtrListId xmlSecKeyDataListGetKlass (void);
/*********************************************************************** /***********************************************************************
* *
* Key Data Ids list * Key Data Ids list
* *
**********************************************************************/ **********************************************************************/
/** /**
* xmlSecKeyDataIdListId: * xmlSecKeyDataIdListId:
* *
* *
* The key data list klass id. * The key data list klass id.
*/ */
#define xmlSecKeyDataIdListId xmlSecKeyDataIdListGetKlass() #define xmlSecKeyDataIdListId xmlSecKeyDataIdListGetKlass()
XMLSEC_EXPORT xmlSecPtrListId xmlSecKeyDataIdListGetKlass (void); XMLSEC_EXPORT xmlSecPtrListId xmlSecKeyDataIdListGetKlass (void);
XMLSEC_EXPORT int xmlSecKeyDataIdListFind (xmlSecPtrLi XMLSEC_EXPORT int xmlSecKeyDataIdListFind (xmlSecPtrL
stPtr list, istPtr list,
xmlSecKeyDa xmlSecKeyD
taId dataId); ataId dataId);
XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataIdListFindByNode (xmlSecPtrLi XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataIdListFindByNode (xmlSecPtrL
stPtr list, istPtr list,
const xmlCh const xmlC
ar* nodeName, har* nodeName,
const xmlCh const xmlC
ar* nodeNs, har* nodeNs,
xmlSecKeyDa xmlSecKeyD
taUsage usage); ataUsage usage);
XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataIdListFindByHref (xmlSecPtrLi XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataIdListFindByHref (xmlSecPtrL
stPtr list, istPtr list,
const xmlCh const xmlC
ar* href, har* href,
xmlSecKeyDa xmlSecKeyD
taUsage usage); ataUsage usage);
XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataIdListFindByName (xmlSecPtrLi XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataIdListFindByName (xmlSecPtrL
stPtr list, istPtr list,
const xmlCh const xmlC
ar* name, har* name,
xmlSecKeyDa xmlSecKeyD
taUsage usage); ataUsage usage);
XMLSEC_EXPORT void xmlSecKeyDataIdListDebugDump (xmlSecPtrLi XMLSEC_EXPORT void xmlSecKeyDataIdListDebugDump (xmlSecPtrL
stPtr list, istPtr list,
FILE* outpu FILE* outp
t); ut);
XMLSEC_EXPORT void xmlSecKeyDataIdListDebugXmlDump (xmlSecPtrLi XMLSEC_EXPORT void xmlSecKeyDataIdListDebugXmlDump (xmlSecPtrL
stPtr list, istPtr list,
FILE* outpu FILE* outp
t); ut);
/************************************************************************** /**************************************************************************
* *
* xmlSecKeyDataBinary * xmlSecKeyDataBinary
* *
* key (xmlSecBuffer) is located after xmlSecKeyData structure * key (xmlSecBuffer) is located after xmlSecKeyData structure
* *
*************************************************************************/ *************************************************************************/
/** /**
* xmlSecKeyDataBinarySize: * xmlSecKeyDataBinarySize:
* *
* The binary key data object size. * The binary key data object size.
*/ */
#define xmlSecKeyDataBinarySize \ #define xmlSecKeyDataBinarySize \
(sizeof(xmlSecKeyData) + sizeof(xmlSecBuffer)) (sizeof(xmlSecKeyData) + sizeof(xmlSecBuffer))
XMLSEC_EXPORT int xmlSecKeyDataBinaryValueInitialize (xml XMLSEC_EXPORT int xmlSecKeyDataBinaryValueInitialize (xm
SecKeyDataPtr data); lSecKeyDataPtr data);
XMLSEC_EXPORT int xmlSecKeyDataBinaryValueDuplicate (xml XMLSEC_EXPORT int xmlSecKeyDataBinaryValueDuplicate (xm
SecKeyDataPtr dst, lSecKeyDataPtr dst,
xmlS xml
ecKeyDataPtr src); SecKeyDataPtr src);
XMLSEC_EXPORT void xmlSecKeyDataBinaryValueFinalize (xml XMLSEC_EXPORT void xmlSecKeyDataBinaryValueFinalize (xm
SecKeyDataPtr data); lSecKeyDataPtr data);
XMLSEC_EXPORT int xmlSecKeyDataBinaryValueXmlRead (xml XMLSEC_EXPORT int xmlSecKeyDataBinaryValueXmlRead (xm
SecKeyDataId id, lSecKeyDataId id,
xml xm
SecKeyPtr key, lSecKeyPtr key,
xml xm
NodePtr node, lNodePtr node,
xml xm
SecKeyInfoCtxPtr keyInfoCtx); lSecKeyInfoCtxPtr keyInfoCtx);
XMLSEC_EXPORT int xmlSecKeyDataBinaryValueXmlWrite (xml XMLSEC_EXPORT int xmlSecKeyDataBinaryValueXmlWrite (xm
SecKeyDataId id, lSecKeyDataId id,
xml xm
SecKeyPtr key, lSecKeyPtr key,
xml xm
NodePtr node, lNodePtr node,
xml xm
SecKeyInfoCtxPtr keyInfoCtx); lSecKeyInfoCtxPtr keyInfoCtx);
XMLSEC_EXPORT int xmlSecKeyDataBinaryValueBinRead (xml XMLSEC_EXPORT int xmlSecKeyDataBinaryValueBinRead (xm
SecKeyDataId id, lSecKeyDataId id,
xml xm
SecKeyPtr key, lSecKeyPtr key,
con co
st xmlSecByte* buf, nst xmlSecByte* buf,
xml xm
SecSize bufSize, lSecSize bufSize,
xml xm
SecKeyInfoCtxPtr keyInfoCtx); lSecKeyInfoCtxPtr keyInfoCtx);
XMLSEC_EXPORT int xmlSecKeyDataBinaryValueBinWrite (xml XMLSEC_EXPORT int xmlSecKeyDataBinaryValueBinWrite (xm
SecKeyDataId id, lSecKeyDataId id,
xml xm
SecKeyPtr key, lSecKeyPtr key,
xml xm
SecByte** buf, lSecByte** buf,
xml xm
SecSize* bufSize, lSecSize* bufSize,
xml xm
SecKeyInfoCtxPtr keyInfoCtx); lSecKeyInfoCtxPtr keyInfoCtx);
XMLSEC_EXPORT void xmlSecKeyDataBinaryValueDebugDump (xml XMLSEC_EXPORT void xmlSecKeyDataBinaryValueDebugDump (xm
SecKeyDataPtr data, lSecKeyDataPtr data,
FILE FIL
* output); E* output);
XMLSEC_EXPORT void xmlSecKeyDataBinaryValueDebugXmlDump (xml XMLSEC_EXPORT void xmlSecKeyDataBinaryValueDebugXmlDump (xm
SecKeyDataPtr data, lSecKeyDataPtr data,
FIL FI
E* output); LE* output);
XMLSEC_EXPORT xmlSecSize xmlSecKeyDataBinaryValueGetSize (xml XMLSEC_EXPORT xmlSecSize xmlSecKeyDataBinaryValueGetSize (xm
SecKeyDataPtr data); lSecKeyDataPtr data);
XMLSEC_EXPORT xmlSecBufferPtr xmlSecKeyDataBinaryValueGetBuffer (xml XMLSEC_EXPORT xmlSecBufferPtr xmlSecKeyDataBinaryValueGetBuffer (xm
SecKeyDataPtr data); lSecKeyDataPtr data);
XMLSEC_EXPORT int xmlSecKeyDataBinaryValueSetBuffer (xml XMLSEC_EXPORT int xmlSecKeyDataBinaryValueSetBuffer (xm
SecKeyDataPtr data, lSecKeyDataPtr data,
con co
st xmlSecByte* buf, nst xmlSecByte* buf,
xml xm
SecSize bufSize); lSecSize bufSize);
/************************************************************************** /**************************************************************************
* *
* xmlSecKeyDataStore * xmlSecKeyDataStore
* *
*************************************************************************/ *************************************************************************/
/** /**
* xmlSecKeyDataStore: * xmlSecKeyDataStore:
* @id: the store id (#xmlSecKeyDataStoreId). * @id: the store id (#xmlSecKeyDataStoreId).
* @reserved0: reserved for the future. * @reserved0: reserved for the future.
* @reserved1: reserved for the future. * @reserved1: reserved for the future.
* *
* The key data store. Key data store holds common key data specific inform ation * The key data store. Key data store holds common key data specific inform ation
* required for key data processing. For example, X509 data store may hold * required for key data processing. For example, X509 data store may hold
* information about trusted (root) certificates. * information about trusted (root) certificates.
*/ */
struct _xmlSecKeyDataStore { struct _xmlSecKeyDataStore {
xmlSecKeyDataStoreId id; xmlSecKeyDataStoreId id;
/* for the future */ /* for the future */
void* reserved0; void* reserved0;
void* reserved1; void* reserved1;
}; };
XMLSEC_EXPORT xmlSecKeyDataStorePtr xmlSecKeyDataStoreCreate (xmlSecKeyDa XMLSEC_EXPORT xmlSecKeyDataStorePtr xmlSecKeyDataStoreCreate (xmlSecKeyD
taStoreId id); ataStoreId id);
XMLSEC_EXPORT void xmlSecKeyDataStoreDestroy (xmlSecKeyDa XMLSEC_EXPORT void xmlSecKeyDataStoreDestroy (xmlSecKeyD
taStorePtr store); ataStorePtr store);
/** /**
* xmlSecKeyDataStoreGetName: * xmlSecKeyDataStoreGetName:
* @store: the pointer to store. * @store: the pointer to store.
* *
* Macro. Returns key data store name. * Macro. Returns key data store name.
*/ */
#define xmlSecKeyDataStoreGetName(store) \ #define xmlSecKeyDataStoreGetName(store) \
((xmlSecKeyDataStoreIsValid((store))) ? \ ((xmlSecKeyDataStoreIsValid((store))) ? \
xmlSecKeyDataStoreKlassGetName((store)->id) : NULL) xmlSecKeyDataStoreKlassGetName((store)->id) : NULL)
/** /**
* xmlSecKeyDataStoreIsValid: * xmlSecKeyDataStoreIsValid:
* @store: the pointer to store. * @store: the pointer to store.
* *
* Macro. Returns 1 if @store is not NULL and @store->id is not NULL * Macro. Returns 1 if @store is not NULL and @store->id is not NULL
* or 0 otherwise. * or 0 otherwise.
*/ */
#define xmlSecKeyDataStoreIsValid(store) \ #define xmlSecKeyDataStoreIsValid(store) \
((( store ) != NULL) && ((( store )->id) != NULL)) ((( store ) != NULL) && ((( store )->id) != NULL))
/** /**
* xmlSecKeyDataStoreCheckId: * xmlSecKeyDataStoreCheckId:
* @store: the pointer to store. * @store: the pointer to store.
* @storeId: the store Id. * @storeId: the store Id.
* *
* Macro. Returns 1 if @store is valid and @store's id is equal to @storeId . * Macro. Returns 1 if @store is valid and @store's id is equal to @storeId .
*/ */
#define xmlSecKeyDataStoreCheckId(store, storeId) \ #define xmlSecKeyDataStoreCheckId(store, storeId) \
(xmlSecKeyDataStoreIsValid(( store )) && \ (xmlSecKeyDataStoreIsValid(( store )) && \
((( store )->id) == ( storeId ))) ((( store )->id) == ( storeId )))
/** /**
* xmlSecKeyDataStoreCheckSize: * xmlSecKeyDataStoreCheckSize:
* @store: the pointer to store. * @store: the pointer to store.
* @size: the expected size. * @size: the expected size.
* *
* Macro. Returns 1 if @data is valid and @stores's object has at least @si ze bytes. * Macro. Returns 1 if @data is valid and @stores's object has at least @si ze bytes.
*/ */
#define xmlSecKeyDataStoreCheckSize(store, size) \ #define xmlSecKeyDataStoreCheckSize(store, size) \
(xmlSecKeyDataStoreIsValid(( store )) && \ (xmlSecKeyDataStoreIsValid(( store )) && \
(( store )->id->objSize >= size)) (( store )->id->objSize >= size))
/************************************************************************** /**************************************************************************
* *
* xmlSecKeyDataStoreKlass * xmlSecKeyDataStoreKlass
* *
*************************************************************************/ *************************************************************************/
/** /**
* xmlSecKeyDataStoreIdUnknown: * xmlSecKeyDataStoreIdUnknown:
* *
* The "unknown" id. * The "unknown" id.
*/ */
#define xmlSecKeyDataStoreIdUnknown NULL #define xmlSecKeyDataStoreIdUnknown NULL
/** /**
* xmlSecKeyDataStoreInitializeMethod: * xmlSecKeyDataStoreInitializeMethod:
* @store: the data store. * @store: the data store.
* *
* Key data store specific initialization method. * Key data store specific initialization method.
* *
* Returns: 0 on success or a negative value if an error occurs. * Returns: 0 on success or a negative value if an error occurs.
*/ */
typedef int (*xmlSecKeyDataStoreInitializeMethod) (xml SecKeyDataStorePtr store); typedef int (*xmlSecKeyDataStoreInitializeMethod) (xm lSecKeyDataStorePtr store);
/** /**
* xmlSecKeyDataStoreFinalizeMethod: * xmlSecKeyDataStoreFinalizeMethod:
* @store: the data store. * @store: the data store.
* *
* Key data store specific finalization (destroy) method. * Key data store specific finalization (destroy) method.
*/ */
typedef void (*xmlSecKeyDataStoreFinalizeMethod) (xml SecKeyDataStorePtr store); typedef void (*xmlSecKeyDataStoreFinalizeMethod) (xm lSecKeyDataStorePtr store);
/** /**
* xmlSecKeyDataStoreKlass: * xmlSecKeyDataStoreKlass:
* @klassSize: the data store klass size. * @klassSize: the data store klass size.
* @objSize: the data store obj size. * @objSize: the data store obj size.
* @name: the store's name. * @name: the store's name.
* @initialize: the store's initialization method. * @initialize: the store's initialization method.
* @finalize: the store's finalization (destroy) method. * @finalize: the store's finalization (destroy) method.
* @reserved0: reserved for the future. * @reserved0: reserved for the future.
* @reserved1: reserved for the future. * @reserved1: reserved for the future.
* *
* The data store id (klass). * The data store id (klass).
*/ */
struct _xmlSecKeyDataStoreKlass { struct _xmlSecKeyDataStoreKlass {
xmlSecSize klassSize; xmlSecSize klassSize;
xmlSecSize objSize; xmlSecSize objSize;
/* data */ /* data */
const xmlChar* name; const xmlChar* name;
/* constructors/destructor */ /* constructors/destructor */
xmlSecKeyDataStoreInitializeMethod initialize; xmlSecKeyDataStoreInitializeMethod initialize;
xmlSecKeyDataStoreFinalizeMethod finalize; xmlSecKeyDataStoreFinalizeMethod finalize;
/* for the future */ /* for the future */
void* reserved0; void* reserved0;
void* reserved1; void* reserved1;
}; };
/** /**
* xmlSecKeyDataStoreKlassGetName: * xmlSecKeyDataStoreKlassGetName:
* @klass: the pointer to store klass. * @klass: the pointer to store klass.
* *
* Macro. Returns store klass name. * Macro. Returns store klass name.
*/ */
#define xmlSecKeyDataStoreKlassGetName(klass) \ #define xmlSecKeyDataStoreKlassGetName(klass) \
(((klass)) ? ((klass)->name) : NULL) (((klass)) ? ((klass)->name) : NULL)
/*********************************************************************** /***********************************************************************
* *
* Key Data Store list * Key Data Store list
* *
**********************************************************************/ **********************************************************************/
/** /**
* xmlSecKeyDataStorePtrListId: * xmlSecKeyDataStorePtrListId:
* *
* The data store list id (klass). * The data store list id (klass).
*/ */
#define xmlSecKeyDataStorePtrListId xmlSecKeyDataStorePtrListGetKlass() #define xmlSecKeyDataStorePtrListId xmlSecKeyDataStorePtrListGetKlass()
XMLSEC_EXPORT xmlSecPtrListId xmlSecKeyDataStorePtrListGetKlass (voi XMLSEC_EXPORT xmlSecPtrListId xmlSecKeyDataStorePtrListGetKlass (vo
d); id);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XMLSEC_KEYSDATA_H__ */ #endif /* __XMLSEC_KEYSDATA_H__ */
 End of changes. 103 change blocks. 
426 lines changed or deleted 428 lines changed or added


 keysmngr.h   keysmngr.h 
skipping to change at line 24 skipping to change at line 24
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
#include <xmlsec/xmlsec.h> #include <xmlsec/xmlsec.h>
#include <xmlsec/list.h> #include <xmlsec/list.h>
#include <xmlsec/keys.h> #include <xmlsec/keys.h>
#include <xmlsec/keysdata.h> #include <xmlsec/keysdata.h>
#include <xmlsec/keyinfo.h> #include <xmlsec/keyinfo.h>
typedef const struct _xmlSecKeyKlass xmlSecKeyKlass, typedef const struct _xmlSecKeyKlass xmlSecKeyKlass,
*xmlSecKeyId; *xmlSecKeyId;
typedef const struct _xmlSecKeyStoreKlass xmlSecKeyStoreKlass, typedef const struct _xmlSecKeyStoreKlass xmlSecKeyStoreKlass
*xmlSecKeyStoreId; ,
*xmlSecKeyStoreId;
/************************************************************************** ** /************************************************************************** **
* *
* Keys Manager * Keys Manager
* *
************************************************************************** */ ************************************************************************** */
XMLSEC_EXPORT xmlSecKeysMngrPtr xmlSecKeysMngrCreate (voi XMLSEC_EXPORT xmlSecKeysMngrPtr xmlSecKeysMngrCreate (vo
d); id);
XMLSEC_EXPORT void xmlSecKeysMngrDestroy (xml XMLSEC_EXPORT void xmlSecKeysMngrDestroy (xm
SecKeysMngrPtr mngr); lSecKeysMngrPtr mngr);
XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeysMngrFindKey (xml XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeysMngrFindKey (xm
SecKeysMngrPtr mngr, lSecKeysMngrPtr mngr,
con co
st xmlChar* name, nst xmlChar* name,
xml xm
SecKeyInfoCtxPtr keyInfoCtx); lSecKeyInfoCtxPtr keyInfoCtx);
XMLSEC_EXPORT int xmlSecKeysMngrAdoptKeysStore (xml XMLSEC_EXPORT int xmlSecKeysMngrAdoptKeysStore (xm
SecKeysMngrPtr mngr, lSecKeysMngrPtr mngr,
xml xm
SecKeyStorePtr store); lSecKeyStorePtr store);
XMLSEC_EXPORT xmlSecKeyStorePtr xmlSecKeysMngrGetKeysStore XMLSEC_EXPORT xmlSecKeyStorePtr xmlSecKeysMngrGetKeysStore (xm
(xmlSecKeysMngrPtr mngr); lSecKeysMngrPtr mngr);
XMLSEC_EXPORT int xmlSecKeysMngrAdoptDataStore (xml XMLSEC_EXPORT int xmlSecKeysMngrAdoptDataStore (xm
SecKeysMngrPtr mngr, lSecKeysMngrPtr mngr,
xml xm
SecKeyDataStorePtr store); lSecKeyDataStorePtr store);
XMLSEC_EXPORT xmlSecKeyDataStorePtr xmlSecKeysMngrGetDataStore (xml XMLSEC_EXPORT xmlSecKeyDataStorePtr xmlSecKeysMngrGetDataStore (xm
SecKeysMngrPtr mngr, lSecKeysMngrPtr mngr,
xml xm
SecKeyDataStoreId id); lSecKeyDataStoreId id);
/** /**
* xmlSecGetKeyCallback: * xmlSecGetKeyCallback:
* @keyInfoNode: the pointer to <dsig:KeyInfo/> node. * @keyInfoNode: the pointer to <dsig:KeyInfo/> node.
* @keyInfoCtx: the pointer to <dsig:KeyInfo/> node * @keyInfoCtx: the pointer to <dsig:KeyInfo/> node process
processing context. ing context.
* *
* Reads the <dsig:KeyInfo/> node @keyInfoNode and extracts the key. * Reads the <dsig:KeyInfo/> node @keyInfoNode and extracts the key.
* *
* Returns: the pointer to key or NULL if the key is not found or * Returns: the pointer to key or NULL if the key is not found or
* an error occurs. * an error occurs.
*/ */
typedef xmlSecKeyPtr (*xmlSecGetKeyCallback) (xmlNodePtr keyInfoN typedef xmlSecKeyPtr (*xmlSecGetKeyCallback) (xmlNodePtr keyInfo
ode, Node,
xmlSecKeyInfoCtxPtr xmlSecKeyInfoCtxPt
keyInfoCtx); r keyInfoCtx);
/** /**
* xmlSecKeysMngr: * xmlSecKeysMngr:
* @keysStore: the key store (list of keys known to keys ma * @keysStore: the key store (list of keys known to keys m
nager). anager).
* @storesList: the list of key data stores known to * @storesList: the list of key data stores known to keys m
keys manager. anager.
* @getKey: the callback used to read <dsig:KeyInfo/> no * @getKey: the callback used to read <dsig:KeyInfo/> n
de. ode.
* *
* The keys manager structure. * The keys manager structure.
*/ */
struct _xmlSecKeysMngr { struct _xmlSecKeysMngr {
xmlSecKeyStorePtr keysStore; xmlSecKeyStorePtr keysStore;
xmlSecPtrList storesList; xmlSecPtrList storesList;
xmlSecGetKeyCallback getKey; xmlSecGetKeyCallback getKey;
}; };
XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeysMngrGetKey (xmlNodePtr keyInfoN XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeysMngrGetKey (xmlNodePtr keyInfo
ode, Node,
xmlSecKeyInfoCtxPtr xmlSecKeyInfoCtxPt
keyInfoCtx); r keyInfoCtx);
/************************************************************************** /**************************************************************************
* *
* xmlSecKeyStore * xmlSecKeyStore
* *
*************************************************************************/ *************************************************************************/
/** /**
* xmlSecKeyStore: * xmlSecKeyStore:
* @id: the store id (#xmlSecKeyStoreId). * @id: the store id (#xmlSecKeyStoreId).
* @reserved0: reserved for the future. * @reserved0: reserved for the future.
* @reserved1: reserved for the future. * @reserved1: reserved for the future.
* *
* The keys store. * The keys store.
*/ */
struct _xmlSecKeyStore { struct _xmlSecKeyStore {
xmlSecKeyStoreId id; xmlSecKeyStoreId id;
/* for the future */ /* for the future */
void* reserved0; void* reserved0;
void* reserved1; void* reserved1;
}; };
XMLSEC_EXPORT xmlSecKeyStorePtr xmlSecKeyStoreCreate (xmlSecKeySt XMLSEC_EXPORT xmlSecKeyStorePtr xmlSecKeyStoreCreate (xmlSecKeyS
oreId id); toreId id);
XMLSEC_EXPORT void xmlSecKeyStoreDestroy (xmlSecKeySt XMLSEC_EXPORT void xmlSecKeyStoreDestroy (xmlSecKeyS
orePtr store); torePtr store);
XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyStoreFindKey (xmlSecKeySt XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyStoreFindKey (xmlSecKeyS
orePtr store, torePtr store,
const xmlCh const xmlC
ar* name, har* name,
xmlSecKeyIn xmlSecKeyI
foCtxPtr keyInfoCtx); nfoCtxPtr keyInfoCtx);
/** /**
* xmlSecKeyStoreGetName: * xmlSecKeyStoreGetName:
* @store: the pointer to store. * @store: the pointer to store.
* *
* Macro. Returns key store name. * Macro. Returns key store name.
*/ */
#define xmlSecKeyStoreGetName(store) \ #define xmlSecKeyStoreGetName(store) \
((xmlSecKeyStoreIsValid((store))) ? \ ((xmlSecKeyStoreIsValid((store))) ? \
xmlSecKeyStoreKlassGetName((store)->id) : NULL) xmlSecKeyStoreKlassGetName((store)->id) : NULL)
/** /**
* xmlSecKeyStoreIsValid: * xmlSecKeyStoreIsValid:
* @store: the pointer to store. * @store: the pointer to store.
* *
* Macro. Returns 1 if @store is not NULL and @store->id is not NULL * Macro. Returns 1 if @store is not NULL and @store->id is not NULL
* or 0 otherwise. * or 0 otherwise.
*/ */
#define xmlSecKeyStoreIsValid(store) \ #define xmlSecKeyStoreIsValid(store) \
((( store ) != NULL) && ((( store )->id) != NULL)) ((( store ) != NULL) && ((( store )->id) != NULL))
/** /**
* xmlSecKeyStoreCheckId: * xmlSecKeyStoreCheckId:
* @store: the pointer to store. * @store: the pointer to store.
* @storeId: the store Id. * @storeId: the store Id.
* *
* Macro. Returns 1 if @store is valid and @store's id is equal to @storeId . * Macro. Returns 1 if @store is valid and @store's id is equal to @storeId .
*/ */
#define xmlSecKeyStoreCheckId(store, storeId) \ #define xmlSecKeyStoreCheckId(store, storeId) \
(xmlSecKeyStoreIsValid(( store )) && \ (xmlSecKeyStoreIsValid(( store )) && \
((( store )->id) == ( storeId ))) ((( store )->id) == ( storeId )))
/** /**
* xmlSecKeyStoreCheckSize: * xmlSecKeyStoreCheckSize:
* @store: the pointer to store. * @store: the pointer to store.
* @size: the expected size. * @size: the expected size.
* *
* Macro. Returns 1 if @store is valid and @stores's object has at least @s ize bytes. * Macro. Returns 1 if @store is valid and @stores's object has at least @s ize bytes.
*/ */
#define xmlSecKeyStoreCheckSize(store, size) \ #define xmlSecKeyStoreCheckSize(store, size) \
(xmlSecKeyStoreIsValid(( store )) && \ (xmlSecKeyStoreIsValid(( store )) && \
(( store )->id->objSize >= size)) (( store )->id->objSize >= size))
/************************************************************************** /**************************************************************************
* *
* xmlSecKeyStoreKlass * xmlSecKeyStoreKlass
* *
*************************************************************************/ *************************************************************************/
/** /**
* xmlSecKeyStoreIdUnknown: * xmlSecKeyStoreIdUnknown:
* *
* The "unknown" id. * The "unknown" id.
*/ */
#define xmlSecKeyStoreIdUnknown ((xmlSecKeyDataStore Id)NULL) #define xmlSecKeyStoreIdUnknown ((xmlSecKeyDataStor eId)NULL)
/** /**
* xmlSecKeyStoreInitializeMethod: * xmlSecKeyStoreInitializeMethod:
* @store: the store. * @store: the store.
* *
* Keys store specific initialization method. * Keys store specific initialization method.
* *
* Returns: 0 on success or a negative value if an error occurs. * Returns: 0 on success or a negative value if an error occurs.
*/ */
typedef int (*xmlSecKeyStoreInitializeMethod) (xml SecKeyStorePtr store); typedef int (*xmlSecKeyStoreInitializeMethod) (xm lSecKeyStorePtr store);
/** /**
* xmlSecKeyStoreFinalizeMethod: * xmlSecKeyStoreFinalizeMethod:
* @store: the store. * @store: the store.
* *
* Keys store specific finalization (destroy) method. * Keys store specific finalization (destroy) method.
*/ */
typedef void (*xmlSecKeyStoreFinalizeMethod) (xml SecKeyStorePtr store); typedef void (*xmlSecKeyStoreFinalizeMethod) (xm lSecKeyStorePtr store);
/** /**
* xmlSecKeyStoreFindKeyMethod: * xmlSecKeyStoreFindKeyMethod:
* @store: the store. * @store: the store.
* @name: the desired key name. * @name: the desired key name.
* @keyInfoCtx: the pointer to key info context. * @keyInfoCtx: the pointer to key info context.
* *
* Keys store specific find method. The caller is responsible for destroyin g * Keys store specific find method. The caller is responsible for destroyin g
* the returned key using #xmlSecKeyDestroy method. * the returned key using #xmlSecKeyDestroy method.
* *
* Returns: the pointer to a key or NULL if key is not found or an error oc curs. * Returns: the pointer to a key or NULL if key is not found or an error oc curs.
*/ */
typedef xmlSecKeyPtr (*xmlSecKeyStoreFindKeyMethod) (xmlSecKeySt typedef xmlSecKeyPtr (*xmlSecKeyStoreFindKeyMethod) (xmlSecKeyS
orePtr store, torePtr store,
const xmlCh const xmlC
ar* name, har* name,
xmlSecKeyIn xmlSecKeyI
foCtxPtr keyInfoCtx); nfoCtxPtr keyInfoCtx);
/** /**
* xmlSecKeyStoreKlass: * xmlSecKeyStoreKlass:
* @klassSize: the store klass size. * @klassSize: the store klass size.
* @objSize: the store obj size. * @objSize: the store obj size.
* @name: the store's name. * @name: the store's name.
* @initialize: the store's initialization method. * @initialize: the store's initialization method.
* @finalize: the store's finalization (destroy) method. * @finalize: the store's finalization (destroy) method.
* @findKey: the store's find method. * @findKey: the store's find method.
* @reserved0: reserved for the future. * @reserved0: reserved for the future.
* @reserved1: reserved for the future. * @reserved1: reserved for the future.
* *
* The keys store id (klass). * The keys store id (klass).
*/ */
struct _xmlSecKeyStoreKlass { struct _xmlSecKeyStoreKlass {
xmlSecSize klassSize; xmlSecSize klassSize;
xmlSecSize objSize; xmlSecSize objSize;
/* data */ /* data */
const xmlChar* name; const xmlChar* name;
/* constructors/destructor */ /* constructors/destructor */
xmlSecKeyStoreInitializeMethod initialize; xmlSecKeyStoreInitializeMethod initialize;
xmlSecKeyStoreFinalizeMethod finalize; xmlSecKeyStoreFinalizeMethod finalize;
xmlSecKeyStoreFindKeyMethod findKey; xmlSecKeyStoreFindKeyMethod findKey;
/* for the future */ /* for the future */
void* reserved0; void* reserved0;
void* reserved1; void* reserved1;
}; };
/** /**
* xmlSecKeyStoreKlassGetName: * xmlSecKeyStoreKlassGetName:
* @klass: the pointer to store klass. * @klass: the pointer to store klass.
* *
* Macro. Returns store klass name. * Macro. Returns store klass name.
*/ */
#define xmlSecKeyStoreKlassGetName(klass) \ #define xmlSecKeyStoreKlassGetName(klass) \
(((klass)) ? ((klass)->name) : NULL) (((klass)) ? ((klass)->name) : NULL)
/************************************************************************** ** /************************************************************************** **
* *
* Simple Keys Store * Simple Keys Store
* *
************************************************************************** */ ************************************************************************** */
/** /**
* xmlSecSimpleKeysStoreId: * xmlSecSimpleKeysStoreId:
* *
* A simple keys store klass id. * A simple keys store klass id.
*/ */
#define xmlSecSimpleKeysStoreId xmlSecSimpleKeysStoreGetKlas #define xmlSecSimpleKeysStoreId xmlSecSimpleKeysStoreGetKlass()
s() XMLSEC_EXPORT xmlSecKeyStoreId xmlSecSimpleKeysStoreGetKlass (vo
XMLSEC_EXPORT xmlSecKeyStoreId xmlSecSimpleKeysStoreGetKlass (voi id);
d); XMLSEC_EXPORT int xmlSecSimpleKeysStoreAdoptKey (xm
XMLSEC_EXPORT int xmlSecSimpleKeysStoreAdoptKey (xml lSecKeyStorePtr store,
SecKeyStorePtr store, xm
xml lSecKeyPtr key);
SecKeyPtr key); XMLSEC_EXPORT int xmlSecSimpleKeysStoreLoad (xm
XMLSEC_EXPORT int xmlSecSimpleKeysStoreLoad (xml lSecKeyStorePtr store,
SecKeyStorePtr store, co
con nst char *uri,
st char *uri, xm
xml lSecKeysMngrPtr keysMngr);
SecKeysMngrPtr keysMngr); XMLSEC_EXPORT int xmlSecSimpleKeysStoreSave (xm
XMLSEC_EXPORT int xmlSecSimpleKeysStoreSave (xml lSecKeyStorePtr store,
SecKeyStorePtr store, co
con nst char *filename,
st char *filename, xm
xml lSecKeyDataType type);
SecKeyDataType type); XMLSEC_EXPORT xmlSecPtrListPtr xmlSecSimpleKeysStoreGetKeys (xm
XMLSEC_EXPORT xmlSecPtrListPtr xmlSecSimpleKeysStoreGetKeys (xml lSecKeyStorePtr store);
SecKeyStorePtr store);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XMLSEC_KEYSMGMR_H__ */ #endif /* __XMLSEC_KEYSMGMR_H__ */
 End of changes. 36 change blocks. 
129 lines changed or deleted 129 lines changed or added


 keysstore.h   keysstore.h 
skipping to change at line 30 skipping to change at line 30
/************************************************************************** ** /************************************************************************** **
* *
* Nss Keys Store * Nss Keys Store
* *
************************************************************************** */ ************************************************************************** */
/** /**
* xmlSecNssKeysStoreId: * xmlSecNssKeysStoreId:
* *
* A Nss keys store klass id. * A Nss keys store klass id.
*/ */
#define xmlSecNssKeysStoreId xmlSecNssKeysStoreGetKlass() #define xmlSecNssKeysStoreId xmlSecNssKeysStoreGetKlass()
XMLSEC_CRYPTO_EXPORT xmlSecKeyStoreId xmlSecNssKeysStoreGetKlass (voi XMLSEC_CRYPTO_EXPORT xmlSecKeyStoreId xmlSecNssKeysStoreGetKlass (vo
d); id);
XMLSEC_CRYPTO_EXPORT int xmlSecNssKeysStoreAdoptKey (xml XMLSEC_CRYPTO_EXPORT int xmlSecNssKeysStoreAdoptKey (xm
SecKeyStorePtr store, lSecKeyStorePtr store,
xml xm
SecKeyPtr key); lSecKeyPtr key);
XMLSEC_CRYPTO_EXPORT int xmlSecNssKeysStoreLoad (xmlSecKeySt XMLSEC_CRYPTO_EXPORT int xmlSecNssKeysStoreLoad (xmlSecKeyS
orePtr store, torePtr store,
const char const char
*uri, *uri,
xmlSecKeysM xmlSecKeys
ngrPtr keysMngr); MngrPtr keysMngr);
XMLSEC_CRYPTO_EXPORT int xmlSecNssKeysStoreSave (xmlSecKeySt XMLSEC_CRYPTO_EXPORT int xmlSecNssKeysStoreSave (xmlSecKeyS
orePtr store, torePtr store,
const char const char
*filename, *filename,
xmlSecKeyDa xmlSecKeyD
taType type); ataType type);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XMLSEC_NSS_KEYSSTORE_H__ */ #endif /* __XMLSEC_NSS_KEYSSTORE_H__ */
 End of changes. 1 change blocks. 
19 lines changed or deleted 19 lines changed or added


 list.h   list.h 
skipping to change at line 21 skipping to change at line 21
#ifndef __XMLSEC_LIST_H__ #ifndef __XMLSEC_LIST_H__
#define __XMLSEC_LIST_H__ #define __XMLSEC_LIST_H__
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
#include <xmlsec/xmlsec.h> #include <xmlsec/xmlsec.h>
#include <xmlsec/buffer.h> #include <xmlsec/buffer.h>
typedef const struct _xmlSecPtrListKlass xmlSecPtrLis typedef const struct _xmlSecPtrListKlass xmlSecPtrLi
tKlass, stKlass,
*xmlSecPtrLi *xmlSecPtrL
stId; istId;
typedef struct _xmlSecPtrList xmlSecPtrLis typedef struct _xmlSecPtrList xmlSecPtrLi
t, st,
*xmlSecPtrLi *xmlSecPtrL
stPtr; istPtr;
/** /**
* xmlSecPtrList: * xmlSecPtrList:
* @id: the list items description. * @id: the list items description.
* @data: the list data. * @data: the list data.
* @use: the current list size. * @use: the current list size.
* @max: the max (allocated) list size. * @max: the max (allocated) list size.
* @allocMode: the memory allocation mode. * @allocMode: the memory allocation mode.
* *
* The pointers list. * The pointers list.
*/ */
struct _xmlSecPtrList { struct _xmlSecPtrList {
xmlSecPtrListId id; xmlSecPtrListId id;
xmlSecPtr* data; xmlSecPtr* data;
xmlSecSize use; xmlSecSize use;
xmlSecSize max; xmlSecSize max;
xmlSecAllocMode allocMode; xmlSecAllocMode allocMode;
}; };
XMLSEC_EXPORT void xmlSecPtrListSetDefaultAllocMode(xmlSecAlloc XMLSEC_EXPORT void xmlSecPtrListSetDefaultAllocMode(xmlSecAllo
Mode defAllocMode, cMode defAllocMode,
xmlSecSize xmlSecSize
defInitialSize); defInitialSize);
XMLSEC_EXPORT int xmlSecPtrListInitialize (xmlSecPtrLi XMLSEC_EXPORT int xmlSecPtrListInitialize (xmlSecPtrL
stPtr list, istPtr list,
xmlSecPtrLi xmlSecPtrL
stId id); istId id);
XMLSEC_EXPORT void xmlSecPtrListFinalize (xmlSecPtrLi XMLSEC_EXPORT void xmlSecPtrListFinalize (xmlSecPtrL
stPtr list); istPtr list);
XMLSEC_EXPORT xmlSecPtrListPtr xmlSecPtrListCreate (xmlSecPtrLi XMLSEC_EXPORT xmlSecPtrListPtr xmlSecPtrListCreate (xmlSecPtrL
stId id); istId id);
XMLSEC_EXPORT void xmlSecPtrListDestroy (xmlSecPtrLi XMLSEC_EXPORT void xmlSecPtrListDestroy (xmlSecPtrL
stPtr list); istPtr list);
XMLSEC_EXPORT void xmlSecPtrListEmpty (xmlSecPtrLi XMLSEC_EXPORT void xmlSecPtrListEmpty (xmlSecPtrL
stPtr list); istPtr list);
XMLSEC_EXPORT int xmlSecPtrListCopy (xmlSecPtrLi XMLSEC_EXPORT int xmlSecPtrListCopy (xmlSecPtrL
stPtr dst, istPtr dst,
xmlSecPtrLi xmlSecPtrL
stPtr src); istPtr src);
XMLSEC_EXPORT xmlSecPtrListPtr xmlSecPtrListDuplicate (xmlSecPtrLi XMLSEC_EXPORT xmlSecPtrListPtr xmlSecPtrListDuplicate (xmlSecPtrL
stPtr list); istPtr list);
XMLSEC_EXPORT xmlSecSize xmlSecPtrListGetSize (xmlSecPtrLi XMLSEC_EXPORT xmlSecSize xmlSecPtrListGetSize (xmlSecPtrL
stPtr list); istPtr list);
XMLSEC_EXPORT xmlSecPtr xmlSecPtrListGetItem (xml XMLSEC_EXPORT xmlSecPtr xmlSecPtrListGetItem (xmlSecPtrL
SecPtrListPtr list, istPtr list,
xmlSecSize xmlSecSize
pos); pos);
XMLSEC_EXPORT int xmlSecPtrListAdd (xmlSecPtrLi XMLSEC_EXPORT int xmlSecPtrListAdd (xmlSecPtrL
stPtr list, istPtr list,
xmlSecPtr i xmlSecPtr
tem); item);
XMLSEC_EXPORT int xmlSecPtrListSet (xmlSecPtrLi XMLSEC_EXPORT int xmlSecPtrListSet (xmlSecPtrL
stPtr list, istPtr list,
xmlSecPtr i xmlSecPtr
tem, item,
xmlSecSize xmlSecSize
pos); pos);
XMLSEC_EXPORT int xmlSecPtrListRemove (xmlSecPtrLi XMLSEC_EXPORT int xmlSecPtrListRemove (xmlSecPtrL
stPtr list, istPtr list,
xmlSecSize xmlSecSize
pos); pos);
XMLSEC_EXPORT void xmlSecPtrListDebugDump (xmlSecPtrLi XMLSEC_EXPORT void xmlSecPtrListDebugDump (xmlSecPtrL
stPtr list, istPtr list,
FILE* outpu FILE* outp
t); ut);
XMLSEC_EXPORT void xmlSecPtrListDebugXmlDump (xmlSecPtrLi XMLSEC_EXPORT void xmlSecPtrListDebugXmlDump (xmlSecPtrL
stPtr list, istPtr list,
FILE* outpu FILE* outp
t); ut);
/** /**
* xmlSecPtrListGetName: * xmlSecPtrListGetName:
* @list: the ponter to list. * @list: the ponter to list.
* *
* Macro. Returns lists's name. * Macro. Returns lists's name.
*/ */
#define xmlSecPtrListGetName(list) \ #define xmlSecPtrListGetName(list) \
(((list) != NULL) ? xmlSecPtrListKlassGetName((list)->id) : NULL) (((list) != NULL) ? xmlSecPtrListKlassGetName((list)->id) : NULL)
/** /**
* xmlSecPtrListIsValid: * xmlSecPtrListIsValid:
* @list: the pointer to list. * @list: the pointer to list.
* *
* Macro. Returns 1 if @list is not NULL and @list->id is not NULL * Macro. Returns 1 if @list is not NULL and @list->id is not NULL
* or 0 otherwise. * or 0 otherwise.
*/ */
#define xmlSecPtrListIsValid(list) \ #define xmlSecPtrListIsValid(list) \
((( list ) != NULL) && ((( list )->id) != NULL)) ((( list ) != NULL) && ((( list )->id) != NULL))
/** /**
* xmlSecPtrListCheckId: * xmlSecPtrListCheckId:
* @list: the pointer to list. * @list: the pointer to list.
* @dataId: the list Id. * @dataId: the list Id.
* *
* Macro. Returns 1 if @list is valid and @list's id is equal to @dataId. * Macro. Returns 1 if @list is valid and @list's id is equal to @dataId.
*/ */
#define xmlSecPtrListCheckId(list, dataId) \ #define xmlSecPtrListCheckId(list, dataId) \
(xmlSecPtrListIsValid(( list )) && \ (xmlSecPtrListIsValid(( list )) && \
((( list )->id) == ( dataId ))) ((( list )->id) == ( dataId )))
/************************************************************************** /**************************************************************************
* *
* List klass * List klass
* *
*************************************************************************/ *************************************************************************/
/** /**
* xmlSecPtrListIdUnknown: * xmlSecPtrListIdUnknown:
* *
* The "unknown" id. * The "unknown" id.
*/ */
#define xmlSecPtrListIdUnknown NULL #define xmlSecPtrListIdUnknown NULL
/** /**
* xmlSecPtrDuplicateItemMethod: * xmlSecPtrDuplicateItemMethod:
* @ptr: the poinetr to list item. * @ptr: the poinetr to list item.
* *
* Duplicates item @ptr. * Duplicates item @ptr.
* *
* Returns: pointer to new item copy or NULL if an error occurs. * Returns: pointer to new item copy or NULL if an error occurs.
*/ */
typedef xmlSecPtr (*xmlSecPtrDuplicateItemMethod) (xmlSecPtr p tr); typedef xmlSecPtr (*xmlSecPtrDuplicateItemMethod) (xmlSecPtr ptr);
/** /**
* xmlSecPtrDestroyItemMethod: * xmlSecPtrDestroyItemMethod:
* @ptr: the poinetr to list item. * @ptr: the poinetr to list item.
* *
* Destroys list item @ptr. * Destroys list item @ptr.
*/ */
typedef void (*xmlSecPtrDestroyItemMethod) (xmlSecPtr p tr); typedef void (*xmlSecPtrDestroyItemMethod) (xmlSecPtr ptr);
/** /**
* xmlSecPtrDebugDumpItemMethod: * xmlSecPtrDebugDumpItemMethod:
* @ptr: the poinetr to list item. * @ptr: the poinetr to list item.
* @output: the output FILE. * @output: the output FILE.
* *
* Prints debug information about @item to @output. * Prints debug information about @item to @output.
*/ */
typedef void (*xmlSecPtrDebugDumpItemMethod) (xmlSecPtr p typedef void (*xmlSecPtrDebugDumpItemMethod) (xmlSecPtr
tr, ptr,
FILE* outpu FILE* outp
t); ut);
/** /**
* xmlSecPtrListKlass: * xmlSecPtrListKlass:
* @name: the list klass name. * @name: the list klass name.
* @duplicateItem: the duplciate item method. * @duplicateItem: the duplciate item method.
* @destroyItem: the destroy item method. * @destroyItem: the destroy item method.
* @debugDumpItem: the debug dump item method. * @debugDumpItem: the debug dump item method.
* @debugXmlDumpItem: the debug dump item in xml format method. * @debugXmlDumpItem: the debug dump item in xml format method.
* *
* List klass. * List klass.
*/ */
struct _xmlSecPtrListKlass { struct _xmlSecPtrListKlass {
const xmlChar* name; const xmlChar* name;
xmlSecPtrDuplicateItemMethod duplicateItem; xmlSecPtrDuplicateItemMethod duplicateItem;
xmlSecPtrDestroyItemMethod destroyItem; xmlSecPtrDestroyItemMethod destroyItem;
xmlSecPtrDebugDumpItemMethod debugDumpItem; xmlSecPtrDebugDumpItemMethod debugDumpItem;
xmlSecPtrDebugDumpItemMethod debugXmlDumpItem; xmlSecPtrDebugDumpItemMethod debugXmlDumpItem;
}; };
/** /**
* xmlSecPtrListKlassGetName: * xmlSecPtrListKlassGetName:
* @klass: the list klass. * @klass: the list klass.
*2 *2
* Macro. Returns the list klass name. * Macro. Returns the list klass name.
*/ */
#define xmlSecPtrListKlassGetName(klass) \ #define xmlSecPtrListKlassGetName(klass) \
(((klass) != NULL) ? ((klass)->name) : NULL) (((klass) != NULL) ? ((klass)->name) : NULL)
/************************************************************************** /**************************************************************************
* *
* xmlSecStringListKlass * xmlSecStringListKlass
* *
*************************************************************************/ *************************************************************************/
/** /**
* xmlSecStringListId: * xmlSecStringListId:
* *
* Strings list klass. * Strings list klass.
*/ */
#define xmlSecStringListId \ #define xmlSecStringListId \
xmlSecStringListGetKlass() xmlSecStringListGetKlass()
XMLSEC_EXPORT xmlSecPtrListId xmlSecStringListGetKlass (void); XMLSEC_EXPORT xmlSecPtrListId xmlSecStringListGetKlass (void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XMLSEC_LIST_H__ */ #endif /* __XMLSEC_LIST_H__ */
 End of changes. 26 change blocks. 
101 lines changed or deleted 101 lines changed or added


 membuf.h   membuf.h 
skipping to change at line 35 skipping to change at line 35
* *
* Memory Buffer transform * Memory Buffer transform
* *
*******************************************************************/ *******************************************************************/
/** /**
* xmlSecTransformMemBufId: * xmlSecTransformMemBufId:
* *
* The Memory Buffer transform klass. * The Memory Buffer transform klass.
*/ */
#define xmlSecTransformMemBufId \ #define xmlSecTransformMemBufId \
xmlSecTransformMemBufGetKlass() xmlSecTransformMemBufGetKlass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformMemBufGetKlass XMLSEC_EXPORT xmlSecTransformId xmlSecTransformMemBufGetKlass (vo
(void); id);
XMLSEC_EXPORT xmlSecBufferPtr xmlSecTransformMemBufGetBuffer (xml XMLSEC_EXPORT xmlSecBufferPtr xmlSecTransformMemBufGetBuffer (xm
SecTransformPtr transform); lSecTransformPtr transform);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XMLSEC_MEMBUF_H__ */ #endif /* __XMLSEC_MEMBUF_H__ */
 End of changes. 1 change blocks. 
5 lines changed or deleted 5 lines changed or added


 nodeset.h   nodeset.h 
skipping to change at line 23 skipping to change at line 23
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
#include <libxml/tree.h> #include <libxml/tree.h>
#include <libxml/xpath.h> #include <libxml/xpath.h>
#include <xmlsec/xmlsec.h> #include <xmlsec/xmlsec.h>
typedef struct _xmlSecNodeSet xmlSecNodeSet, *xmlSecNodeSetPtr; typedef struct _xmlSecNodeSet xmlSecNodeSet, *xmlSecNodeSetPtr;
/** /**
* xmlSecNodeSetType: * xmlSecNodeSetType:
* @xmlSecNodeSetNormal: nodes set = nodes in the list. * @xmlSecNodeSetNormal: nodes set = nodes in the list.
* @xmlSecNodeSetInvert: nodes set = all document nodes minus nodes i * @xmlSecNodeSetInvert: nodes set = all document nodes minus nodes
n the list. in the list.
* @xmlSecNodeSetTree: nodes set = nodes in the list and al * @xmlSecNodeSetTree: nodes set = nodes in the list and all their
l their subtress. subtress.
* @xmlSecNodeSetTreeWithoutComments: nodes set = nodes in the lis * @xmlSecNodeSetTreeWithoutComments: nodes set = nodes in the li
t and st and
* all their subtress but no comment nodes. * all their subtress but no comment nodes.
* @xmlSecNodeSetTreeInvert: nodes set = all document nodes minus nodes i * @xmlSecNodeSetTreeInvert: nodes set = all document nodes minus nodes
n the in the
* list and all their subtress. * list and all their subtress.
* @xmlSecNodeSetTreeWithoutCommentsInvert: nodes set = all document nod * @xmlSecNodeSetTreeWithoutCommentsInvert: nodes set = all document no
es des
* minus (nodes in the list and all their subtr * minus (nodes in the list and all their subt
ess ress
* plus all comment nodes). * plus all comment nodes).
* @xmlSecNodeSetList: nodes set = all nodes in the chidren * @xmlSecNodeSetList: nodes set = all nodes in the chidren list o
list of nodes sets. f nodes sets.
* *
* The basic nodes sets types. * The basic nodes sets types.
*/ */
typedef enum { typedef enum {
xmlSecNodeSetNormal = 0, xmlSecNodeSetNormal = 0,
xmlSecNodeSetInvert, xmlSecNodeSetInvert,
xmlSecNodeSetTree, xmlSecNodeSetTree,
xmlSecNodeSetTreeWithoutComments, xmlSecNodeSetTreeWithoutComments,
xmlSecNodeSetTreeInvert, xmlSecNodeSetTreeInvert,
xmlSecNodeSetTreeWithoutCommentsInvert, xmlSecNodeSetTreeWithoutCommentsInvert,
xmlSecNodeSetList xmlSecNodeSetList
} xmlSecNodeSetType; } xmlSecNodeSetType;
/** /**
* xmlSecNodeSetOp: * xmlSecNodeSetOp:
* @xmlSecNodeSetIntersection: intersection. * @xmlSecNodeSetIntersection: intersection.
* @xmlSecNodeSetSubtraction: subtraction. * @xmlSecNodeSetSubtraction: subtraction.
* @xmlSecNodeSetUnion: union. * @xmlSecNodeSetUnion: union.
* *
* The simple nodes sets operations. * The simple nodes sets operations.
*/ */
typedef enum { typedef enum {
xmlSecNodeSetIntersection = 0, xmlSecNodeSetIntersection = 0,
xmlSecNodeSetSubtraction, xmlSecNodeSetSubtraction,
xmlSecNodeSetUnion xmlSecNodeSetUnion
} xmlSecNodeSetOp; } xmlSecNodeSetOp;
/** /**
* xmlSecNodeSet: * xmlSecNodeSet:
* @nodes: the nodes list. * @nodes: the nodes list.
* @doc: the parent XML document. * @doc: the parent XML document.
* @destroyDoc: the flag: if set to 1 then @doc will * @destroyDoc: the flag: if set to 1 then @doc will
* be destroyed when node set is destroyed. * be destroyed when node set is destroyed.
* @type: the nodes set type. * @type: the nodes set type.
* @op: the operation type. * @op: the operation type.
* @next: the next nodes set. * @next: the next nodes set.
* @prev: the previous nodes set. * @prev: the previous nodes set.
* @children: the children list (valid only if type * @children: the children list (valid only if type
* equal to #xmlSecNodeSetList). * equal to #xmlSecNodeSetList).
* *
* The enchanced nodes set. * The enchanced nodes set.
*/ */
struct _xmlSecNodeSet { struct _xmlSecNodeSet {
xmlNodeSetPtr nodes; xmlNodeSetPtr nodes;
xmlDocPtr doc; xmlDocPtr doc;
int destroyDoc; int destroyDoc;
xmlSecNodeSetType type; xmlSecNodeSetType type;
xmlSecNodeSetOp op; xmlSecNodeSetOp op;
xmlSecNodeSetPtr next; xmlSecNodeSetPtr next;
xmlSecNodeSetPtr prev; xmlSecNodeSetPtr prev;
xmlSecNodeSetPtr children; xmlSecNodeSetPtr children;
}; };
/** /**
* xmlSecNodeSetWalkCallback: * xmlSecNodeSetWalkCallback:
* @nset: the pointer to #xmlSecNodeSet structure. * @nset: the pointer to #xmlSecNodeSet structure.
* @cur: the pointer current XML node. * @cur: the pointer current XML node.
* @parent: the pointer to the @cur parent node. * @parent: the pointer to the @cur parent node.
* @data: the pointer to application specific data. * @data: the pointer to application specific data.
* *
* The callback function called once per each node in the nodes set. * The callback function called once per each node in the nodes set.
* *
* Returns: 0 on success or a negative value if an error occurs * Returns: 0 on success or a negative value if an error occurs
* an walk procedure should be interrupted. * an walk procedure should be interrupted.
*/ */
typedef int (*xmlSecNodeSetWalkCallback) (xmlSecNodeSetPtr ns typedef int (*xmlSecNodeSetWalkCallback) (xmlSecNodeSetPtr n
et, set,
xmlNodePtr cur, xmlNodePtr cur,
xmlNodePtr parent, xmlNodePtr parent,
void* data); void* data);
XMLSEC_EXPORT xmlSecNodeSetPtr xmlSecNodeSetCreate (xmlDocPtr doc, XMLSEC_EXPORT xmlSecNodeSetPtr xmlSecNodeSetCreate (xmlDocPtr doc,
xmlNodeSetPtr nodes xmlNodeSetPtr node
, s,
xmlSecNodeSetType t xmlSecNodeSetType
ype); type);
XMLSEC_EXPORT void xmlSecNodeSetDestroy (xmlSecNodeSetPtr ns XMLSEC_EXPORT void xmlSecNodeSetDestroy (xmlSecNodeSetPtr n
et); set);
XMLSEC_EXPORT void xmlSecNodeSetDocDestroy (xmlSecNodeSetPtr ns XMLSEC_EXPORT void xmlSecNodeSetDocDestroy (xmlSecNodeSetPtr n
et); set);
XMLSEC_EXPORT int xmlSecNodeSetContains (xmlSecNodeSetPtr ns XMLSEC_EXPORT int xmlSecNodeSetContains (xmlSecNodeSetPtr n
et, set,
xmlNodePtr node, xmlNodePtr node,
xmlNodePtr parent); xmlNodePtr parent)
XMLSEC_EXPORT xmlSecNodeSetPtr xmlSecNodeSetAdd (xmlSecNodeSetPtr ns ;
et, XMLSEC_EXPORT xmlSecNodeSetPtr xmlSecNodeSetAdd (xmlSecNodeSetPtr n
xmlSecNodeSetPtr ne set,
wNSet, xmlSecNodeSetPtr n
xmlSecNodeSetOp op) ewNSet,
; xmlSecNodeSetOp op
XMLSEC_EXPORT xmlSecNodeSetPtr xmlSecNodeSetAddList (xmlSecNodeSetPtr ns );
et, XMLSEC_EXPORT xmlSecNodeSetPtr xmlSecNodeSetAddList (xmlSecNodeSetPtr n
xmlSecNodeSetPtr ne set,
wNSet, xmlSecNodeSetPtr n
xmlSecNodeSetOp op) ewNSet,
; xmlSecNodeSetOp op
XMLSEC_EXPORT xmlSecNodeSetPtr xmlSecNodeSetGetChildren(xmlDocPtr doc, );
const xmlNodePtr pa XMLSEC_EXPORT xmlSecNodeSetPtr xmlSecNodeSetGetChildren(xmlDocPtr doc,
rent, const xmlNodePtr p
int withComments, arent,
int invert); int withComments,
XMLSEC_EXPORT int xmlSecNodeSetWalk (xmlSecNodeSetPtr ns int invert);
et, XMLSEC_EXPORT int xmlSecNodeSetWalk (xmlSecNodeSetPtr n
xmlSecNodeSetWalkCa set,
llback walkFunc, xmlSecNodeSetWalkC
void* data); allback walkFunc,
XMLSEC_EXPORT int xmlSecNodeSetDumpTextNodes(xmlSecNodeSetPtr void* data);
nset, XMLSEC_EXPORT int xmlSecNodeSetDumpTextNodes(xmlSecNodeSetPtr
xmlOutputBufferPtr o nset,
ut); xmlOutputBufferPtr
XMLSEC_EXPORT void xmlSecNodeSetDebugDump (xmlSecNodeSetPtr ns out);
et, XMLSEC_EXPORT void xmlSecNodeSetDebugDump (xmlSecNodeSetPtr n
FILE *output); set,
FILE *output);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XMLSEC_NODESET_H__ */ #endif /* __XMLSEC_NODESET_H__ */
 End of changes. 8 change blocks. 
91 lines changed or deleted 92 lines changed or added


 parser.h   parser.h 
skipping to change at line 23 skipping to change at line 23
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
#include <libxml/tree.h> #include <libxml/tree.h>
#include <xmlsec/xmlsec.h> #include <xmlsec/xmlsec.h>
#include <xmlsec/transforms.h> #include <xmlsec/transforms.h>
XMLSEC_EXPORT xmlDocPtr xmlSecParseFile (const char XMLSEC_EXPORT xmlDocPtr xmlSecParseFile (const char *filena
*filename); me);
XMLSEC_EXPORT xmlDocPtr xmlSecParseMemory (const xmlSe XMLSEC_EXPORT xmlDocPtr xmlSecParseMemory (const xmlSecByte *
cByte *buffer, buffer,
xmlSecSize size, xmlSecSize size,
int recovery); int recovery);
XMLSEC_EXPORT xmlDocPtr xmlSecParseMemoryExt (const xmlSe XMLSEC_EXPORT xmlDocPtr xmlSecParseMemoryExt (const xmlSecByte *
cByte *prefix, prefix,
xmlSecSize prefixSi xmlSecSize prefixS
ze, ize,
const xmlSecByte *b const xmlSecByte *
uffer, buffer,
xmlSecSize bufferSi xmlSecSize bufferS
ze, ize,
const xmlSecByte *p const xmlSecByte *
ostfix, postfix,
xmlSecSize postfixS xmlSecSize postfix
ize); Size);
/** /**
* xmlSecTransformXmlParserId: * xmlSecTransformXmlParserId:
* *
* The XML Parser transform klass. * The XML Parser transform klass.
*/ */
#define xmlSecTransformXmlParserId \ #define xmlSecTransformXmlParserId \
xmlSecTransformXmlParserGetKlass() xmlSecTransformXmlParserGetKlass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformXmlParserGetKlass XMLSEC_EXPORT xmlSecTransformId xmlSecTransformXmlParserGetKlass (vo
(void); id);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XMLSEC_PARSER_H__ */ #endif /* __XMLSEC_PARSER_H__ */
 End of changes. 2 change blocks. 
21 lines changed or deleted 21 lines changed or added


 pkikeys.h   pkikeys.h 
skipping to change at line 23 skipping to change at line 23
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
#include <nspr.h> #include <nspr.h>
#include <nss.h> #include <nss.h>
#include <xmlsec/xmlsec.h> #include <xmlsec/xmlsec.h>
#include <xmlsec/keys.h> #include <xmlsec/keys.h>
#include <xmlsec/transforms.h> #include <xmlsec/transforms.h>
XMLSEC_CRYPTO_EXPORT xmlSecKeyDataPtr xmlSecNssPKIAdoptKey (SECK XMLSEC_CRYPTO_EXPORT xmlSecKeyDataPtr xmlSecNssPKIAdoptKey (SEC
EYPrivateKey *privkey, KEYPrivateKey *privkey,
SECK SEC
EYPublicKey *pubkey); KEYPublicKey *pubkey);
XMLSEC_CRYPTO_EXPORT SECKEYPublicKey* xmlSecNssPKIKeyDataGetPubKey (xml SecKeyDataPtr data); XMLSEC_CRYPTO_EXPORT SECKEYPublicKey* xmlSecNssPKIKeyDataGetPubKey (xm lSecKeyDataPtr data);
XMLSEC_CRYPTO_EXPORT SECKEYPrivateKey* xmlSecNssPKIKeyDataGetPrivKey (xml SecKeyDataPtr data); XMLSEC_CRYPTO_EXPORT SECKEYPrivateKey* xmlSecNssPKIKeyDataGetPrivKey (xm lSecKeyDataPtr data);
XMLSEC_CRYPTO_EXPORT KeyType xmlSecNssPKIKeyDataGetKeyType (xml SecKeyDataPtr data); XMLSEC_CRYPTO_EXPORT KeyType xmlSecNssPKIKeyDataGetKeyType (xm lSecKeyDataPtr data);
XMLSEC_CRYPTO_EXPORT int xmlSecNssPKIKeyDataDuplicate (xml XMLSEC_CRYPTO_EXPORT int xmlSecNssPKIKeyDataDuplicate (xm
SecKeyDataPtr dst, lSecKeyDataPtr dst,
xml xm
SecKeyDataPtr src); lSecKeyDataPtr src);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XMLSEC_NSS_PKIKEYS_H__ */ #endif /* __XMLSEC_NSS_PKIKEYS_H__ */
 End of changes. 5 change blocks. 
11 lines changed or deleted 11 lines changed or added


 private.h   private.h 
/** /**
* XML Security Library (http://www.aleksey.com/xmlsec). * XML Security Library (http://www.aleksey.com/xmlsec).
* *
* These are internal private declarations. You don't want to use this file * These are internal private declarations. You don't want to use this file
* unless you are building xmlsec or xmlsec-<crypto> library * unless you are building xmlsec or xmlsec-<crypto> library.
* *
* This is free software; see Copyright file in the source * This is free software; see Copyright file in the source
* distribution for preciese wording. * distribution for preciese wording.
* *
* Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com> * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
*/ */
#ifndef __XMLSEC_PRIVATE_H__ #ifndef __XMLSEC_PRIVATE_H__
#define __XMLSEC_PRIVATE_H__ #define __XMLSEC_PRIVATE_H__
#ifndef XMLSEC_PRIVATE #ifndef XMLSEC_PRIVATE
skipping to change at line 44 skipping to change at line 44
* Crypto Init/shutdown * Crypto Init/shutdown
* *
************************************************************************** **/ ************************************************************************** **/
/** /**
* xmlSecCryptoInitMethod: * xmlSecCryptoInitMethod:
* *
* xmlsec-crypto libraryinitialization method. * xmlsec-crypto libraryinitialization method.
* *
* Returns: 0 on success or a negative value otherwise. * Returns: 0 on success or a negative value otherwise.
*/ */
typedef int (*xmlSecCryptoInitMethod) (voi d); typedef int (*xmlSecCryptoInitMethod) (vo id);
/** /**
* xmlSecCryptoShutdownMethod: * xmlSecCryptoShutdownMethod:
* *
* xmlsec-crypto library shutdown method. * xmlsec-crypto library shutdown method.
* *
* Returns: 0 on success or a negative value otherwise. * Returns: 0 on success or a negative value otherwise.
*/ */
typedef int (*xmlSecCryptoShutdownMethod) (voi d); typedef int (*xmlSecCryptoShutdownMethod) (vo id);
/** /**
* xmlSecCryptoKeysMngrInitMethod: * xmlSecCryptoKeysMngrInitMethod:
* @mngr: the pointer to keys manager. * @mngr: the pointer to keys manager.
* *
* Initializes @mngr with xmlsec-crypto library specific data. * Initializes @mngr with xmlsec-crypto library specific data.
* *
* Returns: 0 on success or a negative value otherwise. * Returns: 0 on success or a negative value otherwise.
*/ */
typedef int (*xmlSecCryptoKeysMngrInitMethod) (xml SecKeysMngrPtr mngr); typedef int (*xmlSecCryptoKeysMngrInitMethod) (xm lSecKeysMngrPtr mngr);
/************************************************************************** *** /************************************************************************** ***
* *
* Key data ids * Key data ids
* *
************************************************************************** **/ ************************************************************************** **/
/** /**
* xmlSecCryptoKeyDataGetKlassMethod: * xmlSecCryptoKeyDataGetKlassMethod:
* *
* Gets the key data klass. * Gets the key data klass.
* *
* Returns: pointer to key data klass or NULL if an error occurs * Returns: pointer to key data klass or NULL if an error occurs
* (the xmlsec-crypto library is not loaded or this key data klass is not * (the xmlsec-crypto library is not loaded or this key data klass is not
* implemented). * implemented).
*/ */
typedef xmlSecKeyDataId (*xmlSecCryptoKeyDataGetKlassMethod) (void); typedef xmlSecKeyDataId (*xmlSecCryptoKeyDataGetKlassMethod) (vo id);
/************************************************************************** *** /************************************************************************** ***
* *
* Key data store ids * Key data store ids
* *
************************************************************************** **/ ************************************************************************** **/
/** /**
* xmlSecCryptoKeyDataStoreGetKlassMethod: * xmlSecCryptoKeyDataStoreGetKlassMethod:
* *
* Gets the key data store klass. * Gets the key data store klass.
* *
* Returns: pointer to key data store klass or NULL if an error occurs * Returns: pointer to key data store klass or NULL if an error occurs
* (the xmlsec-crypto library is not loaded or this key data store klass is not * (the xmlsec-crypto library is not loaded or this key data store klass is not
* implemented). * implemented).
*/ */
typedef xmlSecKeyDataStoreId (*xmlSecCryptoKeyDataStoreGetKlassMethod)(vo id); typedef xmlSecKeyDataStoreId (*xmlSecCryptoKeyDataStoreGetKlassMethod)(v oid);
/************************************************************************** *** /************************************************************************** ***
* *
* Crypto transforms ids * Crypto transforms ids
* *
************************************************************************** **/ ************************************************************************** **/
/** /**
* xmlSecCryptoTransformGetKlassMethod: * xmlSecCryptoTransformGetKlassMethod:
* *
* Gets the transform klass. * Gets the transform klass.
* *
* Returns: pointer to transform klass or NULL if an error occurs * Returns: pointer to transform klass or NULL if an error occurs
* (the xmlsec-crypto library is not loaded or this transform is not * (the xmlsec-crypto library is not loaded or this transform is not
* implemented). * implemented).
*/ */
typedef xmlSecTransformId (*xmlSecCryptoTransformGetKlassMethod) (voi d); typedef xmlSecTransformId (*xmlSecCryptoTransformGetKlassMethod) (vo id);
/************************************************************************** *** /************************************************************************** ***
* *
* High level routines form xmlsec command line utility * High level routines form xmlsec command line utility
* *
************************************************************************** **/ ************************************************************************** **/
/** /**
* xmlSecCryptoAppInitMethod: * xmlSecCryptoAppInitMethod:
* @config: the path to crypto library configuration. * @config: the path to crypto library configuration.
* *
* General crypto engine initialization. This function is used * General crypto engine initialization. This function is used
* by XMLSec command line utility and called before * by XMLSec command line utility and called before
* @xmlSecInit function. * @xmlSecInit function.
* *
* Returns: 0 on success or a negative value otherwise. * Returns: 0 on success or a negative value otherwise.
*/ */
typedef int (*xmlSecCryptoAppInitMethod) (con st char* config); typedef int (*xmlSecCryptoAppInitMethod) (co nst char* config);
/** /**
* xmlSecCryptoAppShutdownMethod: * xmlSecCryptoAppShutdownMethod:
* *
* General crypto engine shutdown. This function is used * General crypto engine shutdown. This function is used
* by XMLSec command line utility and called after * by XMLSec command line utility and called after
* @xmlSecShutdown function. * @xmlSecShutdown function.
* *
* Returns: 0 on success or a negative value otherwise. * Returns: 0 on success or a negative value otherwise.
*/ */
typedef int (*xmlSecCryptoAppShutdownMethod) (voi d); typedef int (*xmlSecCryptoAppShutdownMethod) (vo id);
/** /**
* xmlSecCryptoAppDefaultKeysMngrInitMethod: * xmlSecCryptoAppDefaultKeysMngrInitMethod:
* @mngr: the pointer to keys manager. * @mngr: the pointer to keys manager.
* *
* Initializes @mngr with simple keys store #xmlSecSimpleKeysStoreId * Initializes @mngr with simple keys store #xmlSecSimpleKeysStoreId
* and a default crypto key data stores. * and a default crypto key data stores.
* *
* Returns: 0 on success or a negative value otherwise. * Returns: 0 on success or a negative value otherwise.
*/ */
typedef int (*xmlSecCryptoAppDefaultKeysMngrInitMethod) typedef int (*xmlSecCryptoAppDefaultKeysMngrInitMethod)
(xml (xm
SecKeysMngrPtr mngr); lSecKeysMngrPtr mngr);
/** /**
* xmlSecCryptoAppDefaultKeysMngrAdoptKeyMethod: * xmlSecCryptoAppDefaultKeysMngrAdoptKeyMethod:
* @mngr: the pointer to keys manager. * @mngr: the pointer to keys manager.
* @key: the pointer to key. * @key: the pointer to key.
* *
* Adds @key to the keys manager @mngr created with #xmlSecCryptoAppDefault KeysMngrInit * Adds @key to the keys manager @mngr created with #xmlSecCryptoAppDefault KeysMngrInit
* function. * function.
* *
* Returns: 0 on success or a negative value otherwise. * Returns: 0 on success or a negative value otherwise.
*/ */
typedef int (*xmlSecCryptoAppDefaultKeysMngrAdoptKeyMeth typedef int (*xmlSecCryptoAppDefaultKeysMngrAdoptKeyMet
od) hod)
(xml (xm
SecKeysMngrPtr mngr, lSecKeysMngrPtr mngr,
xml xm
SecKeyPtr key); lSecKeyPtr key);
/** /**
* xmlSecCryptoAppDefaultKeysMngrLoadMethod: * xmlSecCryptoAppDefaultKeysMngrLoadMethod:
* @mngr: the pointer to keys manager. * @mngr: the pointer to keys manager.
* @uri: the uri. * @uri: the uri.
* *
* Loads XML keys file from @uri to the keys manager @mngr created * Loads XML keys file from @uri to the keys manager @mngr created
* with #xmlSecCryptoAppDefaultKeysMngrInit function. * with #xmlSecCryptoAppDefaultKeysMngrInit function.
* *
* Returns: 0 on success or a negative value otherwise. * Returns: 0 on success or a negative value otherwise.
*/ */
typedef int (*xmlSecCryptoAppDefaultKeysMngrLoadMethod) typedef int (*xmlSecCryptoAppDefaultKeysMngrLoadMethod)
(xml (xm
SecKeysMngrPtr mngr, lSecKeysMngrPtr mngr,
con co
st char* uri); nst char* uri);
/** /**
* xmlSecCryptoAppDefaultKeysMngrSaveMethod: * xmlSecCryptoAppDefaultKeysMngrSaveMethod:
* @mngr: the pointer to keys manager. * @mngr: the pointer to keys manager.
* @filename: the destination filename. * @filename: the destination filename.
* @type: the type of keys to save (public/private/symmetric). * @type: the type of keys to save (public/private/symmetric)
.
* *
* Saves keys from @mngr to XML keys file. * Saves keys from @mngr to XML keys file.
* *
* Returns: 0 on success or a negative value otherwise. * Returns: 0 on success or a negative value otherwise.
*/ */
typedef int (*xmlSecCryptoAppDefaultKeysMngrSaveMethod) typedef int (*xmlSecCryptoAppDefaultKeysMngrSaveMethod)
(xml (xm
SecKeysMngrPtr mngr, lSecKeysMngrPtr mngr,
con co
st char* filename, nst char* filename,
xml xm
SecKeyDataType type); lSecKeyDataType type);
/** /**
* xmlSecCryptoAppKeysMngrCertLoadMethod: * xmlSecCryptoAppKeysMngrCertLoadMethod:
* @mngr: the keys manager. * @mngr: the keys manager.
* @filename: the certificate file. * @filename: the certificate file.
* @format: the certificate file format. * @format: the certificate file format.
* @type: the flag that indicates is the certificate in @filen * @type: the flag that indicates is the certificate in @file
ame name
* trusted or not. * trusted or not.
* *
* Reads cert from @filename and adds to the list of trusted or known * Reads cert from @filename and adds to the list of trusted or known
* untrusted certs in @store. * untrusted certs in @store.
* *
* Returns: 0 on success or a negative value otherwise. * Returns: 0 on success or a negative value otherwise.
*/ */
typedef int (*xmlSecCryptoAppKeysMngrCertLoadMethod)(xml typedef int (*xmlSecCryptoAppKeysMngrCertLoadMethod)(xm
SecKeysMngrPtr mngr, lSecKeysMngrPtr mngr,
con co
st char *filename, nst char *filename,
xml xm
SecKeyDataFormat format, lSecKeyDataFormat format,
xml xm
SecKeyDataType type); lSecKeyDataType type);
/** /**
* xmlSecCryptoAppKeysMngrCertLoadMemoryMethod: * xmlSecCryptoAppKeysMngrCertLoadMemoryMethod:
* @mngr: the keys manager. * @mngr: the keys manager.
* @data: the key data. * @data: the key data.
* @dataSize: the key data size. * @dataSize: the key data size.
* @format: the certificate format. * @format: the certificate format.
* @type: the flag that indicates is the certificate in @data * @type: the flag that indicates is the certificate in @data
* trusted or not. * trusted or not.
* *
* Reads cert from @data and adds to the list of trusted or known * Reads cert from @data and adds to the list of trusted or known
* untrusted certs in @store. * untrusted certs in @store.
* *
* Returns: 0 on success or a negative value otherwise. * Returns: 0 on success or a negative value otherwise.
*/ */
typedef int (*xmlSecCryptoAppKeysMngrCertLoadMemoryMetho typedef int (*xmlSecCryptoAppKeysMngrCertLoadMemoryMeth
d)(xmlSecKeysMngrPtr mngr, od)(xmlSecKeysMngrPtr mngr,
con co
st xmlSecByte* data, nst xmlSecByte* data,
xml xm
SecSize dataSize, lSecSize dataSize,
xml xm
SecKeyDataFormat format, lSecKeyDataFormat format,
xml xm
SecKeyDataType type); lSecKeyDataType type);
/** /**
* xmlSecCryptoAppKeyLoadMethod: * xmlSecCryptoAppKeyLoadMethod:
* @filename: the key filename. * @filename: the key filename.
* @format: the key file format. * @format: the key file format.
* @pwd: the key file password. * @pwd: the key file password.
* @pwdCallback: the key password callback. * @pwdCallback: the key password callback.
* @pwdCallbackCtx: the user context for password callback. * @pwdCallbackCtx: the user context for password callback.
* *
* Reads key from the a file. * Reads key from the a file.
* *
* Returns: pointer to the key or NULL if an error occurs. * Returns: pointer to the key or NULL if an error occurs.
*/ */
typedef xmlSecKeyPtr (*xmlSecCryptoAppKeyLoadMethod) (con typedef xmlSecKeyPtr (*xmlSecCryptoAppKeyLoadMethod) (co
st char *filename, nst char *filename,
xml xm
SecKeyDataFormat format, lSecKeyDataFormat format,
con co
st char *pwd, nst char *pwd,
voi vo
d* pwdCallback, id* pwdCallback,
voi vo
d* pwdCallbackCtx); id* pwdCallbackCtx);
/** /**
* xmlSecCryptoAppKeyLoadMemoryMethod: * xmlSecCryptoAppKeyLoadMemoryMethod:
* @data: the key data. * @data: the key data.
* @dataSize: the key data size. * @dataSize: the key data size.
* @format: the key data format. * @format: the key data format.
* @pwd: the key data password. * @pwd: the key data password.
* @pwdCallback: the key password callback. * @pwdCallback: the key password callback.
* @pwdCallbackCtx: the user context for password callback. * @pwdCallbackCtx: the user context for password callback.
* *
* Reads key from the binary data buffer. * Reads key from the binary data buffer.
* *
* Returns: pointer to the key or NULL if an error occurs. * Returns: pointer to the key or NULL if an error occurs.
*/ */
typedef xmlSecKeyPtr (*xmlSecCryptoAppKeyLoadMemoryMethod) (con typedef xmlSecKeyPtr (*xmlSecCryptoAppKeyLoadMemoryMethod) (co
st xmlSecByte* data, nst xmlSecByte* data,
xml xm
SecSize dataSize, lSecSize dataSize,
xml xm
SecKeyDataFormat format, lSecKeyDataFormat format,
con co
st char *pwd, nst char *pwd,
voi vo
d* pwdCallback, id* pwdCallback,
voi vo
d* pwdCallbackCtx); id* pwdCallbackCtx);
/** /**
* xmlSecCryptoAppPkcs12LoadMethod: * xmlSecCryptoAppPkcs12LoadMethod:
* @filename: the PKCS12 key filename. * @filename: the PKCS12 key filename.
* @pwd: the PKCS12 file password. * @pwd: the PKCS12 file password.
* @pwdCallback: the password callback. * @pwdCallback: the password callback.
* @pwdCallbackCtx: the user context for password callback. * @pwdCallbackCtx: the user context for password callback.
* *
* Reads key and all associated certificates from the PKCS12 file. * Reads key and all associated certificates from the PKCS12 file.
* For uniformity, call xmlSecCryptoAppKeyLoad instead of this function. Pa ss * For uniformity, call xmlSecCryptoAppKeyLoad instead of this function. Pa ss
* in format=xmlSecKeyDataFormatPkcs12. * in format=xmlSecKeyDataFormatPkcs12.
* *
* Returns: pointer to the key or NULL if an error occurs. * Returns: pointer to the key or NULL if an error occurs.
*/ */
typedef xmlSecKeyPtr (*xmlSecCryptoAppPkcs12LoadMethod) (con typedef xmlSecKeyPtr (*xmlSecCryptoAppPkcs12LoadMethod) (co
st char* filename, nst char* filename,
con co
st char* pwd, nst char* pwd,
voi vo
d* pwdCallback, id* pwdCallback,
voi vo
d* pwdCallbackCtx); id* pwdCallbackCtx);
/** /**
* xmlSecCryptoAppPkcs12LoadMemoryMethod: * xmlSecCryptoAppPkcs12LoadMemoryMethod:
* @data: the pkcs12 data. * @data: the pkcs12 data.
* @dataSize: the pkcs12 data size. * @dataSize: the pkcs12 data size.
* @pwd: the PKCS12 data password. * @pwd: the PKCS12 data password.
* @pwdCallback: the password callback. * @pwdCallback: the password callback.
* @pwdCallbackCtx: the user context for password callback. * @pwdCallbackCtx: the user context for password callback.
* *
* Reads key and all associated certificates from the PKCS12 binary data. * Reads key and all associated certificates from the PKCS12 binary data.
* For uniformity, call xmlSecCryptoAppKeyLoad instead of this function. Pa ss * For uniformity, call xmlSecCryptoAppKeyLoad instead of this function. Pa ss
* in format=xmlSecKeyDataFormatPkcs12. * in format=xmlSecKeyDataFormatPkcs12.
* *
* Returns: pointer to the key or NULL if an error occurs. * Returns: pointer to the key or NULL if an error occurs.
*/ */
typedef xmlSecKeyPtr (*xmlSecCryptoAppPkcs12LoadMemoryMethod)(con typedef xmlSecKeyPtr (*xmlSecCryptoAppPkcs12LoadMemoryMethod)(co
st xmlSecByte* data, nst xmlSecByte* data,
xml xm
SecSize dataSize, lSecSize dataSize,
con co
st char* pwd, nst char* pwd,
voi vo
d* pwdCallback, id* pwdCallback,
voi vo
d* pwdCallbackCtx); id* pwdCallbackCtx);
/** /**
* xmlSecCryptoAppKeyCertLoadMethod: * xmlSecCryptoAppKeyCertLoadMethod:
* @key: the pointer to key. * @key: the pointer to key.
* @filename: the certificate filename. * @filename: the certificate filename.
* @format: the certificate file format. * @format: the certificate file format.
* *
* Reads the certificate from $@filename and adds it to key. * Reads the certificate from $@filename and adds it to key.
* *
* Returns: 0 on success or a negative value otherwise. * Returns: 0 on success or a negative value otherwise.
*/ */
typedef int (*xmlSecCryptoAppKeyCertLoadMethod) (xml typedef int (*xmlSecCryptoAppKeyCertLoadMethod) (xm
SecKeyPtr key, lSecKeyPtr key,
con co
st char* filename, nst char* filename,
xml xm
SecKeyDataFormat format); lSecKeyDataFormat format);
/** /**
* xmlSecCryptoAppKeyCertLoadMemoryMethod: * xmlSecCryptoAppKeyCertLoadMemoryMethod:
* @key: the pointer to key. * @key: the pointer to key.
* @data: the cert data. * @data: the cert data.
* @dataSize: the cert data size. * @dataSize: the cert data size.
* @format: the certificate data format. * @format: the certificate data format.
* *
* Reads the certificate from binary @data buffer and adds it to key. * Reads the certificate from binary @data buffer and adds it to key.
* *
* Returns: 0 on success or a negative value otherwise. * Returns: 0 on success or a negative value otherwise.
*/ */
typedef int (*xmlSecCryptoAppKeyCertLoadMemoryMethod)(xm typedef int (*xmlSecCryptoAppKeyCertLoadMemoryMethod)(x
lSecKeyPtr key, mlSecKeyPtr key,
con co
st xmlSecByte* data, nst xmlSecByte* data,
xml xm
SecSize dataSize, lSecSize dataSize,
xml xm
SecKeyDataFormat format); lSecKeyDataFormat format);
/** /**
* xmlSecCryptoDLFunctions: * xmlSecCryptoDLFunctions:
* @cryptoInit: the xmlsec-crypto library initializa * @cryptoInit: the xmlsec-crypto library initialization me
tion method. thod.
* @cryptoShutdown: the xmlsec-crypto library shutdown method. * @cryptoShutdown: the xmlsec-crypto library shutdown method.
* @cryptoKeysMngrInit: the xmlsec-crypto library keys manag * @cryptoKeysMngrInit: the xmlsec-crypto library keys manager init
er init method. method.
* @keyDataAesGetKlass: the method to get pointer to AES key * @keyDataAesGetKlass: the method to get pointer to AES key data k
data klass. lass.
* @keyDataDesGetKlass: the method to get pointer to DES key * @keyDataDesGetKlass: the method to get pointer to DES key data k
data klass. lass.
* @keyDataDsaGetKlass: the method to get pointer to DSA key * @keyDataDsaGetKlass: the method to get pointer to DSA key data k
data klass. lass.
* @keyDataGost2001GetKlass: the method to get pointer to GOST 2001 key d * @keyDataGost2001GetKlass: the method to get pointer to GOST 2001 key
ata klass. data klass.
* @keyDataHmacGetKlass: the method to get pointer to HMAC key data k * @keyDataHmacGetKlass: the method to get pointer to HMAC key data
lass. klass.
* @keyDataRsaGetKlass: the method to get pointer to RSA key * @keyDataRsaGetKlass: the method to get pointer to RSA key data k
data klass. lass.
* @keyDataX509GetKlass: the method to get pointer to X509 key data k * @keyDataX509GetKlass: the method to get pointer to X509 key data
lass. klass.
* @keyDataRawX509CertGetKlass: the method to get pointer to raw X50 * @keyDataRawX509CertGetKlass: the method to get pointer to raw X509 cert
9 cert key data klass. key data klass.
* @x509StoreGetKlass: the method to get pointer to X509 key data s * @x509StoreGetKlass: the method to get pointer to X509 key data
tore. store.
* @transformAes128CbcGetKlass: the method to get pointer to AES 128 * @transformAes128CbcGetKlass: the method to get pointer to AES 128 encryp
encryption transform. tion transform.
* @transformAes192CbcGetKlass: the method to get pointer to AES 192 * @transformAes192CbcGetKlass: the method to get pointer to AES 192 encryp
encryption transform. tion transform.
* @transformAes256CbcGetKlass: the method to get pointer to AES 256 * @transformAes256CbcGetKlass: the method to get pointer to AES 256 encryp
encryption transform. tion transform.
* @transformKWAes128GetKlass: the method to get pointer to AES 128 key wra * @transformKWAes128GetKlass: the method to get pointer to AES 128 key wr
pper transform. apper transform.
* @transformKWAes192GetKlass: the method to get pointer to AES 192 key wra * @transformKWAes192GetKlass: the method to get pointer to AES 192 key wr
pper transform. apper transform.
* @transformKWAes256GetKlass: the method to get pointer to AES 256 key wra * @transformKWAes256GetKlass: the method to get pointer to AES 256 key wr
pper transform. apper transform.
* @transformDes3CbcGetKlass: the method to get pointer to Triple DES encr * @transformDes3CbcGetKlass: the method to get pointer to Triple DES enc
yption transform. ryption transform.
* @transformKWDes3GetKlass: the method to get pointer to Triple DES key * @transformKWDes3GetKlass: the method to get pointer to Triple DES key
wrapper transform. wrapper transform.
* @transformDsaSha1GetKlass: the method to get pointer to DSA-SHA1 signat * @transformDsaSha1GetKlass: the method to get pointer to DSA-SHA1 signa
ure transform. ture transform.
* @transformGost2001GostR3411_94GetKlass: the method to get pointer to GOS T2001 transform. * @transformGost2001GostR3411_94GetKlass: the method to get pointer to GOS T2001 transform.
* @transformHmacMd5GetKlass: the method to get pointer to HMAC-MD5 transf orm. * @transformHmacMd5GetKlass: the method to get pointer to HMAC-MD5 trans form.
* @transformHmacRipemd160GetKlass: the method to get pointer to HMAC-RIPEM D160 transform. * @transformHmacRipemd160GetKlass: the method to get pointer to HMAC-RIPEM D160 transform.
* @transformHmacSha1GetKlass: the method to get pointer to HMAC-SHA1 trans form. * @transformHmacSha1GetKlass: the method to get pointer to HMAC-SHA1 tran sform.
* @transformHmacSha224GetKlass: the method to get pointer to HMAC-SHA224 t ransform. * @transformHmacSha224GetKlass: the method to get pointer to HMAC-SHA224 t ransform.
* @transformHmacSha256GetKlass: the method to get pointer to HMAC-SHA256 t ransform. * @transformHmacSha256GetKlass: the method to get pointer to HMAC-SHA256 t ransform.
* @transformHmacSha384GetKlass: the method to get pointer to HMAC-SHA384 t ransform. * @transformHmacSha384GetKlass: the method to get pointer to HMAC-SHA384 t ransform.
* @transformHmacSha512GetKlass: the method to get pointer to HMAC-SHA512 t ransform. * @transformHmacSha512GetKlass: the method to get pointer to HMAC-SHA512 t ransform.
* @transformMd5GetKlass: the method to get pointer to MD5 digest tran * @transformMd5GetKlass: the method to get pointer to MD5 digest tra
sform. nsform.
* @transformRipemd160GetKlass: the method to get pointer to RIPEMD1 * @transformRipemd160GetKlass: the method to get pointer to RIPEMD160 dige
60 digest transform. st transform.
* @transformRsaMd5GetKlass: the method to get pointer to RSA-MD5 signatu * @transformRsaMd5GetKlass: the method to get pointer to RSA-MD5 signat
re transform. ure transform.
* @transformRsaRipemd160GetKlass: the method to get pointer to RSA-RIPEMD1 60 signature transform. * @transformRsaRipemd160GetKlass: the method to get pointer to RSA-RIPEMD1 60 signature transform.
* @transformRsaSha1GetKlass: the method to get pointer to RSA-SHA1 signat * @transformRsaSha1GetKlass: the method to get pointer to RSA-SHA1 signa
ure transform. ture transform.
* @transformRsaSha224GetKlass: the method to get pointer to RSA-SHA * @transformRsaSha224GetKlass: the method to get pointer to RSA-SHA224 sig
224 signature transform. nature transform.
* @transformRsaSha256GetKlass: the method to get pointer to RSA-SHA * @transformRsaSha256GetKlass: the method to get pointer to RSA-SHA256 sig
256 signature transform. nature transform.
* @transformRsaSha384GetKlass: the method to get pointer to RSA-SHA * @transformRsaSha384GetKlass: the method to get pointer to RSA-SHA384 sig
384 signature transform. nature transform.
* @transformRsaSha512GetKlass: the method to get pointer to RSA-SHA * @transformRsaSha512GetKlass: the method to get pointer to RSA-SHA512 sig
512 signature transform. nature transform.
* @transformRsaPkcs1GetKlass: the method to get pointer to RSA-PKCS1_5 key * @transformRsaPkcs1GetKlass: the method to get pointer to RSA-PKCS1_5 ke
transport transform. y transport transform.
* @transformRsaOaepGetKlass: the method to get pointer to RSA-OAEP key tr * @transformRsaOaepGetKlass: the method to get pointer to RSA-OAEP key t
ansport transform. ransport transform.
* @transformGostR3411_94GetKlass: the method to get pointer to GOST R3411 transform. * @transformGostR3411_94GetKlass: the method to get pointer to GOST R3411 transform.
* @transformSha1GetKlass: the method to get pointer to SHA1 digest tra * @transformSha1GetKlass: the method to get pointer to SHA1 digest tr
nsform. ansform.
* @transformSha224GetKlass: the method to get pointer to SHA224 digest t * @transformSha224GetKlass: the method to get pointer to SHA224 digest
ransform. transform.
* @transformSha256GetKlass: the method to get pointer to SHA256 digest t * @transformSha256GetKlass: the method to get pointer to SHA256 digest
ransform. transform.
* @transformSha384GetKlass: the method to get pointer to SHA384 digest t * @transformSha384GetKlass: the method to get pointer to SHA384 digest
ransform. transform.
* @transformSha512GetKlass: the method to get pointer to SHA512 digest t * @transformSha512GetKlass: the method to get pointer to SHA512 digest
ransform. transform.
* @cryptoAppInit: the default crypto engine initialization met * @cryptoAppInit: the default crypto engine initialization me
hod. thod.
* @cryptoAppShutdown: the default crypto engine shutdown method. * @cryptoAppShutdown: the default crypto engine shutdown method.
* @cryptoAppDefaultKeysMngrInit: the default keys manager init method * @cryptoAppDefaultKeysMngrInit: the default keys manager init metho
. d.
* @cryptoAppDefaultKeysMngrAdoptKey: the default keys manager adopt key m * @cryptoAppDefaultKeysMngrAdoptKey: the default keys manager adopt key
ethod. method.
* @cryptoAppDefaultKeysMngrLoad: the default keys manager load method * @cryptoAppDefaultKeysMngrLoad: the default keys manager load metho
. d.
* @cryptoAppDefaultKeysMngrSave: the default keys manager save method * @cryptoAppDefaultKeysMngrSave: the default keys manager save metho
. d.
* @cryptoAppKeysMngrCertLoad: the default keys manager file cert l * @cryptoAppKeysMngrCertLoad: the default keys manager file cert
oad method. load method.
* @cryptoAppKeysMngrCertLoadMemory: the default keys manager memory cert * @cryptoAppKeysMngrCertLoadMemory: the default keys manager memory cer
load method. t load method.
* @cryptoAppKeyLoad: the key file load method. * @cryptoAppKeyLoad: the key file load method.
* @cryptoAppKeyLoadMemory: the meory key load method. * @cryptoAppKeyLoadMemory: the meory key load method.
* @cryptoAppPkcs12Load: the pkcs12 file load method. * @cryptoAppPkcs12Load: the pkcs12 file load method.
* @cryptoAppPkcs12LoadMemory: the memory pkcs12 load method. * @cryptoAppPkcs12LoadMemory: the memory pkcs12 load method.
* @cryptoAppKeyCertLoad: the cert file load method. * @cryptoAppKeyCertLoad: the cert file load method.
* @cryptoAppKeyCertLoadMemory: the memory cert load method. * @cryptoAppKeyCertLoadMemory: the memory cert load method.
* @cryptoAppDefaultPwdCallback:the default password callback. * @cryptoAppDefaultPwdCallback:the default password callback.
* *
* The list of crypto engine functions, key data and transform classes. * The list of crypto engine functions, key data and transform classes.
*/ */
struct _xmlSecCryptoDLFunctions { struct _xmlSecCryptoDLFunctions {
/** /* Crypto Init/shutdown */
* Crypto Init/shutdown xmlSecCryptoInitMethod cryptoInit;
*/ xmlSecCryptoShutdownMethod cryptoShutdown;
xmlSecCryptoInitMethod cryptoInit; xmlSecCryptoKeysMngrInitMethod cryptoKeysMngrInit;
xmlSecCryptoShutdownMethod cryptoShutdown;
xmlSecCryptoKeysMngrInitMethod cryptoKeysMngrInit;
/** /* Key data ids */
* Key data ids xmlSecCryptoKeyDataGetKlassMethod keyDataAesGetKlass;
*/ xmlSecCryptoKeyDataGetKlassMethod keyDataDesGetKlass;
xmlSecCryptoKeyDataGetKlassMethod keyDataAesGetKlass; xmlSecCryptoKeyDataGetKlassMethod keyDataDsaGetKlass;
xmlSecCryptoKeyDataGetKlassMethod keyDataDesGetKlass; xmlSecCryptoKeyDataGetKlassMethod keyDataGost2001GetKlass;
xmlSecCryptoKeyDataGetKlassMethod keyDataDsaGetKlass; xmlSecCryptoKeyDataGetKlassMethod keyDataHmacGetKlass;
xmlSecCryptoKeyDataGetKlassMethod keyDataGost2001GetKlass; xmlSecCryptoKeyDataGetKlassMethod keyDataRsaGetKlass;
xmlSecCryptoKeyDataGetKlassMethod keyDataHmacGetKlass; xmlSecCryptoKeyDataGetKlassMethod keyDataX509GetKlass;
xmlSecCryptoKeyDataGetKlassMethod keyDataRsaGetKlass; xmlSecCryptoKeyDataGetKlassMethod keyDataRawX509CertGetKlass
xmlSecCryptoKeyDataGetKlassMethod keyDataX509GetKlass; ;
xmlSecCryptoKeyDataGetKlassMethod keyDataRawX509CertGetKlass;
/** /* Key data store ids */
* Key data store ids xmlSecCryptoKeyDataStoreGetKlassMethod x509StoreGetKlass;
*/
xmlSecCryptoKeyDataStoreGetKlassMethod x509StoreGetKlass;
/** /* Crypto transforms ids */
* Crypto transforms ids xmlSecCryptoTransformGetKlassMethod transformAes128CbcGetKlass
*/ ;
xmlSecCryptoTransformGetKlassMethod transformAes128CbcG xmlSecCryptoTransformGetKlassMethod transformAes192CbcGetKlass
etKlass; ;
xmlSecCryptoTransformGetKlassMethod transformAes192CbcG xmlSecCryptoTransformGetKlassMethod transformAes256CbcGetKlass
etKlass; ;
xmlSecCryptoTransformGetKlassMethod transformAes256CbcG xmlSecCryptoTransformGetKlassMethod transformKWAes128GetKlass;
etKlass; xmlSecCryptoTransformGetKlassMethod transformKWAes192GetKlass;
xmlSecCryptoTransformGetKlassMethod transformKWAes128Ge xmlSecCryptoTransformGetKlassMethod transformKWAes256GetKlass;
tKlass; xmlSecCryptoTransformGetKlassMethod transformDes3CbcGetKlass;
xmlSecCryptoTransformGetKlassMethod transformKWAes192Ge xmlSecCryptoTransformGetKlassMethod transformKWDes3GetKlass;
tKlass; xmlSecCryptoTransformGetKlassMethod transformDsaSha1GetKlass;
xmlSecCryptoTransformGetKlassMethod transformKWAes256Ge xmlSecCryptoTransformGetKlassMethod transformGost2001GostR3411
tKlass; _94GetKlass;
xmlSecCryptoTransformGetKlassMethod transformDes3CbcGet xmlSecCryptoTransformGetKlassMethod transformHmacMd5GetKlass;
Klass; xmlSecCryptoTransformGetKlassMethod transformHmacRipemd160GetK
xmlSecCryptoTransformGetKlassMethod transformKWDes3GetK lass;
lass; xmlSecCryptoTransformGetKlassMethod transformHmacSha1GetKlass;
xmlSecCryptoTransformGetKlassMethod transformDsaSha1Get xmlSecCryptoTransformGetKlassMethod transformHmacSha224GetKlas
Klass; s;
xmlSecCryptoTransformGetKlassMethod transformGost2001Go xmlSecCryptoTransformGetKlassMethod transformHmacSha256GetKlas
stR3411_94GetKlass; s;
xmlSecCryptoTransformGetKlassMethod transformHmacMd5Get xmlSecCryptoTransformGetKlassMethod transformHmacSha384GetKlas
Klass; s;
xmlSecCryptoTransformGetKlassMethod transformHmacRipemd xmlSecCryptoTransformGetKlassMethod transformHmacSha512GetKlas
160GetKlass; s;
xmlSecCryptoTransformGetKlassMethod transformHmacSha1Ge xmlSecCryptoTransformGetKlassMethod transformMd5GetKlass;
tKlass; xmlSecCryptoTransformGetKlassMethod transformRipemd160GetKlass
xmlSecCryptoTransformGetKlassMethod transformHmacSha224 ;
GetKlass; xmlSecCryptoTransformGetKlassMethod transformRsaMd5GetKlass;
xmlSecCryptoTransformGetKlassMethod transformHmacSha256 xmlSecCryptoTransformGetKlassMethod transformRsaRipemd160GetKl
GetKlass; ass;
xmlSecCryptoTransformGetKlassMethod transformHmacSha384 xmlSecCryptoTransformGetKlassMethod transformRsaSha1GetKlass;
GetKlass; xmlSecCryptoTransformGetKlassMethod transformRsaSha224GetKlass
xmlSecCryptoTransformGetKlassMethod transformHmacSha512 ;
GetKlass; xmlSecCryptoTransformGetKlassMethod transformRsaSha256GetKlass
xmlSecCryptoTransformGetKlassMethod transformMd5GetKlas ;
s; xmlSecCryptoTransformGetKlassMethod transformRsaSha384GetKlass
xmlSecCryptoTransformGetKlassMethod transformRipemd160G ;
etKlass; xmlSecCryptoTransformGetKlassMethod transformRsaSha512GetKlass
xmlSecCryptoTransformGetKlassMethod transformRsaMd5GetK ;
lass; xmlSecCryptoTransformGetKlassMethod transformRsaPkcs1GetKlass;
xmlSecCryptoTransformGetKlassMethod transformRsaRipemd1 xmlSecCryptoTransformGetKlassMethod transformRsaOaepGetKlass;
60GetKlass; xmlSecCryptoTransformGetKlassMethod transformGostR3411_94GetKl
xmlSecCryptoTransformGetKlassMethod transformRsaSha1Get ass;
Klass; xmlSecCryptoTransformGetKlassMethod transformSha1GetKlass;
xmlSecCryptoTransformGetKlassMethod transformRsaSha224G xmlSecCryptoTransformGetKlassMethod transformSha224GetKlass;
etKlass; xmlSecCryptoTransformGetKlassMethod transformSha256GetKlass;
xmlSecCryptoTransformGetKlassMethod transformRsaSha256G xmlSecCryptoTransformGetKlassMethod transformSha384GetKlass;
etKlass; xmlSecCryptoTransformGetKlassMethod transformSha512GetKlass;
xmlSecCryptoTransformGetKlassMethod transformRsaSha384G
etKlass;
xmlSecCryptoTransformGetKlassMethod transformRsaSha512G
etKlass;
xmlSecCryptoTransformGetKlassMethod transformRsaPkcs1Ge
tKlass;
xmlSecCryptoTransformGetKlassMethod transformRsaOaepGet
Klass;
xmlSecCryptoTransformGetKlassMethod transformGostR3411_
94GetKlass;
xmlSecCryptoTransformGetKlassMethod transformSha1GetKla
ss;
xmlSecCryptoTransformGetKlassMethod transformSha224GetK
lass;
xmlSecCryptoTransformGetKlassMethod transformSha256GetK
lass;
xmlSecCryptoTransformGetKlassMethod transformSha384GetK
lass;
xmlSecCryptoTransformGetKlassMethod transformSha512GetK
lass;
/** /* High level routines form xmlsec command line utility */
* High level routines form xmlsec command line utility xmlSecCryptoAppInitMethod cryptoAppInit;
*/ xmlSecCryptoAppShutdownMethod cryptoAppShutdown;
xmlSecCryptoAppInitMethod cryptoAppInit; xmlSecCryptoAppDefaultKeysMngrInitMethod cryptoAppDefaultKeysMngrIn
xmlSecCryptoAppShutdownMethod cryptoAppShutdown; it;
xmlSecCryptoAppDefaultKeysMngrInitMethod cryptoAppDefaultKeysMngrIni
t;
xmlSecCryptoAppDefaultKeysMngrAdoptKeyMethod cryptoAppDefaultKeysMngrAd optKey; xmlSecCryptoAppDefaultKeysMngrAdoptKeyMethod cryptoAppDefaultKeysMngrAd optKey;
xmlSecCryptoAppDefaultKeysMngrLoadMethod cryptoAppDefaultKeysMngrLoa xmlSecCryptoAppDefaultKeysMngrLoadMethod cryptoAppDefaultKeysMngrLo
d; ad;
xmlSecCryptoAppDefaultKeysMngrSaveMethod cryptoAppDefaultKeysMngrSav xmlSecCryptoAppDefaultKeysMngrSaveMethod cryptoAppDefaultKeysMngrSa
e; ve;
xmlSecCryptoAppKeysMngrCertLoadMethod cryptoAppKeysMngrCertLoad; xmlSecCryptoAppKeysMngrCertLoadMethod cryptoAppKeysMngrCertLoad;
xmlSecCryptoAppKeysMngrCertLoadMemoryMethod cryptoAppKeysMngrCe xmlSecCryptoAppKeysMngrCertLoadMemoryMethod cryptoAppKeysMngrCertLoadM
rtLoadMemory; emory;
xmlSecCryptoAppKeyLoadMethod cryptoAppKeyLoad; xmlSecCryptoAppKeyLoadMethod cryptoAppKeyLoad;
xmlSecCryptoAppKeyLoadMemoryMethod cryptoAppKeyLoadMemory; xmlSecCryptoAppKeyLoadMemoryMethod cryptoAppKeyLoadMemory;
xmlSecCryptoAppPkcs12LoadMethod cryptoAppPkcs12Load; xmlSecCryptoAppPkcs12LoadMethod cryptoAppPkcs12Load;
xmlSecCryptoAppPkcs12LoadMemoryMethod cryptoAppPkcs12LoadMemory; xmlSecCryptoAppPkcs12LoadMemoryMethod cryptoAppPkcs12LoadMemory;
xmlSecCryptoAppKeyCertLoadMethod cryptoAppKeyCertLoad; xmlSecCryptoAppKeyCertLoadMethod cryptoAppKeyCertLoad;
xmlSecCryptoAppKeyCertLoadMemoryMethod cryptoAppKeyCertLoadMemory; xmlSecCryptoAppKeyCertLoadMemoryMethod cryptoAppKeyCertLoadMemory
void* cryptoAppDefaultPwdCallback ;
; void* cryptoAppDefaultPwdCallbac
k;
}; };
#include <libxml/xmlstring.h> #include <libxml/xmlstring.h>
/** /**
* xmlSecStrPrintf: * xmlSecStrPrintf:
* *
* Prints a string (see @xmlStrPrintf). * Prints a string (see @xmlStrPrintf).
*/ */
#define xmlSecStrPrintf xmlStrPrintf #define xmlSecStrPrintf xmlStrPrintf
/** /**
* xmlSecStrVPrintf: * xmlSecStrVPrintf:
* *
* Prints a string (see @xmlStrVPrintf). * Prints a string (see @xmlStrVPrintf).
*/ */
#define xmlSecStrVPrintf xmlStrVPrintf #define xmlSecStrVPrintf xmlStrVPrintf
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XMLSEC_PRIVATE_H__ */ #endif /* __XMLSEC_PRIVATE_H__ */
 End of changes. 49 change blocks. 
361 lines changed or deleted 336 lines changed or added


 soap.h   soap.h 
skipping to change at line 28 skipping to change at line 28
#endif /* __cplusplus */ #endif /* __cplusplus */
#include <libxml/tree.h> #include <libxml/tree.h>
#include <xmlsec/xmlsec.h> #include <xmlsec/xmlsec.h>
/*********************************************************************** /***********************************************************************
* *
* SOAP 1.1 * SOAP 1.1
* *
**********************************************************************/ **********************************************************************/
XMLSEC_EXPORT xmlNodePtr xmlSecSoap11CreateEnvelope (xmlDocPtr d XMLSEC_EXPORT xmlNodePtr xmlSecSoap11CreateEnvelope (xmlDocPtr
oc); doc);
XMLSEC_EXPORT xmlNodePtr xmlSecSoap11EnsureHeader (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecSoap11EnsureHeader (xmlNodePtr
envNode); envNode);
XMLSEC_EXPORT xmlNodePtr xmlSecSoap11AddBodyEntry (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecSoap11AddBodyEntry (xmlNodePtr
envNode, envNode,
xmlNodePtr xmlNodePtr
entryNode); entryNode);
XMLSEC_EXPORT xmlNodePtr xmlSecSoap11AddFaultEntry (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecSoap11AddFaultEntry (xmlNodePtr
envNode, envNode,
const xmlCh const xmlC
ar* faultCodeHref, har* faultCodeHref,
const xmlCh const xmlC
ar* faultCodeLocalPart, har* faultCodeLocalPart,
const xmlCh const xmlC
ar* faultString, har* faultString,
const xmlCh const xmlC
ar* faultActor); har* faultActor);
XMLSEC_EXPORT int xmlSecSoap11CheckEnvelope (xmlNodePtr XMLSEC_EXPORT int xmlSecSoap11CheckEnvelope (xmlNodePtr
envNode); envNode);
XMLSEC_EXPORT xmlNodePtr xmlSecSoap11GetHeader (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecSoap11GetHeader (xmlNodePtr
envNode); envNode);
XMLSEC_EXPORT xmlNodePtr xmlSecSoap11GetBody (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecSoap11GetBody (xmlNodePtr
envNode); envNode);
XMLSEC_EXPORT xmlSecSize xmlSecSoap11GetBodyEntriesNumber(xmlNodePtr XMLSEC_EXPORT xmlSecSize xmlSecSoap11GetBodyEntriesNumber(xmlNodePtr
envNode); envNode);
XMLSEC_EXPORT xmlNodePtr xmlSecSoap11GetBodyEntry (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecSoap11GetBodyEntry (xmlNodePtr
envNode, envNode,
xmlSecSize xmlSecSize
pos); pos);
XMLSEC_EXPORT xmlNodePtr xmlSecSoap11GetFaultEntry (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecSoap11GetFaultEntry (xmlNodePtr
envNode); envNode);
/*********************************************************************** /***********************************************************************
* *
* SOAP 1.2 * SOAP 1.2
* *
**********************************************************************/ **********************************************************************/
/** /**
* xmlSecSoap12FaultCode: * xmlSecSoap12FaultCode:
* @xmlSecSoap12FaultCodeUnknown: The fault code is not availa * @xmlSecSoap12FaultCodeUnknown: The fault code is not avail
ble. able.
* @xmlSecSoap12FaultCodeVersionMismatch: The faulting node found an * @xmlSecSoap12FaultCodeVersionMismatch: The faulting node found an
* invalid element information * invalid element information
* item instead of the expected * item instead of the expecte
* Envelope element information d
item. * Envelope element informatio
* @xmlSecSoap12FaultCodeMustUnderstand: An immediate child element n item.
* information item of the SOAP * @xmlSecSoap12FaultCodeMustUnderstand: An immediate child element
* Header element information i * information item of the SOA
tem P
* targeted at the faulting nod * Header element information
e item
* that was not understood by t * targeted at the faulting no
he de
* faulting node contained a SO * that was not understood by
AP the
* mustUnderstand attribute * faulting node contained a S
* information item with a valu OAP
e of "true" * mustUnderstand attribute
* @xmlSecSoap12FaultCodeDataEncodingUnknown: A SOAP header block or SOAP * information item with a val
* body child element informati ue of "true"
on * @xmlSecSoap12FaultCodeDataEncodingUnknown: A SOAP header block or SOAP
* item targeted at the faultin * body child element informat
g ion
* SOAP node is scoped with a d * item targeted at the faulti
ata ng
* encoding that the faulting n * SOAP node is scoped with a
ode data
* does not support. * encoding that the faulting
* @xmlSecSoap12FaultCodeSender: The message was incorrectly node
* formed or did not contain th * does not support.
e * @xmlSecSoap12FaultCodeSender: The message was incorrectly
* appropriate information in o * formed or did not contain t
rder he
* to succeed. * appropriate information in
* @xmlSecSoap12FaultCodeReceiver: The message could not be pro order
cessed * to succeed.
* for reasons attributable to * @xmlSecSoap12FaultCodeReceiver: The message could not be pr
the ocessed
* processing of the message ra * for reasons attributable to
ther the
* than to the contents of the * processing of the message r
* message itself. ather
* than to the contents of the
* message itself.
* *
* The values of the <Value> child element information item of the * The values of the <Value> child element information item of the
* <Code> element information item (http://www.w3.org/TR/2003/REC-soap12-pa rt1-20030624/#faultcodes). * <Code> element information item (http://www.w3.org/TR/2003/REC-soap12-pa rt1-20030624/#faultcodes).
*/ */
typedef enum { typedef enum {
xmlSecSoap12FaultCodeUnknown = 0, xmlSecSoap12FaultCodeUnknown = 0,
xmlSecSoap12FaultCodeVersionMismatch, xmlSecSoap12FaultCodeVersionMismatch,
xmlSecSoap12FaultCodeMustUnderstand, xmlSecSoap12FaultCodeMustUnderstand,
xmlSecSoap12FaultCodeDataEncodingUnknown, xmlSecSoap12FaultCodeDataEncodingUnknown,
xmlSecSoap12FaultCodeSender, xmlSecSoap12FaultCodeSender,
xmlSecSoap12FaultCodeReceiver xmlSecSoap12FaultCodeReceiver
} xmlSecSoap12FaultCode; } xmlSecSoap12FaultCode;
XMLSEC_EXPORT xmlNodePtr xmlSecSoap12CreateEnvelope (xmlDocPtr d XMLSEC_EXPORT xmlNodePtr xmlSecSoap12CreateEnvelope (xmlDocPtr
oc); doc);
XMLSEC_EXPORT xmlNodePtr xmlSecSoap12EnsureHeader (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecSoap12EnsureHeader (xmlNodePtr
envNode); envNode);
XMLSEC_EXPORT xmlNodePtr xmlSecSoap12AddBodyEntry (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecSoap12AddBodyEntry (xmlNodePtr
envNode, envNode,
xmlNodePtr xmlNodePtr
entryNode); entryNode);
XMLSEC_EXPORT xmlNodePtr xmlSecSoap12AddFaultEntry (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecSoap12AddFaultEntry (xmlNodePtr
envNode, envNode,
xmlSecSoap1 xmlSecSoap
2FaultCode faultCode, 12FaultCode faultCode,
const xmlCh const xmlC
ar* faultReasonText, har* faultReasonText,
const xmlCh const xmlC
ar* faultReasonLang, har* faultReasonLang,
const xmlCh const xmlC
ar* faultNodeURI, har* faultNodeURI,
const xmlCh const xmlC
ar* faultRole); har* faultRole);
XMLSEC_EXPORT xmlNodePtr xmlSecSoap12AddFaultSubcode (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecSoap12AddFaultSubcode (xmlNodePtr
faultNode, faultNode,
const xmlCh const xmlC
ar* subCodeHref, har* subCodeHref,
const xmlCh const xmlC
ar* subCodeName); har* subCodeName);
XMLSEC_EXPORT xmlNodePtr xmlSecSoap12AddFaultReasonText (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecSoap12AddFaultReasonText (xmlNodePtr
faultNode, faultNode,
const xmlCh const xmlC
ar* faultReasonText, har* faultReasonText,
const xmlCh const xmlC
ar* faultReasonLang); har* faultReasonLang);
XMLSEC_EXPORT xmlNodePtr xmlSecSoap12AddFaultDetailEntry (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecSoap12AddFaultDetailEntry (xmlNodePtr
faultNode, faultNode,
xmlNodePtr xmlNodePtr
detailEntryNode); detailEntryNode);
XMLSEC_EXPORT int xmlSecSoap12CheckEnvelope (xmlNodePtr XMLSEC_EXPORT int xmlSecSoap12CheckEnvelope (xmlNodePtr
envNode); envNode);
XMLSEC_EXPORT xmlNodePtr xmlSecSoap12GetHeader (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecSoap12GetHeader (xmlNodePtr
envNode); envNode);
XMLSEC_EXPORT xmlNodePtr xmlSecSoap12GetBody (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecSoap12GetBody (xmlNodePtr
envNode); envNode);
XMLSEC_EXPORT xmlSecSize xmlSecSoap12GetBodyEntriesNumber(xmlNodePtr XMLSEC_EXPORT xmlSecSize xmlSecSoap12GetBodyEntriesNumber(xmlNodePtr
envNode); envNode);
XMLSEC_EXPORT xmlNodePtr xmlSecSoap12GetBodyEntry (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecSoap12GetBodyEntry (xmlNodePtr
envNode, envNode,
xmlSecSize xmlSecSize
pos); pos);
XMLSEC_EXPORT xmlNodePtr xmlSecSoap12GetFaultEntry (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecSoap12GetFaultEntry (xmlNodePtr
envNode); envNode);
#endif /* XMLSEC_NO_SOAP */ #endif /* XMLSEC_NO_SOAP */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XMLSEC_SOAP_H__ */ #endif /* __XMLSEC_SOAP_H__ */
 End of changes. 3 change blocks. 
126 lines changed or deleted 128 lines changed or added


 symbols.h   symbols.h 
skipping to change at line 20 skipping to change at line 20
#define __XMLSEC_GNUTLS_SYMBOLS_H__ #define __XMLSEC_GNUTLS_SYMBOLS_H__
#if !defined(IN_XMLSEC) && defined(XMLSEC_CRYPTO_DYNAMIC_LOADING) #if !defined(IN_XMLSEC) && defined(XMLSEC_CRYPTO_DYNAMIC_LOADING)
#error To disable dynamic loading of xmlsec-crypto libraries undefine XMLSE C_CRYPTO_DYNAMIC_LOADING #error To disable dynamic loading of xmlsec-crypto libraries undefine XMLSE C_CRYPTO_DYNAMIC_LOADING
#endif /* !defined(IN_XMLSEC) && defined(XMLSEC_CRYPTO_DYNAMIC_LOADING) */ #endif /* !defined(IN_XMLSEC) && defined(XMLSEC_CRYPTO_DYNAMIC_LOADING) */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
/**
* Defines for writing simple code
*/
#ifdef XMLSEC_CRYPTO_GNUTLS #ifdef XMLSEC_CRYPTO_GNUTLS
/** /********************************************************************
*
* Crypto Init/shutdown * Crypto Init/shutdown
*/ *
#define xmlSecCryptoInit xmlSecGnuTLSInit ********************************************************************/
#define xmlSecCryptoShutdown xmlSecGnuTLSShutdown #define xmlSecCryptoInit xmlSecGnuTLSInit
#define xmlSecCryptoShutdown xmlSecGnuTLSShutdown
#define xmlSecCryptoKeysMngrInit xmlSecGnuTLSKeysMngrInit #define xmlSecCryptoKeysMngrInit xmlSecGnuTLSKeysMngrInit
/** /********************************************************************
*
* Key data ids * Key data ids
*/ *
#define xmlSecKeyDataAesId xmlSecGnuTLSKeyDataAesId ********************************************************************/
#define xmlSecKeyDataDesId xmlSecGnuTLSKeyDataDesId #define xmlSecKeyDataAesId xmlSecGnuTLSKeyDataAesId
#define xmlSecKeyDataDsaId xmlSecGnuTLSKeyDataDsaId #define xmlSecKeyDataDesId xmlSecGnuTLSKeyDataDesId
#define xmlSecKeyDataHmacId xmlSecGnuTLSKeyDataHmacId #define xmlSecKeyDataDsaId xmlSecGnuTLSKeyDataDsaId
#define xmlSecKeyDataRsaId xmlSecGnuTLSKeyDataRsaId #define xmlSecKeyDataHmacId xmlSecGnuTLSKeyDataHmacId
#define xmlSecKeyDataX509Id xmlSecGnuTLSKeyDataX509Id #define xmlSecKeyDataRsaId xmlSecGnuTLSKeyDataRsaId
#define xmlSecKeyDataRawX509CertId xmlSecGnuTLSKeyDataRawX509Ce #define xmlSecKeyDataX509Id xmlSecGnuTLSKeyDataX509Id
rtId #define xmlSecKeyDataRawX509CertId xmlSecGnuTLSKeyDataRawX509C
ertId
/** /********************************************************************
*
* Key data store ids * Key data store ids
*/ *
#define xmlSecX509StoreId xmlSecGnuTLSX509StoreId ********************************************************************/
#define xmlSecX509StoreId xmlSecGnuTLSX509StoreId
/** /********************************************************************
*
* Crypto transforms ids * Crypto transforms ids
*/ *
#define xmlSecTransformAes128CbcId xmlSecGnuTLSTransformAes128C ********************************************************************/
bcId #define xmlSecTransformAes128CbcId xmlSecGnuTLSTransformAes128
#define xmlSecTransformAes192CbcId xmlSecGnuTLSTransformAes192C CbcId
bcId #define xmlSecTransformAes192CbcId xmlSecGnuTLSTransformAes192
#define xmlSecTransformAes256CbcId xmlSecGnuTLSTransformAes256C CbcId
bcId #define xmlSecTransformAes256CbcId xmlSecGnuTLSTransformAes256
#define xmlSecTransformKWAes128Id xmlSecGnuTLSTransformKWAes12 CbcId
8Id #define xmlSecTransformKWAes128Id xmlSecGnuTLSTransformKWAes1
#define xmlSecTransformKWAes192Id xmlSecGnuTLSTransformKWAes19 28Id
2Id #define xmlSecTransformKWAes192Id xmlSecGnuTLSTransformKWAes1
#define xmlSecTransformKWAes256Id xmlSecGnuTLSTransformKWAes25 92Id
6Id #define xmlSecTransformKWAes256Id xmlSecGnuTLSTransformKWAes2
#define xmlSecTransformDes3CbcId xmlSecGnuTLSTransformDes3Cbc 56Id
Id #define xmlSecTransformDes3CbcId xmlSecGnuTLSTransformDes3Cb
#define xmlSecTransformKWDes3Id xmlSecGnuTLSTransfor cId
mKWDes3Id #define xmlSecTransformKWDes3Id xmlSecGnuTLSTransformKWDes3
#define xmlSecTransformDsaSha1Id xmlSecGnuTLSTransformDsaSha1 Id
Id #define xmlSecTransformDsaSha1Id xmlSecGnuTLSTransformDsaSha
#define xmlSecTransformHmacMd5Id xmlSecGnuTLSTransformHmacMd5 1Id
Id #define xmlSecTransformHmacMd5Id xmlSecGnuTLSTransformHmacMd
#define xmlSecTransformHmacRipemd160Id xmlSecGnuTLSTransformHmacRip 5Id
emd160Id #define xmlSecTransformHmacRipemd160Id xmlSecGnuTLSTransformHmacRi
#define xmlSecTransformHmacSha1Id xmlSecGnuTLSTransformHmacSha pemd160Id
1Id #define xmlSecTransformHmacSha1Id xmlSecGnuTLSTransformHmacSh
#define xmlSecTransformRipemd160Id xmlSecGnuTLSTransformRipemd1 a1Id
60Id #define xmlSecTransformRipemd160Id xmlSecGnuTLSTransformRipemd
#define xmlSecTransformRsaSha1Id xmlSecGnuTLSTransformRsaSha1 160Id
Id #define xmlSecTransformRsaSha1Id xmlSecGnuTLSTransformRsaSha
#define xmlSecTransformRsaPkcs1Id xmlSecGnuTLSTransformRsaPkcs 1Id
1Id #define xmlSecTransformRsaPkcs1Id xmlSecGnuTLSTransformRsaPkc
#define xmlSecTransformRsaOaepId xmlSecGnuTLSTransformRsaOaep s1Id
Id #define xmlSecTransformRsaOaepId xmlSecGnuTLSTransformRsaOae
#define xmlSecTransformSha1Id xmlSecGnuTLSTransformSha1Id pId
#define xmlSecTransformSha1Id xmlSecGnuTLSTransformSha1Id
/** /********************************************************************
*
* High level routines form xmlsec command line utility * High level routines form xmlsec command line utility
*/ *
#define xmlSecCryptoAppInit xmlSecGnuTLSAppInit ********************************************************************/
#define xmlSecCryptoAppShutdown xmlSecGnuTLSAppShutd #define xmlSecCryptoAppInit xmlSecGnuTLSAppInit
own #define xmlSecCryptoAppShutdown xmlSecGnuTLSAppShutdown
#define xmlSecCryptoAppDefaultKeysMngrInit xmlSecGnuTLSAppDefaultKeysMn #define xmlSecCryptoAppDefaultKeysMngrInit xmlSecGnuTLSAppDefaultKeysM
grInit ngrInit
#define xmlSecCryptoAppDefaultKeysMngrAdoptKey xmlSecGnuTLSAppDefaultKeysMn #define xmlSecCryptoAppDefaultKeysMngrAdoptKey xmlSecGnuTLSAppDefaultKeysM
grAdoptKey ngrAdoptKey
#define xmlSecCryptoAppDefaultKeysMngrLoad xmlSecGnuTLSAppDefaultKeysMn #define xmlSecCryptoAppDefaultKeysMngrLoad xmlSecGnuTLSAppDefaultKeysM
grLoad ngrLoad
#define xmlSecCryptoAppDefaultKeysMngrSave xmlSecGnuTLSAppDefaultKeysMn #define xmlSecCryptoAppDefaultKeysMngrSave xmlSecGnuTLSAppDefaultKeysM
grSave ngrSave
#define xmlSecCryptoAppKeysMngrCertLoad xmlSecGnuTLSAppKeysM #define xmlSecCryptoAppKeysMngrCertLoad xmlSecGnuTLSAppKeysMngrCert
ngrCertLoad Load
#define xmlSecCryptoAppKeysMngrCertLoadMemory xmlSecGnuTLSAppKeysMngrCertL #define xmlSecCryptoAppKeysMngrCertLoadMemory xmlSecGnuTLSAppKeysMngrCert
oadMemory LoadMemory
#define xmlSecCryptoAppKeyLoad xmlSecGnuTLSAppKeyLoad #define xmlSecCryptoAppKeyLoad xmlSecGnuTLSAppKeyLoad
#define xmlSecCryptoAppPkcs12Load xmlSecGnuTLSAppPkcs12Load #define xmlSecCryptoAppPkcs12Load xmlSecGnuTLSAppPkcs12Load
#define xmlSecCryptoAppKeyCertLoad xmlSecGnuTLSAppKeyCertLoad #define xmlSecCryptoAppKeyCertLoad xmlSecGnuTLSAppKeyCertLoad
#define xmlSecCryptoAppKeyLoadMemory xmlSecGnuTLSAppKeyLoadMemory #define xmlSecCryptoAppKeyLoadMemory xmlSecGnuTLSAppKeyLoadMemor
#define xmlSecCryptoAppPkcs12LoadMemory xmlSecGnuTLSAppPkcs1 y
2LoadMemory #define xmlSecCryptoAppPkcs12LoadMemory xmlSecGnuTLSAppPkcs12LoadMe
#define xmlSecCryptoAppKeyCertLoadMemory xmlSecGnuTLSAppKeyCertLoadMe mory
mory #define xmlSecCryptoAppKeyCertLoadMemory xmlSecGnuTLSAppKeyCertLoadM
#define xmlSecCryptoAppGetDefaultPwdCallback xmlSecGnuTLSAppGetDefaultPwd emory
Callback #define xmlSecCryptoAppGetDefaultPwdCallback xmlSecGnuTLSAppGetDefaultPw
dCallback
#endif /* XMLSEC_CRYPTO_GNUTLS */ #endif /* XMLSEC_CRYPTO_GNUTLS */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XMLSEC_GNUTLS_CRYPTO_H__ */ #endif /* __XMLSEC_GNUTLS_CRYPTO_H__ */
#define __XMLSEC_GNUTLS_CRYPTO_H__ #define __XMLSEC_GNUTLS_CRYPTO_H__
 End of changes. 12 change blocks. 
83 lines changed or deleted 90 lines changed or added


 templates.h   templates.h 
skipping to change at line 28 skipping to change at line 28
#include <libxml/tree.h> #include <libxml/tree.h>
#include <xmlsec/xmlsec.h> #include <xmlsec/xmlsec.h>
#include <xmlsec/transforms.h> #include <xmlsec/transforms.h>
/*********************************************************************** /***********************************************************************
* *
* <dsig:Signature> node * <dsig:Signature> node
* *
**********************************************************************/ **********************************************************************/
XMLSEC_EXPORT xmlNodePtr xmlSecTmplSignatureCreate (xmlDocPtr d XMLSEC_EXPORT xmlNodePtr xmlSecTmplSignatureCreate (xmlDocPtr
oc, doc,
xmlSecTrans xmlSecTran
formId c14nMethodId, sformId c14nMethodId,
xmlSecTrans xmlSecTran
formId signMethodId, sformId signMethodId,
const xmlCh const xmlC
ar *id); har *id);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplSignatureCreateNsPref (xmlDocPtr d oc, XMLSEC_EXPORT xmlNodePtr xmlSecTmplSignatureCreateNsPref (xmlDocPtr d oc,
xmlSecTrans formId c14nMethodId, xmlSecTrans formId c14nMethodId,
xmlSecTrans formId signMethodId, xmlSecTrans formId signMethodId,
const xmlCh ar *id, const xmlCh ar *id,
const xmlCh ar *nsPrefix); const xmlCh ar *nsPrefix);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplSignatureEnsureKeyInfo (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecTmplSignatureEnsureKeyInfo (xmlNodePtr
signNode, signNode,
const xmlCh const xmlC
ar *id); har *id);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplSignatureAddReference (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecTmplSignatureAddReference (xmlNodePtr
signNode, signNode,
xmlSecTrans xmlSecTran
formId digestMethodId, sformId digestMethodId,
const xmlCh const xmlC
ar *id, har *id,
const xmlCh const xmlC
ar *uri, har *uri,
const xmlCh const xmlC
ar *type); har *type);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplSignatureAddObject (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecTmplSignatureAddObject (xmlNodePtr
signNode, signNode,
const xmlCh const xmlC
ar *id, har *id,
const xmlCh const xmlC
ar *mimeType, har *mimeType,
const xmlCh const xmlC
ar *encoding); har *encoding);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplSignatureGetSignMethodNode (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecTmplSignatureGetSignMethodNode (xmlNodePtr
signNode); signNode);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplSignatureGetC14NMethodNode (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecTmplSignatureGetC14NMethodNode (xmlNodePtr
signNode); signNode);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplReferenceAddTransform (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecTmplReferenceAddTransform (xmlNodePtr
referenceNode, referenceNode,
xmlSecTrans xmlSecTran
formId transformId); sformId transformId);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplObjectAddSignProperties (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecTmplObjectAddSignProperties (xmlNodePtr
objectNode, objectNode,
const xmlCh const xmlC
ar *id, har *id,
const xmlCh const xmlC
ar *target); har *target);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplObjectAddManifest (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecTmplObjectAddManifest (xmlNodePtr
objectNode, objectNode,
const xmlCh const xmlC
ar *id); har *id);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplManifestAddReference (xml XMLSEC_EXPORT xmlNodePtr xmlSecTmplManifestAddReference (xmlNodePtr
NodePtr manifestNode, manifestNode,
xmlSecTrans xmlSecTran
formId digestMethodId, sformId digestMethodId,
const xmlCh const xmlC
ar *id, har *id,
const xmlCh const xmlC
ar *uri, har *uri,
const xmlCh const xmlC
ar *type); har *type);
/*********************************************************************** /***********************************************************************
* *
* <enc:EncryptedData> node * <enc:EncryptedData> node
* *
**********************************************************************/ **********************************************************************/
XMLSEC_EXPORT xmlNodePtr xmlSecTmplEncDataCreate (xmlDocPtr d XMLSEC_EXPORT xmlNodePtr xmlSecTmplEncDataCreate (xmlDocPtr
oc, doc,
xmlSecTrans xmlSecTran
formId encMethodId, sformId encMethodId,
const xmlCh const xmlC
ar *id, har *id,
const xmlCh const xmlC
ar *type, har *type,
const xmlCh const xmlC
ar *mimeType, har *mimeType,
const xmlCh const xmlC
ar *encoding); har *encoding);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplEncDataEnsureKeyInfo (xml XMLSEC_EXPORT xmlNodePtr xmlSecTmplEncDataEnsureKeyInfo (xmlNodePtr
NodePtr encNode, encNode,
const xmlCh const xmlC
ar *id); har *id);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplEncDataEnsureEncProperties (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecTmplEncDataEnsureEncProperties (xmlNodePtr
encNode, encNode,
const xmlCh const xmlC
ar *id); har *id);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplEncDataAddEncProperty (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecTmplEncDataAddEncProperty (xmlNodePtr
encNode, encNode,
const xmlCh const xmlC
ar *id, har *id,
const xmlCh const xmlC
ar *target); har *target);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplEncDataEnsureCipherValue (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecTmplEncDataEnsureCipherValue (xmlNodePtr
encNode); encNode);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplEncDataEnsureCipherReference (xml XMLSEC_EXPORT xmlNodePtr xmlSecTmplEncDataEnsureCipherReference (xmlNodePtr
NodePtr encNode, encNode,
const xmlCh const xmlC
ar *uri); har *uri);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplEncDataGetEncMethodNode (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecTmplEncDataGetEncMethodNode (xmlNodePtr
encNode); encNode);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplCipherReferenceAddTransform (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecTmplCipherReferenceAddTransform (xmlNodePtr
cipherReferenceNode, cipherReferenceNode,
xmlSecTrans xmlSecTran
formId transformId); sformId transformId);
/*********************************************************************** /***********************************************************************
* *
* <enc:EncryptedKey> node * <enc:EncryptedKey> node
* *
**********************************************************************/ **********************************************************************/
XMLSEC_EXPORT xmlNodePtr xmlSecTmplReferenceListAddDataReference(xmlNodePtr encNode, XMLSEC_EXPORT xmlNodePtr xmlSecTmplReferenceListAddDataReference(xmlNodePtr encNode,
const xmlC har *uri); const xmlC har *uri);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplReferenceListAddKeyReference (xml NodePtr encNode, XMLSEC_EXPORT xmlNodePtr xmlSecTmplReferenceListAddKeyReference (xmlNodePtr encNode,
const xmlC har *uri); const xmlC har *uri);
/*********************************************************************** /***********************************************************************
* *
* <dsig:KeyInfo> node * <dsig:KeyInfo> node
* *
**********************************************************************/ **********************************************************************/
XMLSEC_EXPORT xmlNodePtr xmlSecTmplKeyInfoAddKeyName (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecTmplKeyInfoAddKeyName (xmlNodePtr
keyInfoNode, keyInfoNode,
const xmlCh const xmlC
ar* name); har* name);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplKeyInfoAddKeyValue (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecTmplKeyInfoAddKeyValue (xmlNodePtr
keyInfoNode); keyInfoNode);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplKeyInfoAddX509Data (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecTmplKeyInfoAddX509Data (xmlNodePtr
keyInfoNode); keyInfoNode);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplKeyInfoAddRetrievalMethod (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecTmplKeyInfoAddRetrievalMethod (xmlNodePtr
keyInfoNode, keyInfoNode,
const xmlCh const xmlC
ar *uri, har *uri,
const xmlCh const xmlC
ar *type); har *type);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplRetrievalMethodAddTransform (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecTmplRetrievalMethodAddTransform (xmlNodePtr
retrMethodNode, retrMethodNode,
xmlSecTrans xmlSecTran
formId transformId); sformId transformId);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplKeyInfoAddEncryptedKey (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecTmplKeyInfoAddEncryptedKey (xmlNodePtr
keyInfoNode, keyInfoNode,
xmlSecTrans xmlSecTran
formId encMethodId, sformId encMethodId,
const xmlCh const xmlC
ar *id, har *id,
const xmlCh const xmlC
ar *type, har *type,
const xmlCh const xmlC
ar *recipient); har *recipient);
/*********************************************************************** /***********************************************************************
* *
* <dsig:X509Data> node * <dsig:X509Data> node
* *
**********************************************************************/ **********************************************************************/
XMLSEC_EXPORT xmlNodePtr xmlSecTmplX509DataAddIssuerSerial (xmlNodePtr x509DataNode); XMLSEC_EXPORT xmlNodePtr xmlSecTmplX509DataAddIssuerSerial (xmlNodePtr x509DataNode);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplX509IssuerSerialAddIssuerName(xmlNodePtr x509IssuerSerialNode, const xmlChar* issuerName); XMLSEC_EXPORT xmlNodePtr xmlSecTmplX509IssuerSerialAddIssuerName(xmlNodePtr x509IssuerSerialNode, const xmlChar* issuerName);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplX509IssuerSerialAddSerialNumber(xmlNodeP tr x509IssuerSerialNode, const xmlChar* serial); XMLSEC_EXPORT xmlNodePtr xmlSecTmplX509IssuerSerialAddSerialNumber(xmlNodeP tr x509IssuerSerialNode, const xmlChar* serial);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplX509DataAddSubjectName (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecTmplX509DataAddSubjectName (xmlNodePtr
x509DataNode); x509DataNode);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplX509DataAddSKI (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecTmplX509DataAddSKI (xmlNodePtr
x509DataNode); x509DataNode);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplX509DataAddCertificate (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecTmplX509DataAddCertificate (xmlNodePtr
x509DataNode); x509DataNode);
XMLSEC_EXPORT xmlNodePtr xmlSecTmplX509DataAddCRL (xmlNodePtr XMLSEC_EXPORT xmlNodePtr xmlSecTmplX509DataAddCRL (xmlNodePtr
x509DataNode); x509DataNode);
/*********************************************************************** /***********************************************************************
* *
* <dsig:Transform> node * <dsig:Transform> node
* *
**********************************************************************/ **********************************************************************/
XMLSEC_EXPORT int xmlSecTmplTransformAddHmacOutputLength (xmlNodePtr XMLSEC_EXPORT int xmlSecTmplTransformAddHmacOutputLength (xmlNodePtr
transformNode, transformNode,
xmlSecSize xmlSecSize
bitsLen); bitsLen);
XMLSEC_EXPORT int xmlSecTmplTransformAddRsaOaepParam (xmlNodePtr XMLSEC_EXPORT int xmlSecTmplTransformAddRsaOaepParam (xmlNodePtr
transformNode, transformNode,
const xmlSe const xmlS
cByte *buf, ecByte *buf,
xmlSecSize xmlSecSize
size); size);
XMLSEC_EXPORT int xmlSecTmplTransformAddXsltStylesheet (xmlNodePtr XMLSEC_EXPORT int xmlSecTmplTransformAddXsltStylesheet (xmlNodePtr
transformNode, transformNode,
const xmlCh const xmlC
ar *xslt); har *xslt);
XMLSEC_EXPORT int xmlSecTmplTransformAddC14NInclNamespaces(xmlNodePtr XMLSEC_EXPORT int xmlSecTmplTransformAddC14NInclNamespaces(xmlNodePtr
transformNode, transformNode,
const xmlCh const xmlC
ar *prefixList); har *prefixList);
XMLSEC_EXPORT int xmlSecTmplTransformAddXPath (xmlNodePtr XMLSEC_EXPORT int xmlSecTmplTransformAddXPath (xmlNodePtr
transformNode, transformNode,
const xmlCh const xmlC
ar *expression, har *expression,
const xmlCh const xmlC
ar **nsList); har **nsList);
XMLSEC_EXPORT int xmlSecTmplTransformAddXPath2 (xmlNodePtr XMLSEC_EXPORT int xmlSecTmplTransformAddXPath2 (xmlNodePtr
transformNode, transformNode,
const xmlCh const xmlC
ar* type, har* type,
const xmlCh const xmlC
ar *expression, har *expression,
const xmlCh const xmlC
ar **nsList); har **nsList);
XMLSEC_EXPORT int xmlSecTmplTransformAddXPointer (xmlNodePtr XMLSEC_EXPORT int xmlSecTmplTransformAddXPointer (xmlNodePtr
transformNode, transformNode,
const xmlCh const xmlC
ar *expression, har *expression,
const xmlCh const xmlC
ar **nsList); har **nsList);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XMLSEC_KEYINFO_TEMPLATES_H__ */ #endif /* __XMLSEC_KEYINFO_TEMPLATES_H__ */
 End of changes. 9 change blocks. 
172 lines changed or deleted 172 lines changed or added


 transforms.h   transforms.h 
skipping to change at line 27 skipping to change at line 27
#include <libxml/tree.h> #include <libxml/tree.h>
#include <libxml/xpath.h> #include <libxml/xpath.h>
#include <xmlsec/xmlsec.h> #include <xmlsec/xmlsec.h>
#include <xmlsec/buffer.h> #include <xmlsec/buffer.h>
#include <xmlsec/list.h> #include <xmlsec/list.h>
#include <xmlsec/nodeset.h> #include <xmlsec/nodeset.h>
#include <xmlsec/keys.h> #include <xmlsec/keys.h>
typedef const struct _xmlSecTransformKlass xmlSecTransformKlass typedef const struct _xmlSecTransformKlass xmlSecTransformKlas
, s,
*xmlSecTransformId; *xmlSecTransformId;
/** /**
* XMLSEC_TRANSFORM_BINARY_CHUNK: * XMLSEC_TRANSFORM_BINARY_CHUNK:
* *
* The binary data chunks size. XMLSec processes binary data one chunk * The binary data chunks size. XMLSec processes binary data one chunk
* at a time. Changing this impacts xmlsec memory usage and performance. * at a time. Changing this impacts xmlsec memory usage and performance.
*/ */
#define XMLSEC_TRANSFORM_BINARY_CHUNK 64 #define XMLSEC_TRANSFORM_BINARY_CHUNK 64
/********************************************************************** /**********************************************************************
* *
* Hi-level functions * High-level functions
* *
*********************************************************************/ *********************************************************************/
XMLSEC_EXPORT xmlSecPtrListPtr xmlSecTransformIdsGet (void); XMLSEC_EXPORT xmlSecPtrListPtr xmlSecTransformIdsGet (void);
XMLSEC_EXPORT int xmlSecTransformIdsInit (void); XMLSEC_EXPORT int xmlSecTransformIdsInit (void);
XMLSEC_EXPORT void xmlSecTransformIdsShutdown (void); XMLSEC_EXPORT void xmlSecTransformIdsShutdown (void);
XMLSEC_EXPORT int xmlSecTransformIdsRegisterDefault(void); XMLSEC_EXPORT int xmlSecTransformIdsRegisterDefault(void);
XMLSEC_EXPORT int xmlSecTransformIdsRegister (xmlSecTrans XMLSEC_EXPORT int xmlSecTransformIdsRegister (xmlSecTran
formId id); sformId id);
/** /**
* xmlSecTransformStatus: * xmlSecTransformStatus:
* @xmlSecTransformStatusNone: the status unknown. * @xmlSecTransformStatusNone: the status unknown.
* @xmlSecTransformStatusWorking: the transform is executed. * @xmlSecTransformStatusWorking: the transform is executed.
* @xmlSecTransformStatusFinished: the transform finished * @xmlSecTransformStatusFinished: the transform finished
* @xmlSecTransformStatusOk: the transform succeeded. * @xmlSecTransformStatusOk: the transform succeeded.
* @xmlSecTransformStatusFail: the transform failed (an err * @xmlSecTransformStatusFail: the transform failed (an error occu
or occur). r).
* *
* The transform execution status. * The transform execution status.
*/ */
typedef enum { typedef enum {
xmlSecTransformStatusNone = 0, xmlSecTransformStatusNone = 0,
xmlSecTransformStatusWorking, xmlSecTransformStatusWorking,
xmlSecTransformStatusFinished, xmlSecTransformStatusFinished,
xmlSecTransformStatusOk, xmlSecTransformStatusOk,
xmlSecTransformStatusFail xmlSecTransformStatusFail
} xmlSecTransformStatus; } xmlSecTransformStatus;
/** /**
* xmlSecTransformMode: * xmlSecTransformMode:
* @xmlSecTransformModeNone: the mode is unknown. * @xmlSecTransformModeNone: the mode is unknown.
* @xmlSecTransformModePush: pushing data thru transform. * @xmlSecTransformModePush: pushing data thru transform.
* @xmlSecTransformModePop: popping data from transform. * @xmlSecTransformModePop: popping data from transform.
* *
* The transform operation mode * The transform operation mode
*/ */
typedef enum { typedef enum {
xmlSecTransformModeNone = 0, xmlSecTransformModeNone = 0,
xmlSecTransformModePush, xmlSecTransformModePush,
xmlSecTransformModePop xmlSecTransformModePop
} xmlSecTransformMode; } xmlSecTransformMode;
/** /**
* xmlSecTransformOperation: * xmlSecTransformOperation:
* @xmlSecTransformOperationNone: the operation is unknown. * @xmlSecTransformOperationNone: the operation is unknown.
* @xmlSecTransformOperationEncode: the encode operation (for base64 tra * @xmlSecTransformOperationEncode: the encode operation (for base64 tr
nsform). ansform).
* @xmlSecTransformOperationDecode: the decode operation (for base64 tra * @xmlSecTransformOperationDecode: the decode operation (for base64 tr
nsform). ansform).
* @xmlSecTransformOperationSign: the sign or digest operation. * @xmlSecTransformOperationSign: the sign or digest operation.
* @xmlSecTransformOperationVerify: the verification of signature or dig * @xmlSecTransformOperationVerify: the verification of signature or di
est operation. gest operation.
* @xmlSecTransformOperationEncrypt: the encryption operation. * @xmlSecTransformOperationEncrypt: the encryption operation.
* @xmlSecTransformOperationDecrypt: the decryption operation. * @xmlSecTransformOperationDecrypt: the decryption operation.
* *
* The transform operation. * The transform operation.
*/ */
typedef enum { typedef enum {
xmlSecTransformOperationNone = 0, xmlSecTransformOperationNone = 0,
xmlSecTransformOperationEncode, xmlSecTransformOperationEncode,
xmlSecTransformOperationDecode, xmlSecTransformOperationDecode,
xmlSecTransformOperationSign, xmlSecTransformOperationSign,
xmlSecTransformOperationVerify, xmlSecTransformOperationVerify,
xmlSecTransformOperationEncrypt, xmlSecTransformOperationEncrypt,
skipping to change at line 113 skipping to change at line 113
/************************************************************************** /**************************************************************************
* *
* xmlSecTransformUriType: * xmlSecTransformUriType:
* *
*************************************************************************/ *************************************************************************/
/** /**
* xmlSecTransformUriType: * xmlSecTransformUriType:
* *
* URI transform type bit mask. * URI transform type bit mask.
*/ */
typedef unsigned int xmlSecTransformUriType; typedef unsigned int xmlSecTransformUriType;
/** /**
* xmlSecTransformUriTypeNone: * xmlSecTransformUriTypeNone:
* *
* The URI type is unknown or not set. * The URI type is unknown or not set.
*/ */
#define xmlSecTransformUriTypeNone 0x0000 #define xmlSecTransformUriTypeNone 0x0000
/** /**
* xmlSecTransformUriTypeEmpty: * xmlSecTransformUriTypeEmpty:
* *
* The empty URI ("") type. * The empty URI ("") type.
*/ */
#define xmlSecTransformUriTypeEmpty 0x0001 #define xmlSecTransformUriTypeEmpty 0x0001
/** /**
* xmlSecTransformUriTypeSameDocument: * xmlSecTransformUriTypeSameDocument:
* *
* The smae document ("#...") but not empty ("") URI type. * The smae document ("#...") but not empty ("") URI type.
*/ */
#define xmlSecTransformUriTypeSameDocument 0x0002 #define xmlSecTransformUriTypeSameDocument 0x0002
/** /**
* xmlSecTransformUriTypeLocal: * xmlSecTransformUriTypeLocal:
* *
* The local URI ("file:///....") type. * The local URI ("file:///....") type.
*/ */
#define xmlSecTransformUriTypeLocal 0x0004 #define xmlSecTransformUriTypeLocal 0x0004
/** /**
* xmlSecTransformUriTypeRemote: * xmlSecTransformUriTypeRemote:
* *
* The remote URI type. * The remote URI type.
*/ */
#define xmlSecTransformUriTypeRemote 0x0008 #define xmlSecTransformUriTypeRemote 0x0008
/** /**
* xmlSecTransformUriTypeAny: * xmlSecTransformUriTypeAny:
* *
* Any URI type. * Any URI type.
*/ */
#define xmlSecTransformUriTypeAny 0xFFFF #define xmlSecTransformUriTypeAny 0xFFFF
XMLSEC_EXPORT int xmlSecTransformUriTypeCheck (xml XMLSEC_EXPORT int xmlSecTransformUriTypeCheck (xm
SecTransformUriType type, lSecTransformUriType type,
con co
st xmlChar* uri); nst xmlChar* uri);
/************************************************************************** /**************************************************************************
* *
* xmlSecTransformDataType * xmlSecTransformDataType
* *
*************************************************************************/ *************************************************************************/
/** /**
* xmlSecTransformDataType: * xmlSecTransformDataType:
* *
* Transform data type bit mask. * Transform data type bit mask.
*/ */
typedef xmlSecByte xmlSecTransformDataType; typedef xmlSecByte xmlSecTransformDataType;
/** /**
* xmlSecTransformDataTypeUnknown: * xmlSecTransformDataTypeUnknown:
* *
* The transform data type is unknown or nor data expected. * The transform data type is unknown or nor data expected.
*/ */
#define xmlSecTransformDataTypeUnknown 0x0000 #define xmlSecTransformDataTypeUnknown 0x0000
/** /**
* xmlSecTransformDataTypeBin: * xmlSecTransformDataTypeBin:
* *
* The binary transform data. * The binary transform data.
*/ */
#define xmlSecTransformDataTypeBin 0x0001 #define xmlSecTransformDataTypeBin 0x0001
/** /**
* xmlSecTransformDataTypeXml: * xmlSecTransformDataTypeXml:
* *
* The xml transform data. * The xml transform data.
*/ */
#define xmlSecTransformDataTypeXml 0x0002 #define xmlSecTransformDataTypeXml 0x0002
/************************************************************************** /**************************************************************************
* *
* xmlSecTransformUsage * xmlSecTransformUsage
* *
*************************************************************************/ *************************************************************************/
/** /**
* xmlSecTransformUsage: * xmlSecTransformUsage:
* *
* The transform usage bit mask. * The transform usage bit mask.
*/ */
typedef unsigned int xmlSecTransformUsage; typedef unsigned int xmlSecTransformUsage;
/** /**
* xmlSecTransformUsageUnknown: * xmlSecTransformUsageUnknown:
* *
* Transforms usage is unknown or undefined. * Transforms usage is unknown or undefined.
*/ */
#define xmlSecTransformUsageUnknown 0x0000 #define xmlSecTransformUsageUnknown 0x0000
/** /**
* xmlSecTransformUsageDSigTransform: * xmlSecTransformUsageDSigTransform:
* *
* Transform could be used in <dsig:Transform>. * Transform could be used in <dsig:Transform>.
*/ */
#define xmlSecTransformUsageDSigTransform 0x0001 #define xmlSecTransformUsageDSigTransform 0x0001
/** /**
* xmlSecTransformUsageC14NMethod: * xmlSecTransformUsageC14NMethod:
* *
* Transform could be used in <dsig:CanonicalizationMethod>. * Transform could be used in <dsig:CanonicalizationMethod>.
*/ */
#define xmlSecTransformUsageC14NMethod 0x0002 #define xmlSecTransformUsageC14NMethod 0x0002
/** /**
* xmlSecTransformUsageDigestMethod: * xmlSecTransformUsageDigestMethod:
* *
* Transform could be used in <dsig:DigestMethod>. * Transform could be used in <dsig:DigestMethod>.
*/ */
#define xmlSecTransformUsageDigestMethod 0x0004 #define xmlSecTransformUsageDigestMethod 0x0004
/** /**
* xmlSecTransformUsageSignatureMethod: * xmlSecTransformUsageSignatureMethod:
* *
* Transform could be used in <dsig:SignatureMethod>. * Transform could be used in <dsig:SignatureMethod>.
*/ */
#define xmlSecTransformUsageSignatureMethod 0x0008 #define xmlSecTransformUsageSignatureMethod 0x0008
/** /**
* xmlSecTransformUsageEncryptionMethod: * xmlSecTransformUsageEncryptionMethod:
* *
* Transform could be used in <enc:EncryptionMethod>. * Transform could be used in <enc:EncryptionMethod>.
*/ */
#define xmlSecTransformUsageEncryptionMethod 0x0010 #define xmlSecTransformUsageEncryptionMethod 0x0010
/** /**
* xmlSecTransformUsageAny: * xmlSecTransformUsageAny:
* *
* Transform could be used for operation. * Transform could be used for operation.
*/ */
#define xmlSecTransformUsageAny 0xFFFF #define xmlSecTransformUsageAny 0xFFFF
/************************************************************************** /**************************************************************************
* *
* xmlSecTransformCtx * xmlSecTransformCtx
* *
*************************************************************************/ *************************************************************************/
/** /**
* xmlSecTransformCtxPreExecuteCallback: * xmlSecTransformCtxPreExecuteCallback:
* @transformCtx: the pointer to transform's context. * @transformCtx: the pointer to transform's context.
* *
* The callback called after creating transforms chain but before * The callback called after creating transforms chain but before
* starting data processing. Application can use this callback to * starting data processing. Application can use this callback to
* do additional transforms chain verification or modification and * do additional transforms chain verification or modification and
* aborting transforms execution (if necessary). * aborting transforms execution (if necessary).
* *
* Returns: 0 on success and a negative value otherwise (in this case, * Returns: 0 on success and a negative value otherwise (in this case,
* transforms chain will not be executed and xmlsec processing stops). * transforms chain will not be executed and xmlsec processing stops).
*/ */
typedef int (*xmlSecTransformCtxPreExecuteCallback) (xml SecTransformCtxPtr transformCtx); typedef int (*xmlSecTransformCtxPreExecuteCallback) (xm lSecTransformCtxPtr transformCtx);
/** /**
* XMLSEC_TRANSFORMCTX_FLAGS_USE_VISA3D_HACK: * XMLSEC_TRANSFORMCTX_FLAGS_USE_VISA3D_HACK:
* *
* If this flag is set then URI ID references are resolved directly * If this flag is set then URI ID references are resolved directly
* without using XPointers. This allows one to sign/verify Visa3D * without using XPointers. This allows one to sign/verify Visa3D
* documents that don't follow XML, XPointer and XML DSig specifications. * documents that don't follow XML, XPointer and XML DSig specifications.
*/ */
#define XMLSEC_TRANSFORMCTX_FLAGS_USE_VISA3D_HACK 0x00000001 #define XMLSEC_TRANSFORMCTX_FLAGS_USE_VISA3D_HACK 0x00000001
/** /**
* xmlSecTransformCtx: * xmlSecTransformCtx:
* @userData: the pointer to user data (xmlsec and xmlsec-crypto n * @userData: the pointer to user data (xmlsec and xmlsec-crypto
ever never
* touch this). * touch this).
* @flags: the bit mask flags to control transforms execution * @flags: the bit mask flags to control transforms execution
* (reserved for the future). * (reserved for the future).
* @flags2: the bit mask flags to control transforms execution * @flags2: the bit mask flags to control transforms execution
* (reserved for the future). * (reserved for the future).
* @enabledUris: the allowed transform data source uri types. * @enabledUris: the allowed transform data source uri types.
* @enabledTransforms: the list of enabled transforms; if list is e * @enabledTransforms: the list of enabled transforms; if list is empty (d
mpty (default) efault)
* then all registered transforms are enabled. * then all registered transforms are enabled.
* @preExecCallback: the callback called after preparing transform chain * @preExecCallback: the callback called after preparing transform chain
* and right before actual data processing; application * and right before actual data processing; applicatio
* can use this callback to change transforms parameter n
s, * can use this callback to change transforms paramete
* insert additional transforms in the chain or do rs,
* additional validation (and abort transform execution * insert additional transforms in the chain or do
* if needed). * additional validation (and abort transform executio
* @result: the pointer to transforms result buffer. n
* @status: the transforms chain processng status. * if needed).
* @uri: the data source URI without xpointer expression. * @result: the pointer to transforms result buffer.
* @xptrExpr: the xpointer expression from data source URI (if any * @status: the transforms chain processng status.
). * @uri: the data source URI without xpointer expression.
* @first: the first transform in the chain. * @xptrExpr: the xpointer expression from data source URI (if an
* @last: the last transform in the chain. y).
* @reserved0: reserved for the future. * @first: the first transform in the chain.
* @reserved1: reserved for the future. * @last: the last transform in the chain.
* @reserved0: reserved for the future.
* @reserved1: reserved for the future.
* *
* The transform execution context. * The transform execution context.
*/ */
struct _xmlSecTransformCtx { struct _xmlSecTransformCtx {
/* user settings */ /* user settings */
void* userData; void* userData;
unsigned int flags; unsigned int flags;
unsigned int flags2; unsigned int flags2;
xmlSecTransformUriType enabledUris; xmlSecTransformUriType enabledUris;
xmlSecPtrList enabledTransforms; xmlSecPtrList enabledTransforms;
xmlSecTransformCtxPreExecuteCallback preExecCallback; xmlSecTransformCtxPreExecuteCallback preExecCallback;
/* results */ /* results */
xmlSecBufferPtr result; xmlSecBufferPtr result;
xmlSecTransformStatus status; xmlSecTransformStatus status;
xmlChar* uri; xmlChar* uri;
xmlChar* xptrExpr; xmlChar* xptrExpr;
xmlSecTransformPtr first; xmlSecTransformPtr first;
xmlSecTransformPtr last; xmlSecTransformPtr last;
/* for the future */ /* for the future */
void* reserved0; void* reserved0;
void* reserved1; void* reserved1;
}; };
XMLSEC_EXPORT xmlSecTransformCtxPtr xmlSecTransformCtxCreate (voi XMLSEC_EXPORT xmlSecTransformCtxPtr xmlSecTransformCtxCreate (vo
d); id);
XMLSEC_EXPORT void xmlSecTransformCtxDestroy (xml XMLSEC_EXPORT void xmlSecTransformCtxDestroy (xm
SecTransformCtxPtr ctx); lSecTransformCtxPtr ctx);
XMLSEC_EXPORT int xmlSecTransformCtxInitialize (xml XMLSEC_EXPORT int xmlSecTransformCtxInitialize (xm
SecTransformCtxPtr ctx); lSecTransformCtxPtr ctx);
XMLSEC_EXPORT void xmlSecTransformCtxFinalize (xml XMLSEC_EXPORT void xmlSecTransformCtxFinalize (xm
SecTransformCtxPtr ctx); lSecTransformCtxPtr ctx);
XMLSEC_EXPORT void xmlSecTransformCtxReset (xml XMLSEC_EXPORT void xmlSecTransformCtxReset (xm
SecTransformCtxPtr ctx); lSecTransformCtxPtr ctx);
XMLSEC_EXPORT int xmlSecTransformCtxCopyUserPref (xml XMLSEC_EXPORT int xmlSecTransformCtxCopyUserPref (xm
SecTransformCtxPtr dst, lSecTransformCtxPtr dst,
xml xm
SecTransformCtxPtr src); lSecTransformCtxPtr src);
XMLSEC_EXPORT int xmlSecTransformCtxSetUri (xml XMLSEC_EXPORT int xmlSecTransformCtxSetUri (xm
SecTransformCtxPtr ctx, lSecTransformCtxPtr ctx,
con co
st xmlChar* uri, nst xmlChar* uri,
xml xm
NodePtr hereNode); lNodePtr hereNode);
XMLSEC_EXPORT int xmlSecTransformCtxAppend (xml XMLSEC_EXPORT int xmlSecTransformCtxAppend (xm
SecTransformCtxPtr ctx, lSecTransformCtxPtr ctx,
xml xm
SecTransformPtr transform); lSecTransformPtr transform);
XMLSEC_EXPORT int xmlSecTransformCtxPrepend (xml XMLSEC_EXPORT int xmlSecTransformCtxPrepend (xm
SecTransformCtxPtr ctx, lSecTransformCtxPtr ctx,
xml xm
SecTransformPtr transform); lSecTransformPtr transform);
XMLSEC_EXPORT xmlSecTransformPtr xmlSecTransformCtxCreateAndAppend(xm XMLSEC_EXPORT xmlSecTransformPtr xmlSecTransformCtxCreateAndAppend(x
lSecTransformCtxPtr ctx, mlSecTransformCtxPtr ctx,
xml xm
SecTransformId id); lSecTransformId id);
XMLSEC_EXPORT xmlSecTransformPtr xmlSecTransformCtxCreateAndPrepend(x XMLSEC_EXPORT xmlSecTransformPtr xmlSecTransformCtxCreateAndPrepend(
mlSecTransformCtxPtr ctx, xmlSecTransformCtxPtr ctx,
xml xm
SecTransformId id); lSecTransformId id);
XMLSEC_EXPORT xmlSecTransformPtr xmlSecTransformCtxNodeRead (xml XMLSEC_EXPORT xmlSecTransformPtr xmlSecTransformCtxNodeRead (xm
SecTransformCtxPtr ctx, lSecTransformCtxPtr ctx,
xml xm
NodePtr node, lNodePtr node,
xml xm
SecTransformUsage usage); lSecTransformUsage usage);
XMLSEC_EXPORT int xmlSecTransformCtxNodesListRead (xml XMLSEC_EXPORT int xmlSecTransformCtxNodesListRead (xm
SecTransformCtxPtr ctx, lSecTransformCtxPtr ctx,
xml xm
NodePtr node, lNodePtr node,
xml xm
SecTransformUsage usage); lSecTransformUsage usage);
XMLSEC_EXPORT int xmlSecTransformCtxPrepare (xml XMLSEC_EXPORT int xmlSecTransformCtxPrepare (xm
SecTransformCtxPtr ctx, lSecTransformCtxPtr ctx,
xml xm
SecTransformDataType inputDataType); lSecTransformDataType inputDataType);
XMLSEC_EXPORT int xmlSecTransformCtxBinaryExecute (xml XMLSEC_EXPORT int xmlSecTransformCtxBinaryExecute (xm
SecTransformCtxPtr ctx, lSecTransformCtxPtr ctx,
con co
st xmlSecByte* data, nst xmlSecByte* data,
xml xm
SecSize dataSize); lSecSize dataSize);
XMLSEC_EXPORT int xmlSecTransformCtxUriExecute (xml XMLSEC_EXPORT int xmlSecTransformCtxUriExecute (xm
SecTransformCtxPtr ctx, lSecTransformCtxPtr ctx,
con co
st xmlChar* uri); nst xmlChar* uri);
XMLSEC_EXPORT int xmlSecTransformCtxXmlExecute (xml XMLSEC_EXPORT int xmlSecTransformCtxXmlExecute (xm
SecTransformCtxPtr ctx, lSecTransformCtxPtr ctx,
xml xm
SecNodeSetPtr nodes); lSecNodeSetPtr nodes);
XMLSEC_EXPORT int xmlSecTransformCtxExecute (xml XMLSEC_EXPORT int xmlSecTransformCtxExecute (xm
SecTransformCtxPtr ctx, lSecTransformCtxPtr ctx,
xml xm
DocPtr doc); lDocPtr doc);
XMLSEC_EXPORT void xmlSecTransformCtxDebugDump (xml XMLSEC_EXPORT void xmlSecTransformCtxDebugDump (xm
SecTransformCtxPtr ctx, lSecTransformCtxPtr ctx,
FILE FIL
* output); E* output);
XMLSEC_EXPORT void xmlSecTransformCtxDebugXmlDump (xml XMLSEC_EXPORT void xmlSecTransformCtxDebugXmlDump (xm
SecTransformCtxPtr ctx, lSecTransformCtxPtr ctx,
FIL FI
E* output); LE* output);
/************************************************************************** /**************************************************************************
* *
* xmlSecTransform * xmlSecTransform
* *
*************************************************************************/ *************************************************************************/
/** /**
* xmlSecTransform: * xmlSecTransform:
* @id: the transform id (pointer to #xmlSecTransformId). * @id: the transform id (pointer to #xmlSecTransformId).
* @operation: the transform's opertaion. * @operation: the transform's opertaion.
* @status: the current status. * @status: the current status.
* @hereNode: the pointer to transform's <dsig:Transform /> node. * @hereNode: the pointer to transform's <dsig:Transform /> node.
* @next: the pointer to next transform in the chain. * @next: the pointer to next transform in the chain.
* @prev: the pointer to previous transform in the chain. * @prev: the pointer to previous transform in the chain.
* @inBuf: the input binary data buffer. * @inBuf: the input binary data buffer.
* @outBuf: the output binary data buffer. * @outBuf: the output binary data buffer.
* @inNodes: the input XML nodes. * @inNodes: the input XML nodes.
* @outNodes: the output XML nodes. * @outNodes: the output XML nodes.
* @reserved0: reserved for the future. * @reserved0: reserved for the future.
* @reserved1: reserved for the future. * @reserved1: reserved for the future.
* *
* The transform structure. * The transform structure.
*/ */
struct _xmlSecTransform { struct _xmlSecTransform {
xmlSecTransformId id; xmlSecTransformId id;
xmlSecTransformOperation operation; xmlSecTransformOperation operation;
xmlSecTransformStatus status; xmlSecTransformStatus status;
xmlNodePtr hereNode; xmlNodePtr hereNode;
/* transforms chain */ /* transforms chain */
xmlSecTransformPtr next; xmlSecTransformPtr next;
xmlSecTransformPtr prev; xmlSecTransformPtr prev;
/* binary data */ /* binary data */
xmlSecBuffer inBuf; xmlSecBuffer inBuf;
xmlSecBuffer outBuf; xmlSecBuffer outBuf;
/* xml data */ /* xml data */
xmlSecNodeSetPtr inNodes; xmlSecNodeSetPtr inNodes;
xmlSecNodeSetPtr outNodes; xmlSecNodeSetPtr outNodes;
/* reserved for the future */ /* reserved for the future */
void* reserved0; void* reserved0;
void* reserved1; void* reserved1;
}; };
XMLSEC_EXPORT xmlSecTransformPtr xmlSecTransformCreate (xmlSecTrans XMLSEC_EXPORT xmlSecTransformPtr xmlSecTransformCreate (xmlSecTran
formId id); sformId id);
XMLSEC_EXPORT void xmlSecTransformDestroy (xmlSecTrans XMLSEC_EXPORT void xmlSecTransformDestroy (xmlSecTran
formPtr transform); sformPtr transform);
XMLSEC_EXPORT xmlSecTransformPtr xmlSecTransformNodeRead (xmlNodePtr XMLSEC_EXPORT xmlSecTransformPtr xmlSecTransformNodeRead (xmlNodePtr
node, node,
xmlSecTrans xmlSecTran
formUsage usage, sformUsage usage,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
XMLSEC_EXPORT int xmlSecTransformPump (xmlSecTrans XMLSEC_EXPORT int xmlSecTransformPump (xmlSecTran
formPtr left, sformPtr left,
xmlSecTrans xmlSecTran
formPtr right, sformPtr right,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
XMLSEC_EXPORT int xmlSecTransformSetKey (xmlSecTrans XMLSEC_EXPORT int xmlSecTransformSetKey (xmlSecTran
formPtr transform, sformPtr transform,
xmlSecKeyPt xmlSecKeyP
r key); tr key);
XMLSEC_EXPORT int xmlSecTransformSetKeyReq(xmlSecTrans XMLSEC_EXPORT int xmlSecTransformSetKeyReq(xmlSecTran
formPtr transform, sformPtr transform,
xmlSecKeyRe xmlSecKeyR
qPtr keyReq); eqPtr keyReq);
XMLSEC_EXPORT int xmlSecTransformVerify (xmlSecTrans XMLSEC_EXPORT int xmlSecTransformVerify (xmlSecTran
formPtr transform, sformPtr transform,
const xmlSe const xmlS
cByte* data, ecByte* data,
xmlSecSize xmlSecSize
dataSize, dataSize,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
XMLSEC_EXPORT int xmlSecTransformVerifyNodeContent(xml XMLSEC_EXPORT int xmlSecTransformVerifyNodeContent(xm
SecTransformPtr transform, lSecTransformPtr transform,
xmlNodePtr xmlNodePtr
node, node,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
XMLSEC_EXPORT xmlSecTransformDataType xmlSecTransformGetDataType(xmlSecTra XMLSEC_EXPORT xmlSecTransformDataType xmlSecTransformGetDataType(xmlSecTr
nsformPtr transform, ansformPtr transform,
xmlSecTrans xmlSecTran
formMode mode, sformMode mode,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
XMLSEC_EXPORT int xmlSecTransformPushBin (xmlSecTrans XMLSEC_EXPORT int xmlSecTransformPushBin (xmlSecTran
formPtr transform, sformPtr transform,
const xmlSe const xmlS
cByte* data, ecByte* data,
xmlSecSize xmlSecSize
dataSize, dataSize,
int final, int final,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
XMLSEC_EXPORT int xmlSecTransformPopBin (xmlSecTrans XMLSEC_EXPORT int xmlSecTransformPopBin (xmlSecTran
formPtr transform, sformPtr transform,
xmlSecByte* xmlSecByte
data, * data,
xmlSecSize xmlSecSize
maxDataSize, maxDataSize,
xmlSecSize* xmlSecSize
dataSize, * dataSize,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
XMLSEC_EXPORT int xmlSecTransformPushXml (xmlSecTrans XMLSEC_EXPORT int xmlSecTransformPushXml (xmlSecTran
formPtr transform, sformPtr transform,
xmlSecNodeS xmlSecNode
etPtr nodes, SetPtr nodes,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
XMLSEC_EXPORT int xmlSecTransformPopXml (xmlSecTrans XMLSEC_EXPORT int xmlSecTransformPopXml (xmlSecTran
formPtr transform, sformPtr transform,
xmlSecNodeS xmlSecNode
etPtr* nodes, SetPtr* nodes,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
XMLSEC_EXPORT int xmlSecTransformExecute (xmlSecTrans XMLSEC_EXPORT int xmlSecTransformExecute (xmlSecTran
formPtr transform, sformPtr transform,
int last, int last,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
XMLSEC_EXPORT void xmlSecTransformDebugDump(xmlSecTrans XMLSEC_EXPORT void xmlSecTransformDebugDump(xmlSecTran
formPtr transform, sformPtr transform,
FILE* outpu FILE* outp
t); ut);
XMLSEC_EXPORT void xmlSecTransformDebugXmlDump(xmlSecTr XMLSEC_EXPORT void xmlSecTransformDebugXmlDump(xmlSecT
ansformPtr transform, ransformPtr transform,
FILE* outpu FILE* outp
t); ut);
/** /**
* xmlSecTransformGetName: * xmlSecTransformGetName:
* @transform: the pointer to transform. * @transform: the pointer to transform.
* *
* Macro. Returns transform name. * Macro. Returns transform name.
*/ */
#define xmlSecTransformGetName(transform) \ #define xmlSecTransformGetName(transform) \
((xmlSecTransformIsValid((transform))) ? \ ((xmlSecTransformIsValid((transform))) ? \
xmlSecTransformKlassGetName((transform)->id) : NULL) xmlSecTransformKlassGetName((transform)->id) : NULL)
/** /**
* xmlSecTransformIsValid: * xmlSecTransformIsValid:
* @transform: the pointer to transform. * @transform: the pointer to transform.
* *
* Macro. Returns 1 if the @transform is valid or 0 otherwise. * Macro. Returns 1 if the @transform is valid or 0 otherwise.
*/ */
#define xmlSecTransformIsValid(transform) \ #define xmlSecTransformIsValid(transform) \
((( transform ) != NULL) && \ ((( transform ) != NULL) && \
(( transform )->id != NULL) && \ (( transform )->id != NULL) && \
(( transform )->id->klassSize >= sizeof(xmlSecTransformKlass)) && \ (( transform )->id->klassSize >= sizeof(xmlSecTransformKlass)) &&
(( transform )->id->objSize >= sizeof(xmlSecTransform)) && \ \
(( transform )->id->name != NULL)) (( transform )->id->objSize >= sizeof(xmlSecTransform)) && \
(( transform )->id->name != NULL))
/** /**
* xmlSecTransformCheckType: * xmlSecTransformCheckType:
* @transform: the pointer to transform. * @transform: the pointer to transform.
* @t: the transform type. * @t: the transform type.
* *
* Macro. Returns 1 if the @transform is valid and has specified type @t * Macro. Returns 1 if the @transform is valid and has specified type @t
* or 0 otherwise. * or 0 otherwise.
*/ */
#define xmlSecTransformCheckType(transform, t) \ #define xmlSecTransformCheckType(transform, t) \
(xmlSecTransformIsValid(( transform )) && \ (xmlSecTransformIsValid(( transform )) && \
((( transform )->id->type) == ( t ))) ((( transform )->id->type) == ( t )))
/** /**
* xmlSecTransformCheckId: * xmlSecTransformCheckId:
* @transform: the pointer to transform. * @transform: the pointer to transform.
* @i: the transform id. * @i: the transform id.
* *
* Macro. Returns 1 if the @transform is valid and has specified id @i * Macro. Returns 1 if the @transform is valid and has specified id @i
* or 0 otherwise. * or 0 otherwise.
*/ */
#define xmlSecTransformCheckId(transform, i) \ #define xmlSecTransformCheckId(transform, i) \
(xmlSecTransformIsValid(( transform )) && \ (xmlSecTransformIsValid(( transform )) && \
((((const xmlSecTransformId) (( transform )->id))) == ( i ))) ((((const xmlSecTransformId) (( transform )->id))) == ( i )))
/** /**
* xmlSecTransformCheckSize: * xmlSecTransformCheckSize:
* @transform: the pointer to transform. * @transform: the pointer to transform.
* @size: the transform object size. * @size: the transform object size.
* *
* Macro. Returns 1 if the @transform is valid and has at least @size * Macro. Returns 1 if the @transform is valid and has at least @size
* bytes or 0 otherwise. * bytes or 0 otherwise.
*/ */
#define xmlSecTransformCheckSize(transform, size) \ #define xmlSecTransformCheckSize(transform, size) \
(xmlSecTransformIsValid(( transform )) && \ (xmlSecTransformIsValid(( transform )) && \
((( transform )->id->objSize) >= ( size ))) ((( transform )->id->objSize) >= ( size )))
/************************************************************************ /************************************************************************
* *
* Operations on transforms chain * Operations on transforms chain
* *
************************************************************************/ ************************************************************************/
XMLSEC_EXPORT int xmlSecTransformConnect (xmlSecTrans XMLSEC_EXPORT int xmlSecTransformConnect (xmlSecTran
formPtr left, sformPtr left,
xmlSecTrans xmlSecTran
formPtr right, sformPtr right,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
XMLSEC_EXPORT void xmlSecTransformRemove (xmlSecTrans XMLSEC_EXPORT void xmlSecTransformRemove (xmlSecTran
formPtr transform); sformPtr transform);
/************************************************************************ /************************************************************************
* *
* Default callbacks, most of the transforms can use them * Default callbacks, most of the transforms can use them
* *
************************************************************************/ ************************************************************************/
XMLSEC_EXPORT xmlSecTransformDataType xmlSecTransformDefaultGetDataType(xm XMLSEC_EXPORT xmlSecTransformDataType xmlSecTransformDefaultGetDataType(x
lSecTransformPtr transform, mlSecTransformPtr transform,
xmlSecTrans xmlSecTran
formMode mode, sformMode mode,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
XMLSEC_EXPORT int xmlSecTransformDefaultPushBin(xmlSec XMLSEC_EXPORT int xmlSecTransformDefaultPushBin(xmlSe
TransformPtr transform, cTransformPtr transform,
const xmlSe const xmlS
cByte* data, ecByte* data,
xmlSecSize xmlSecSize
dataSize, dataSize,
int final, int final,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
XMLSEC_EXPORT int xmlSecTransformDefaultPopBin(xmlSecT XMLSEC_EXPORT int xmlSecTransformDefaultPopBin(xmlSec
ransformPtr transform, TransformPtr transform,
xmlSecByte* xmlSecByte
data, * data,
xmlSecSize xmlSecSize
maxDataSize, maxDataSize,
xmlSecSize* xmlSecSize
dataSize, * dataSize,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
XMLSEC_EXPORT int xmlSecTransformDefaultPushXml(xmlSec XMLSEC_EXPORT int xmlSecTransformDefaultPushXml(xmlSe
TransformPtr transform, cTransformPtr transform,
xmlSecNodeS xmlSecNode
etPtr nodes, SetPtr nodes,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
XMLSEC_EXPORT int xmlSecTransformDefaultPopXml(xmlSecT XMLSEC_EXPORT int xmlSecTransformDefaultPopXml(xmlSec
ransformPtr transform, TransformPtr transform,
xmlSecNodeS xmlSecNode
etPtr* nodes, SetPtr* nodes,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
/************************************************************************ /************************************************************************
* *
* IO buffers for transforms * IO buffers for transforms
* *
************************************************************************/ ************************************************************************/
XMLSEC_EXPORT xmlOutputBufferPtr xmlSecTransformCreateOutputBuffer(xm XMLSEC_EXPORT xmlOutputBufferPtr xmlSecTransformCreateOutputBuffer(x
lSecTransformPtr transform, mlSecTransformPtr transform,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
XMLSEC_EXPORT xmlParserInputBufferPtr xmlSecTransformCreateInputBuffer(xml XMLSEC_EXPORT xmlParserInputBufferPtr xmlSecTransformCreateInputBuffer(xm
SecTransformPtr transform, lSecTransformPtr transform,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
/************************************************************************ /************************************************************************
* *
* Transform Klass * Transform Klass
* *
************************************************************************/ ************************************************************************/
/** /**
* xmlSecTransformInitializeMethod: * xmlSecTransformInitializeMethod:
* @transform: the pointer to transform object. * @transform: the pointer to transform object.
* *
* The transform specific initialization method. * The transform specific initialization method.
* *
* Returns: 0 on success or a negative value otherwise. * Returns: 0 on success or a negative value otherwise.
*/ */
typedef int (*xmlSecTransformInitializeMethod) (xmlSecTrans formPtr transform); typedef int (*xmlSecTransformInitializeMethod) (xmlSecTran sformPtr transform);
/** /**
* xmlSecTransformFinalizeMethod: * xmlSecTransformFinalizeMethod:
* @transform: the pointer to transform object. * @transform: the pointer to transform object.
* *
* The transform specific destroy method. * The transform specific destroy method.
*/ */
typedef void (*xmlSecTransformFinalizeMethod) (xmlSecTrans formPtr transform); typedef void (*xmlSecTransformFinalizeMethod) (xmlSecTran sformPtr transform);
/** /**
* xmlSecTransformGetDataTypeMethod: * xmlSecTransformGetDataTypeMethod:
* @transform: the pointer to transform object. * @transform: the pointer to transform object.
* @mode: the mode. * @mode: the mode.
* @transformCtx: the pointer to transform context object. * @transformCtx: the pointer to transform context object.
* *
* The transform specific method to query information about transform * The transform specific method to query information about transform
* data type in specified mode @mode. * data type in specified mode @mode.
* *
* Returns: transform data type. * Returns: transform data type.
*/ */
typedef xmlSecTransformDataType (*xmlSecTransformGetDataTypeMethod)( typedef xmlSecTransformDataType (*xmlSecTransformGetDataTypeMethod)(xmlSecT
xmlSecTransformPtr transform, ransformPtr transform,
xmlSecTrans xmlSecTran
formMode mode, sformMode mode,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
/** /**
* xmlSecTransformNodeReadMethod: * xmlSecTransformNodeReadMethod:
* @transform: the pointer to transform object. * @transform: the pointer to transform object.
* @node: the pointer to <dsig:Transform/> node. * @node: the pointer to <dsig:Transform/> node.
* @transformCtx: the pointer to transform context object. * @transformCtx: the pointer to transform context object.
* *
* The transform specific method to read the transform data from * The transform specific method to read the transform data from
* the @node. * the @node.
* *
* Returns: 0 on success or a negative value otherwise. * Returns: 0 on success or a negative value otherwise.
*/ */
typedef int (*xmlSecTransformNodeReadMethod) (xmlSecTrans typedef int (*xmlSecTransformNodeReadMethod) (xmlSecTran
formPtr transform, sformPtr transform,
xmlNodePtr xmlNodePtr
node, node,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
/** /**
* xmlSecTransformNodeWriteMethod: * xmlSecTransformNodeWriteMethod:
* @transform: the pointer to transform object. * @transform: the pointer to transform object.
* @node: the pointer to <dsig:Transform/> node. * @node: the pointer to <dsig:Transform/> node.
* @transformCtx: the pointer to transform context object. * @transformCtx: the pointer to transform context object.
* *
* The transform specific method to write transform information to an XML n ode @node. * The transform specific method to write transform information to an XML n ode @node.
* *
* Returns: 0 on success or a negative value otherwise. * Returns: 0 on success or a negative value otherwise.
*/ */
typedef int (*xmlSecTransformNodeWriteMethod) (xmlSecTrans typedef int (*xmlSecTransformNodeWriteMethod) (xmlSecTran
formPtr transform, sformPtr transform,
xmlNodePtr xmlNodePtr
node, node,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
/** /**
* xmlSecTransformSetKeyRequirementsMethod: * xmlSecTransformSetKeyRequirementsMethod:
* @transform: the pointer to transform object. * @transform: the pointer to transform object.
* @keyReq: the pointer to key requirements structure. * @keyReq: the pointer to key requirements structure.
* *
* Transform specific method to set transform's key requirements. * Transform specific method to set transform's key requirements.
* *
* Returns: 0 on success or a negative value otherwise. * Returns: 0 on success or a negative value otherwise.
*/ */
typedef int (*xmlSecTransformSetKeyRequirementsMethod)(xmlSecTra typedef int (*xmlSecTransformSetKeyRequirementsMethod)(xmlSecTr
nsformPtr transform, ansformPtr transform,
xmlSecKeyRe xmlSecKeyR
qPtr keyReq); eqPtr keyReq);
/** /**
* xmlSecTransformSetKeyMethod: * xmlSecTransformSetKeyMethod:
* @transform: the pointer to transform object. * @transform: the pointer to transform object.
* @key: the pointer to key. * @key: the pointer to key.
* *
* The transform specific method to set the key for use. * The transform specific method to set the key for use.
* *
* Returns: 0 on success or a negative value otherwise. * Returns: 0 on success or a negative value otherwise.
*/ */
typedef int (*xmlSecTransformSetKeyMethod) (xmlSecTrans typedef int (*xmlSecTransformSetKeyMethod) (xmlSecTran
formPtr transform, sformPtr transform,
xmlSecKeyPt xmlSecKeyP
r key); tr key);
/** /**
* xmlSecTransformVerifyMethod: * xmlSecTransformVerifyMethod:
* @transform: the pointer to transform object. * @transform: the pointer to transform object.
* @data: the input buffer. * @data: the input buffer.
* @dataSize: the size of input buffer @data. * @dataSize: the size of input buffer @data.
* @transformCtx: the pointer to transform context object. * @transformCtx: the pointer to transform context object.
* *
* The transform specific method to verify transform processing results * The transform specific method to verify transform processing results
* (used by digest and signature transforms). This method sets @status * (used by digest and signature transforms). This method sets @status
* member of the #xmlSecTransform structure to either #xmlSecTransformStatu sOk * member of the #xmlSecTransform structure to either #xmlSecTransformStatu sOk
* if verification succeeded or #xmlSecTransformStatusFail otherwise. * if verification succeeded or #xmlSecTransformStatusFail otherwise.
* *
* Returns: 0 on success or a negative value otherwise. * Returns: 0 on success or a negative value otherwise.
*/ */
typedef int (*xmlSecTransformVerifyMethod) (xmlSecTrans typedef int (*xmlSecTransformVerifyMethod) (xmlSecTran
formPtr transform, sformPtr transform,
const xmlSe const xmlS
cByte* data, ecByte* data,
xmlSecSize xmlSecSize
dataSize, dataSize,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
/** /**
* xmlSecTransformPushBinMethod: * xmlSecTransformPushBinMethod:
* @transform: the pointer to transform object. * @transform: the pointer to transform object.
* @data: the input binary data, * @data: the input binary data,
* @dataSize: the input data size. * @dataSize: the input data size.
* @final: the flag: if set to 1 then it's the last * @final: the flag: if set to 1 then it's the last
* data chunk. * data chunk.
* @transformCtx: the pointer to transform context object. * @transformCtx: the pointer to transform context object.
* *
* The transform specific method to process data from @data and push * The transform specific method to process data from @data and push
* result to the next transform in the chain. * result to the next transform in the chain.
* *
* Returns: 0 on success or a negative value otherwise. * Returns: 0 on success or a negative value otherwise.
*/ */
typedef int (*xmlSecTransformPushBinMethod) (xmlSecTrans typedef int (*xmlSecTransformPushBinMethod) (xmlSecTran
formPtr transform, sformPtr transform,
const xmlSe const xmlS
cByte* data, ecByte* data,
xmlSecSize xmlSecSize
dataSize, dataSize,
int final, int final,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
/** /**
* xmlSecTransformPopBinMethod: * xmlSecTransformPopBinMethod:
* @transform: the pointer to transform object. * @transform: the pointer to transform object.
* @data: the buffer to store result data. * @data: the buffer to store result data.
* @maxDataSize: the size of the buffer @data. * @maxDataSize: the size of the buffer @data.
* @dataSize: the pointer to returned data size. * @dataSize: the pointer to returned data size.
* @transformCtx: the pointer to transform context object. * @transformCtx: the pointer to transform context object.
* *
* The transform specific method to pop data from previous transform * The transform specific method to pop data from previous transform
* in the chain and return result in the @data buffer. The size of returned * in the chain and return result in the @data buffer. The size of returned
* data is placed in the @dataSize. * data is placed in the @dataSize.
* *
* Returns: 0 on success or a negative value otherwise. * Returns: 0 on success or a negative value otherwise.
*/ */
typedef int (*xmlSecTransformPopBinMethod) (xmlSecTrans typedef int (*xmlSecTransformPopBinMethod) (xmlSecTran
formPtr transform, sformPtr transform,
xmlSecByte* xmlSecByte
data, * data,
xmlSecSize xmlSecSize
maxDataSize, maxDataSize,
xmlSecSize* xmlSecSize
dataSize, * dataSize,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
/** /**
* xmlSecTransformPushXmlMethod: * xmlSecTransformPushXmlMethod:
* @transform: the pointer to transform object. * @transform: the pointer to transform object.
* @nodes: the input nodes. * @nodes: the input nodes.
* @transformCtx: the pointer to transform context object. * @transformCtx: the pointer to transform context object.
* *
* The transform specific method to process @nodes and push result to the n ext * The transform specific method to process @nodes and push result to the n ext
* transform in the chain. * transform in the chain.
* *
* Returns: 0 on success or a negative value otherwise. * Returns: 0 on success or a negative value otherwise.
*/ */
typedef int (*xmlSecTransformPushXmlMethod) (xmlSecTrans typedef int (*xmlSecTransformPushXmlMethod) (xmlSecTran
formPtr transform, sformPtr transform,
xmlSecNodeS xmlSecNode
etPtr nodes, SetPtr nodes,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
/** /**
* xmlSecTransformPopXmlMethod: * xmlSecTransformPopXmlMethod:
* @transform: the pointer to transform object. * @transform: the pointer to transform object.
* @nodes: the pointer to store popinter to result node * @nodes: the pointer to store popinter to result nod
s. es.
* @transformCtx: the pointer to transform context object. * @transformCtx: the pointer to transform context object.
* *
* The transform specific method to pop data from previous transform in the chain, * The transform specific method to pop data from previous transform in the chain,
* process the data and return result in @nodes. * process the data and return result in @nodes.
* *
* Returns: 0 on success or a negative value otherwise. * Returns: 0 on success or a negative value otherwise.
*/ */
typedef int (*xmlSecTransformPopXmlMethod) (xmlSecTrans typedef int (*xmlSecTransformPopXmlMethod) (xmlSecTran
formPtr transform, sformPtr transform,
xmlSecNodeS xmlSecNode
etPtr* nodes, SetPtr* nodes,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
/** /**
* xmlSecTransformExecuteMethod: * xmlSecTransformExecuteMethod:
* @transform: the pointer to transform object. * @transform: the pointer to transform object.
* @last: the flag: if set to 1 then it's the last dat * @last: the flag: if set to 1 then it's the last da
a chunk. ta chunk.
* @transformCtx: the pointer to transform context object. * @transformCtx: the pointer to transform context object.
* *
* Transform specific method to process a chunk of data. * Transform specific method to process a chunk of data.
* *
* Returns: 0 on success or a negative value otherwise. * Returns: 0 on success or a negative value otherwise.
*/ */
typedef int (*xmlSecTransformExecuteMethod) (xmlSecTrans typedef int (*xmlSecTransformExecuteMethod) (xmlSecTran
formPtr transform, sformPtr transform,
int last, int last,
xmlSecTrans xmlSecTran
formCtxPtr transformCtx); sformCtxPtr transformCtx);
/** /**
* xmlSecTransformKlass: * xmlSecTransformKlass:
* @klassSize: the transform klass structure size. * @klassSize: the transform klass structure size.
* @objSize: the transform object size. * @objSize: the transform object size.
* @name: the transform's name. * @name: the transform's name.
* @href: the transform's identification string (href) * @href: the transform's identification string (href
. ).
* @usage: the allowed transforms usages. * @usage: the allowed transforms usages.
* @initialize: the initialization method. * @initialize: the initialization method.
* @finalize: the finmalization (destroy) function. * @finalize: the finmalization (destroy) function.
* @readNode: the XML node read method. * @readNode: the XML node read method.
* @writeNode: the XML node write method. * @writeNode: the XML node write method.
* @setKeyReq: the set key requirements method. * @setKeyReq: the set key requirements method.
* @setKey: the set key method. * @setKey: the set key method.
* @verify: the verify method (for digest and signature * @verify: the verify method (for digest and signature
transforms). transforms).
* @getDataType: the input/output data type query method. * @getDataType: the input/output data type query method.
* @pushBin: the binary data "push thru chain" processing * @pushBin: the binary data "push thru chain" processin
method. g method.
* @popBin: the binary data "pop from chain" procesing m * @popBin: the binary data "pop from chain" procesing
ethod. method.
* @pushXml: the XML data "push thru chain" processing me * @pushXml: the XML data "push thru chain" processing m
thod. ethod.
* @popXml: the XML data "pop from chain" procesing meth * @popXml: the XML data "pop from chain" procesing met
od. hod.
* @execute: the low level data processing method used b * @execute: the low level data processing method used
y default by default
* implementations of @pushBin, @popBin, @pushX * implementations of @pushBin, @popBin, @push
ml and @popXml. Xml and @popXml.
* @reserved0: reserved for the future. * @reserved0: reserved for the future.
* @reserved1: reserved for the future. * @reserved1: reserved for the future.
* *
* The transform klass desccription structure. * The transform klass desccription structure.
*/ */
struct _xmlSecTransformKlass { struct _xmlSecTransformKlass {
/* data */ /* data */
xmlSecSize klassSize; xmlSecSize klassSize;
xmlSecSize objSize; xmlSecSize objSize;
const xmlChar* name; const xmlChar* name;
const xmlChar* href; const xmlChar* href;
xmlSecTransformUsage usage; xmlSecTransformUsage usage;
/* methods */ /* methods */
xmlSecTransformInitializeMethod initialize; xmlSecTransformInitializeMethod initialize;
xmlSecTransformFinalizeMethod finalize; xmlSecTransformFinalizeMethod finalize;
xmlSecTransformNodeReadMethod readNode; xmlSecTransformNodeReadMethod readNode;
xmlSecTransformNodeWriteMethod writeNode; xmlSecTransformNodeWriteMethod writeNode;
xmlSecTransformSetKeyRequirementsMethod setKeyReq; xmlSecTransformSetKeyRequirementsMethod setKeyReq;
xmlSecTransformSetKeyMethod setKey; xmlSecTransformSetKeyMethod setKey;
xmlSecTransformVerifyMethod verify; xmlSecTransformVerifyMethod verify;
xmlSecTransformGetDataTypeMethod getDataType; xmlSecTransformGetDataTypeMethod getDataType;
xmlSecTransformPushBinMethod pushBin; xmlSecTransformPushBinMethod pushBin;
xmlSecTransformPopBinMethod popBin; xmlSecTransformPopBinMethod popBin;
xmlSecTransformPushXmlMethod pushXml; xmlSecTransformPushXmlMethod pushXml;
xmlSecTransformPopXmlMethod popXml; xmlSecTransformPopXmlMethod popXml;
/* low level method */ /* low level method */
xmlSecTransformExecuteMethod execute; xmlSecTransformExecuteMethod execute;
/* reserved for future */ /* reserved for future */
void* reserved0; void* reserved0;
void* reserved1; void* reserved1;
}; };
/** /**
* xmlSecTransformKlassGetName: * xmlSecTransformKlassGetName:
* @klass: the transofrm's klass. * @klass: the transofrm's klass.
* *
* Macro. Returns transform klass name. * Macro. Returns transform klass name.
*/ */
#define xmlSecTransformKlassGetName(klass) \ #define xmlSecTransformKlassGetName(klass) \
(((klass)) ? ((klass)->name) : NULL) (((klass)) ? ((klass)->name) : NULL)
/*********************************************************************** /***********************************************************************
* *
* Transform Ids list * Transform Ids list
* *
**********************************************************************/ **********************************************************************/
/** /**
* xmlSecTransformIdListId: * xmlSecTransformIdListId:
* *
* Transform klasses list klass. * Transform klasses list klass.
*/ */
#define xmlSecTransformIdListId xmlSecTransformIdListGetKlass() #define xmlSecTransformIdListId xmlSecTransformIdListGetKlass()
XMLSEC_EXPORT xmlSecPtrListId xmlSecTransformIdListGetKlass (void); XMLSEC_EXPORT xmlSecPtrListId xmlSecTransformIdListGetKlass (void);
XMLSEC_EXPORT int xmlSecTransformIdListFind (xmlSecPtrLi XMLSEC_EXPORT int xmlSecTransformIdListFind (xmlSecPtrL
stPtr list, istPtr list,
xmlSecTrans xmlSecTran
formId transformId); sformId transformId);
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformIdListFindByHref (xml XMLSEC_EXPORT xmlSecTransformId xmlSecTransformIdListFindByHref (xmlSecPtrL
SecPtrListPtr list, istPtr list,
const xmlCh const xmlC
ar* href, har* href,
xmlSecTrans xmlSecTran
formUsage usage); sformUsage usage);
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformIdListFindByName (xml XMLSEC_EXPORT xmlSecTransformId xmlSecTransformIdListFindByName (xmlSecPtrL
SecPtrListPtr list, istPtr list,
const xmlCh const xmlC
ar* name, har* name,
xmlSecTrans xmlSecTran
formUsage usage); sformUsage usage);
XMLSEC_EXPORT void xmlSecTransformIdListDebugDump (xmlSecPtrLi XMLSEC_EXPORT void xmlSecTransformIdListDebugDump (xmlSecPtrL
stPtr list, istPtr list,
FILE* outpu FILE* outp
t); ut);
XMLSEC_EXPORT void xmlSecTransformIdListDebugXmlDump(xmlSecPtrL XMLSEC_EXPORT void xmlSecTransformIdListDebugXmlDump(xmlSecPtr
istPtr list, ListPtr list,
FILE* outpu FILE* outp
t); ut);
/******************************************************************** /********************************************************************
* *
* XML Sec Library Transform Ids * XML Sec Library Transform Ids
* *
*******************************************************************/ *******************************************************************/
/** /**
* xmlSecTransformIdUnknown: * xmlSecTransformIdUnknown:
* *
* The "unknown" transform id (NULL). * The "unknown" transform id (NULL).
*/ */
#define xmlSecTransformIdUnknown ((xmlSecTransformId) NULL) #define xmlSecTransformIdUnknown ((xmlSecTransformId )NULL)
/** /**
* xmlSecTransformBase64Id: * xmlSecTransformBase64Id:
* *
* The base64 encode transform klass. * The base64 encode transform klass.
*/ */
#define xmlSecTransformBase64Id \ #define xmlSecTransformBase64Id \
xmlSecTransformBase64GetKlass() xmlSecTransformBase64GetKlass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformBase64GetKlass XMLSEC_EXPORT xmlSecTransformId xmlSecTransformBase64GetKlass (vo
(void); id);
XMLSEC_EXPORT void xmlSecTransformBase64SetLineSize (xml XMLSEC_EXPORT void xmlSecTransformBase64SetLineSize (xm
SecTransformPtr transform, lSecTransformPtr transform,
xml xm
SecSize lineSize); lSecSize lineSize);
/** /**
* xmlSecTransformInclC14NId: * xmlSecTransformInclC14NId:
* *
* The regular (inclusive) C14N without comments transform klass. * The regular (inclusive) C14N without comments transform klass.
*/ */
#define xmlSecTransformInclC14NId \ #define xmlSecTransformInclC14NId \
xmlSecTransformInclC14NGetKlass() xmlSecTransformInclC14NGetKlass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformInclC14NGetKlass XMLSEC_EXPORT xmlSecTransformId xmlSecTransformInclC14NGetKlass (vo
(void); id);
/** /**
* xmlSecTransformInclC14NWithCommentsId: * xmlSecTransformInclC14NWithCommentsId:
* *
* The regular (inclusive) C14N with comments transform klass. * The regular (inclusive) C14N with comments transform klass.
*/ */
#define xmlSecTransformInclC14NWithCommentsId \ #define xmlSecTransformInclC14NWithCommentsId \
xmlSecTransformInclC14NWithCommentsGetKlass() xmlSecTransformInclC14NWithCommentsGetKlass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformInclC14NWithCommentsG XMLSEC_EXPORT xmlSecTransformId xmlSecTransformInclC14NWithCommentsGetKlass
etKlass(void); (void);
/** /**
* xmlSecTransformInclC14N11Id: * xmlSecTransformInclC14N11Id:
* *
* The regular (inclusive) C14N 1.1 without comments transform klass. * The regular (inclusive) C14N 1.1 without comments transform klass.
*/ */
#define xmlSecTransformInclC14N11Id \ #define xmlSecTransformInclC14N11Id \
xmlSecTransformInclC14N11GetKlass() xmlSecTransformInclC14N11GetKlass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformInclC14N11GetKlass XMLSEC_EXPORT xmlSecTransformId xmlSecTransformInclC14N11GetKlass (vo
(void); id);
/** /**
* xmlSecTransformInclC14N11WithCommentsId: * xmlSecTransformInclC14N11WithCommentsId:
* *
* The regular (inclusive) C14N 1.1 with comments transform klass. * The regular (inclusive) C14N 1.1 with comments transform klass.
*/ */
#define xmlSecTransformInclC14N11WithCommentsId \ #define xmlSecTransformInclC14N11WithCommentsId \
xmlSecTransformInclC14N11WithCommentsGetKlass() xmlSecTransformInclC14N11WithCommentsGetKlass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformInclC14N11WithComment XMLSEC_EXPORT xmlSecTransformId xmlSecTransformInclC14N11WithCommentsGetKla
sGetKlass(void); ss(void);
/** /**
* xmlSecTransformExclC14NId * xmlSecTransformExclC14NId
* *
* The exclusive C14N without comments transform klass. * The exclusive C14N without comments transform klass.
*/ */
#define xmlSecTransformExclC14NId \ #define xmlSecTransformExclC14NId \
xmlSecTransformExclC14NGetKlass() xmlSecTransformExclC14NGetKlass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformExclC14NGetKlass XMLSEC_EXPORT xmlSecTransformId xmlSecTransformExclC14NGetKlass (vo
(void); id);
/** /**
* xmlSecTransformExclC14NWithCommentsId: * xmlSecTransformExclC14NWithCommentsId:
* *
* The exclusive C14N with comments transform klass. * The exclusive C14N with comments transform klass.
*/ */
#define xmlSecTransformExclC14NWithCommentsId \ #define xmlSecTransformExclC14NWithCommentsId \
xmlSecTransformExclC14NWithCommentsGetKlass() xmlSecTransformExclC14NWithCommentsGetKlass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformExclC14NWithCommentsG XMLSEC_EXPORT xmlSecTransformId xmlSecTransformExclC14NWithCommentsGetKlass
etKlass(void); (void);
/** /**
* xmlSecTransformEnvelopedId: * xmlSecTransformEnvelopedId:
* *
* The "enveloped" transform klass. * The "enveloped" transform klass.
*/ */
#define xmlSecTransformEnvelopedId \ #define xmlSecTransformEnvelopedId \
xmlSecTransformEnvelopedGetKlass() xmlSecTransformEnvelopedGetKlass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformEnvelopedGetKlass XMLSEC_EXPORT xmlSecTransformId xmlSecTransformEnvelopedGetKlass (vo
(void); id);
/** /**
* xmlSecTransformXPathId: * xmlSecTransformXPathId:
* *
* The XPath transform klass. * The XPath transform klass.
*/ */
#define xmlSecTransformXPathId \ #define xmlSecTransformXPathId \
xmlSecTransformXPathGetKlass() xmlSecTransformXPathGetKlass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformXPathGetKlass XMLSEC_EXPORT xmlSecTransformId xmlSecTransformXPathGetKlass (vo
(void); id);
/** /**
* xmlSecTransformXPath2Id: * xmlSecTransformXPath2Id:
* *
* The XPath2 transform klass. * The XPath2 transform klass.
*/ */
#define xmlSecTransformXPath2Id \ #define xmlSecTransformXPath2Id \
xmlSecTransformXPath2GetKlass() xmlSecTransformXPath2GetKlass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformXPath2GetKlass XMLSEC_EXPORT xmlSecTransformId xmlSecTransformXPath2GetKlass (vo
(void); id);
/** /**
* xmlSecTransformXPointerId: * xmlSecTransformXPointerId:
* *
* The XPointer transform klass. * The XPointer transform klass.
*/ */
#define xmlSecTransformXPointerId \ #define xmlSecTransformXPointerId \
xmlSecTransformXPointerGetKlass() xmlSecTransformXPointerGetKlass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformXPointerGetKlass XMLSEC_EXPORT xmlSecTransformId xmlSecTransformXPointerGetKlass (vo
(void); id);
XMLSEC_EXPORT int xmlSecTransformXPointerSetExpr (xml XMLSEC_EXPORT int xmlSecTransformXPointerSetExpr (xm
SecTransformPtr transform, lSecTransformPtr transform,
con co
st xmlChar* expr, nst xmlChar* expr,
xml xm
SecNodeSetType nodeSetType, lSecNodeSetType nodeSetType,
xml xm
NodePtr hereNode); lNodePtr hereNode);
#ifndef XMLSEC_NO_XSLT #ifndef XMLSEC_NO_XSLT
/** /**
* xmlSecTransformXsltId: * xmlSecTransformXsltId:
* *
* The XSLT transform klass. * The XSLT transform klass.
*/ */
#define xmlSecTransformXsltId \ #define xmlSecTransformXsltId \
xmlSecTransformXsltGetKlass() xmlSecTransformXsltGetKlass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformXsltGetKlass XMLSEC_EXPORT xmlSecTransformId xmlSecTransformXsltGetKlass (vo
(void); id);
#endif /* XMLSEC_NO_XSLT */ #endif /* XMLSEC_NO_XSLT */
/** /**
* xmlSecTransformRemoveXmlTagsC14NId: * xmlSecTransformRemoveXmlTagsC14NId:
* *
* The "remove all xml tags" transform klass (used before base64 transforms ). * The "remove all xml tags" transform klass (used before base64 transforms ).
*/ */
#define xmlSecTransformRemoveXmlTagsC14NId \ #define xmlSecTransformRemoveXmlTagsC14NId \
xmlSecTransformRemoveXmlTagsC14NGetKlass() xmlSecTransformRemoveXmlTagsC14NGetKlass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRemoveXmlTagsC14NGetK XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRemoveXmlTagsC14NGetKlass(vo
lass(void); id);
/** /**
* xmlSecTransformVisa3DHackId: * xmlSecTransformVisa3DHackId:
* *
* Selects node subtree by given node id string. The only reason why we nee d this * Selects node subtree by given node id string. The only reason why we nee d this
* is Visa3D protocol. It doesn't follow XML/XPointer/XMLDSig specs and all ows * is Visa3D protocol. It doesn't follow XML/XPointer/XMLDSig specs and all ows
* invalid XPointer expressions in the URI attribute. Since we couldn't eva luate * invalid XPointer expressions in the URI attribute. Since we couldn't eva luate
* such expressions thru XPath/XPointer engine, we need to have this hack h ere. * such expressions thru XPath/XPointer engine, we need to have this hack h ere.
*/ */
#define xmlSecTransformVisa3DHackId \ #define xmlSecTransformVisa3DHackId \
xmlSecTransformVisa3DHackGetKlass() xmlSecTransformVisa3DHackGetKlass()
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformVisa3DHackGetKlass XMLSEC_EXPORT xmlSecTransformId xmlSecTransformVisa3DHackGetKlass (vo
(void); id);
XMLSEC_EXPORT int xmlSecTransformVisa3DHackSetID (xml XMLSEC_EXPORT int xmlSecTransformVisa3DHackSetID (xm
SecTransformPtr transform, lSecTransformPtr transform,
con co
st xmlChar* id); nst xmlChar* id);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XMLSEC_TRANSFORMS_H__ */ #endif /* __XMLSEC_TRANSFORMS_H__ */
 End of changes. 107 change blocks. 
610 lines changed or deleted 613 lines changed or added


 version.h   version.h 
skipping to change at line 24 skipping to change at line 24
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
/** /**
* XMLSEC_VERSION: * XMLSEC_VERSION:
* *
* The library version string in the format * The library version string in the format
* "<major-number>.<minor-number>.<sub-minor-number>". * "<major-number>.<minor-number>.<sub-minor-number>".
*/ */
#define XMLSEC_VERSION "1.2.14" #define XMLSEC_VERSION "1.2.15"
/** /**
* XMLSEC_VERSION_MAJOR: * XMLSEC_VERSION_MAJOR:
* *
* The library major version number. * The library major version number.
*/ */
#define XMLSEC_VERSION_MAJOR 1 #define XMLSEC_VERSION_MAJOR 1
/** /**
* XMLSEC_VERSION_MINOR: * XMLSEC_VERSION_MINOR:
* *
* The library minor version number. * The library minor version number.
*/ */
#define XMLSEC_VERSION_MINOR 2 #define XMLSEC_VERSION_MINOR 2
/** /**
* XMLSEC_VERSION_SUBMINOR: * XMLSEC_VERSION_SUBMINOR:
* *
* The library sub-minor version number. * The library sub-minor version number.
*/ */
#define XMLSEC_VERSION_SUBMINOR 14 #define XMLSEC_VERSION_SUBMINOR 15
/** /**
* XMLSEC_VERSION_INFO: * XMLSEC_VERSION_INFO:
* *
* The library version info string in the format * The library version info string in the format
* "<major-number>+<minor-number>:<sub-minor-number>:<minor-number>". * "<major-number>+<minor-number>:<sub-minor-number>:<minor-number>".
*/ */
#define XMLSEC_VERSION_INFO "3:14:2" #define XMLSEC_VERSION_INFO "3:15:2"
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XMLSEC_VERSION_H__ */ #endif /* __XMLSEC_VERSION_H__ */
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 x509.h   x509.h 
skipping to change at line 32 skipping to change at line 32
#include <xmlsec/xmlsec.h> #include <xmlsec/xmlsec.h>
#include <xmlsec/keys.h> #include <xmlsec/keys.h>
#include <xmlsec/transforms.h> #include <xmlsec/transforms.h>
/** /**
* xmlSecNssKeyDataX509Id: * xmlSecNssKeyDataX509Id:
* *
* The NSS X509 data klass. * The NSS X509 data klass.
*/ */
#define xmlSecNssKeyDataX509Id \ #define xmlSecNssKeyDataX509Id \
xmlSecNssKeyDataX509GetKlass() xmlSecNssKeyDataX509GetKlass()
XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecNssKeyDataX509GetKlass(void); XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecNssKeyDataX509GetKlass(void);
XMLSEC_CRYPTO_EXPORT CERTCertificate* xmlSecNssKeyDataX509GetKeyCert(xmlSe XMLSEC_CRYPTO_EXPORT CERTCertificate* xmlSecNssKeyDataX509GetKeyCert(xmlS
cKeyDataPtr data); ecKeyDataPtr data);
XMLSEC_CRYPTO_EXPORT int xmlSecNssKeyDataX509AdoptKeyCert(xml XMLSEC_CRYPTO_EXPORT int xmlSecNssKeyDataX509AdoptKeyCert(xm
SecKeyDataPtr data, lSecKeyDataPtr data,
CER CE
TCertificate* cert); RTCertificate* cert);
XMLSEC_CRYPTO_EXPORT int xmlSecNssKeyDataX509AdoptCert(xmlSec XMLSEC_CRYPTO_EXPORT int xmlSecNssKeyDataX509AdoptCert(xmlSe
KeyDataPtr data, cKeyDataPtr data,
CER CE
TCertificate* cert); RTCertificate* cert);
XMLSEC_CRYPTO_EXPORT CERTCertificate* xmlSecNssKeyDataX509GetCert (xml XMLSEC_CRYPTO_EXPORT CERTCertificate* xmlSecNssKeyDataX509GetCert (xm
SecKeyDataPtr data, lSecKeyDataPtr data,
xml xm
SecSize pos); lSecSize pos);
XMLSEC_CRYPTO_EXPORT xmlSecSize xmlSecNssKeyDataX509GetCerts XMLSEC_CRYPTO_EXPORT xmlSecSize xmlSecNssKeyDataX509GetCertsSize(xm
Size(xmlSecKeyDataPtr data); lSecKeyDataPtr data);
XMLSEC_CRYPTO_EXPORT int xmlSecNssKeyDataX509AdoptCrl(xmlSecK XMLSEC_CRYPTO_EXPORT int xmlSecNssKeyDataX509AdoptCrl(xmlSec
eyDataPtr data, KeyDataPtr data,
CER CE
TSignedCrl* crl); RTSignedCrl* crl);
XMLSEC_CRYPTO_EXPORT CERTSignedCrl* xmlSecNssKeyDataX509GetCrl (xml XMLSEC_CRYPTO_EXPORT CERTSignedCrl* xmlSecNssKeyDataX509GetCrl (xm
SecKeyDataPtr data, lSecKeyDataPtr data,
xml xm
SecSize pos); lSecSize pos);
XMLSEC_CRYPTO_EXPORT xmlSecSize xmlSecNssKeyDataX509GetCrlsS XMLSEC_CRYPTO_EXPORT xmlSecSize xmlSecNssKeyDataX509GetCrlsSize(xml
ize(xmlSecKeyDataPtr data); SecKeyDataPtr data);
XMLSEC_CRYPTO_EXPORT xmlSecKeyDataPtr xmlSecNssX509CertGetKey (CER XMLSEC_CRYPTO_EXPORT xmlSecKeyDataPtr xmlSecNssX509CertGetKey (CE
TCertificate* cert); RTCertificate* cert);
/** /**
* xmlSecNssKeyDataRawX509CertId: * xmlSecNssKeyDataRawX509CertId:
* *
* The NSS raw X509 certificate klass. * The NSS raw X509 certificate klass.
*/ */
#define xmlSecNssKeyDataRawX509CertId \ #define xmlSecNssKeyDataRawX509CertId \
xmlSecNssKeyDataRawX509CertGetKlass() xmlSecNssKeyDataRawX509CertGetKlass()
XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecNssKeyDataRawX509CertGetKlass( XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecNssKeyDataRawX509CertGetKlass
void); (void);
/** /**
* xmlSecNssX509StoreId: * xmlSecNssX509StoreId:
* *
* The NSS X509 store klass. * The NSS X509 store klass.
*/ */
#define xmlSecNssX509StoreId \ #define xmlSecNssX509StoreId \
xmlSecNssX509StoreGetKlass() xmlSecNssX509StoreGetKlass()
XMLSEC_CRYPTO_EXPORT xmlSecKeyDataStoreId xmlSecNssX509StoreGetKlass(void); XMLSEC_CRYPTO_EXPORT xmlSecKeyDataStoreId xmlSecNssX509StoreGetKlass(void);
XMLSEC_CRYPTO_EXPORT CERTCertificate* xmlSecNssX509StoreFindCert XMLSEC_CRYPTO_EXPORT CERTCertificate* xmlSecNssX509StoreFindCert
(xmlSecKeyDataStorePtr store, (xmlSecKeyDataStorePtr store,
xmlChar *subjectName, xmlChar *subjectName,
xmlChar *issuerName, xmlChar *issuerName,
xmlChar *issuerSerial, xmlChar *issuerSerial,
xmlChar *ski, xmlChar *ski,
xmlSecKeyInfoCtx* keyInfoCtx); xmlSecKeyInfoCtx* keyInfoCtx);
XMLSEC_CRYPTO_EXPORT CERTCertificate* xmlSecNssX509StoreVerify XMLSEC_CRYPTO_EXPORT CERTCertificate* xmlSecNssX509StoreVerify
(xmlSecKeyDataStorePtr store, (xmlSecKeyDataStorePtr store,
CERTCertList* certs, CERTCertList* certs,
xmlSecKeyInfoCtx* keyInfoCtx); xmlSecKeyInfoCtx* keyInfoCtx);
XMLSEC_CRYPTO_EXPORT int xmlSecNssX509StoreAdoptCert XMLSEC_CRYPTO_EXPORT int xmlSecNssX509StoreAdoptCert
(xmlSecKeyDataStorePtr store, (xmlSecKeyDataStorePtr store,
CERTCertificate* cert, CERTCertificate* cert,
xmlSecKeyDataType type); xmlSecKeyDataType type);
#endif /* XMLSEC_NO_X509 */ #endif /* XMLSEC_NO_X509 */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XMLSEC_NSS_X509_H__ */ #endif /* __XMLSEC_NSS_X509_H__ */
 End of changes. 8 change blocks. 
56 lines changed or deleted 56 lines changed or added


 xkms.h   xkms.h 
skipping to change at line 43 skipping to change at line 43
#include <xmlsec/keysmngr.h> #include <xmlsec/keysmngr.h>
#include <xmlsec/keyinfo.h> #include <xmlsec/keyinfo.h>
#include <xmlsec/transforms.h> #include <xmlsec/transforms.h>
#include <xmlsec/xkms.h> #include <xmlsec/xkms.h>
/************************************************************************ /************************************************************************
* *
* XKMS RespondWith Klass * XKMS RespondWith Klass
* *
************************************************************************/ ************************************************************************/
typedef int (*xmlSecXkmsRespondWithNodeReadMethod) (xmlSecXkmsR typedef int (*xmlSecXkmsRespondWithNodeReadMethod) (xmlSecXkms
espondWithId id, RespondWithId id,
xmlSecXkmsS xmlSecXkms
erverCtxPtr ctx, ServerCtxPtr ctx,
xmlNodePtr xmlNodePtr
node); node);
typedef int (*xmlSecXkmsRespondWithNodeWriteMethod) (xmlSecXkmsR typedef int (*xmlSecXkmsRespondWithNodeWriteMethod) (xmlSecXkms
espondWithId id, RespondWithId id,
xmlSecXkmsS xmlSecXkms
erverCtxPtr ctx, ServerCtxPtr ctx,
xmlNodePtr xmlNodePtr
node); node);
struct _xmlSecXkmsRespondWithKlass { struct _xmlSecXkmsRespondWithKlass {
const xmlChar* valueName; const xmlChar* valueName;
const xmlChar* valueNs; const xmlChar* valueNs;
const xmlChar* nodeName; const xmlChar* nodeName;
const xmlChar* nodeNs; const xmlChar* nodeNs;
xmlSecXkmsRespondWithNodeReadMethod readNode; xmlSecXkmsRespondWithNodeReadMethod readNode;
xmlSecXkmsRespondWithNodeWriteMethod writeNode; xmlSecXkmsRespondWithNodeWriteMethod writeNode;
void* reserved1; void* reserved1;
void* reserved2; void* reserved2;
}; };
#define xmlSecXkmsRespondWithKlassGetName(id) \ #define xmlSecXkmsRespondWithKlassGetName(id) \
((((id) != NULL) && ((id)->valueName != NULL)) ? (id)->valueName : N ULL) ((((id) != NULL) && ((id)->valueName != NULL)) ? (id)->valueName : NULL)
/************************************************************************ /************************************************************************
* *
* XKMS ServerRequest Klass * XKMS ServerRequest Klass
* *
************************************************************************/ ************************************************************************/
typedef int (*xmlSecXkmsServerRequestNodeReadMethod) typedef int (*xmlSecXkmsServerRequestNodeReadMethod)
(xmlSecXkmsS (xmlSecXkms
erverRequestId id, ServerRequestId id,
xmlSecXkmsS xmlSecXkms
erverCtxPtr ctx, ServerCtxPtr ctx,
xmlNodePtr xmlNodePtr
node); node);
typedef int (*xmlSecXkmsServerRequestExecuteMethod) typedef int (*xmlSecXkmsServerRequestExecuteMethod)
(xmlSecXkmsS (xmlSecXkms
erverRequestId id, ServerRequestId id,
xmlSecXkmsS xmlSecXkms
erverCtxPtr ctx); ServerCtxPtr ctx);
typedef int (*xmlSecXkmsServerRequestNodeWriteMethod) typedef int (*xmlSecXkmsServerRequestNodeWriteMethod)
(xmlSecXkmsS (xmlSecXkms
erverRequestId id, ServerRequestId id,
xmlSecXkmsS xmlSecXkms
erverCtxPtr ctx, ServerCtxPtr ctx,
xmlNodePtr xmlNodePtr
node); node);
struct _xmlSecXkmsServerRequestKlass { struct _xmlSecXkmsServerRequestKlass {
const xmlChar* name; const xmlChar* name;
const xmlChar* requestNodeName; const xmlChar* requestNodeName;
const xmlChar* requestNodeNs; const xmlChar* requestNodeNs;
const xmlChar* resultNodeName; const xmlChar* resultNodeName;
const xmlChar* resultNodeNs; const xmlChar* resultNodeNs;
xmlSecBitMask flags; xmlSecBitMask flags;
xmlSecXkmsServerRequestNodeReadMethod readNode; xmlSecXkmsServerRequestNodeReadMethod readNode;
xmlSecXkmsServerRequestNodeWriteMethod writeNode; xmlSecXkmsServerRequestNodeWriteMethod writeNode;
xmlSecXkmsServerRequestExecuteMethod execute; xmlSecXkmsServerRequestExecuteMethod execute;
void* reserved1; void* reserved1;
void* reserved2; void* reserved2;
}; };
#define xmlSecXkmsServerRequestKlassGetName(id) \ #define xmlSecXkmsServerRequestKlassGetName(id) \
((((id) != NULL) && ((id)->name != NULL)) ? (id)->name : NULL) ((((id) != NULL) && ((id)->name != NULL)) ? (id)->name : NULL)
/************************************************************************ /************************************************************************
* *
* XKMS ServerRequest Klass flags * XKMS ServerRequest Klass flags
* *
************************************************************************/ ************************************************************************/
/** /**
* XMLSEC_XKMS_SERVER_REQUEST_KLASS_ALLOWED_IN_COUMPOUND: * XMLSEC_XKMS_SERVER_REQUEST_KLASS_ALLOWED_IN_COUMPOUND:
* *
* The server request klass is allowed in xkms:CompoundRequest element. * The server request klass is allowed in xkms:CompoundRequest element.
 End of changes. 11 change blocks. 
52 lines changed or deleted 52 lines changed or added


 xmldsig.h   xmldsig.h 
skipping to change at line 33 skipping to change at line 33
#include <libxml/parser.h> #include <libxml/parser.h>
#include <xmlsec/xmlsec.h> #include <xmlsec/xmlsec.h>
#include <xmlsec/list.h> #include <xmlsec/list.h>
#include <xmlsec/buffer.h> #include <xmlsec/buffer.h>
#include <xmlsec/keys.h> #include <xmlsec/keys.h>
#include <xmlsec/keysmngr.h> #include <xmlsec/keysmngr.h>
#include <xmlsec/keyinfo.h> #include <xmlsec/keyinfo.h>
#include <xmlsec/transforms.h> #include <xmlsec/transforms.h>
typedef struct _xmlSecDSigReferenceCtx xmlSecDSigReferenceCtx, typedef struct _xmlSecDSigReferenceCtx xmlSecDSigReferenceCtx,
*xmlSecDSigReferenceCtxPtr; *xmlSecDSigReferenceCtxPtr;
/** /**
* xmlSecDSigStatus: * xmlSecDSigStatus:
* @xmlSecDSigStatusUnknown: the status is unknow. * @xmlSecDSigStatusUnknown: the status is unknow.
* @xmlSecDSigStatusSucceeded: the processing succeeded. * @xmlSecDSigStatusSucceeded: the processing succeeded.
* @xmlSecDSigStatusInvalid: the processing failed. * @xmlSecDSigStatusInvalid: the processing failed.
* *
* XML Digital signature processing status. * XML Digital signature processing status.
*/ */
typedef enum { typedef enum {
xmlSecDSigStatusUnknown = 0, xmlSecDSigStatusUnknown = 0,
xmlSecDSigStatusSucceeded, xmlSecDSigStatusSucceeded,
xmlSecDSigStatusInvalid xmlSecDSigStatusInvalid
} xmlSecDSigStatus; } xmlSecDSigStatus;
/************************************************************************** /**************************************************************************
* *
* xmlSecDSigCtx * xmlSecDSigCtx
* *
*************************************************************************/ *************************************************************************/
/** /**
* XMLSEC_DSIG_FLAGS_IGNORE_MANIFESTS: * XMLSEC_DSIG_FLAGS_IGNORE_MANIFESTS:
* *
* If this flag is set then <dsig:Manifests/> nodes will not be processed. * If this flag is set then <dsig:Manifests/> nodes will not be processed.
*/ */
#define XMLSEC_DSIG_FLAGS_IGNORE_MANIFESTS 0x00000001 #define XMLSEC_DSIG_FLAGS_IGNORE_MANIFESTS 0x00000001
/** /**
* XMLSEC_DSIG_FLAGS_STORE_SIGNEDINFO_REFERENCES: * XMLSEC_DSIG_FLAGS_STORE_SIGNEDINFO_REFERENCES:
* *
* If this flag is set then pre-digest buffer for <dsig:Reference/> child * If this flag is set then pre-digest buffer for <dsig:Reference/> child
* of <dsig:KeyInfo/> element will be stored in #xmlSecDSigCtx. * of <dsig:KeyInfo/> element will be stored in #xmlSecDSigCtx.
*/ */
#define XMLSEC_DSIG_FLAGS_STORE_SIGNEDINFO_REFERENCES 0x00000002 #define XMLSEC_DSIG_FLAGS_STORE_SIGNEDINFO_REFERENCES 0x00000002
/** /**
* XMLSEC_DSIG_FLAGS_STORE_MANIFEST_REFERENCES: * XMLSEC_DSIG_FLAGS_STORE_MANIFEST_REFERENCES:
* *
* If this flag is set then pre-digest buffer for <dsig:Reference/> child * If this flag is set then pre-digest buffer for <dsig:Reference/> child
* of <dsig:Manifest/> element will be stored in #xmlSecDSigCtx. * of <dsig:Manifest/> element will be stored in #xmlSecDSigCtx.
*/ */
#define XMLSEC_DSIG_FLAGS_STORE_MANIFEST_REFERENCES 0x00000004 #define XMLSEC_DSIG_FLAGS_STORE_MANIFEST_REFERENCES 0x00000004
/** /**
* XMLSEC_DSIG_FLAGS_STORE_SIGNATURE: * XMLSEC_DSIG_FLAGS_STORE_SIGNATURE:
* *
* If this flag is set then pre-signature buffer for <dsig:SignedInfo/> * If this flag is set then pre-signature buffer for <dsig:SignedInfo/>
* element processing will be stored in #xmlSecDSigCtx. * element processing will be stored in #xmlSecDSigCtx.
*/ */
#define XMLSEC_DSIG_FLAGS_STORE_SIGNATURE 0x00000008 #define XMLSEC_DSIG_FLAGS_STORE_SIGNATURE 0x00000008
/** /**
* XMLSEC_DSIG_FLAGS_USE_VISA3D_HACK: * XMLSEC_DSIG_FLAGS_USE_VISA3D_HACK:
* *
* If this flag is set then URI ID references are resolved directly * If this flag is set then URI ID references are resolved directly
* without using XPointers. This allows one to sign/verify Visa3D * without using XPointers. This allows one to sign/verify Visa3D
* documents that don't follow XML, XPointer and XML DSig specifications. * documents that don't follow XML, XPointer and XML DSig specifications.
*/ */
#define XMLSEC_DSIG_FLAGS_USE_VISA3D_HACK 0x00000010 #define XMLSEC_DSIG_FLAGS_USE_VISA3D_HACK 0x00000010
/** /**
* xmlSecDSigCtx: * xmlSecDSigCtx:
* @userData: the pointer to user data (xmlsec and xmlsec- * @userData: the pointer to user data (xmlsec and xmlsec
crypto libraries -crypto libraries
* never touches this). * never touches this).
* @flags: the XML Digital Signature processing flags. * @flags: the XML Digital Signature processing flags.
* @flags2: the XML Digital Signature processing flags. * @flags2: the XML Digital Signature processing flags.
* @keyInfoReadCtx: the reading key context. * @keyInfoReadCtx: the reading key context.
* @keyInfoWriteCtx: the writing key context (not used for signat * @keyInfoWriteCtx: the writing key context (not used for signa
ure verification). ture verification).
* @transformCtx: the <dsig:SignedInfo/> node processing conte * @transformCtx: the <dsig:SignedInfo/> node processing cont
xt. ext.
* @enabledReferenceUris: the URI types allowed for <dsig:Reference/> * @enabledReferenceUris: the URI types allowed for <dsig:Reference/>
node. node.
* @enabledReferenceTransforms: the list of transforms allowed in <d * @enabledReferenceTransforms: the list of transforms allowed in <dsig:Ref
sig:Reference/> node. erence/> node.
* @referencePreExecuteCallback:the callback for <dsig:Reference/> node pro cessing. * @referencePreExecuteCallback:the callback for <dsig:Reference/> node pro cessing.
* @defSignMethodId: the default signing method klass. * @defSignMethodId: the default signing method klass.
* @defC14NMethodId: the default c14n method klass. * @defC14NMethodId: the default c14n method klass.
* @defDigestMethodId: the default digest method klass. * @defDigestMethodId: the default digest method klass.
* @signKey: the signature key; application may set #sign * @signKey: the signature key; application may set #sig
Key nKey
* before calling #xmlSecDSigCtxSign or #xmlSec * before calling #xmlSecDSigCtxSign or #xmlSe
DSigCtxVerify cDSigCtxVerify
* functions. * functions.
* @operation: the operation: sign or verify. * @operation: the operation: sign or verify.
* @result: the pointer to signature (not valid for sign * @result: the pointer to signature (not valid for sig
ature verificaction). nature verificaction).
* @status: the <dsig:Signatuire/> procesisng status. * @status: the <dsig:Signatuire/> procesisng status.
* @signMethod: the pointer to signature transform. * @signMethod: the pointer to signature transform.
* @c14nMethod: the pointer to c14n transform. * @c14nMethod: the pointer to c14n transform.
* @preSignMemBufMethod: the pointer to binary buffer right before si * @preSignMemBufMethod: the pointer to binary buffer right before s
gnature ignature
* (valid only if #XMLSEC_DSIG_FLAGS_STORE_SIGN * (valid only if #XMLSEC_DSIG_FLAGS_STORE_SIG
ATURE flag is set). NATURE flag is set).
* @signValueNode: the pointer to <dsig:SignatureValue/> node. * @signValueNode: the pointer to <dsig:SignatureValue/> node.
* @id: the pointer to Id attribute of <dsig * @id: the pointer to Id attribute of <dsig:Signat
:Signature/> node. ure/> node.
* @signedInfoReferences: the list of references in <dsig:SignedInfo/> * @signedInfoReferences: the list of references in <dsig:SignedInfo/
node. > node.
* @manifestReferences: the list of references in <dsig:Mani * @manifestReferences: the list of references in <dsig:Manifest/>
fest/> nodes. nodes.
* @reserved0: reserved for the future. * @reserved0: reserved for the future.
* @reserved1: reserved for the future. * @reserved1: reserved for the future.
* *
* XML DSig processing context. * XML DSig processing context.
*/ */
struct _xmlSecDSigCtx { struct _xmlSecDSigCtx {
/* these data user can set before performing the operation */ /* these data user can set before performing the operation */
void* userData; void* userData;
unsigned int flags; unsigned int flags;
unsigned int flags2; unsigned int flags2;
xmlSecKeyInfoCtx keyInfoReadCtx; xmlSecKeyInfoCtx keyInfoReadCtx;
xmlSecKeyInfoCtx keyInfoWriteCtx; xmlSecKeyInfoCtx keyInfoWriteCtx;
xmlSecTransformCtx transformCtx; xmlSecTransformCtx transformCtx;
xmlSecTransformUriType enabledReferenceUris; xmlSecTransformUriType enabledReferenceUris;
xmlSecPtrListPtr enabledReferenceTransforms; xmlSecPtrListPtr enabledReferenceTransforms;
xmlSecTransformCtxPreExecuteCallback referencePreExecuteCallback; xmlSecTransformCtxPreExecuteCallback referencePreExecuteCallback;
xmlSecTransformId defSignMethodId; xmlSecTransformId defSignMethodId;
xmlSecTransformId defC14NMethodId; xmlSecTransformId defC14NMethodId;
xmlSecTransformId defDigestMethodId; xmlSecTransformId defDigestMethodId;
/* these data are returned */ /* these data are returned */
xmlSecKeyPtr signKey; xmlSecKeyPtr signKey;
xmlSecTransformOperation operation; xmlSecTransformOperation operation;
xmlSecBufferPtr result; xmlSecBufferPtr result;
xmlSecDSigStatus status; xmlSecDSigStatus status;
xmlSecTransformPtr signMethod; xmlSecTransformPtr signMethod;
xmlSecTransformPtr c14nMethod; xmlSecTransformPtr c14nMethod;
xmlSecTransformPtr preSignMemBufMethod; xmlSecTransformPtr preSignMemBufMethod;
xmlNodePtr signValueNode; xmlNodePtr signValueNode;
xmlChar* id; xmlChar* id;
xmlSecPtrList signedInfoReferences; xmlSecPtrList signedInfoReferences;
xmlSecPtrList manifestReferences; xmlSecPtrList manifestReferences;
/* reserved for future */ /* reserved for future */
void* reserved0; void* reserved0;
void* reserved1; void* reserved1;
}; };
/* constructor/destructor */ /* constructor/destructor */
XMLSEC_EXPORT xmlSecDSigCtxPtr xmlSecDSigCtxCreate (xmlSecKeysM XMLSEC_EXPORT xmlSecDSigCtxPtr xmlSecDSigCtxCreate (xmlSecKeys
ngrPtr keysMngr); MngrPtr keysMngr);
XMLSEC_EXPORT void xmlSecDSigCtxDestroy (xmlSecDSigC XMLSEC_EXPORT void xmlSecDSigCtxDestroy (xmlSecDSig
txPtr dsigCtx); CtxPtr dsigCtx);
XMLSEC_EXPORT int xmlSecDSigCtxInitialize (xmlSecDSigC XMLSEC_EXPORT int xmlSecDSigCtxInitialize (xmlSecDSig
txPtr dsigCtx, CtxPtr dsigCtx,
xmlSecKeysM xmlSecKeys
ngrPtr keysMngr); MngrPtr keysMngr);
XMLSEC_EXPORT void xmlSecDSigCtxFinalize (xmlSecDSigC XMLSEC_EXPORT void xmlSecDSigCtxFinalize (xmlSecDSig
txPtr dsigCtx); CtxPtr dsigCtx);
XMLSEC_EXPORT int xmlSecDSigCtxSign (xmlSecDSigC XMLSEC_EXPORT int xmlSecDSigCtxSign (xmlSecDSig
txPtr dsigCtx, CtxPtr dsigCtx,
xmlNodePtr xmlNodePtr
tmpl); tmpl);
XMLSEC_EXPORT int xmlSecDSigCtxVerify (xmlSecDSigC XMLSEC_EXPORT int xmlSecDSigCtxVerify (xmlSecDSig
txPtr dsigCtx, CtxPtr dsigCtx,
xmlNodePtr xmlNodePtr
node); node);
XMLSEC_EXPORT int xmlSecDSigCtxEnableReferenceTransform(xmlSec XMLSEC_EXPORT int xmlSecDSigCtxEnableReferenceTransform(xmlSe
DSigCtxPtr dsigCtx, cDSigCtxPtr dsigCtx,
xmlSecTransf xmlSecTrans
ormId transformId); formId transformId);
XMLSEC_EXPORT int xmlSecDSigCtxEnableSignatureTransform(xmlSec XMLSEC_EXPORT int xmlSecDSigCtxEnableSignatureTransform(xmlSe
DSigCtxPtr dsigCtx, cDSigCtxPtr dsigCtx,
xmlSecTransf xmlSecTrans
ormId transformId); formId transformId);
XMLSEC_EXPORT xmlSecBufferPtr xmlSecDSigCtxGetPreSignBuffer (xmlSecDSigC XMLSEC_EXPORT xmlSecBufferPtr xmlSecDSigCtxGetPreSignBuffer (xmlSecDSig
txPtr dsigCtx); CtxPtr dsigCtx);
XMLSEC_EXPORT void xmlSecDSigCtxDebugDump (xmlSecDSigC XMLSEC_EXPORT void xmlSecDSigCtxDebugDump (xmlSecDSig
txPtr dsigCtx, CtxPtr dsigCtx,
FILE* outpu FILE* outp
t); ut);
XMLSEC_EXPORT void xmlSecDSigCtxDebugXmlDump (xmlSecDSigC XMLSEC_EXPORT void xmlSecDSigCtxDebugXmlDump (xmlSecDSig
txPtr dsigCtx, CtxPtr dsigCtx,
FILE* outpu FILE* outp
t); ut);
/************************************************************************** /**************************************************************************
* *
* xmlSecDSigReferenceCtx * xmlSecDSigReferenceCtx
* *
*************************************************************************/ *************************************************************************/
/** /**
* xmlSecDSigReferenceOrigin: * xmlSecDSigReferenceOrigin:
* @xmlSecDSigReferenceOriginSignedInfo:reference in <dsig:SignedInfo> node . * @xmlSecDSigReferenceOriginSignedInfo:reference in <dsig:SignedInfo> node .
* @xmlSecDSigReferenceOriginManifest: reference <dsig:Manifest> no de. * @xmlSecDSigReferenceOriginManifest: reference <dsig:Manifest> node.
* *
* The possible <dsig:Reference/> node locations: in the <dsig:SignedInfo/> * The possible <dsig:Reference/> node locations: in the <dsig:SignedInfo/>
* node or in the <dsig:Manifest/> node. * node or in the <dsig:Manifest/> node.
*/ */
typedef enum { typedef enum {
xmlSecDSigReferenceOriginSignedInfo, xmlSecDSigReferenceOriginSignedInfo,
xmlSecDSigReferenceOriginManifest xmlSecDSigReferenceOriginManifest
} xmlSecDSigReferenceOrigin; } xmlSecDSigReferenceOrigin;
/** /**
* xmlSecDSigReferenceCtx: * xmlSecDSigReferenceCtx:
* @userData: the pointer to user data (xmlsec and xmlsec- * @userData: the pointer to user data (xmlsec and xmlsec
crypto libraries -crypto libraries
* never touches this). * never touches this).
* @dsigCtx: the pointer to "parent" <dsig:Signature/> pr * @dsigCtx: the pointer to "parent" <dsig:Signature/> p
ocessing context. rocessing context.
* @origin: the signature origin (<dsig:SignedInfo/> or * @origin: the signature origin (<dsig:SignedInfo/> or
<dsig:Manifest/>). <dsig:Manifest/>).
* @transformCtx: the reference processing transforms context. * @transformCtx: the reference processing transforms context
* @digestMethod: the pointer to digest transform. .
* @result: the pointer to digest result. * @digestMethod: the pointer to digest transform.
* @status: the reference processing status. * @result: the pointer to digest result.
* @preDigestMemBufMethod: the pointer to binary buffer right before di * @status: the reference processing status.
gest * @preDigestMemBufMethod: the pointer to binary buffer right before d
* (valid only if either igest
* #XMLSEC_DSIG_FLAGS_STORE_SIGNEDINFO_REFERENC * (valid only if either
ES or * #XMLSEC_DSIG_FLAGS_STORE_SIGNEDINFO_REFEREN
* #XMLSEC_DSIG_FLAGS_STORE_MANIFEST_REFERENCES CES or
flags are set). * #XMLSEC_DSIG_FLAGS_STORE_MANIFEST_REFERENCE
* @id: the <dsig:Reference/> node ID attrib S flags are set).
ute. * @id: the <dsig:Reference/> node ID attribute.
* @uri: the <dsig:Reference/> node URI attribute. * @uri: the <dsig:Reference/> node URI attribute.
* @type: the <dsig:Reference/> node Type attribute. * @type: the <dsig:Reference/> node Type attribute.
* @reserved0: reserved for the future. * @reserved0: reserved for the future.
* @reserved1: reserved for the future. * @reserved1: reserved for the future.
* *
* The <dsig:Reference/> processing context. * The <dsig:Reference/> processing context.
*/ */
struct _xmlSecDSigReferenceCtx { struct _xmlSecDSigReferenceCtx {
void* userData; void* userData;
xmlSecDSigCtxPtr dsigCtx; xmlSecDSigCtxPtr dsigCtx;
xmlSecDSigReferenceOrigin origin; xmlSecDSigReferenceOrigin origin;
xmlSecTransformCtx transformCtx; xmlSecTransformCtx transformCtx;
xmlSecTransformPtr digestMethod; xmlSecTransformPtr digestMethod;
xmlSecBufferPtr result; xmlSecBufferPtr result;
xmlSecDSigStatus status; xmlSecDSigStatus status;
xmlSecTransformPtr preDigestMemBufMethod; xmlSecTransformPtr preDigestMemBufMethod;
xmlChar* id; xmlChar* id;
xmlChar* uri; xmlChar* uri;
xmlChar* type; xmlChar* type;
/* reserved for future */ /* reserved for future */
void* reserved0; void* reserved0;
void* reserved1; void* reserved1;
}; };
XMLSEC_EXPORT xmlSecDSigReferenceCtxPtr xmlSecDSigReferenceCtxCreate XMLSEC_EXPORT xmlSecDSigReferenceCtxPtr xmlSecDSigReferenceCtxCreate(xmlSec
(xmlSecDSigCtxPtr dsigCtx, DSigCtxPtr dsigCtx,
xmlSecDSigRe xmlSecDSigR
ferenceOrigin origin); eferenceOrigin origin);
XMLSEC_EXPORT void xmlSecDSigReferenceCtxDestroy (xmlSecDSigR XMLSEC_EXPORT void xmlSecDSigReferenceCtxDestroy (xmlSecDSig
eferenceCtxPtr dsigRefCtx); ReferenceCtxPtr dsigRefCtx);
XMLSEC_EXPORT int xmlSecDSigReferenceCtxInitialize(xmlSecDSigR XMLSEC_EXPORT int xmlSecDSigReferenceCtxInitialize(xmlSecDSig
eferenceCtxPtr dsigRefCtx, ReferenceCtxPtr dsigRefCtx,
xmlSecDSigCt xmlSecDSigC
xPtr dsigCtx, txPtr dsigCtx,
xmlSecDSigRe xmlSecDSigR
ferenceOrigin origin); eferenceOrigin origin);
XMLSEC_EXPORT void xmlSecDSigReferenceCtxFinalize (xmlSecDSigR XMLSEC_EXPORT void xmlSecDSigReferenceCtxFinalize (xmlSecDSig
eferenceCtxPtr dsigRefCtx); ReferenceCtxPtr dsigRefCtx);
XMLSEC_EXPORT int xmlSecDSigReferenceCtxProcessNode(xmlSecDSig XMLSEC_EXPORT int xmlSecDSigReferenceCtxProcessNode(xmlSecDSi
ReferenceCtxPtr dsigRefCtx, gReferenceCtxPtr dsigRefCtx,
xmlNodePtr xmlNodePt
node); r node);
XMLSEC_EXPORT xmlSecBufferPtr xmlSecDSigReferenceCtxGetPreDigestBuffer XMLSEC_EXPORT xmlSecBufferPtr xmlSecDSigReferenceCtxGetPreDigestBuffer
(xmlSecDSigR (xmlSecDSig
eferenceCtxPtr dsigRefCtx); ReferenceCtxPtr dsigRefCtx);
XMLSEC_EXPORT void xmlSecDSigReferenceCtxDebugDump (xmlSecDSigR XMLSEC_EXPORT void xmlSecDSigReferenceCtxDebugDump (xmlSecDSig
eferenceCtxPtr dsigRefCtx, ReferenceCtxPtr dsigRefCtx,
FILE* outpu FILE* outp
t); ut);
XMLSEC_EXPORT void xmlSecDSigReferenceCtxDebugXmlDump(xmlSecDSi XMLSEC_EXPORT void xmlSecDSigReferenceCtxDebugXmlDump(xmlSecDS
gReferenceCtxPtr dsigRefCtx, igReferenceCtxPtr dsigRefCtx,
FILE* outpu FILE* outp
t); ut);
/************************************************************************** /**************************************************************************
* *
* xmlSecDSigReferenceCtxListKlass * xmlSecDSigReferenceCtxListKlass
* *
*************************************************************************/ *************************************************************************/
/** /**
* xmlSecDSigReferenceCtxListId: * xmlSecDSigReferenceCtxListId:
* *
* The references list klass. * The references list klass.
*/ */
#define xmlSecDSigReferenceCtxListId \ #define xmlSecDSigReferenceCtxListId \
xmlSecDSigReferenceCtxListGetKlass() xmlSecDSigReferenceCtxListGetKlass()
XMLSEC_EXPORT xmlSecPtrListId xmlSecDSigReferenceCtxListGetKlass(void); XMLSEC_EXPORT xmlSecPtrListId xmlSecDSigReferenceCtxListGetKlass(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* XMLSEC_NO_XMLDSIG */ #endif /* XMLSEC_NO_XMLDSIG */
#endif /* __XMLSEC_XMLDSIG_H__ */ #endif /* __XMLSEC_XMLDSIG_H__ */
 End of changes. 21 change blocks. 
180 lines changed or deleted 180 lines changed or added


 xmlenc.h   xmlenc.h 
skipping to change at line 34 skipping to change at line 34
#include <xmlsec/xmlsec.h> #include <xmlsec/xmlsec.h>
#include <xmlsec/buffer.h> #include <xmlsec/buffer.h>
#include <xmlsec/keys.h> #include <xmlsec/keys.h>
#include <xmlsec/keysmngr.h> #include <xmlsec/keysmngr.h>
#include <xmlsec/keyinfo.h> #include <xmlsec/keyinfo.h>
#include <xmlsec/transforms.h> #include <xmlsec/transforms.h>
/** /**
* xmlEncCtxMode: * xmlEncCtxMode:
* @xmlEncCtxModeEncryptedData: the <enc:EncryptedData/> element pro * @xmlEncCtxModeEncryptedData: the <enc:EncryptedData/> element procesing.
cesing. * @xmlEncCtxModeEncryptedKey: the <enc:EncryptedKey/> element processing.
* @xmlEncCtxModeEncryptedKey: the <enc:EncryptedKey/> element processing.
* *
* The #xmlSecEncCtx mode. * The #xmlSecEncCtx mode.
*/ */
typedef enum { typedef enum {
xmlEncCtxModeEncryptedData = 0, xmlEncCtxModeEncryptedData = 0,
xmlEncCtxModeEncryptedKey xmlEncCtxModeEncryptedKey
} xmlEncCtxMode; } xmlEncCtxMode;
/** /**
* XMLSEC_ENC_RETURN_REPLACED_NODE: * XMLSEC_ENC_RETURN_REPLACED_NODE:
* *
* If this flag is set, then the replaced node will be returned in the repl acedNodeList * If this flag is set, then the replaced node will be returned in the repl acedNodeList
*/ */
#define XMLSEC_ENC_RETURN_REPLACED_NODE 0x00000001 #define XMLSEC_ENC_RETURN_REPLACED_NODE 0x00000001
/** /**
* xmlSecEncCtx: * xmlSecEncCtx:
* @userData: the pointer to user data (xmlsec and xmlsec- * @userData: the pointer to user data (xmlsec and xmlsec
crypto libraries -crypto libraries
* never touches this). * never touches this).
* @flags: the XML Encryption processing flags. * @flags: the XML Encryption processing flags.
* @flags2: the XML Encryption processing flags. * @flags2: the XML Encryption processing flags.
* @mode: the mode. * @mode: the mode.
* @keyInfoReadCtx: the reading key context. * @keyInfoReadCtx: the reading key context.
* @keyInfoWriteCtx: the writing key context (not used for signat * @keyInfoWriteCtx: the writing key context (not used for signa
ure verification). ture verification).
* @transformCtx: the transforms processing context. * @transformCtx: the transforms processing context.
* @defEncMethodId: the default encryption method (used if * @defEncMethodId: the default encryption method (used if
* <enc:EncryptionMethod/> node is not present) * <enc:EncryptionMethod/> node is not present
. ).
* @encKey: the signature key; application may set #encK * @encKey: the signature key; application may set #enc
ey Key
* before calling encryption/decryption functio * before calling encryption/decryption functi
ns. ons.
* @operation: the operation: encrypt or decrypt. * @operation: the operation: encrypt or decrypt.
* @result: the pointer to signature (not valid for sign * @result: the pointer to signature (not valid for sig
ature verificaction). nature verificaction).
* @resultBase64Encoded: the flag: if set then result in #result is b * @resultBase64Encoded: the flag: if set then result in #result is
ase64 encoded. base64 encoded.
* @resultReplaced: the flag: if set then resulted <enc:Encrypte * @resultReplaced: the flag: if set then resulted <enc:Encrypt
dData/> edData/>
* or <enc:EncryptedKey/> node is added to the * or <enc:EncryptedKey/> node is added to the
document. document.
* @encMethod: the pointer to encryption transform. * @encMethod: the pointer to encryption transform.
* @replacedNodeList: the first node of the list of replaced nodes dependin g on the nodeReplacementMode * @replacedNodeList: the first node of the list of replaced nodes dependin g on the nodeReplacementMode
* @id: the ID attribute of <enc:EncryptedDa * @id: the ID attribute of <enc:EncryptedData/>
ta/> * or <enc:EncryptedKey/> node.
* or <enc:EncryptedKey/> node. * @type: the Type attribute of <enc:EncryptedData/>
* @type: the Type attribute of <enc:EncryptedData/> * or <enc:EncryptedKey/> node.
* or <enc:EncryptedKey/> node. * @mimeType: the MimeType attribute of <enc:EncryptedDat
* @mimeType: the MimeType attribute of <enc:EncryptedData a/>
/> * or <enc:EncryptedKey/> node.
* or <enc:EncryptedKey/> node. * @encoding: the Encoding attributeof <enc:EncryptedData
* @encoding: the Encoding attributeof <enc:EncryptedData/ />
> * or <enc:EncryptedKey/> node.
* or <enc:EncryptedKey/> node. * @recipient: the Recipient attribute of <enc:EncryptedKe
* @recipient: the Recipient attribute of <enc:EncryptedKey y/> node..
/> node.. * @carriedKeyName: the CarriedKeyName attribute of <enc:Encryp
* @carriedKeyName: the CarriedKeyName attribute of <enc:Encrypt tedKey/> node.
edKey/> node. * @encDataNode: the pointer to <enc:EncryptedData/>
* @encDataNode: the pointer to <enc:EncryptedData/> * or <enc:EncryptedKey/> node.
* or <enc:EncryptedKey/> node. * @encMethodNode: the pointer to <enc:EncryptionMethod/> node
* @encMethodNode: the pointer to <enc:EncryptionMethod/> node. .
* @keyInfoNode: the pointer to <enc:KeyInfo/> node. * @keyInfoNode: the pointer to <enc:KeyInfo/> node.
* @cipherValueNode: the pointer to <enc:CipherValue/> node. * @cipherValueNode: the pointer to <enc:CipherValue/> node.
* @reserved1: reserved for the future. * @reserved1: reserved for the future.
* *
* XML Encrypiton context. * XML Encrypiton context.
*/ */
struct _xmlSecEncCtx { struct _xmlSecEncCtx {
/* these data user can set before performing the operation */ /* these data user can set before performing the operation */
void* userData; void* userData;
unsigned int flags; unsigned int flags;
unsigned int flags2; unsigned int flags2;
xmlEncCtxMode mode; xmlEncCtxMode mode;
xmlSecKeyInfoCtx keyInfoReadCtx; xmlSecKeyInfoCtx keyInfoReadCtx;
xmlSecKeyInfoCtx keyInfoWriteCtx; xmlSecKeyInfoCtx keyInfoWriteCtx;
xmlSecTransformCtx transformCtx; xmlSecTransformCtx transformCtx;
xmlSecTransformId defEncMethodId; xmlSecTransformId defEncMethodId;
/* these data are returned */ /* these data are returned */
xmlSecKeyPtr encKey; xmlSecKeyPtr encKey;
xmlSecTransformOperation operation; xmlSecTransformOperation operation;
xmlSecBufferPtr result; xmlSecBufferPtr result;
int resultBase64Encoded; int resultBase64Encoded;
int resultReplaced; int resultReplaced;
xmlSecTransformPtr encMethod; xmlSecTransformPtr encMethod;
/* attributes from EncryptedData or EncryptedKey */ /* attributes from EncryptedData or EncryptedKey */
xmlChar* id; xmlChar* id;
xmlChar* type; xmlChar* type;
xmlChar* mimeType; xmlChar* mimeType;
xmlChar* encoding; xmlChar* encoding;
xmlChar* recipient; xmlChar* recipient;
xmlChar* carriedKeyName; xmlChar* carriedKeyName;
/* these are internal data, nobody should change that except us */ /* these are internal data, nobody should change that except us */
xmlNodePtr encDataNode; xmlNodePtr encDataNode;
xmlNodePtr encMethodNode; xmlNodePtr encMethodNode;
xmlNodePtr keyInfoNode; xmlNodePtr keyInfoNode;
xmlNodePtr cipherValueNode; xmlNodePtr cipherValueNode;
xmlNodePtr replacedNodeList; /* the pointer to the repl xmlNodePtr replacedNodeList; /* the pointer to the rep
aced node */ laced node */
void* reserved1; /* reserved for future */ void* reserved1; /* reserved for future */
}; };
XMLSEC_EXPORT xmlSecEncCtxPtr xmlSecEncCtxCreate (xmlSecKeysM XMLSEC_EXPORT xmlSecEncCtxPtr xmlSecEncCtxCreate (xmlSecKeys
ngrPtr keysMngr); MngrPtr keysMngr);
XMLSEC_EXPORT void xmlSecEncCtxDestroy (xmlSecEncCt XMLSEC_EXPORT void xmlSecEncCtxDestroy (xmlSecEncC
xPtr encCtx); txPtr encCtx);
XMLSEC_EXPORT int xmlSecEncCtxInitialize (xmlSecEncCt XMLSEC_EXPORT int xmlSecEncCtxInitialize (xmlSecEncC
xPtr encCtx, txPtr encCtx,
xmlSecKeysM xmlSecKeys
ngrPtr keysMngr); MngrPtr keysMngr);
XMLSEC_EXPORT void xmlSecEncCtxFinalize (xmlSecEncCt XMLSEC_EXPORT void xmlSecEncCtxFinalize (xmlSecEncC
xPtr encCtx); txPtr encCtx);
XMLSEC_EXPORT int xmlSecEncCtxCopyUserPref (xmlSecEncCt XMLSEC_EXPORT int xmlSecEncCtxCopyUserPref (xmlSecEncC
xPtr dst, txPtr dst,
xmlSecEncCt xmlSecEncC
xPtr src); txPtr src);
XMLSEC_EXPORT void xmlSecEncCtxReset (xmlSecEncCt XMLSEC_EXPORT void xmlSecEncCtxReset (xmlSecEncC
xPtr encCtx); txPtr encCtx);
XMLSEC_EXPORT int xmlSecEncCtxBinaryEncrypt (xmlSecEncCt XMLSEC_EXPORT int xmlSecEncCtxBinaryEncrypt (xmlSecEncC
xPtr encCtx, txPtr encCtx,
xmlNodePtr xmlNodePtr
tmpl, tmpl,
const xmlSe const xmlS
cByte* data, ecByte* data,
xmlSecSize xmlSecSize
dataSize); dataSize);
XMLSEC_EXPORT int xmlSecEncCtxXmlEncrypt (xmlSecEncCt XMLSEC_EXPORT int xmlSecEncCtxXmlEncrypt (xmlSecEncC
xPtr encCtx, txPtr encCtx,
xmlNodePtr xmlNodePtr
tmpl, tmpl,
xmlNodePtr xmlNodePtr
node); node);
XMLSEC_EXPORT int xmlSecEncCtxUriEncrypt (xmlSecEncCt XMLSEC_EXPORT int xmlSecEncCtxUriEncrypt (xmlSecEncC
xPtr encCtx, txPtr encCtx,
xmlNodePtr xmlNodePtr
tmpl, tmpl,
const xmlCh const xmlC
ar *uri); har *uri);
XMLSEC_EXPORT int xmlSecEncCtxDecrypt (xmlSecEncCt XMLSEC_EXPORT int xmlSecEncCtxDecrypt (xmlSecEncC
xPtr encCtx, txPtr encCtx,
xmlNodePtr xmlNodePtr
node); node);
XMLSEC_EXPORT xmlSecBufferPtr xmlSecEncCtxDecryptToBuffer (xmlSecEncCt XMLSEC_EXPORT xmlSecBufferPtr xmlSecEncCtxDecryptToBuffer (xmlSecEncC
xPtr encCtx, txPtr encCtx,
xmlNodePtr xmlNodePtr
node ); node );
XMLSEC_EXPORT void xmlSecEncCtxDebugDump (xmlSecEncCt XMLSEC_EXPORT void xmlSecEncCtxDebugDump (xmlSecEncC
xPtr encCtx, txPtr encCtx,
FILE* outpu FILE* outp
t); ut);
XMLSEC_EXPORT void xmlSecEncCtxDebugXmlDump (xmlSecEncCt XMLSEC_EXPORT void xmlSecEncCtxDebugXmlDump (xmlSecEncC
xPtr encCtx, txPtr encCtx,
FILE* outpu FILE* outp
t); ut);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* XMLSEC_NO_XMLENC */ #endif /* XMLSEC_NO_XMLENC */
#endif /* __XMLSEC_XMLENC_H__ */ #endif /* __XMLSEC_XMLENC_H__ */
 End of changes. 10 change blocks. 
131 lines changed or deleted 130 lines changed or added


 xmlsec.h   xmlsec.h 
skipping to change at line 34 skipping to change at line 34
/*********************************************************************** /***********************************************************************
* *
* Basic types to make ports to exotic platforms easier * Basic types to make ports to exotic platforms easier
* *
***********************************************************************/ ***********************************************************************/
/** /**
* xmlSecPtr: * xmlSecPtr:
* *
* Void pointer. * Void pointer.
*/ */
typedef void* xmlSecPtr; typedef void* xmlSecPtr;
/** /**
* xmlSecSize: * xmlSecSize:
* *
* Size of something. Should be typedef instead of define * Size of something. Should be typedef instead of define
* but it will break ABI (todo). * but it will break ABI (todo).
*/ */
#ifdef XMLSEC_NO_SIZE_T #ifdef XMLSEC_NO_SIZE_T
#define xmlSecSize unsigned int #define xmlSecSize unsigned int
#else /* XMLSEC_NO_SIZE_T */ #else /* XMLSEC_NO_SIZE_T */
#define xmlSecSize size_t #define xmlSecSize size_t
#endif /* XMLSEC_NO_SIZE_T */ #endif /* XMLSEC_NO_SIZE_T */
/** /**
* XMLSEC_SIZE_BAD_CAST:
* @val: the value to cast
*
* Bad cast to xmlSecSize
*/
#define XMLSEC_SIZE_BAD_CAST(val) ((xmlSecSize)(val))
/**
* xmlSecByte: * xmlSecByte:
* *
* One byte. Should be typedef instead of define * One byte. Should be typedef instead of define
* but it will break ABI (todo). * but it will break ABI (todo).
*/ */
#define xmlSecByte unsigned char #define xmlSecByte unsigned char
/*********************************************************************** /***********************************************************************
* *
* Forward declarations * Forward declarations
* *
***********************************************************************/ ***********************************************************************/
typedef struct _xmlSecKeyData xmlSecKeyData, *xmlSecKeyDat typedef struct _xmlSecKeyData xmlSecKeyData, *xmlSecKeyDa
aPtr; taPtr;
typedef struct _xmlSecKeyDataStore xmlSecKeyDataStore, *xmlSecK typedef struct _xmlSecKeyDataStore xmlSecKeyDataStore, *xmlSec
eyDataStorePtr; KeyDataStorePtr;
typedef struct _xmlSecKeyInfoCtx xmlSecKeyInfoCtx, *xmlSecKey typedef struct _xmlSecKeyInfoCtx xmlSecKeyInfoCtx, *xmlSecKe
InfoCtxPtr; yInfoCtxPtr;
typedef struct _xmlSecKey xmlSecKey, *xmlSecKeyPtr; typedef struct _xmlSecKey xmlSecKey, *xmlSecKeyPtr;
typedef struct _xmlSecKeyStore xmlSecKeyStore, *xmlSecKeySt typedef struct _xmlSecKeyStore xmlSecKeyStore, *xmlSecKeyS
orePtr; torePtr;
typedef struct _xmlSecKeysMngr xmlSecKeysMngr, *xmlSecKeysM typedef struct _xmlSecKeysMngr xmlSecKeysMngr, *xmlSecKeys
ngrPtr; MngrPtr;
typedef struct _xmlSecTransform xmlSecTransform, *xmlSecTran typedef struct _xmlSecTransform xmlSecTransform, *xmlSecTra
sformPtr; nsformPtr;
typedef struct _xmlSecTransformCtx xmlSecTransformCtx, *xmlSecT typedef struct _xmlSecTransformCtx xmlSecTransformCtx, *xmlSec
ransformCtxPtr; TransformCtxPtr;
#ifndef XMLSEC_NO_XMLDSIG #ifndef XMLSEC_NO_XMLDSIG
typedef struct _xmlSecDSigCtx xmlSecDSigCtx, *xmlSecDSigCt xPtr; typedef struct _xmlSecDSigCtx xmlSecDSigCtx, *xmlSecDSigC txPtr;
#endif /* XMLSEC_NO_XMLDSIG */ #endif /* XMLSEC_NO_XMLDSIG */
#ifndef XMLSEC_NO_XMLENC #ifndef XMLSEC_NO_XMLENC
typedef struct _xmlSecEncCtx xmlSecEncCtx, *xmlSecEncCtxP tr; typedef struct _xmlSecEncCtx xmlSecEncCtx, *xmlSecEncCtx Ptr;
#endif /* XMLSEC_NO_XMLENC */ #endif /* XMLSEC_NO_XMLENC */
#ifndef XMLSEC_NO_XKMS #ifndef XMLSEC_NO_XKMS
typedef struct _xmlSecXkmsServerCtx xmlSecXkmsServerCtx, *xmlSec XkmsServerCtxPtr; typedef struct _xmlSecXkmsServerCtx xmlSecXkmsServerCtx, *xmlSe cXkmsServerCtxPtr;
#endif /* XMLSEC_NO_XKMS */ #endif /* XMLSEC_NO_XKMS */
XMLSEC_EXPORT int xmlSecInit (void); XMLSEC_EXPORT int xmlSecInit (void);
XMLSEC_EXPORT int xmlSecShutdown (void); XMLSEC_EXPORT int xmlSecShutdown (void);
/*********************************************************************** /***********************************************************************
* *
* Version checking * Version checking
* *
***********************************************************************/ ***********************************************************************/
/** /**
* xmlSecCheckVersionExact: * xmlSecCheckVersionExact:
* *
* Macro. Returns 1 if the loaded xmlsec library version exactly matches * Macro. Returns 1 if the loaded xmlsec library version exactly matches
* the one used to compile the caller, 0 if it does not or a negative * the one used to compile the caller, 0 if it does not or a negative
* value if an error occurs. * value if an error occurs.
*/ */
#define xmlSecCheckVersionExact() \ #define xmlSecCheckVersionExact() \
xmlSecCheckVersionExt(XMLSEC_VERSION_MAJOR, XMLSEC_VERSION_MINOR, XMLSE C_VERSION_SUBMINOR, xmlSecCheckVersionExactMatch) xmlSecCheckVersionExt(XMLSEC_VERSION_MAJOR, XMLSEC_VERSION_MINOR, XMLSE C_VERSION_SUBMINOR, xmlSecCheckVersionExactMatch)
/** /**
* xmlSecCheckVersion: * xmlSecCheckVersion:
* *
* Macro. Returns 1 if the loaded xmlsec library version ABI compatible wit h * Macro. Returns 1 if the loaded xmlsec library version ABI compatible wit h
* the one used to compile the caller, 0 if it does not or a negative * the one used to compile the caller, 0 if it does not or a negative
* value if an error occurs. * value if an error occurs.
*/ */
#define xmlSecCheckVersion() \ #define xmlSecCheckVersion() \
xmlSecCheckVersionExt(XMLSEC_VERSION_MAJOR, XMLSEC_VERSION_MINOR, XMLSE C_VERSION_SUBMINOR, xmlSecCheckVersionABICompatible) xmlSecCheckVersionExt(XMLSEC_VERSION_MAJOR, XMLSEC_VERSION_MINOR, XMLSE C_VERSION_SUBMINOR, xmlSecCheckVersionABICompatible)
/** /**
* xmlSecCheckVersionMode: * xmlSecCheckVersionMode:
* @xmlSecCheckVersionExactMatch: the version should match exactly. * @xmlSecCheckVersionExactMatch: the version should match exactly.
* @xmlSecCheckVersionABICompatible: the version should be ABI compatible * @xmlSecCheckVersionABICompatible: the version should be ABI compatibl
. e.
* *
* The xmlsec library version mode. * The xmlsec library version mode.
*/ */
typedef enum { typedef enum {
xmlSecCheckVersionExactMatch = 0, xmlSecCheckVersionExactMatch = 0,
xmlSecCheckVersionABICompatible xmlSecCheckVersionABICompatible
} xmlSecCheckVersionMode; } xmlSecCheckVersionMode;
XMLSEC_EXPORT int xmlSecCheckVersionExt (int major, XMLSEC_EXPORT int xmlSecCheckVersionExt (int major,
int minor, int minor,
int subminor, int subminor,
xmlSecCheckVersionMode mode xmlSecCheckVersionMode mod
); e);
/** /**
* ATTRIBUTE_UNUSED: * ATTRIBUTE_UNUSED:
* *
* Macro used to signal to GCC unused function parameters * Macro used to signal to GCC unused function parameters
*/ */
#ifdef __GNUC__ #ifdef __GNUC__
#ifdef HAVE_ANSIDECL_H #ifdef HAVE_ANSIDECL_H
#include <ansidecl.h> #include <ansidecl.h>
#endif #endif
 End of changes. 14 change blocks. 
34 lines changed or deleted 42 lines changed or added


 xmltree.h   xmltree.h 
skipping to change at line 26 skipping to change at line 26
#endif /* __cplusplus */ #endif /* __cplusplus */
#include <stdio.h> #include <stdio.h>
#include <libxml/tree.h> #include <libxml/tree.h>
#include <libxml/xpath.h> #include <libxml/xpath.h>
#include <xmlsec/xmlsec.h> #include <xmlsec/xmlsec.h>
/** /**
* xmlSecNodeGetName: * xmlSecNodeGetName:
* @node: the pointer to node. * @node: the pointer to node.
* *
* Macro. Returns node's name. * Macro. Returns node's name.
*/ */
#define xmlSecNodeGetName(node) \ #define xmlSecNodeGetName(node) \
(((node)) ? ((const char*)((node)->name)) : NULL) (((node)) ? ((const char*)((node)->name)) : NULL)
XMLSEC_EXPORT const xmlChar* xmlSecGetNodeNsHref (const xmlNodePtr cu XMLSEC_EXPORT const xmlChar* xmlSecGetNodeNsHref (const xmlNodePtr c
r); ur);
XMLSEC_EXPORT int xmlSecCheckNodeName (const xmlNodePtr cu XMLSEC_EXPORT int xmlSecCheckNodeName (const xmlNodePtr c
r, ur,
const xmlChar *name const xmlChar *nam
, e,
const xmlChar *ns); const xmlChar *ns)
XMLSEC_EXPORT xmlNodePtr xmlSecGetNextElementNode(xmlNodePtr cur); ;
XMLSEC_EXPORT xmlNodePtr xmlSecFindChild (const xmlNodePtr pa XMLSEC_EXPORT xmlNodePtr xmlSecGetNextElementNode(xmlNodePtr cur);
rent, XMLSEC_EXPORT xmlNodePtr xmlSecFindChild (const xmlNodePtr p
const xmlChar *name arent,
, const xmlChar *nam
const xmlChar *ns); e,
XMLSEC_EXPORT xmlNodePtr xmlSecFindParent (const xmlNodePtr cu const xmlChar *ns)
r, ;
const xmlChar *name XMLSEC_EXPORT xmlNodePtr xmlSecFindParent (const xmlNodePtr c
, ur,
const xmlChar *ns); const xmlChar *nam
XMLSEC_EXPORT xmlNodePtr xmlSecFindNode (const xmlNodePtr pa e,
rent, const xmlChar *ns)
const xmlChar *name ;
, XMLSEC_EXPORT xmlNodePtr xmlSecFindNode (const xmlNodePtr p
const xmlChar *ns); arent,
XMLSEC_EXPORT xmlNodePtr xmlSecAddChild (xmlNodePtr parent, const xmlChar *nam
const xmlChar *name e,
, const xmlChar *ns)
const xmlChar *ns); ;
XMLSEC_EXPORT xmlNodePtr xmlSecAddChildNode (xmlNodePtr parent, XMLSEC_EXPORT xmlNodePtr xmlSecAddChild (xmlNodePtr parent,
xmlNodePtr child); const xmlChar *nam
XMLSEC_EXPORT xmlNodePtr xmlSecAddNextSibling (xmlNodePtr node, e,
const xmlChar *name const xmlChar *ns)
, ;
const xmlChar *ns); XMLSEC_EXPORT xmlNodePtr xmlSecAddChildNode (xmlNodePtr parent,
XMLSEC_EXPORT xmlNodePtr xmlSecAddPrevSibling (xmlNodePtr node, xmlNodePtr child);
const xmlChar *name XMLSEC_EXPORT xmlNodePtr xmlSecAddNextSibling (xmlNodePtr node,
, const xmlChar *nam
const xmlChar *ns); e,
const xmlChar *ns)
;
XMLSEC_EXPORT xmlNodePtr xmlSecAddPrevSibling (xmlNodePtr node,
const xmlChar *nam
e,
const xmlChar *ns)
;
XMLSEC_EXPORT int xmlSecReplaceNode (xmlNodePtr node, XMLSEC_EXPORT int xmlSecReplaceNode (xmlNodePtr node,
xmlNodePtr newNode) xmlNodePtr newNode
; );
XMLSEC_EXPORT int xmlSecReplaceNodeAndReturn XMLSEC_EXPORT int xmlSecReplaceNodeAndReturn
(xmlNodePtr node, (xmlNodePtr node,
xmlNodePtr newNode, xmlNodePtr newNode
xmlNodePtr* replace ,
d); xmlNodePtr* replac
XMLSEC_EXPORT int xmlSecReplaceContent (xmlNodePtr node, ed);
xmlNodePtr newNode) XMLSEC_EXPORT int xmlSecReplaceContent (xmlNodePtr node,
; xmlNodePtr newNode
XMLSEC_EXPORT int xmlSecReplaceContentAndReturn );
(xmlNodePtr node, XMLSEC_EXPORT int xmlSecReplaceContentAndReturn
xmlNodePtr newNode, (xmlNodePtr node,
xmlNodePtr* replace xmlNodePtr newNode
d); ,
XMLSEC_EXPORT int xmlSecReplaceNodeBuffer (xmlNodePtr node, xmlNodePtr* replac
const xmlSecByte *b ed);
uffer, XMLSEC_EXPORT int xmlSecReplaceNodeBuffer (xmlNodePtr node,
xmlSecSize size); const xmlSecByte *
XMLSEC_EXPORT int xmlSecReplaceNodeBufferAndReturn buffer,
(xmlNodePtr node, xmlSecSize size);
const xmlSecByte *b XMLSEC_EXPORT int xmlSecReplaceNodeBufferAndReturn
uffer, (xmlNodePtr node,
xmlSecSize size, const xmlSecByte *
xmlNodePtr* replace buffer,
d); xmlSecSize size,
XMLSEC_EXPORT int xmlSecNodeEncodeAndSetContent xmlNodePtr* replac
(xmlNodePtr node, ed);
const xmlChar *buff XMLSEC_EXPORT int xmlSecNodeEncodeAndSetContent
er); (xmlNodePtr node,
XMLSEC_EXPORT void xmlSecAddIDs (xmlDocPtr doc, const xmlChar *buf
xmlNodePtr cur, fer);
const xmlChar** ids XMLSEC_EXPORT void xmlSecAddIDs (xmlDocPtr doc,
); xmlNodePtr cur,
XMLSEC_EXPORT int xmlSecGenerateAndAddID (xmlNodePtr node, const xmlChar** id
const xmlChar* attr s);
Name, XMLSEC_EXPORT int xmlSecGenerateAndAddID (xmlNodePtr node,
const xmlChar* pref const xmlChar* att
ix, rName,
xmlSecSize len); const xmlChar* pre
XMLSEC_EXPORT xmlChar* xmlSecGenerateID (const xmlChar* pref fix,
ix, xmlSecSize len);
xmlSecSize len); XMLSEC_EXPORT xmlChar* xmlSecGenerateID (const xmlChar* pre
fix,
xmlSecSize len);
XMLSEC_EXPORT xmlDocPtr xmlSecCreateTree (const xmlCh XMLSEC_EXPORT xmlDocPtr xmlSecCreateTree (const xmlChar* roo
ar* rootNodeName, tNodeName,
const xmlChar* root const xmlChar* roo
NodeNs); tNodeNs);
XMLSEC_EXPORT int xmlSecIsEmptyNode (xmlNodePtr node); XMLSEC_EXPORT int xmlSecIsEmptyNode (xmlNodePtr node);
XMLSEC_EXPORT int xmlSecIsEmptyString (const xmlChar* str) XMLSEC_EXPORT int xmlSecIsEmptyString (const xmlChar* str
; );
XMLSEC_EXPORT xmlChar* xmlSecGetQName (xmlNodePtr node, XMLSEC_EXPORT xmlChar* xmlSecGetQName (xmlNodePtr node,
const xmlChar* href const xmlChar* hre
, f,
const xmlChar* loca const xmlChar* loc
l); al);
XMLSEC_EXPORT int xmlSecPrintXmlString (FILE * fd, XMLSEC_EXPORT int xmlSecPrintXmlString (FILE * fd,
const xmlChar * st r); const xmlChar * st r);
/** /**
* xmlSecIsHex: * xmlSecIsHex:
* @c: the character. * @c: the character.
* *
* Macro. Returns 1 if @c is a hex digit or 0 other wise. * Macro. Returns 1 if @c is a hex digit or 0 other wise.
*/ */
#define xmlSecIsHex(c) \ #define xmlSecIsHex(c) \
(( (('0' <= (c)) && ((c) <= '9')) || \ (( (('0' <= (c)) && ((c) <= '9')) || \
(('a' <= (c)) && ((c) <= 'f')) || \ (('a' <= (c)) && ((c) <= 'f')) || \
(('A' <= (c)) && ((c) <= 'F')) ) ? 1 : 0) (('A' <= (c)) && ((c) <= 'F')) ) ? 1 : 0)
/** /**
* xmlSecGetHex: * xmlSecGetHex:
* @c: the character, * @c: the character,
* *
* Macro. Returns the hex value of the @c. * Macro. Returns the hex value of the @c.
*/ */
#define xmlSecGetHex(c) \ #define xmlSecGetHex(c) \
( (('0' <= (c)) && ((c) <= '9')) ? (c) - '0' : \ ( (('0' <= (c)) && ((c) <= '9')) ? (c) - '0' : \
( (('a' <= (c)) && ((c) <= 'f')) ? (c) - 'a' + 10 : \ ( (('a' <= (c)) && ((c) <= 'f')) ? (c) - 'a' + 10 : \
( (('A' <= (c)) && ((c) <= 'F')) ? (c) - 'A' + 10 : 0 ))) ( (('A' <= (c)) && ((c) <= 'F')) ? (c) - 'A' + 10 : 0 )))
/************************************************************************* /*************************************************************************
* *
* QName <-> Integer mapping * QName <-> Integer mapping
* *
************************************************************************/ ************************************************************************/
/** /**
* xmlSecQName2IntegerInfo: * xmlSecQName2IntegerInfo:
* @qnameHref: the QName href * @qnameHref: the QName href
* @qnameLocalPart: the QName local * @qnameLocalPart: the QName local
* @intValue: the integer value * @intValue: the integer value
* *
* QName <-> Integer conversion definition. * QName <-> Integer conversion definition.
*/ */
typedef struct _xmlSecQName2IntegerInfo xmlSecQName2IntegerInfo, *xm lSecQName2IntegerInfoPtr; typedef struct _xmlSecQName2IntegerInfo xmlSecQName2IntegerInfo, *x mlSecQName2IntegerInfoPtr;
struct _xmlSecQName2IntegerInfo { struct _xmlSecQName2IntegerInfo {
const xmlChar* qnameHref; const xmlChar* qnameHref;
const xmlChar* qnameLocalPart; const xmlChar* qnameLocalPart;
int intValue; int intValue;
}; };
/** /**
* xmlSecQName2IntegerInfoConstPtr: * xmlSecQName2IntegerInfoConstPtr:
* *
* Pointer to constant QName <-> Integer conversion definition. * Pointer to constant QName <-> Integer conversion definition.
*/ */
typedef const xmlSecQName2IntegerInfo * xmlSecQName2IntegerI nfoConstPtr; typedef const xmlSecQName2IntegerInfo * xmlSecQName2IntegerInfoCons tPtr;
XMLSEC_EXPORT xmlSecQName2IntegerInfoConstPtr xmlSecQName2IntegerGetInfo XMLSEC_EXPORT xmlSecQName2IntegerInfoConstPtr xmlSecQName2IntegerGetInfo
(xmlSecQName (xmlSecQNam
2IntegerInfoConstPtr info, e2IntegerInfoConstPtr info,
int intValu int intVal
e); ue);
XMLSEC_EXPORT int xmlSecQName2IntegerGetInteger (xmlSecQName XMLSEC_EXPORT int xmlSecQName2IntegerGetInteger (xmlSecQNam
2IntegerInfoConstPtr info, e2IntegerInfoConstPtr info,
const xmlCh const xmlC
ar* qnameHref, har* qnameHref,
const xmlCh const xmlC
ar* qnameLocalPart, har* qnameLocalPart,
int* intVal int* intVa
ue); lue);
XMLSEC_EXPORT int xmlSecQName2IntegerGetIntegerFromString XMLSEC_EXPORT int xmlSecQName2IntegerGetIntegerFromString
(xmlSecQName (xmlSecQNam
2IntegerInfoConstPtr info, e2IntegerInfoConstPtr info,
xmlNodePtr xmlNodePtr
node, node,
const xmlCh const xmlC
ar* qname, har* qname,
int* intVal int* intVa
ue); lue);
XMLSEC_EXPORT xmlChar* xmlSecQName2IntegerGetStringFromInte XMLSEC_EXPORT xmlChar* xmlSecQName2IntegerGetStringFromInteger
ger (xmlSecQNam
(xmlSecQName e2IntegerInfoConstPtr info,
2IntegerInfoConstPtr info, xmlNodePtr
xmlNodePtr node,
node, int intVal
int intValu ue);
e); XMLSEC_EXPORT int xmlSecQName2IntegerNodeRead (xmlSecQNam
XMLSEC_EXPORT int xmlSecQName2IntegerNodeRead (xmlSecQName e2IntegerInfoConstPtr info,
2IntegerInfoConstPtr info, xmlNodePtr
xmlNodePtr node,
node, int* intVa
int* intVal lue);
ue); XMLSEC_EXPORT int xmlSecQName2IntegerNodeWrite (xmlSecQNam
XMLSEC_EXPORT int xmlSecQName2IntegerNodeWrite (xmlSecQName e2IntegerInfoConstPtr info,
2IntegerInfoConstPtr info, xmlNodePtr
xmlNodePtr node,
node, const xmlC
const xmlCh har* nodeName,
ar* nodeName, const xmlC
const xmlCh har* nodeNs,
ar* nodeNs, int intVal
int intValu ue);
e); XMLSEC_EXPORT int xmlSecQName2IntegerAttributeRead(xmlSecQNam
XMLSEC_EXPORT int xmlSecQName2IntegerAttributeRead(xmlSecQName e2IntegerInfoConstPtr info,
2IntegerInfoConstPtr info, xmlNodePtr
xmlNodePtr node,
node, const xmlC
const xmlCh har* attrName,
ar* attrName, int* intVa
int* intVal lue);
ue); XMLSEC_EXPORT int xmlSecQName2IntegerAttributeWrite(xmlSecQNa
XMLSEC_EXPORT int xmlSecQName2IntegerAttributeWrite(xmlSecQNam me2IntegerInfoConstPtr info,
e2IntegerInfoConstPtr info, xmlNodePtr
xmlNodePtr node,
node, const xmlC
const xmlCh har* attrName,
ar* attrName, int intVal
int intValu ue);
e); XMLSEC_EXPORT void xmlSecQName2IntegerDebugDump (xmlSecQNam
XMLSEC_EXPORT void xmlSecQName2IntegerDebugDump (xmlSecQName e2IntegerInfoConstPtr info,
2IntegerInfoConstPtr info, int intVal
int intValu ue,
e, const xmlC
const xmlCh har* name,
ar* name, FILE* outp
FILE* outpu ut);
t); XMLSEC_EXPORT void xmlSecQName2IntegerDebugXmlDump(xmlSecQName
XMLSEC_EXPORT void xmlSecQName2IntegerDebugXmlDump(xmlSecQName2 2IntegerInfoConstPtr info,
IntegerInfoConstPtr info, int intVal
int intValu ue,
e, const xmlC
const xmlCh har* name,
ar* name, FILE* outp
FILE* outpu ut);
t);
/************************************************************************* /*************************************************************************
* *
* QName <-> Bitmask mapping * QName <-> Bitmask mapping
* *
************************************************************************/ ************************************************************************/
/** /**
* xmlSecBitMask: * xmlSecBitMask:
* *
* Bitmask datatype. * Bitmask datatype.
*/ */
typedef unsigned int xmlSecBitMask; typedef unsigned int xmlSecBitMask;
/** /**
* xmlSecQName2BitMaskInfo: * xmlSecQName2BitMaskInfo:
* @qnameHref: the QName href * @qnameHref: the QName href
* @qnameLocalPart: the QName local * @qnameLocalPart: the QName local
* @mask: the bitmask value * @mask: the bitmask value
* *
* QName <-> Bitmask conversion definition. * QName <-> Bitmask conversion definition.
*/ */
typedef struct _xmlSecQName2BitMaskInfo xmlSecQName2BitMaskInfo, *xm lSecQName2BitMaskInfoPtr; typedef struct _xmlSecQName2BitMaskInfo xmlSecQName2BitMaskInfo, *x mlSecQName2BitMaskInfoPtr;
struct _xmlSecQName2BitMaskInfo { struct _xmlSecQName2BitMaskInfo {
const xmlChar* qnameHref; const xmlChar* qnameHref;
const xmlChar* qnameLocalPart; const xmlChar* qnameLocalPart;
xmlSecBitMask mask; xmlSecBitMask mask;
}; };
/** /**
* xmlSecQName2BitMaskInfoConstPtr: * xmlSecQName2BitMaskInfoConstPtr:
* *
* Pointer to constant QName <-> Bitmask conversion definition. * Pointer to constant QName <-> Bitmask conversion definition.
*/ */
typedef const xmlSecQName2BitMaskInfo* xmlSecQName2BitMaskInfoConst Ptr; typedef const xmlSecQName2BitMaskInfo* xmlSecQName2BitMaskInfoCons tPtr;
XMLSEC_EXPORT xmlSecQName2BitMaskInfoConstPtr xmlSecQName2BitMaskGetInfo XMLSEC_EXPORT xmlSecQName2BitMaskInfoConstPtr xmlSecQName2BitMaskGetInfo
(xmlSecQName (xmlSecQNam
2BitMaskInfoConstPtr info, e2BitMaskInfoConstPtr info,
xmlSecBitMa xmlSecBitM
sk mask); ask mask);
XMLSEC_EXPORT int xmlSecQName2BitMaskGetBitMask (xmlSecQName XMLSEC_EXPORT int xmlSecQName2BitMaskGetBitMask (xmlSecQNam
2BitMaskInfoConstPtr info, e2BitMaskInfoConstPtr info,
const xmlCh const xmlC
ar* qnameLocalPart, har* qnameLocalPart,
const xmlCh const xmlC
ar* qnameHref, har* qnameHref,
xmlSecBitMa xmlSecBitM
sk* mask); ask* mask);
XMLSEC_EXPORT int xmlSecQName2BitMaskNodesRead (xmlSecQName XMLSEC_EXPORT int xmlSecQName2BitMaskNodesRead (xmlSecQNam
2BitMaskInfoConstPtr info, e2BitMaskInfoConstPtr info,
xmlNodePtr* xmlNodePtr
node, * node,
const xmlCh const xmlC
ar* nodeName, har* nodeName,
const xmlCh const xmlC
ar* nodeNs, har* nodeNs,
int stopOnU int stopOn
nknown, Unknown,
xmlSecBitMa xmlSecBitM
sk* mask); ask* mask);
XMLSEC_EXPORT int xmlSecQName2BitMaskGetBitMaskFromString XMLSEC_EXPORT int xmlSecQName2BitMaskGetBitMaskFromString
(xmlSecQName (xmlSecQNam
2BitMaskInfoConstPtr info, e2BitMaskInfoConstPtr info,
xmlNodePtr xmlNodePtr
node, node,
const xmlCh const xmlC
ar* qname, har* qname,
xmlSecBitMa xmlSecBitM
sk* mask); ask* mask);
XMLSEC_EXPORT xmlChar* xmlSecQName2BitMaskGetStringFromBitM XMLSEC_EXPORT xmlChar* xmlSecQName2BitMaskGetStringFromBitMask
ask (xmlSecQNam
(xmlSecQName e2BitMaskInfoConstPtr info,
2BitMaskInfoConstPtr info, xmlNodePtr
xmlNodePtr node,
node, xmlSecBitM
xmlSecBitMa ask mask);
sk mask); XMLSEC_EXPORT int xmlSecQName2BitMaskNodesWrite (xmlSecQNam
XMLSEC_EXPORT int xmlSecQName2BitMaskNodesWrite (xmlSecQName e2BitMaskInfoConstPtr info,
2BitMaskInfoConstPtr info, xmlNodePtr
xmlNodePtr node,
node, const xmlC
const xmlCh har* nodeName,
ar* nodeName, const xmlC
const xmlCh har* nodeNs,
ar* nodeNs, xmlSecBitM
xmlSecBitMa ask mask);
sk mask); XMLSEC_EXPORT void xmlSecQName2BitMaskDebugDump (xmlSecQNam
XMLSEC_EXPORT void xmlSecQName2BitMaskDebugDump (xmlSecQName e2BitMaskInfoConstPtr info,
2BitMaskInfoConstPtr info, xmlSecBitM
xmlSecBitMa ask mask,
sk mask, const xmlC
const xmlCh har* name,
ar* name, FILE* outp
FILE* outpu ut);
t); XMLSEC_EXPORT void xmlSecQName2BitMaskDebugXmlDump(xmlSecQName
XMLSEC_EXPORT void xmlSecQName2BitMaskDebugXmlDump(xmlSecQName2 2BitMaskInfoConstPtr info,
BitMaskInfoConstPtr info, xmlSecBitM
xmlSecBitMa ask mask,
sk mask, const xmlC
const xmlCh har* name,
ar* name, FILE* outp
FILE* outpu ut);
t);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XMLSEC_TREE_H__ */ #endif /* __XMLSEC_TREE_H__ */
 End of changes. 16 change blocks. 
252 lines changed or deleted 259 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/