Compare commits

..

3 Commits

Author SHA1 Message Date
Benjamin Dauvergne ede9aef12e Fix undefined macro in #if conditional (#85339)
gitea/lasso/pipeline/head There was a failure building this commit Details
2024-04-16 11:26:04 +02:00
Benjamin Dauvergne 3768f1bedf xmlsec: re-enable KeyValue nodes when reading KeyInfo descriptors (#85339)
KeyValue has been disabled in libxmlsec >= 1.3.3, as it can be a security
liability in other settings than SAML:

   (xmlsec-core) Disabled KeyValue and DEREncodedKeyValue XML nodes by default. Use the '--enabled-key-data' option for the xmlsec command line utility or update the 'keyInfoCtx->enabledKeyData' parameter if you need to re-enable these nodes (also see question 3.5 in the FAQ).
2024-04-16 11:02:13 +02:00
Benjamin Dauvergne 21c224cfef xmlsec: use XMLSEC_KEYINFO_FLAGS_LAX_KEY_SEARCH when writing encrypted keys (#85339)
For compatibility with libxmlsec1>=1.3.0, as we do not use KeyName to
reference the wrapping key:

  (API breaking change) Changed the key search to strict mode: only keys referenced by KeyInfo are used. To restore the old "lax" mode, set XMLSEC_KEYINFO_FLAGS_LAX_KEY_SEARCH flag on xmlSecKeyInfoCtx or use '--lax-key-search' option for XMLSec command line utility.
2024-04-16 11:02:13 +02:00
3 changed files with 2 additions and 6 deletions

View File

@ -90,7 +90,7 @@ fi
dnl
dnl Check for programs
dnl
CFLAGS="$CFLAGS -Werror=implicit-function-declaration"
CFLAGS="$CFLAGS -Werror=undef -Werror=implicit-function-declaration"
AC_PROG_CC
AM_CFLAGS=""
AC_HEADER_STDC

View File

@ -128,7 +128,7 @@ get_xmlNode(LassoNode *node, gboolean lasso_dump)
lasso_foreach(it, other_session_index) {
xmlNode *child = xmlSecAddChild(xmlnode, BAD_CAST SESSION_INDEX,
BAD_CAST LASSO_SAML2_PROTOCOL_HREF);
#if (XMLSEC_MAJOR > 1) || (XMLSEC_MAJOR == 1 && XMLSEC_MINOR > 2) || (XMLSEC_MAJOR == 1 && XMLSEC_MINOR == 2 && XMLSEC_SUBMINOR > 12)
#if (XMLSEC_VERSION_MAJOR > 1) || (XMLSEC_VERSION_MAJOR == 1 && XMLSEC_VERSION_MINOR > 2) || (XMLSEC_VERSION_MAJOR == 1 && XMLSEC_VERSION_MINOR == 2 && XMLSEC_VERSION_SUBMINOR > 12)
xmlSecNodeEncodeAndSetContent(child, BAD_CAST it->data);
#else
xmlChar *content;

View File

@ -620,10 +620,6 @@ lasso_node_encrypt(LassoNode *lasso_node, xmlSecKey *encryption_public_key,
message(G_LOG_LEVEL_WARNING, "Failed to create encryption context");
goto cleanup;
}
#define XSTR(x) STR(x)
#define STR(x) #x
#pragma message "The value of LASSO_XMLSEC_VERSION_NUMBER" LASSO_XMLSEC_VERSION_NUMBER
#if LASSO_XMLSEC_VERSION_NUMBER >= 0x010300
enc_ctx->keyInfoWriteCtx.flags |= XMLSEC_KEYINFO_FLAGS_LAX_KEY_SEARCH;