| 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 | |
|
| 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 | |
|
| 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 | |
|
| 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 | |
|
| 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 | |
|
| 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 | |
|
| 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 | |
|
| 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 | |
|