From bbbe2212ab41c01fe309081dccb523af5b32a110 Mon Sep 17 00:00:00 2001 From: "sangwan.kwon" Date: Fri, 30 Sep 2016 17:07:22 +0900 Subject: Add xmlSecProxyCtx and refactor custumized code [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 --- include/xmlsec/xmldsig.h | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) (limited to 'include') 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 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 -- cgit v1.2.3