diff options
| author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2009-03-27 15:05:31 +0000 |
|---|---|---|
| committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2009-03-27 15:05:31 +0000 |
| commit | c9011fb16b6d03228b7bb53df9712dffa64d2b41 (patch) | |
| tree | 46fa357c2e31231ccef4cc477223fe341500b579 | |
| parent | f6f8ffcd6e0c11bdcfdc52a5e7846c0f27ef85df (diff) | |
| download | lasso-c9011fb16b6d03228b7bb53df9712dffa64d2b41.tar.gz lasso-c9011fb16b6d03228b7bb53df9712dffa64d2b41.tar.xz lasso-c9011fb16b6d03228b7bb53df9712dffa64d2b41.zip | |
Core: replace direct use of xmlSecSoap function by wrapper
* lasso/xml/xml.c:
In lasso_node_init_from_message_with_format remove direct use of
xmlSecSoap* functions because they emit too much warning by lasso
reimplementations.
| -rw-r--r-- | lasso/xml/xml.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/lasso/xml/xml.c b/lasso/xml/xml.c index 90003571..2849cc94 100644 --- a/lasso/xml/xml.c +++ b/lasso/xml/xml.c @@ -40,7 +40,6 @@ #include <xmlsec/xmldsig.h> #include <xmlsec/templates.h> #include <xmlsec/crypto.h> -#include <xmlsec/soap.h> #include <xmlsec/xmlenc.h> #include <lasso/xml/xml.h> @@ -1636,10 +1635,9 @@ lasso_node_init_from_message_with_format(LassoNode *node, const char *message, L /* XML case */ if (any || constraint == LASSO_MESSAGE_FORMAT_XML || + constraint == LASSO_MESSAGE_FORMAT_BASE64 || constraint == LASSO_MESSAGE_FORMAT_SOAP) { if (strchr(msg, '<')) { - gboolean is_soap = FALSE; - doc = lasso_xml_parse_memory(msg, strlen(msg)); if (doc == NULL) { rc = LASSO_MESSAGE_FORMAT_UNKNOWN; @@ -1648,20 +1646,11 @@ lasso_node_init_from_message_with_format(LassoNode *node, const char *message, L root = xmlDocGetRootElement(doc); if (any || constraint == LASSO_MESSAGE_FORMAT_SOAP) { - is_soap = xmlSecSoap11CheckEnvelope(root) || - xmlSecSoap12CheckEnvelope(root); + gboolean is_soap = FALSE; + is_soap = lasso_xml_is_soap(root); if (is_soap) { - xmlNode *body; - - if (xmlSecSoap11CheckEnvelope(root)) { - body = xmlSecSoap11GetBody(root); - } else { - body = xmlSecSoap12GetBody(root); - } - if (body) { - root = xmlSecGetNextElementNode(body->children); - } + root = lasso_xml_get_soap_content(root); } rc = lasso_node_init_from_xml(node, root); if (rc != 0) { @@ -1705,7 +1694,6 @@ cleanup: } } else { lasso_release_doc(doc); - lasso_release_xml_node(root); } return rc; } |
