Development #71313
compatibilité xmlsec 1.2.35 (openssl 3?)
0%
Description
Dans debian est arrivé xmlsec 1.2.36 (c'était 1.2.34 avant);
October 31 2022
The XML Security Library 1.2.36 release includes the following changes:
- Retired the XMLSec mailing list "xmlsec@aleksey.com" and the XMLSec Online Signature Verifier.
- Several other small fixes (more details).
October 25 2022
The XML Security Library 1.2.35 release includes the following changes:
- Migration to OpenSSL 3.0 API (based on PR by @snargit). Note that OpenSSL engines are disabled by default when XMLSec library is compiled against OpenSSL 3.0. To re-enable OpenSSL engines, use "--enable-openssl3-engines" configure flag (there will be a lot of deprecation warnings).
- The OpenSSL before 1.1.0 and LibreSSL before 2.7.0 are now deprecated and will be removed in the future versions of XMLSec Library.
- Refactored all the integer casts to ensure cast-safety. Fixed all warnings and enabled "-Werror" and "-pedantic" flags on CI builds.
- Added configure flag to use size_t for xmlSecSize (currently disabled by default for backward compatibility).
- Moved all CI builds to GitHub actions.
- Several other small fixes (more details).
cette montée de version fait échouer lasso de diverses manières; sur l'initiation d'un SSO,
lasso:ERROR:tools.c:586:lasso_query_sign: assertion failed: (rsa) Bail out! lasso:ERROR:tools.c:586:lasso_query_sign: assertion failed: (rsa)
Files
Associated revisions
History
Updated by Benjamin Dauvergne 2 months ago
La source du problème c'est qu'OpenSSL a déprécié les fonctions bas niveaux (RSA_sign, structure RSA) et en mode OpenSSL 3 pure xmlsec ne les expose donc plus, ça casse notre support des signatures avec le binding GET (signature de texte et pas XML) :
/** * xmlSecOpenSSLKeyDataRsaGetRsa: * @data: the pointer to RSA key data. * * DEPRECATED. Gets the OpenSSL RSA key from RSA key data. * * Returns: pointer to OpenSSL RSA key or NULL if an error occurs. */ RSA* xmlSecOpenSSLKeyDataRsaGetRsa(xmlSecKeyDataPtr data) { #ifndef XMLSEC_OPENSSL_API_300 EVP_PKEY* pKey; xmlSecAssert2(xmlSecKeyDataCheckId(data, xmlSecOpenSSLKeyDataRsaId), NULL); pKey = xmlSecOpenSSLKeyDataRsaGetEvp(data); xmlSecAssert2((pKey == NULL) || (EVP_PKEY_base_id(pKey) == EVP_PKEY_RSA), NULL); return((pKey != NULL) ? EVP_PKEY_get0_RSA(pKey) : NULL); #else /* XMLSEC_OPENSSL_API_300 */ UNREFERENCED_PARAMETER(data); xmlSecNotImplementedError("OpenSSL 3.0 does not support direct access to RSA key"); return(NULL); #endif /* XMLSEC_OPENSSL_API_300 */ }
Je suppose qu'il va falloir reconstruire tout ça au dessus des APIs haut-niveau EVP_* :/
Updated by Benjamin Dauvergne 2 months ago
- File 0001-wip.patch 0001-wip.patch added
- Patch proposed changed from No to Yes
Avec ça les tests passent mais faut que je redécoupe, beaucoup de trucs sont devenus dépréciés un peu partou.
Updated by Benjamin Dauvergne 2 months ago
Benjamin Dauvergne a écrit :
Avec ça les tests passent mais faut que je redécoupe, beaucoup de trucs sont devenus dépréciés un peu partout.
Bon ben va falloir gérer xmlsec pre et post 1.2.35 à cause de la dépréciation de xmlSecBase64Decode en plus de la migration vers l'API EVP d'OpenSSL.
Updated by Benjamin Dauvergne 2 months ago
- File 0007-Fix-use-of-wrong-enumeration-NULL-value-71313.patch 0007-Fix-use-of-wrong-enumeration-NULL-value-71313.patch added
- File 0009-Fix-warning-about-enum-conversion-71313.patch 0009-Fix-warning-about-enum-conversion-71313.patch added
- File 0001-Use-OpenSSL-EVP-API-to-work-around-deprecation-of-lo.patch 0001-Use-OpenSSL-EVP-API-to-work-around-deprecation-of-lo.patch added
- File 0010-Fix-all-cast-function-type-warnings-71313.patch 0010-Fix-all-cast-function-type-warnings-71313.patch added
- File 0006-Fix-warnings-about-type-casts-71313.patch 0006-Fix-warnings-about-type-casts-71313.patch added
- File 0003-Make-lasso_inflate-output-the-inflated-buffer-size-7.patch 0003-Make-lasso_inflate-output-the-inflated-buffer-size-7.patch added
- File 0008-Fix-all-warnings-in-tests-71313.patch 0008-Fix-all-warnings-in-tests-71313.patch added
- File 0002-Add-new-define-LASSO_XMLSEC_VERSION_NUMBER-allow-ver.patch 0002-Add-new-define-LASSO_XMLSEC_VERSION_NUMBER-allow-ver.patch added
- File 0011-Fix-unused-parameters-warnings-71313.patch 0011-Fix-unused-parameters-warnings-71313.patch added
- File 0005-Replace-all-use-of-xmlSecBase64Decode-by-lasso_base6.patch 0005-Replace-all-use-of-xmlSecBase64Decode-by-lasso_base6.patch added
- File 0004-Adapt-lasso_base64_decode-to-the-deprecation-of-xmlS.patch 0004-Adapt-lasso_base64_decode-to-the-deprecation-of-xmlS.patch added
- Tracker changed from Bug to Development
- Status changed from Nouveau to Solution proposée
- 0001: le patch en question
- 0002/0003: réécriture pour prendre en compte que xmlSecBase64Decode est déprécié et que je n'ai aucune idée de quand elle sera définitivement retirée, j'ai mis un #if/#else/#endif pour que ça reste compilable avec libxmlsec<1.2.35
- le reste, des corrections aux warnings il en reste trois sources :
- g_type_class_add_private qui est déprécié et c'est le gros morceau en attente
- des trucs autour de distutils dans configure.ac
- des tas de dépréciations dans autoconf sur sid (je pense que ça peut attendre, c'est juste moche quand on fait autogen.sh)
Ce serait bien que ça passe vite que je puisse faire la release et que le paquet Debian soit correct pour le prochain freeze.
Updated by Frédéric Péters 2 months ago
Pour info déjà,
lasso (2.8.0-2) unstable; urgency=medium . * debian/patches/use-openssl-evp-api.diff: import upstream WIP patch for compatibility with latest xmlsec (closes: 1024138)
Uniquement 0001 donc, et je n'ai pas lu/testé les autres.
Note : dans la branche il y a avant ces commits des commits pas liés ("Release 2.8.1" et "Augment timeout on ECP tests").
Updated by Frédéric Péters 2 months ago
- Subject changed from compatiblité xmlsec 1.2.35 (openssl 3?) to compatibilité xmlsec 1.2.35 (openssl 3?)
Updated by Benjamin Dauvergne 2 months ago
J'ai réduit la branche au strict nécessaire et déplacer le reste dans d'autres tickets, si ça peut être validé.
Updated by Frédéric Péters 2 months ago
- Status changed from Solution proposée to Solution validée
Uniquement 0001 donc, et je n'ai pas lu/testé les autres.
Donc la branche ramenée à 0001 c'est ok.
Updated by Benjamin Dauvergne 2 months ago
- Status changed from Solution validée to Résolu (à déployer)
commit 66ebd11166038c23e642c4f9ed2f036815872e41 Author: Benjamin Dauvergne <bdauvergne@entrouvert.com> Date: Wed Nov 16 15:35:27 2022 +0100 Use OpenSSL EVP API to work around deprecation of low level APIs in OpenSSL 3 (#71313) OpenSSL API is used to sign query-string values in the SAML 2.0 Redirect binding. Other binding only need the libxmlsec API as signature are XML DSIG signatures.
Use OpenSSL EVP API to work around deprecation of low level APIs in OpenSSL 3 (#71313)
OpenSSL API is used to sign query-string values in the SAML 2.0 Redirect binding.
Other binding only need the libxmlsec API as signature are XML DSIG signatures.