Fri Sep 28 11:59:19 2012 UTC ()
add patches for libxml2>=2.9.0, new buffer structure.


(obache)
diff -r1.10 -r1.11 pkgsrc/security/lasso/distinfo
diff -r1.1 -r1.2 pkgsrc/security/lasso/patches/patch-lasso-xml-tools.c
diff -r0 -r1.1 pkgsrc/security/lasso/patches/patch-lasso_id-ff_lecp.c
diff -r0 -r1.1 pkgsrc/security/lasso/patches/patch-lasso_id-ff_session.c
diff -r0 -r1.1 pkgsrc/security/lasso/patches/patch-lasso_saml-2.0_ecp.c

cvs diff -r1.10 -r1.11 pkgsrc/security/lasso/distinfo (expand / switch to unified diff)

--- pkgsrc/security/lasso/distinfo 2012/05/06 17:14:58 1.10
+++ pkgsrc/security/lasso/distinfo 2012/09/28 11:59:18 1.11
@@ -1,9 +1,12 @@ @@ -1,9 +1,12 @@
1$NetBSD: distinfo,v 1.10 2012/05/06 17:14:58 dholland Exp $ 1$NetBSD: distinfo,v 1.11 2012/09/28 11:59:18 obache Exp $
2 2
3SHA1 (lasso-2.3.5.tar.gz) = 3ba022e85a2d05cd00e45d41f8f59a94b71b75b0 3SHA1 (lasso-2.3.5.tar.gz) = 3ba022e85a2d05cd00e45d41f8f59a94b71b75b0
4RMD160 (lasso-2.3.5.tar.gz) = 24660682b34c38a556b9ea902066cc9b0f74e9a7 4RMD160 (lasso-2.3.5.tar.gz) = 24660682b34c38a556b9ea902066cc9b0f74e9a7
5Size (lasso-2.3.5.tar.gz) = 3907467 bytes 5Size (lasso-2.3.5.tar.gz) = 3907467 bytes
6SHA1 (patch-lasso-errors_c) = 5c0fe304cd9cce6d926362c248ffe60c2c7357c5 6SHA1 (patch-lasso-errors_c) = 5c0fe304cd9cce6d926362c248ffe60c2c7357c5
7SHA1 (patch-lasso-errors_c_in) = d4663edb280d38a0cb1a422d9b95b1d344012f63 7SHA1 (patch-lasso-errors_c_in) = d4663edb280d38a0cb1a422d9b95b1d344012f63
8SHA1 (patch-lasso-id-ff-provider.c) = 9312c67a8e81eeea95b888745a2b9f504a36a36f 8SHA1 (patch-lasso-id-ff-provider.c) = 9312c67a8e81eeea95b888745a2b9f504a36a36f
9SHA1 (patch-lasso-xml-tools.c) = bd45a4ad4d492c0599665371cc413ef49064b54b 9SHA1 (patch-lasso-xml-tools.c) = 1cbc77b8fb9e6a4ecf0c1fe5017cca2782f343e4
 10SHA1 (patch-lasso_id-ff_lecp.c) = c19d443664e6a68f37573d54add51998ffa2622b
 11SHA1 (patch-lasso_id-ff_session.c) = 9fd9c5f413e96f24658c897e9ac10b5c6df253bd
 12SHA1 (patch-lasso_saml-2.0_ecp.c) = 135f10c1d8b146963f0ccaa74ab5b871317b3111

cvs diff -r1.1 -r1.2 pkgsrc/security/lasso/patches/Attic/patch-lasso-xml-tools.c (expand / switch to unified diff)

--- pkgsrc/security/lasso/patches/Attic/patch-lasso-xml-tools.c 2011/09/08 00:17:03 1.1
+++ pkgsrc/security/lasso/patches/Attic/patch-lasso-xml-tools.c 2012/09/28 11:59:18 1.2
@@ -1,25 +1,37 @@ @@ -1,25 +1,37 @@
1$NetBSD: patch-lasso-xml-tools.c,v 1.1 2011/09/08 00:17:03 joerg Exp $ 1$NetBSD: patch-lasso-xml-tools.c,v 1.2 2012/09/28 11:59:18 obache Exp $
2 2
3--- lasso/xml/tools.c.orig 2011-09-07 03:18:42.000000000 +0000 3* XXX
 4* for libxml>=2.9.0
 5
 6--- lasso/xml/tools.c.orig 2011-01-05 13:57:32.000000000 +0000
