Hello,

The reason for this failure is the fact
that "p" does not get info about
Additional Authentication Data length ("al")
in src/jose/apr_jwe.c for big endian.

Patch that fixes this issue is attached.
This patch should enable build of libapache2-mod-auth-openidc
on big endian architectures.
I successfully built it on mips (BE).
Could you please consider including this patch?


I had already forwarded it upstream:
https://github.com/pingidentity/mod_auth_openidc/pull/21


Best Regards,
Dejan
diff -uNr libapache2-mod-auth-openidc-1.5.3.orig/src/jose/apr_jwe.c libapache2-mod-auth-openidc-1.5.3/src/jose/apr_jwe.c
--- libapache2-mod-auth-openidc-1.5.3.orig/src/jose/apr_jwe.c	2014-07-20 17:11:41.000000000 +0000
+++ libapache2-mod-auth-openidc-1.5.3/src/jose/apr_jwe.c	2014-08-05 07:50:49.000000000 +0000
@@ -371,6 +371,8 @@
 		// little endian machine: reverse AAD length for big endian representation
 		for (i=0; i < sizeof(int64_t); ++i) p[sizeof(uint64_t)-1-i] = src[i];
 	}
+	else
+		memcpy(p, &al, sizeof(uint64_t));
 
 //	uint64_t big_endian = htobe64(al);
 //	memcpy(p, &big_endian, sizeof(int64_t));

Reply via email to