diff options
author | sangwan.kwon <sangwan.kwon@samsung.com> | 2016-09-30 17:07:22 +0900 |
---|---|---|
committer | sangwan.kwon <sangwan.kwon@samsung.com> | 2016-10-05 11:18:00 +0900 |
commit | bbbe2212ab41c01fe309081dccb523af5b32a110 (patch) | |
tree | 6860ed4916f332dc428059cd6e77a8908ab7c4a5 /include | |
parent | 90944743dfa83b3d0db90cc18c3f75ec822b0850 (diff) | |
download | xmlsec1-bbbe2212ab41c01fe309081dccb523af5b32a110.tar.gz xmlsec1-bbbe2212ab41c01fe309081dccb523af5b32a110.tar.bz2 xmlsec1-bbbe2212ab41c01fe309081dccb523af5b32a110.zip |
Add xmlSecProxyCtx and refactor custumized codesubmit/tizen/20161010.015747accepted/tizen/wearable/20161011.233857accepted/tizen/tv/20161011.233902accepted/tizen/mobile/20161011.233843accepted/tizen/ivi/20161011.233908accepted/tizen/common/20161010.145725
[Problem]
* PARTIAL-MODE bug : validator doesn't work proper.
* Too many legacy code exist for just passing uri list.
[Solution]
* Add custum xmlSecProxyCtx for supporting PARTIAL-MODE.
* Add XMLSEC_DSIG_FLAGS_IGNORE_REFERENCES for supporting NO-HASH.
* Add XMLSEC_DSIG_FLAGS_CHECK_PROXY for supporting PARTIAL-MODE.
* Remove legacy codes.
Change-Id: I889047d2358476123a0be7fc7138b75371c47533
Signed-off-by: sangwan.kwon <sangwan.kwon@samsung.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/xmlsec/xmldsig.h | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/include/xmlsec/xmldsig.h b/include/xmlsec/xmldsig.h index 5a375985..886bba98 100644 --- a/include/xmlsec/xmldsig.h +++ b/include/xmlsec/xmldsig.h @@ -94,6 +94,33 @@ typedef enum { */ #define XMLSEC_DSIG_FLAGS_USE_VISA3D_HACK 0x00000010 +/** TIZEN CUSTUMIZED + * XMLSEC_DSIG_FLAGS_IGNORE_REFERENCES: + * + * If this flag is set then <dsig:Reference/> nodes will not be processed. + */ +#define XMLSEC_DSIG_FLAGS_IGNORE_REFERENCES 0x00000020 + +/** TIZEN CUSTUMIZED + * XMLSEC_DSIG_FLAGS_CHECK_PROXY: + * + * If this flag is set then xmlSecProxyCtx will be processed. + */ +#define XMLSEC_DSIG_FLAGS_CHECK_PROXY 0x00000040 + +/** TIZEN CUSTUMIZED + * @cache: the cache include reference uri for supporting partial mode. + * cache represented uri will be check on processing references. + * @next: the pointer to indicate linked node (xmlSecProxyCtx). + */ +struct _xmlSecProxyCtx { + xmlChar* cache; + struct _xmlSecProxyCtx* next; +}; + +typedef struct _xmlSecProxyCtx xmlSecProxyCtx, + *xmlSecProxyCtxPtr; + /** * xmlSecDSigCtx: * @userData: the pointer to user data (xmlsec and xmlsec-crypto libraries @@ -143,6 +170,9 @@ struct _xmlSecDSigCtx { xmlSecTransformId defC14NMethodId; xmlSecTransformId defDigestMethodId; + /* TIZEN CUTUMIZED: these data user can set before performing the operation */ + xmlSecProxyCtxPtr proxyCtxPtr; + /* these data are returned */ xmlSecKeyPtr signKey; xmlSecTransformOperation operation; @@ -181,6 +211,10 @@ XMLSEC_EXPORT void xmlSecDSigCtxDebugDump (xmlSecDSigCtxPt XMLSEC_EXPORT void xmlSecDSigCtxDebugXmlDump (xmlSecDSigCtxPtr dsigCtx, FILE* output); +/* TIZEN CUSTUMIZED: xmlSecProxyCtx operator */ +XMLSEC_EXPORT int xmlSecProxyCtxAdd (xmlSecProxyCtxPtr* proxyCtxPtrPtr, + const xmlChar* uri); +XMLSEC_EXPORT void xmlSecProxyCtxDestroy (xmlSecProxyCtxPtr proxyCtxPtr); /************************************************************************** * @@ -257,11 +291,6 @@ XMLSEC_EXPORT void xmlSecDSigReferenceCtxDebugDump (xmlSecDSigRefer XMLSEC_EXPORT void xmlSecDSigReferenceCtxDebugXmlDump(xmlSecDSigReferenceCtxPtr dsigRefCtx, FILE* output); -XMLSEC_EXPORT int xmlSecDSigCtxVerifyEx(xmlSecDSigCtxPtr dsigCtx, - xmlNodePtr node, int noHash, void* pList); - - - /************************************************************************** * * xmlSecDSigReferenceCtxListKlass |