4+++ lasso/xml/tools.c 7+++ lasso/xml/tools.c
5@@ -27,6 +27,7 @@ 8@@ -27,6 +27,7 @@
6 /* permit importation of timegm for glibc2, wait for people to complain it does not work on their 9 /* permit importation of timegm for glibc2, wait for people to complain it does not work on their
7 * system. */ 10 * system. */
8 #define _BSD_SOURCE 11 #define _BSD_SOURCE
9+#define _NETBSD_SOURCE 12+#define _NETBSD_SOURCE
10 #include "private.h" 13 #include "private.h"
11 #include <string.h> 14 #include <string.h>
12 #include <time.h> 15 #include <time.h>
 16@@ -1063,7 +1064,7 @@ lasso_node_build_deflated_query(LassoNod
 17 buf = xmlAllocOutputBuffer(handler);
 18 xmlNodeDumpOutput(buf, NULL, xmlnode, 0, 0, "utf-8");
 19 xmlOutputBufferFlush(buf);
 20- buffer = buf->conv ? buf->conv->content : buf->buffer->content;
 21+ buffer = xmlBufferContent(buf->conv ? buf->conv : buf->buffer);
 22
 23 xmlFreeNode(xmlnode);
 24 xmlnode = NULL;
13@@ -1196,6 +1197,11 @@ lasso_concat_url_query(const char *url,  25@@ -1196,6 +1197,11 @@ lasso_concat_url_query(const char *url,
14 * 26 *
15 * Return value: TRUE if no error occurred during evaluation, FALSE otherwise. 27 * Return value: TRUE if no error occurred during evaluation, FALSE otherwise.
16 */ 28 */
17+static void 29+static void
18+structuredErrorFunc (void *userData, xmlErrorPtr error) { 30+structuredErrorFunc (void *userData, xmlErrorPtr error) {
19+ *(int *)userData = error->code; 31+ *(int *)userData = error->code;
20+} 32+}
21+ 33+
22 gboolean 34 gboolean
23 lasso_eval_xpath_expression(xmlXPathContextPtr xpath_ctx, const char *expression, 35 lasso_eval_xpath_expression(xmlXPathContextPtr xpath_ctx, const char *expression,
24 xmlXPathObjectPtr *xpath_object_ptr, int *xpath_error_code) 36 xmlXPathObjectPtr *xpath_object_ptr, int *xpath_error_code)
25@@ -1205,10 +1211,6 @@ lasso_eval_xpath_expression(xmlXPathCont 37@@ -1205,10 +1211,6 @@ lasso_eval_xpath_expression(xmlXPathCont
@@ -31,13 +43,22 @@ $NetBSD: patch-lasso-xml-tools.c,v 1.1 2 @@ -31,13 +43,22 @@ $NetBSD: patch-lasso-xml-tools.c,v 1.1 2
31- } 43- }
32- 44-
33 g_return_val_if_fail(xpath_ctx != NULL && expression != NULL, FALSE); 45 g_return_val_if_fail(xpath_ctx != NULL && expression != NULL, FALSE);
34  46
35 if (xpath_error_code) { /* reset */ 47 if (xpath_error_code) { /* reset */
36@@ -1216,6 +1218,7 @@ lasso_eval_xpath_expression(xmlXPathCont 48@@ -1216,6 +1218,7 @@ lasso_eval_xpath_expression(xmlXPathCont
37 } 49 }
38 oldStructuredErrorFunc = xpath_ctx->error; 50 oldStructuredErrorFunc = xpath_ctx->error;
39 xpath_ctx->error = structuredErrorFunc; 51 xpath_ctx->error = structuredErrorFunc;
40+ xpath_ctx->userData = &errorCode; 52+ xpath_ctx->userData = &errorCode;
41 xpath_object = xmlXPathEvalExpression((xmlChar*)expression, xpath_ctx); 53 xpath_object = xmlXPathEvalExpression((xmlChar*)expression, xpath_ctx);
42 xpath_ctx->error = oldStructuredErrorFunc; 54 xpath_ctx->error = oldStructuredErrorFunc;
43  55
 56@@ -2156,7 +2159,7 @@ lasso_xmlnode_to_string(xmlNode *node, g
 57 buf = xmlAllocOutputBuffer(handler);
 58 xmlNodeDumpOutput(buf, NULL, node, level, format ? 1 : 0, "utf-8");
 59 xmlOutputBufferFlush(buf);
 60- buffer = buf->conv ? buf->conv->content : buf->buffer->content;
 61+ buffer = xmlBufferContent(buf->conv ? buf->conv : buf->buffer);
 62 /* do not mix XML and GLib strings, so we must copy */
 63 str = g_strdup((char*)buffer);
 64 xmlOutputBufferClose(buf);

File Added: pkgsrc/security/lasso/patches/Attic/patch-lasso_id-ff_lecp.c
$NetBSD: patch-lasso_id-ff_lecp.c,v 1.1 2012/09/28 11:59:18 obache Exp $

* for libxml2>=2.9.0

--- lasso/id-ff/lecp.c.orig	2011-01-05 13:57:32.000000000 +0000
+++ lasso/id-ff/lecp.c
@@ -96,7 +96,7 @@ lasso_lecp_build_authn_request_envelope_
 	xmlOutputBufferFlush(buf);
 
 	lasso_assign_string(profile->msg_body,
-			(char*)(buf->conv ? buf->conv->content : buf->buffer->content));
+			(char*)(xmlBufferContent(buf->conv ? buf->conv : buf->buffer)));
 	xmlOutputBufferClose(buf);
 	xmlFreeNode(msg);
 
@@ -342,7 +342,7 @@ lasso_lecp_process_authn_request_envelop
 	xmlNodeDumpOutput(buf, NULL, soap_envelope, 0, 0, "utf-8");
 	xmlOutputBufferFlush(buf);
 	LASSO_PROFILE(lecp)->msg_body = g_strdup( (char*)(
-			buf->conv ? buf->conv->content : buf->buffer->content));
+			buf->conv ? xmlBufferContent(buf->conv) : xmlBufferContent(buf->buffer)));
 	xmlOutputBufferClose(buf);
 	xmlFreeNode(soap_envelope);
 

File Added: pkgsrc/security/lasso/patches/Attic/patch-lasso_id-ff_session.c
$NetBSD: patch-lasso_id-ff_session.c,v 1.1 2012/09/28 11:59:18 obache Exp $

* for libxml2>=2.9.0

--- lasso/id-ff/session.c.orig	2011-01-05 13:57:32.000000000 +0000
+++ lasso/id-ff/session.c
@@ -450,7 +450,7 @@ xmlNode_to_base64(xmlNode *node) {
 		goto cleanup;
 	xmlNodeDumpOutput(buf, NULL, node, 0, 0, "utf-8");
 	xmlOutputBufferFlush(buf);
-	buffer = buf->conv ? buf->conv->content : buf->buffer->content;
+	buffer = xmlBufferContent(buf->conv ? buf->conv : buf->buffer);
 
 	ret = xmlSecBase64Encode(buffer, strlen((char*)buffer), 0);
 

File Added: pkgsrc/security/lasso/patches/Attic/patch-lasso_saml-2.0_ecp.c
$NetBSD: patch-lasso_saml-2.0_ecp.c,v 1.1 2012/09/28 11:59:18 obache Exp $

* for libxml2>=2.9.0

--- lasso/saml-2.0/ecp.c.orig	2011-01-05 13:57:32.000000000 +0000
+++ lasso/saml-2.0/ecp.c
@@ -175,7 +175,7 @@ lasso_ecp_process_authn_request_msg(Lass
 	xmlNodeDumpOutput(buf, NULL, xmlnode, 0, 0, "utf-8");
 	xmlOutputBufferFlush(buf);
 	LASSO_PROFILE(ecp)->msg_body = g_strdup(
-			(char*)(buf->conv ? buf->conv->content : buf->buffer->content));
+			(char*)(xmlBufferContent(buf->conv ? buf->conv : buf->buffer)));
 	xmlOutputBufferClose(buf);
 	lasso_release_doc(doc);
 
@@ -276,7 +276,7 @@ lasso_ecp_process_response_msg(LassoEcp 
 	xmlNodeDumpOutput(buf, NULL, new_envelope, 0, 0, "utf-8");
 	xmlOutputBufferFlush(buf);
 	LASSO_PROFILE(ecp)->msg_body = g_strdup(
-			(char*)(buf->conv ? buf->conv->content : buf->buffer->content));
+			(char*)(xmlBufferContent(buf->conv ? buf->conv : buf->buffer)));
 	xmlOutputBufferClose(buf);
 
 	lasso_release_doc(doc);