From 740a6fa2e9b25b900a2a6bf55fac0c438e067a71 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Mon, 7 Feb 2011 23:26:25 -0600 Subject: [PATCH 01/66] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index d704f34..60201bb 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,6 +1,6 @@ Name: xml-security-c Version: 1.5.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: C++ Implementation of W3C security standards for XML Group: System Environment/Libraries @@ -81,6 +81,9 @@ rm -rf $RPM_BUILD_ROOT # %doc CHANGELOG.txt %changelog +* Mon Feb 07 2011 Fedora Release Engineering - 1.5.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Sat Feb 06 2010 steve.traylen@cern.ch - 1.5.1-3 - Rebuild for xerces 2 to 3 .so bump From b688bc1e3c5e12917613ceded046e94fc2b3c614 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Thu, 10 Mar 2011 13:15:10 +0200 Subject: [PATCH 02/66] Rebuilt with xerces-c 3.1 --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 60201bb..b86bd83 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,6 +1,6 @@ Name: xml-security-c Version: 1.5.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: C++ Implementation of W3C security standards for XML Group: System Environment/Libraries @@ -81,6 +81,9 @@ rm -rf $RPM_BUILD_ROOT # %doc CHANGELOG.txt %changelog +* Thu Mar 10 2011 Kalev Lember - 1.5.1-5 +- Rebuilt with xerces-c 3.1 + * Mon Feb 07 2011 Fedora Release Engineering - 1.5.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild From 0bd011cee5fedd4bf7f6718fe6f89472924e6f79 Mon Sep 17 00:00:00 2001 From: Antti Andreimann Date: Wed, 16 Mar 2011 13:32:17 +0200 Subject: [PATCH 03/66] New upstream release 1.6.0 --- .gitignore | 1 + sources | 2 +- xml-security-c.spec | 12 +++++++----- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 1049786..7b14dd5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ xml-security-c-1.5.1.tar.gz +/xml-security-c-1.6.0.tar.gz diff --git a/sources b/sources index 62c55a2..3dc7e91 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2c47c4ec12e8d6abe967aa5e5e99000c xml-security-c-1.5.1.tar.gz +b66046f074f5483e3b0081c5303e320c xml-security-c-1.6.0.tar.gz diff --git a/xml-security-c.spec b/xml-security-c.spec index b86bd83..bdb3535 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,6 +1,6 @@ Name: xml-security-c -Version: 1.5.1 -Release: 5%{?dist} +Version: 1.6.0 +Release: 1%{?dist} Summary: C++ Implementation of W3C security standards for XML Group: System Environment/Libraries @@ -45,7 +45,7 @@ make %{?_smp_mflags} %check # Verify that what was compiled actually works. -./bin/xtest +./xsec/xtest %install rm -rf $RPM_BUILD_ROOT @@ -77,10 +77,12 @@ rm -rf $RPM_BUILD_ROOT %{_includedir}/xsec %{_libdir}/libxml-security-c.so -# Upstream does not provide any docs (yet!) -# %doc CHANGELOG.txt +%doc CHANGELOG.txt LICENSE.txt NOTICE.txt INSTALL %changelog +* Wed Mar 16 2011 Antti Andreimann 1.6.0-1 +- New upstream release + * Thu Mar 10 2011 Kalev Lember - 1.5.1-5 - Rebuilt with xerces-c 3.1 From 7e69bdcc9ee8f5e009b16cb7bc1698ae363ff8a0 Mon Sep 17 00:00:00 2001 From: Steve Traylen Date: Thu, 7 Jul 2011 20:12:45 +0200 Subject: [PATCH 04/66] New upstream release, Correct source URL. --- .gitignore | 1 + sources | 2 +- xml-security-c.spec | 9 ++++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 7b14dd5..41cc71c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ xml-security-c-1.5.1.tar.gz /xml-security-c-1.6.0.tar.gz +/xml-security-c-1.6.1.tar.gz diff --git a/sources b/sources index 3dc7e91..964d32d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b66046f074f5483e3b0081c5303e320c xml-security-c-1.6.0.tar.gz +808316c80a7453b6d50a0bceb7ebe9bc xml-security-c-1.6.1.tar.gz diff --git a/xml-security-c.spec b/xml-security-c.spec index bdb3535..502053c 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,12 +1,12 @@ Name: xml-security-c -Version: 1.6.0 +Version: 1.6.1 Release: 1%{?dist} Summary: C++ Implementation of W3C security standards for XML Group: System Environment/Libraries License: ASL 2.0 URL: http://santuario.apache.org/c/ -Source: http://santuario.apache.org/dist/c-library/%{name}-%{version}.tar.gz +Source: http://www.apache.org/dist//santuario/c-library/xml-security-c-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: xerces-c-devel xalan-c-devel openssl-devel @@ -77,9 +77,12 @@ rm -rf $RPM_BUILD_ROOT %{_includedir}/xsec %{_libdir}/libxml-security-c.so -%doc CHANGELOG.txt LICENSE.txt NOTICE.txt INSTALL +%doc CHANGELOG.txt LICENSE.txt NOTICE.txt %changelog +* Thu Jul 7 2011 Steve Traylen 1.6.1-1 +- New upstream release, Correct source URL. + * Wed Mar 16 2011 Antti Andreimann 1.6.0-1 - New upstream release From 08c19d608660d1925081357fa548b0d3f17db9e3 Mon Sep 17 00:00:00 2001 From: Antti Andreimann Date: Fri, 8 Jul 2011 11:38:16 +0300 Subject: [PATCH 05/66] Backported a patch to fix CVE-2011-2516 (#719698) --- xml-security-c-1.5.1-CVE-2011-2516.patch | 192 +++++++++++++++++++++++ xml-security-c.spec | 7 +- 2 files changed, 198 insertions(+), 1 deletion(-) create mode 100644 xml-security-c-1.5.1-CVE-2011-2516.patch diff --git a/xml-security-c-1.5.1-CVE-2011-2516.patch b/xml-security-c-1.5.1-CVE-2011-2516.patch new file mode 100644 index 0000000..7ba5d9e --- /dev/null +++ b/xml-security-c-1.5.1-CVE-2011-2516.patch @@ -0,0 +1,192 @@ +diff -up xml-security-c-1.5.1/src/dsig/DSIGAlgorithmHandlerDefault.cpp.orig xml-security-c-1.5.1/src/dsig/DSIGAlgorithmHandlerDefault.cpp +--- xml-security-c-1.5.1/src/dsig/DSIGAlgorithmHandlerDefault.cpp.orig 2009-07-21 17:48:45.000000000 +0300 ++++ xml-security-c-1.5.1/src/dsig/DSIGAlgorithmHandlerDefault.cpp 2011-07-08 10:49:00.000000000 +0300 +@@ -42,6 +42,7 @@ + + XERCES_CPP_NAMESPACE_USE + ++#define MAXB64BUFSIZE 2048 + + // -------------------------------------------------------------------------------- + // Some useful utility functions +@@ -53,10 +54,10 @@ bool compareBase64StringToRaw(const char + unsigned int rawLen, + unsigned int maxCompare = 0) { + // Decode a base64 buffer and then compare the result to a raw buffer +- // Compare at most maxCompare bits (if maxComare > 0) ++ // Compare at most maxCompare bits (if maxCompare > 0) + // Note - whilst the other parameters are bytes, maxCompare is bits + +- unsigned char outputStr[1024]; ++ unsigned char outputStr[MAXB64BUFSIZE]; + unsigned int outputLen = 0; + + XSECCryptoBase64 * b64 = XSECPlatformUtils::g_cryptoProvider->base64(); +@@ -71,8 +72,8 @@ bool compareBase64StringToRaw(const char + Janitor j_b64(b64); + + b64->decodeInit(); +- outputLen = b64->decode((unsigned char *) b64Str, (unsigned int) strlen((char *) b64Str), outputStr, 1024); +- outputLen += b64->decodeFinish(&outputStr[outputLen], 1024 - outputLen); ++ outputLen = b64->decode((unsigned char *) b64Str, (unsigned int) strlen((char *) b64Str), outputStr, MAXB64BUFSIZE); ++ outputLen += b64->decodeFinish(&outputStr[outputLen], MAXB64BUFSIZE - outputLen); + + // Compare + +@@ -144,7 +145,7 @@ void convertRawToBase64String(safeBuffer + // Translate the rawbuffer (at most maxBits or rawLen - whichever is smaller) + // to a base64 string + +- unsigned char b64Str[1024]; ++ unsigned char b64Str[MAXB64BUFSIZE]; + unsigned int outputLen = 0; + + XSECCryptoBase64 * b64 = XSECPlatformUtils::g_cryptoProvider->base64(); +@@ -175,8 +176,8 @@ void convertRawToBase64String(safeBuffer + size = rawLen; + + b64->encodeInit(); +- outputLen = b64->encode((unsigned char *) raw, rawLen, b64Str, 1024); +- outputLen += b64->encodeFinish(&b64Str[outputLen], 1024 - outputLen); ++ outputLen = b64->encode((unsigned char *) raw, rawLen, b64Str, MAXB64BUFSIZE - 1); ++ outputLen += b64->encodeFinish(&b64Str[outputLen], MAXB64BUFSIZE - outputLen - 1); + b64Str[outputLen] = '\0'; + + // Copy out +@@ -380,7 +381,10 @@ unsigned int DSIGAlgorithmHandlerDefault + + // Now check the calculated hash + +- char b64Buf[1024]; ++ // For now, use a fixed length buffer, but expand it, ++ // and detect if the signature size exceeds what we can ++ // handle. ++ char b64Buf[MAXB64BUFSIZE]; + unsigned int b64Len; + safeBuffer b64SB; + +@@ -400,7 +404,7 @@ unsigned int DSIGAlgorithmHandlerDefault + hash, + hashLen, + (char *) b64Buf, +- 1024); ++ MAXB64BUFSIZE); + + if (b64Len <= 0) { + +@@ -408,6 +412,12 @@ unsigned int DSIGAlgorithmHandlerDefault + "Unknown error occured during a DSA Signing operation"); + + } ++ else if (b64Len >= MAXB64BUFSIZE) { ++ ++ throw XSECException(XSECException::AlgorithmMapperError, ++ "DSA Signing operation exceeded size of buffer"); ++ ++ } + + if (b64Buf[b64Len-1] == '\n') + b64Buf[b64Len-1] = '\0'; +@@ -430,7 +440,7 @@ unsigned int DSIGAlgorithmHandlerDefault + hash, + hashLen, + (char *) b64Buf, +- 1024, ++ MAXB64BUFSIZE, + hm); + + if (b64Len <= 0) { +@@ -439,6 +449,12 @@ unsigned int DSIGAlgorithmHandlerDefault + "Unknown error occured during a RSA Signing operation"); + + } ++ else if (b64Len >= MAXB64BUFSIZE) { ++ ++ throw XSECException(XSECException::AlgorithmMapperError, ++ "RSA Signing operation exceeded size of buffer"); ++ ++ } + + // Clean up some "funnies" and make sure the string is NULL terminated + +@@ -471,7 +487,7 @@ unsigned int DSIGAlgorithmHandlerDefault + hashLen, + outputLength); + +- strncpy(b64Buf, (char *) b64SB.rawBuffer(), 1024); ++ strncpy(b64Buf, (char *) b64SB.rawBuffer(), MAXB64BUFSIZE); + break; + + default : +diff -up xml-security-c-1.5.1/src/enc/OpenSSL/OpenSSLCryptoKeyDSA.cpp.orig xml-security-c-1.5.1/src/enc/OpenSSL/OpenSSLCryptoKeyDSA.cpp +--- xml-security-c-1.5.1/src/enc/OpenSSL/OpenSSLCryptoKeyDSA.cpp.orig 2008-12-08 20:52:47.000000000 +0200 ++++ xml-security-c-1.5.1/src/enc/OpenSSL/OpenSSLCryptoKeyDSA.cpp 2011-07-08 11:21:12.000000000 +0300 +@@ -33,6 +33,10 @@ + #include + #include + ++#include ++ ++XSEC_USING_XERCES(ArrayJanitor); ++ + #include + + OpenSSLCryptoKeyDSA::OpenSSLCryptoKeyDSA() : mp_dsaKey(NULL) { +@@ -157,8 +161,9 @@ bool OpenSSLCryptoKeyDSA::verifyBase64Si + "OpenSSL:DSA - Attempt to validate signature with empty key"); + } + +- unsigned char sigVal[512]; + int sigValLen; ++ unsigned char* sigVal = new unsigned char[sigLen + 1]; ++ ArrayJanitor j_sigVal(sigVal); + int err; + + EVP_ENCODE_CTX m_dctx; +@@ -271,10 +276,10 @@ unsigned int OpenSSLCryptoKeyDSA::signBa + + // Now turn the signature into a base64 string + +- unsigned char rawSigBuf[256]; +- unsigned int rawLen; +- +- rawLen = BN_bn2bin(dsa_sig->r, rawSigBuf); ++ unsigned char* rawSigBuf = new unsigned char[(BN_num_bits(dsa_sig->r) + BN_num_bits(dsa_sig->s)) / 8]; ++ ArrayJanitor j_sigbuf(rawSigBuf); ++ ++ unsigned int rawLen = BN_bn2bin(dsa_sig->r, rawSigBuf); + + if (rawLen <= 0) { + +diff -up xml-security-c-1.5.1/src/enc/OpenSSL/OpenSSLCryptoKeyRSA.cpp.orig xml-security-c-1.5.1/src/enc/OpenSSL/OpenSSLCryptoKeyRSA.cpp +--- xml-security-c-1.5.1/src/enc/OpenSSL/OpenSSLCryptoKeyRSA.cpp.orig 2008-12-08 20:52:47.000000000 +0200 ++++ xml-security-c-1.5.1/src/enc/OpenSSL/OpenSSLCryptoKeyRSA.cpp 2011-07-08 10:48:58.000000000 +0300 +@@ -186,21 +186,20 @@ bool OpenSSLCryptoKeyRSA::verifySHA1PKCS + "OpenSSL:RSA - Attempt to validate signature with empty key"); + } + +- unsigned char sigVal[1024]; +- int sigValLen; +- +- EVP_ENCODE_CTX m_dctx; +- int rc; +- +- char * cleanedBase64Signature; ++ char* cleanedBase64Signature; + unsigned int cleanedBase64SignatureLen = 0; + + cleanedBase64Signature = + XSECCryptoBase64::cleanBuffer(base64Signature, sigLen, cleanedBase64SignatureLen); + ArrayJanitor j_cleanedBase64Signature(cleanedBase64Signature); + ++ int sigValLen; ++ unsigned char* sigVal = new unsigned char[sigLen + 1]; ++ ArrayJanitor j_sigVal(sigVal); ++ ++ EVP_ENCODE_CTX m_dctx; + EVP_DecodeInit(&m_dctx); +- rc = EVP_DecodeUpdate(&m_dctx, ++ int rc = EVP_DecodeUpdate(&m_dctx, + sigVal, + &sigValLen, + (unsigned char *) cleanedBase64Signature, diff --git a/xml-security-c.spec b/xml-security-c.spec index d704f34..a3d298d 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,12 +1,13 @@ Name: xml-security-c Version: 1.5.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: C++ Implementation of W3C security standards for XML Group: System Environment/Libraries License: ASL 2.0 URL: http://santuario.apache.org/c/ Source: http://santuario.apache.org/dist/c-library/%{name}-%{version}.tar.gz +Patch0: xml-security-c-1.5.1-CVE-2011-2516.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: xerces-c-devel xalan-c-devel openssl-devel @@ -36,6 +37,7 @@ XML Digital Signatures. %prep %setup -q +%patch0 -p1 # Remove bogus "-O2" from CXXFLAGS to avoid overriding RPM_OPT_FLAGS. sed -i -e 's/-O2 -DNDEBUG/-DNDEBUG/g' configure @@ -81,6 +83,9 @@ rm -rf $RPM_BUILD_ROOT # %doc CHANGELOG.txt %changelog +* Fri Jul 08 2011 Antti Andreimann - 1.5.1-4 +- Backported a patch to fix CVE-2011-2516 (#719698) + * Sat Feb 06 2010 steve.traylen@cern.ch - 1.5.1-3 - Rebuild for xerces 2 to 3 .so bump From 3e91dd1f50a88f6617a33aa7afbed7a8eeceea5c Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 14 Jan 2012 03:02:24 -0600 Subject: [PATCH 06/66] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 502053c..44d81ac 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,6 +1,6 @@ Name: xml-security-c Version: 1.6.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: C++ Implementation of W3C security standards for XML Group: System Environment/Libraries @@ -80,6 +80,9 @@ rm -rf $RPM_BUILD_ROOT %doc CHANGELOG.txt LICENSE.txt NOTICE.txt %changelog +* Sat Jan 14 2012 Fedora Release Engineering - 1.6.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Thu Jul 7 2011 Steve Traylen 1.6.1-1 - New upstream release, Correct source URL. From 8a688e1c672947331b301a0fede3987b1183b99d Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 22 Jul 2012 00:47:16 -0500 Subject: [PATCH 07/66] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 44d81ac..774c41d 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,6 +1,6 @@ Name: xml-security-c Version: 1.6.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: C++ Implementation of W3C security standards for XML Group: System Environment/Libraries @@ -80,6 +80,9 @@ rm -rf $RPM_BUILD_ROOT %doc CHANGELOG.txt LICENSE.txt NOTICE.txt %changelog +* Sun Jul 22 2012 Fedora Release Engineering - 1.6.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Sat Jan 14 2012 Fedora Release Engineering - 1.6.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild From c5507f463ed3173c65c91764c85fb33ba2641cbc Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 14 Feb 2013 21:48:53 -0600 Subject: [PATCH 08/66] - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 774c41d..afddedd 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,6 +1,6 @@ Name: xml-security-c Version: 1.6.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: C++ Implementation of W3C security standards for XML Group: System Environment/Libraries @@ -80,6 +80,9 @@ rm -rf $RPM_BUILD_ROOT %doc CHANGELOG.txt LICENSE.txt NOTICE.txt %changelog +* Fri Feb 15 2013 Fedora Release Engineering - 1.6.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + * Sun Jul 22 2012 Fedora Release Engineering - 1.6.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From d734e44aeeb4d0cf43e1169678ba7694dc89bcc6 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 4 Aug 2013 03:27:24 -0500 Subject: [PATCH 09/66] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index afddedd..e02e1e7 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,6 +1,6 @@ Name: xml-security-c Version: 1.6.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: C++ Implementation of W3C security standards for XML Group: System Environment/Libraries @@ -80,6 +80,9 @@ rm -rf $RPM_BUILD_ROOT %doc CHANGELOG.txt LICENSE.txt NOTICE.txt %changelog +* Sun Aug 04 2013 Fedora Release Engineering - 1.6.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Fri Feb 15 2013 Fedora Release Engineering - 1.6.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild From 472eda6b9a0f91007d8f4c8343db8d54f03e3a42 Mon Sep 17 00:00:00 2001 From: Antti Andreimann Date: Fri, 11 Oct 2013 09:33:28 -0700 Subject: [PATCH 10/66] Rebuild for xalan-c 110 to 111 .so bump --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index e02e1e7..92b61f2 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,6 +1,6 @@ Name: xml-security-c Version: 1.6.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: C++ Implementation of W3C security standards for XML Group: System Environment/Libraries @@ -80,6 +80,9 @@ rm -rf $RPM_BUILD_ROOT %doc CHANGELOG.txt LICENSE.txt NOTICE.txt %changelog +* Fri Oct 11 2013 Antti Andreimann - 1.6.1-6 +- Rebuild for xalan-c 110 to 111 .so bump + * Sun Aug 04 2013 Fedora Release Engineering - 1.6.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild From 7702fe4a3988ef7147f2dfa236346c8698c61517 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 8 Jun 2014 01:03:42 -0500 Subject: [PATCH 11/66] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 92b61f2..d4557c3 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,6 +1,6 @@ Name: xml-security-c Version: 1.6.1 -Release: 6%{?dist} +Release: 7%{?dist} Summary: C++ Implementation of W3C security standards for XML Group: System Environment/Libraries @@ -80,6 +80,9 @@ rm -rf $RPM_BUILD_ROOT %doc CHANGELOG.txt LICENSE.txt NOTICE.txt %changelog +* Sun Jun 08 2014 Fedora Release Engineering - 1.6.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Fri Oct 11 2013 Antti Andreimann - 1.6.1-6 - Rebuild for xalan-c 110 to 111 .so bump From 2475563ab0924da58e649e9aa86efae9744c1771 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 18 Aug 2014 10:12:38 +0000 Subject: [PATCH 12/66] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index d4557c3..31dd48e 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,6 +1,6 @@ Name: xml-security-c Version: 1.6.1 -Release: 7%{?dist} +Release: 8%{?dist} Summary: C++ Implementation of W3C security standards for XML Group: System Environment/Libraries @@ -80,6 +80,9 @@ rm -rf $RPM_BUILD_ROOT %doc CHANGELOG.txt LICENSE.txt NOTICE.txt %changelog +* Mon Aug 18 2014 Fedora Release Engineering - 1.6.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Sun Jun 08 2014 Fedora Release Engineering - 1.6.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From e34b2dbad1dedb1b95d6bc1a569e3f1ede155dd2 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Sat, 2 May 2015 18:43:55 +0200 Subject: [PATCH 13/66] Rebuilt for GCC 5 C++11 ABI change --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 31dd48e..14505ed 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,6 +1,6 @@ Name: xml-security-c Version: 1.6.1 -Release: 8%{?dist} +Release: 9%{?dist} Summary: C++ Implementation of W3C security standards for XML Group: System Environment/Libraries @@ -80,6 +80,9 @@ rm -rf $RPM_BUILD_ROOT %doc CHANGELOG.txt LICENSE.txt NOTICE.txt %changelog +* Sat May 02 2015 Kalev Lember - 1.6.1-9 +- Rebuilt for GCC 5 C++11 ABI change + * Mon Aug 18 2014 Fedora Release Engineering - 1.6.1-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From 445d37944fa44a33e43026b269c2876fbbf72ce1 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 19 Jun 2015 04:07:31 +0000 Subject: [PATCH 14/66] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 14505ed..23520b1 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,6 +1,6 @@ Name: xml-security-c Version: 1.6.1 -Release: 9%{?dist} +Release: 10%{?dist} Summary: C++ Implementation of W3C security standards for XML Group: System Environment/Libraries @@ -80,6 +80,9 @@ rm -rf $RPM_BUILD_ROOT %doc CHANGELOG.txt LICENSE.txt NOTICE.txt %changelog +* Fri Jun 19 2015 Fedora Release Engineering - 1.6.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Sat May 02 2015 Kalev Lember - 1.6.1-9 - Rebuilt for GCC 5 C++11 ABI change From 6ae8b8e9c926918e5de173e7c9018229b5579700 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 3 Feb 2016 00:07:03 +0000 Subject: [PATCH 15/66] Patched for C++11 compatibility --- xml-security-c.spec | 8 +++++++- xmlsec-1.6.1-cxx11.patch | 11 +++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 xmlsec-1.6.1-cxx11.patch diff --git a/xml-security-c.spec b/xml-security-c.spec index 23520b1..f3d238c 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,12 +1,14 @@ Name: xml-security-c Version: 1.6.1 -Release: 10%{?dist} +Release: 11%{?dist} Summary: C++ Implementation of W3C security standards for XML Group: System Environment/Libraries License: ASL 2.0 URL: http://santuario.apache.org/c/ Source: http://www.apache.org/dist//santuario/c-library/xml-security-c-%{version}.tar.gz +# https://issues.apache.org/jira/browse/SANTUARIO-437 +Patch0: xmlsec-1.6.1-cxx11.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: xerces-c-devel xalan-c-devel openssl-devel @@ -38,6 +40,7 @@ XML Digital Signatures. %setup -q # Remove bogus "-O2" from CXXFLAGS to avoid overriding RPM_OPT_FLAGS. sed -i -e 's/-O2 -DNDEBUG/-DNDEBUG/g' configure +%patch0 -p1 %build %configure --disable-static @@ -80,6 +83,9 @@ rm -rf $RPM_BUILD_ROOT %doc CHANGELOG.txt LICENSE.txt NOTICE.txt %changelog +* Tue Feb 02 2016 Jonathan Wakely - 1.6.1-11 +- Patched for C++11 compatibility + * Fri Jun 19 2015 Fedora Release Engineering - 1.6.1-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/xmlsec-1.6.1-cxx11.patch b/xmlsec-1.6.1-cxx11.patch new file mode 100644 index 0000000..bc87d4c --- /dev/null +++ b/xmlsec-1.6.1-cxx11.patch @@ -0,0 +1,11 @@ +--- xml-security-c-1.6.1/xsec/tools/checksig/InteropResolver.cpp.orig 2016-02-02 23:57:26.204655144 +0000 ++++ xml-security-c-1.6.1/xsec/tools/checksig/InteropResolver.cpp 2016-02-02 23:57:35.796692305 +0000 +@@ -645,7 +645,7 @@ + + } + +- return false; ++ return NULL; + + } + From 9830a7d961bffcd2317aac696c7482e67461906d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 5 Feb 2016 03:35:01 +0000 Subject: [PATCH 16/66] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index f3d238c..b2938c9 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,6 +1,6 @@ Name: xml-security-c Version: 1.6.1 -Release: 11%{?dist} +Release: 12%{?dist} Summary: C++ Implementation of W3C security standards for XML Group: System Environment/Libraries @@ -83,6 +83,9 @@ rm -rf $RPM_BUILD_ROOT %doc CHANGELOG.txt LICENSE.txt NOTICE.txt %changelog +* Fri Feb 05 2016 Fedora Release Engineering - 1.6.1-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Tue Feb 02 2016 Jonathan Wakely - 1.6.1-11 - Patched for C++11 compatibility From bfbd134ea6005cb49dda154c9853693ab97bb40d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 11 Feb 2017 17:56:26 +0000 Subject: [PATCH 17/66] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index b2938c9..6b7e281 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,6 +1,6 @@ Name: xml-security-c Version: 1.6.1 -Release: 12%{?dist} +Release: 13%{?dist} Summary: C++ Implementation of W3C security standards for XML Group: System Environment/Libraries @@ -83,6 +83,9 @@ rm -rf $RPM_BUILD_ROOT %doc CHANGELOG.txt LICENSE.txt NOTICE.txt %changelog +* Sat Feb 11 2017 Fedora Release Engineering - 1.6.1-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Fri Feb 05 2016 Fedora Release Engineering - 1.6.1-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From dd4dc15971155f5fc8aae7f9a6a9c31154c11e01 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 27 Jul 2017 22:12:21 +0000 Subject: [PATCH 18/66] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 6b7e281..5452eb9 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,6 +1,6 @@ Name: xml-security-c Version: 1.6.1 -Release: 13%{?dist} +Release: 14%{?dist} Summary: C++ Implementation of W3C security standards for XML Group: System Environment/Libraries @@ -83,6 +83,9 @@ rm -rf $RPM_BUILD_ROOT %doc CHANGELOG.txt LICENSE.txt NOTICE.txt %changelog +* Thu Jul 27 2017 Fedora Release Engineering - 1.6.1-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Sat Feb 11 2017 Fedora Release Engineering - 1.6.1-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 179df253dfddae99684dfe13424f8dce1c6b0b31 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 3 Aug 2017 10:46:32 +0000 Subject: [PATCH 19/66] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 5452eb9..3bc132b 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,6 +1,6 @@ Name: xml-security-c Version: 1.6.1 -Release: 14%{?dist} +Release: 15%{?dist} Summary: C++ Implementation of W3C security standards for XML Group: System Environment/Libraries @@ -83,6 +83,9 @@ rm -rf $RPM_BUILD_ROOT %doc CHANGELOG.txt LICENSE.txt NOTICE.txt %changelog +* Thu Aug 03 2017 Fedora Release Engineering - 1.6.1-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Thu Jul 27 2017 Fedora Release Engineering - 1.6.1-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 446ccb402e3d73a15b2f44ad80a2fecdc91fe27e Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 29 Aug 2017 15:00:40 +0200 Subject: [PATCH 20/66] Fix the build Build with openssl 1.0 as xml-security-c doesn't support 1.1 yet. --- xml-security-c.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 3bc132b..c3ade35 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -11,8 +11,10 @@ Source: http://www.apache.org/dist//santuario/c-library/xml-security-c-% Patch0: xmlsec-1.6.1-cxx11.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: xerces-c-devel xalan-c-devel openssl-devel +BuildRequires: compat-openssl10-devel BuildRequires: pkgconfig +BuildRequires: xalan-c-devel +BuildRequires: xerces-c-devel %description The xml-security-c library is a C++ implementation of the XML Digital Signature @@ -25,7 +27,9 @@ XSLT transforms. Summary: Development files for xml-security-c Group: Development/Libraries Requires: %{name} = %{version}-%{release} -Requires: xerces-c-devel xalan-c-devel openssl-devel +Requires: compat-openssl10-devel +Requires: xalan-c-devel +Requires: xerces-c-devel # There are a number of headers that can use NSS if HAVE_NSS is set to 1 # Current build does not set it (configure does not even check for NSS) # so we do not include this dependency for now. From 58d66dcb76a3579e31df1b249896e9004b044d1f Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 29 Aug 2017 15:06:51 +0200 Subject: [PATCH 21/66] Update to 1.7.3 --- .gitignore | 1 + sources | 2 +- xml-security-c.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 41cc71c..909c243 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ xml-security-c-1.5.1.tar.gz /xml-security-c-1.6.0.tar.gz /xml-security-c-1.6.1.tar.gz +/xml-security-c-1.7.3.tar.gz diff --git a/sources b/sources index 964d32d..0abc979 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -808316c80a7453b6d50a0bceb7ebe9bc xml-security-c-1.6.1.tar.gz +SHA512 (xml-security-c-1.7.3.tar.gz) = ea46709d6706edf345e19132d9998774e50dc7b5947a7b4a55e3627998f5ac66f976fdff0a5015ef3cee73c03c04f3c4cf993efd397082491c2000c6548b89d2 diff --git a/xml-security-c.spec b/xml-security-c.spec index c3ade35..c617741 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,6 +1,6 @@ Name: xml-security-c -Version: 1.6.1 -Release: 15%{?dist} +Version: 1.7.3 +Release: 1%{?dist} Summary: C++ Implementation of W3C security standards for XML Group: System Environment/Libraries @@ -87,6 +87,9 @@ rm -rf $RPM_BUILD_ROOT %doc CHANGELOG.txt LICENSE.txt NOTICE.txt %changelog +* Tue Aug 29 2017 Kalev Lember - 1.7.3-1 +- Update to 1.7.3 + * Thu Aug 03 2017 Fedora Release Engineering - 1.6.1-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From 3144d2d4500feb695a2a16cd8ce5982a6d405ac9 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 29 Aug 2017 15:07:03 +0200 Subject: [PATCH 22/66] Modernize spec file --- xml-security-c.spec | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index c617741..f7d1bbf 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -3,13 +3,11 @@ Version: 1.7.3 Release: 1%{?dist} Summary: C++ Implementation of W3C security standards for XML -Group: System Environment/Libraries License: ASL 2.0 URL: http://santuario.apache.org/c/ Source: http://www.apache.org/dist//santuario/c-library/xml-security-c-%{version}.tar.gz # https://issues.apache.org/jira/browse/SANTUARIO-437 Patch0: xmlsec-1.6.1-cxx11.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: compat-openssl10-devel BuildRequires: pkgconfig @@ -25,7 +23,6 @@ XSLT transforms. %package devel Summary: Development files for xml-security-c -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: compat-openssl10-devel Requires: xalan-c-devel @@ -48,15 +45,14 @@ sed -i -e 's/-O2 -DNDEBUG/-DNDEBUG/g' configure %build %configure --disable-static -make %{?_smp_mflags} +%make_build %check # Verify that what was compiled actually works. ./xsec/xtest %install -rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT CPPROG="cp -p" +%make_install # We do not ship .la files. rm -f $RPM_BUILD_ROOT%{_libdir}/*.la @@ -70,22 +66,15 @@ rm -rf $RPM_BUILD_ROOT%{_bindir} %postun -p /sbin/ldconfig -%clean -rm -rf $RPM_BUILD_ROOT - - %files -%defattr(-,root,root,-) %{_libdir}/libxml-security-c.so.* - %files devel -%defattr(-,root,root,-) +%license LICENSE.txt +%doc CHANGELOG.txt NOTICE.txt %{_includedir}/xsec %{_libdir}/libxml-security-c.so -%doc CHANGELOG.txt LICENSE.txt NOTICE.txt - %changelog * Tue Aug 29 2017 Kalev Lember - 1.7.3-1 - Update to 1.7.3 From 092f0fff97b0e64d11823590c985c516c9c3cc9a Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 29 Aug 2017 15:11:05 +0200 Subject: [PATCH 23/66] Tighten -devel deps with the _isa macro --- xml-security-c.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index f7d1bbf..4b47e2e 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -23,7 +23,7 @@ XSLT transforms. %package devel Summary: Development files for xml-security-c -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} Requires: compat-openssl10-devel Requires: xalan-c-devel Requires: xerces-c-devel From 3752f3668c8cd75381f8fd08ceff5dfde61c71ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20K=C5=82oczko?= Date: Wed, 30 Aug 2017 10:50:29 +0100 Subject: [PATCH 24/66] - move patch comment from spec file to patch file. --- xml-security-c.spec | 1 - xmlsec-1.6.1-cxx11.patch | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 4b47e2e..09814ed 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -6,7 +6,6 @@ Summary: C++ Implementation of W3C security standards for XML License: ASL 2.0 URL: http://santuario.apache.org/c/ Source: http://www.apache.org/dist//santuario/c-library/xml-security-c-%{version}.tar.gz -# https://issues.apache.org/jira/browse/SANTUARIO-437 Patch0: xmlsec-1.6.1-cxx11.patch BuildRequires: compat-openssl10-devel diff --git a/xmlsec-1.6.1-cxx11.patch b/xmlsec-1.6.1-cxx11.patch index bc87d4c..e342b08 100644 --- a/xmlsec-1.6.1-cxx11.patch +++ b/xmlsec-1.6.1-cxx11.patch @@ -1,3 +1,5 @@ +https://issues.apache.org/jira/browse/SANTUARIO-437 + --- xml-security-c-1.6.1/xsec/tools/checksig/InteropResolver.cpp.orig 2016-02-02 23:57:26.204655144 +0000 +++ xml-security-c-1.6.1/xsec/tools/checksig/InteropResolver.cpp 2016-02-02 23:57:35.796692305 +0000 @@ -645,7 +645,7 @@ From 8e612b7a9a51a8e43234a84d258a9a7fc125af8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20K=C5=82oczko?= Date: Wed, 30 Aug 2017 12:04:30 +0100 Subject: [PATCH 25/66] - indent spec file. --- xml-security-c.spec | 55 +++++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 32 deletions(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 09814ed..9bab4fe 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,17 +1,15 @@ -Name: xml-security-c -Version: 1.7.3 -Release: 1%{?dist} -Summary: C++ Implementation of W3C security standards for XML - -License: ASL 2.0 -URL: http://santuario.apache.org/c/ -Source: http://www.apache.org/dist//santuario/c-library/xml-security-c-%{version}.tar.gz -Patch0: xmlsec-1.6.1-cxx11.patch - -BuildRequires: compat-openssl10-devel -BuildRequires: pkgconfig -BuildRequires: xalan-c-devel -BuildRequires: xerces-c-devel +Summary: C++ Implementation of W3C security standards for XML +Name: xml-security-c +Version: 1.7.3 +Release: 1%{?dist} +License: ASL 2.0 +URL: http://santuario.apache.org/c/ +Source: http://www.apache.org/dist/santuario/c-library/xml-security-c-%{version}.tar.gz +Patch0: xmlsec-1.6.1-cxx11.patch +BuildRequires: compat-openssl10-devel +BuildRequires: pkgconfig +BuildRequires: xalan-c-devel +BuildRequires: xerces-c-devel %description The xml-security-c library is a C++ implementation of the XML Digital Signature @@ -19,23 +17,17 @@ specification. The library makes use of the Apache XML project's Xerces-C XML Parser and Xalan-C XSLT processor. The latter is used for processing XPath and XSLT transforms. - -%package devel -Summary: Development files for xml-security-c -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: compat-openssl10-devel -Requires: xalan-c-devel -Requires: xerces-c-devel -# There are a number of headers that can use NSS if HAVE_NSS is set to 1 -# Current build does not set it (configure does not even check for NSS) -# so we do not include this dependency for now. -# Requires: nss-devel +%package devel +Summary: Development files for xml-security-c +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: compat-openssl10-devel +Requires: xalan-c-devel +Requires: xerces-c-devel %description devel This package provides development files for xml-security-c, a C++ library for XML Digital Signatures. - %prep %setup -q # Remove bogus "-O2" from CXXFLAGS to avoid overriding RPM_OPT_FLAGS. @@ -43,15 +35,16 @@ sed -i -e 's/-O2 -DNDEBUG/-DNDEBUG/g' configure %patch0 -p1 %build -%configure --disable-static -%make_build +%configure \ + --disable-static +%{make_build} %check # Verify that what was compiled actually works. ./xsec/xtest %install -%make_install +%{make_install} # We do not ship .la files. rm -f $RPM_BUILD_ROOT%{_libdir}/*.la @@ -60,11 +53,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la # xml-security-c developers and they should have the whole source anyway. rm -rf $RPM_BUILD_ROOT%{_bindir} -%post -p /sbin/ldconfig - +%post -p /sbin/ldconfig %postun -p /sbin/ldconfig - %files %{_libdir}/libxml-security-c.so.* From 9c88623c26c76775e0041bd1103d2a971fee63c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20K=C5=82oczko?= Date: Wed, 30 Aug 2017 12:07:59 +0100 Subject: [PATCH 26/66] - do not use sed to to remove hardcoded optimisation flags. Just make patch because you will never know is such fix istill needed. --- xml-security-c-ac_fixes.patch | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 xml-security-c-ac_fixes.patch diff --git a/xml-security-c-ac_fixes.patch b/xml-security-c-ac_fixes.patch new file mode 100644 index 0000000..939107a --- /dev/null +++ b/xml-security-c-ac_fixes.patch @@ -0,0 +1,24 @@ +--- xml-security-c-1.7.3/configure.ac~ 2015-01-30 03:55:09.000000000 +0000 ++++ xml-security-c-1.7.3/configure.ac 2017-08-30 10:10:04.161889660 +0100 +@@ -26,16 +26,13 @@ + + AC_ARG_ENABLE(debug, + AS_HELP_STRING([--enable-debug],[Have GCC compile with symbols (Default = no)]), +- enable_debug=$enableval, enable_debug=no) +- +-if test "$enable_debug" = "yes" ; then ++ [ + GCC_CFLAGS="$CFLAGS -g -D_DEBUG" + GCC_CXXFLAGS="$CXXFLAGS -g -D_DEBUG" +-else +- GCC_CFLAGS="$CFLAGS -O2 -DNDEBUG" +- GCC_CXXFLAGS="$CXXFLAGS -O2 -DNDEBUG" +-fi +- ++ ],[ ++ GCC_CFLAGS="$CFLAGS -DNDEBUG" ++ GCC_CXXFLAGS="$CXXFLAGS -DNDEBUG" ++ ]) + + # Define the files we wish to generate + From 2d7539963415124e8bad292a50a082af7981182b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20K=C5=82oczko?= Date: Wed, 30 Aug 2017 12:33:42 +0100 Subject: [PATCH 27/66] - added openssl 1.1 patch - other improvenets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary %changelog entry: * Wed Aug 30 2017 Tomasz Kłoczko - 1.7.3-2 - added patch which allows build xml-security-c against openssl 1.1 - added ac_fixes patch: do not use sed to remove hardcoded compile options. Use patch because you will never know is such correction still nedded (added autoconf and automake to BuildRequires) - added libstdc++-devel to BuildReqires and to devel Requires - add explicit all %%configure options to prevent build by mistake package against nss and force use openssl - added --disable-debug to %%configure options - added use %%autosetup in %%prep - do not waste IOs on remove not packaged files and add them %%files with %%exclude - indent and clean spec (move patch comments to the patch) --- xml-security-c-1.7.3_openssl1.1.patch | 1700 +++++++++++++++++++++++++ xml-security-c.spec | 65 +- 2 files changed, 1741 insertions(+), 24 deletions(-) create mode 100644 xml-security-c-1.7.3_openssl1.1.patch diff --git a/xml-security-c-1.7.3_openssl1.1.patch b/xml-security-c-1.7.3_openssl1.1.patch new file mode 100644 index 0000000..03e564d --- /dev/null +++ b/xml-security-c-1.7.3_openssl1.1.patch @@ -0,0 +1,1700 @@ +diff -U3 -r xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoBase64.cpp xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoBase64.cpp +--- xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoBase64.cpp 2012-07-23 19:56:11.000000000 +0300 ++++ xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoBase64.cpp 2017-02-19 20:37:10.000000000 +0200 +@@ -44,6 +44,15 @@ + + XERCES_CPP_NAMESPACE_USE + ++OpenSSLCryptoBase64::OpenSSLCryptoBase64() { ++ m_ectx = EVP_ENCODE_CTX_new(); ++ m_dctx = EVP_ENCODE_CTX_new(); ++} ++ ++OpenSSLCryptoBase64::~OpenSSLCryptoBase64() { ++ EVP_ENCODE_CTX_free(m_ectx); ++ EVP_ENCODE_CTX_free(m_dctx); ++} + + // -------------------------------------------------------------------------------- + // Decoding +@@ -51,7 +60,7 @@ + + void OpenSSLCryptoBase64::decodeInit(void) { + +- EVP_DecodeInit(&m_dctx); ++ EVP_DecodeInit(m_dctx); + + } + +@@ -70,7 +79,7 @@ + + } + +- rc = EVP_DecodeUpdate(&m_dctx, ++ rc = EVP_DecodeUpdate(m_dctx, + outData, + &outLen, + (unsigned char *) inData, +@@ -99,7 +108,7 @@ + int outLen; + outLen = outLength; + +- EVP_DecodeFinal(&m_dctx, outData, &outLen); ++ EVP_DecodeFinal(m_dctx, outData, &outLen); + + return outLen; + +@@ -111,7 +120,7 @@ + + void OpenSSLCryptoBase64::encodeInit(void) { + +- EVP_EncodeInit(&m_ectx); ++ EVP_EncodeInit(m_ectx); + + } + +@@ -130,7 +139,7 @@ + + } + +- EVP_EncodeUpdate(&m_ectx, ++ EVP_EncodeUpdate(m_ectx, + outData, + &outLen, + (unsigned char *) inData, +@@ -153,7 +162,7 @@ + int outLen; + outLen = outLength; + +- EVP_EncodeFinal(&m_ectx, outData, &outLen); ++ EVP_EncodeFinal(m_ectx, outData, &outLen); + + return outLen; + +diff -U3 -r xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoBase64.hpp xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoBase64.hpp +--- xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoBase64.hpp 2012-07-23 19:56:11.000000000 +0300 ++++ xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoBase64.hpp 2017-02-19 10:46:50.000000000 +0200 +@@ -66,8 +66,8 @@ + public : + + +- OpenSSLCryptoBase64() {}; +- virtual ~OpenSSLCryptoBase64() {}; ++ OpenSSLCryptoBase64(); ++ virtual ~OpenSSLCryptoBase64(); + + /** @name Decoding Functions */ + //@{ +@@ -189,20 +189,20 @@ + * \brief Get OpenSSL encode context structure + */ + +- EVP_ENCODE_CTX * getOpenSSLEncodeEVP_ENCODE_CTX(void) {return &m_ectx;} ++ EVP_ENCODE_CTX * getOpenSSLEncodeEVP_ENCODE_CTX(void) {return m_ectx;} + + /** + * \brief Get OpenSSL encode context structure + */ + +- EVP_ENCODE_CTX * getOpenSSLDecodeEVP_ENCODE_CTX(void) {return &m_dctx;} ++ EVP_ENCODE_CTX * getOpenSSLDecodeEVP_ENCODE_CTX(void) {return m_dctx;} + + //@} + + private : + +- EVP_ENCODE_CTX m_ectx; // Encode context +- EVP_ENCODE_CTX m_dctx; // Decode context ++ EVP_ENCODE_CTX *m_ectx; // Encode context ++ EVP_ENCODE_CTX *m_dctx; // Decode context + + }; + +diff -U3 -r xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoHash.cpp xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoHash.cpp +--- xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoHash.cpp 2012-07-23 19:56:11.000000000 +0300 ++++ xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoHash.cpp 2017-02-19 20:48:48.000000000 +0200 +@@ -40,6 +40,7 @@ + + OpenSSLCryptoHash::OpenSSLCryptoHash(HashType alg) { + ++ m_mdctx = EVP_MD_CTX_create(); + switch (alg) { + + case (XSECCryptoHash::HASH_SHA1) : +@@ -104,7 +105,7 @@ + "OpenSSL:Hash - Error loading Message Digest"); + } + +- EVP_DigestInit(&m_mdctx, mp_md); ++ EVP_DigestInit(m_mdctx, mp_md); + m_hashType = alg; + + } +@@ -112,7 +113,7 @@ + + OpenSSLCryptoHash::~OpenSSLCryptoHash() { + +- EVP_MD_CTX_cleanup(&m_mdctx); ++ EVP_MD_CTX_free(m_mdctx); + + } + +@@ -121,16 +122,16 @@ + // Hashing Activities + void OpenSSLCryptoHash::reset(void) { + +- EVP_MD_CTX_cleanup(&m_mdctx); +- +- EVP_DigestInit(&m_mdctx, mp_md); ++ EVP_MD_CTX_free(m_mdctx); ++ m_mdctx = EVP_MD_CTX_new(); ++ EVP_DigestInit(m_mdctx, mp_md); + + } + + void OpenSSLCryptoHash::hash(unsigned char * data, + unsigned int length) { + +- EVP_DigestUpdate(&m_mdctx, data, length); ++ EVP_DigestUpdate(m_mdctx, data, length); + + } + unsigned int OpenSSLCryptoHash::finish(unsigned char * hash, +@@ -140,7 +141,7 @@ + + // Finish up and copy out hash, returning the length + +- EVP_DigestFinal(&m_mdctx, m_mdValue, &m_mdLen); ++ EVP_DigestFinal(m_mdctx, m_mdValue, &m_mdLen); + + // Copy to output buffer + +diff -U3 -r xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoHash.hpp xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoHash.hpp +--- xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoHash.hpp 2012-07-23 19:56:11.000000000 +0300 ++++ xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoHash.hpp 2017-02-19 10:42:32.000000000 +0200 +@@ -138,7 +138,7 @@ + * \brief Get OpenSSL hash context structure + */ + +- EVP_MD_CTX * getOpenSSLEVP_MD_CTX(void) {return &m_mdctx;} ++ EVP_MD_CTX * getOpenSSLEVP_MD_CTX(void) {return m_mdctx;} + + //@} + +@@ -148,7 +148,7 @@ + // Not implemented constructors + OpenSSLCryptoHash(); + +- EVP_MD_CTX m_mdctx; // Context for digest ++ EVP_MD_CTX *m_mdctx; // Context for digest + const EVP_MD * mp_md; // Digest instance + unsigned char m_mdValue[EVP_MAX_MD_SIZE]; // Final output + unsigned int m_mdLen; // Length of digest +diff -U3 -r xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoHashHMAC.cpp xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoHashHMAC.cpp +--- xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoHashHMAC.cpp 2012-07-23 19:56:11.000000000 +0300 ++++ xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoHashHMAC.cpp 2017-02-19 20:50:03.000000000 +0200 +@@ -43,6 +43,7 @@ + OpenSSLCryptoHashHMAC::OpenSSLCryptoHashHMAC(HashType alg) { + + // Initialise the digest ++ m_hctx = HMAC_CTX_new(); + + switch (alg) { + +@@ -127,7 +128,7 @@ + m_keyLen = ((XSECCryptoKeyHMAC *) key)->getKey(m_keyBuf); + + +- HMAC_Init(&m_hctx, ++ HMAC_Init(m_hctx, + m_keyBuf.rawBuffer(), + m_keyLen, + mp_md); +@@ -139,7 +140,7 @@ + OpenSSLCryptoHashHMAC::~OpenSSLCryptoHashHMAC() { + + if (m_initialised) +- HMAC_CTX_cleanup(&m_hctx); ++ HMAC_CTX_free(m_hctx); + + } + +@@ -151,9 +152,9 @@ + + if (m_initialised) { + +- HMAC_CTX_cleanup(&m_hctx); +- +- HMAC_Init(&m_hctx, ++ HMAC_CTX_free(m_hctx); ++ m_hctx = HMAC_CTX_new(); ++ HMAC_Init(m_hctx, + m_keyBuf.rawBuffer(), + m_keyLen, + mp_md); +@@ -170,7 +171,7 @@ + "OpenSSL:HashHMAC - hash called prior to setKey"); + + +- HMAC_Update(&m_hctx, data, (int) length); ++ HMAC_Update(m_hctx, data, (int) length); + + } + +@@ -181,7 +182,7 @@ + + // Finish up and copy out hash, returning the length + +- HMAC_Final(&m_hctx, m_mdValue, &m_mdLen); ++ HMAC_Final(m_hctx, m_mdValue, &m_mdLen); + + // Copy to output buffer + +diff -U3 -r xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoHashHMAC.hpp xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoHashHMAC.hpp +--- xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoHashHMAC.hpp 2012-07-23 19:56:11.000000000 +0300 ++++ xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoHashHMAC.hpp 2017-02-19 10:50:19.000000000 +0200 +@@ -162,7 +162,7 @@ + * \brief Get OpenSSL Hash Context + */ + +- HMAC_CTX * getOpenSSLHMAC_CTX(void) {return &m_hctx;} ++ HMAC_CTX * getOpenSSLHMAC_CTX(void) {return m_hctx;} + + //@} + +@@ -175,7 +175,7 @@ + unsigned char m_mdValue[EVP_MAX_MD_SIZE]; // Final output + unsigned int m_mdLen; // Length of digest + HashType m_hashType; // What type of hash is this? +- HMAC_CTX m_hctx; // Context for HMAC ++ HMAC_CTX *m_hctx; // Context for HMAC + safeBuffer m_keyBuf; // The loaded key + unsigned int m_keyLen; // The loaded key length + bool m_initialised; +diff -U3 -r xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoKeyDSA.cpp xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoKeyDSA.cpp +--- xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoKeyDSA.cpp 2015-01-29 04:52:17.000000000 +0200 ++++ xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoKeyDSA.cpp 2017-02-19 22:39:29.000000000 +0200 +@@ -64,13 +64,15 @@ + if (mp_dsaKey == NULL) + return KEY_NONE; + +- if (mp_dsaKey->priv_key != NULL && mp_dsaKey->pub_key != NULL) ++ const BIGNUM *pub_key = 0, *priv_key = 0; ++ DSA_get0_key(mp_dsaKey, &pub_key, &priv_key); ++ if (priv_key != NULL && pub_key != NULL) + return KEY_DSA_PAIR; + +- if (mp_dsaKey->priv_key != NULL) ++ if (priv_key != NULL) + return KEY_DSA_PRIVATE; + +- if (mp_dsaKey->pub_key != NULL) ++ if (pub_key != NULL) + return KEY_DSA_PUBLIC; + + return KEY_NONE; +@@ -82,7 +84,7 @@ + if (mp_dsaKey == NULL) + mp_dsaKey = DSA_new(); + +- mp_dsaKey->p = OpenSSLCryptoBase64::b642BN((char *) b64, len); ++ DSA_set0_pqg(mp_dsaKey, OpenSSLCryptoBase64::b642BN((char *) b64, len), 0, 0); + + } + +@@ -91,7 +93,7 @@ + if (mp_dsaKey == NULL) + mp_dsaKey = DSA_new(); + +- mp_dsaKey->q = OpenSSLCryptoBase64::b642BN((char *) b64, len); ++ DSA_set0_pqg(mp_dsaKey, 0, OpenSSLCryptoBase64::b642BN((char *) b64, len), 0); + + } + +@@ -100,7 +102,7 @@ + if (mp_dsaKey == NULL) + mp_dsaKey = DSA_new(); + +- mp_dsaKey->g = OpenSSLCryptoBase64::b642BN((char *) b64, len); ++ DSA_set0_pqg(mp_dsaKey, 0, 0, OpenSSLCryptoBase64::b642BN((char *) b64, len)); + + } + +@@ -109,7 +111,7 @@ + if (mp_dsaKey == NULL) + mp_dsaKey = DSA_new(); + +- mp_dsaKey->pub_key = OpenSSLCryptoBase64::b642BN((char *) b64, len); ++ DSA_set0_key(mp_dsaKey, OpenSSLCryptoBase64::b642BN((char *) b64, len), 0); + + } + +@@ -130,20 +132,15 @@ + + mp_dsaKey = DSA_new(); + +- if (k == NULL || k->type != EVP_PKEY_DSA) ++ if (k == NULL || EVP_PKEY_base_id(k) != EVP_PKEY_DSA) + return; // Nothing to do with us + +- +- if (k->pkey.dsa->p) +- mp_dsaKey->p = BN_dup(k->pkey.dsa->p); +- if (k->pkey.dsa->q) +- mp_dsaKey->q = BN_dup(k->pkey.dsa->q); +- if (k->pkey.dsa->g) +- mp_dsaKey->g = BN_dup(k->pkey.dsa->g); +- if (k->pkey.dsa->pub_key) +- mp_dsaKey->pub_key = BN_dup(k->pkey.dsa->pub_key); +- if (k->pkey.dsa->priv_key) +- mp_dsaKey->priv_key = BN_dup(k->pkey.dsa->priv_key); ++ DSA *dsa = EVP_PKEY_get0_DSA(k); ++ const BIGNUM *p = 0, *q = 0, *g = 0, *pub_key = 0, *priv_key = 0; ++ DSA_get0_pqg(dsa, &p, &q, &g); ++ DSA_get0_key(dsa, &pub_key, &priv_key); ++ DSA_set0_pqg(mp_dsaKey, BN_dup(p), BN_dup(q), BN_dup(g)); ++ DSA_set0_key(mp_dsaKey, BN_dup(pub_key), BN_dup(priv_key)); + + } + +@@ -175,9 +172,9 @@ + unsigned char* sigVal = new unsigned char[sigLen + 1]; + ArrayJanitor j_sigVal(sigVal); + +- EVP_ENCODE_CTX m_dctx; +- EVP_DecodeInit(&m_dctx); +- int rc = EVP_DecodeUpdate(&m_dctx, ++ EVP_ENCODE_CTX *m_dctx = EVP_ENCODE_CTX_new(); ++ EVP_DecodeInit(m_dctx); ++ int rc = EVP_DecodeUpdate(m_dctx, + sigVal, + &sigValLen, + (unsigned char *) cleanedBase64Signature, +@@ -190,7 +187,8 @@ + } + int t = 0; + +- EVP_DecodeFinal(&m_dctx, &sigVal[sigValLen], &t); ++ EVP_DecodeFinal(m_dctx, &sigVal[sigValLen], &t); ++ EVP_ENCODE_CTX_free(m_dctx); + + sigValLen += t; + +@@ -223,12 +221,7 @@ + } + + DSA_SIG * dsa_sig = DSA_SIG_new(); +- +- dsa_sig->r = BN_dup(R); +- dsa_sig->s = BN_dup(S); +- +- BN_free(R); +- BN_free(S); ++ DSA_SIG_set0(dsa_sig, R, S); + + // Now we have a signature and a key - lets check + +@@ -267,6 +260,8 @@ + DSA_SIG * dsa_sig; + + dsa_sig = DSA_do_sign(hashBuf, hashLen, mp_dsaKey); ++ const BIGNUM *r = 0, *s = 0; ++ DSA_SIG_get0(dsa_sig, &r, &s); + + if (dsa_sig == NULL) { + +@@ -277,10 +272,10 @@ + + // Now turn the signature into a base64 string + +- unsigned char* rawSigBuf = new unsigned char[(BN_num_bits(dsa_sig->r) + BN_num_bits(dsa_sig->s) + 7) / 8]; ++ unsigned char* rawSigBuf = new unsigned char[(BN_num_bits(r) + BN_num_bits(s) + 7) / 8]; + ArrayJanitor j_sigbuf(rawSigBuf); + +- unsigned int rawLen = BN_bn2bin(dsa_sig->r, rawSigBuf); ++ unsigned int rawLen = BN_bn2bin(r, rawSigBuf); + + if (rawLen <= 0) { + +@@ -289,7 +284,7 @@ + + } + +- unsigned int rawLenS = BN_bn2bin(dsa_sig->s, (unsigned char *) &rawSigBuf[rawLen]); ++ unsigned int rawLenS = BN_bn2bin(s, (unsigned char *) &rawSigBuf[rawLen]); + + if (rawLenS <= 0) { + +@@ -339,16 +334,11 @@ + ret->mp_dsaKey = DSA_new(); + + // Duplicate parameters +- if (mp_dsaKey->p) +- ret->mp_dsaKey->p = BN_dup(mp_dsaKey->p); +- if (mp_dsaKey->q) +- ret->mp_dsaKey->q = BN_dup(mp_dsaKey->q); +- if (mp_dsaKey->g) +- ret->mp_dsaKey->g = BN_dup(mp_dsaKey->g); +- if (mp_dsaKey->pub_key) +- ret->mp_dsaKey->pub_key = BN_dup(mp_dsaKey->pub_key); +- if (mp_dsaKey->priv_key) +- ret->mp_dsaKey->priv_key = BN_dup(mp_dsaKey->priv_key); ++ const BIGNUM *p = 0, *q = 0, *g = 0, *pub_key = 0, *priv_key = 0; ++ DSA_get0_pqg(mp_dsaKey, &p, &q, &g); ++ DSA_get0_key(mp_dsaKey, &pub_key, &priv_key); ++ DSA_set0_pqg(ret->mp_dsaKey, BN_dup(p), BN_dup(q), BN_dup(g)); ++ DSA_set0_key(ret->mp_dsaKey, BN_dup(pub_key), BN_dup(priv_key)); + + return ret; + +diff -U3 -r xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoKeyEC.cpp xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoKeyEC.cpp +--- xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoKeyEC.cpp 2015-02-03 02:57:48.000000000 +0200 ++++ xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoKeyEC.cpp 2017-02-19 21:57:57.000000000 +0200 +@@ -128,10 +128,10 @@ + + // Create a new key to be loaded as we go + +- if (k == NULL || k->type != EVP_PKEY_EC) ++ if (k == NULL || EVP_PKEY_base_id(k) != EVP_PKEY_EC) + return; // Nothing to do with us + +- mp_ecKey = EC_KEY_dup(k->pkey.ec); ++ mp_ecKey = EC_KEY_dup(EVP_PKEY_get0_EC_KEY(k)); + } + + // -------------------------------------------------------------------------------- +@@ -162,9 +162,9 @@ + unsigned char* sigVal = new unsigned char[sigLen + 1]; + ArrayJanitor j_sigVal(sigVal); + +- EVP_ENCODE_CTX m_dctx; +- EVP_DecodeInit(&m_dctx); +- int rc = EVP_DecodeUpdate(&m_dctx, ++ EVP_ENCODE_CTX *m_dctx = EVP_ENCODE_CTX_new(); ++ EVP_DecodeInit(m_dctx); ++ int rc = EVP_DecodeUpdate(m_dctx, + sigVal, + &sigValLen, + (unsigned char *) cleanedBase64Signature, +@@ -177,7 +177,8 @@ + } + int t = 0; + +- EVP_DecodeFinal(&m_dctx, &sigVal[sigValLen], &t); ++ EVP_DecodeFinal(m_dctx, &sigVal[sigValLen], &t); ++ EVP_ENCODE_CTX_free(m_dctx); + + sigValLen += t; + +@@ -189,8 +190,9 @@ + // Translate to BNs by splitting in half, and thence to ECDSA_SIG + + ECDSA_SIG * dsa_sig = ECDSA_SIG_new(); +- dsa_sig->r = BN_bin2bn(sigVal, sigValLen / 2, NULL); +- dsa_sig->s = BN_bin2bn(&sigVal[sigValLen / 2], sigValLen / 2, NULL); ++ ECDSA_SIG_set0(dsa_sig, ++ BN_bin2bn(sigVal, sigValLen / 2, NULL), ++ BN_bin2bn(&sigVal[sigValLen / 2], sigValLen / 2, NULL)); + + // Now we have a signature and a key - lets check + +@@ -228,6 +230,8 @@ + ECDSA_SIG * dsa_sig; + + dsa_sig = ECDSA_do_sign(hashBuf, hashLen, mp_ecKey); ++ const BIGNUM *r, *s; ++ ECDSA_SIG_get0(dsa_sig, &r, &s); + + if (dsa_sig == NULL) { + throw XSECCryptoException(XSECCryptoException::ECError, +@@ -263,14 +267,14 @@ + memset(rawSigBuf, 0, keyLen * 2); + ArrayJanitor j_sigbuf(rawSigBuf); + +- unsigned int rawLen = (BN_num_bits(dsa_sig->r) + 7) / 8; +- if (BN_bn2bin(dsa_sig->r, rawSigBuf + keyLen - rawLen) <= 0) { ++ unsigned int rawLen = (BN_num_bits(r) + 7) / 8; ++ if (BN_bn2bin(r, rawSigBuf + keyLen - rawLen) <= 0) { + throw XSECCryptoException(XSECCryptoException::ECError, + "OpenSSL:EC - Error copying signature 'r' value to buffer"); + } + +- rawLen = (BN_num_bits(dsa_sig->s) + 7) / 8; +- if (BN_bn2bin(dsa_sig->s, rawSigBuf + keyLen + keyLen - rawLen) <= 0) { ++ rawLen = (BN_num_bits(s) + 7) / 8; ++ if (BN_bn2bin(s, rawSigBuf + keyLen + keyLen - rawLen) <= 0) { + throw XSECCryptoException(XSECCryptoException::ECError, + "OpenSSL:EC - Error copying signature 's' value to buffer"); + } +diff -U3 -r xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoKeyRSA.cpp xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoKeyRSA.cpp +--- xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoKeyRSA.cpp 2012-07-23 19:56:11.000000000 +0300 ++++ xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoKeyRSA.cpp 2017-02-19 21:53:14.000000000 +0200 +@@ -326,13 +326,15 @@ + if (mp_rsaKey == NULL) + return KEY_NONE; + +- if (mp_rsaKey->n != NULL && mp_rsaKey->d != NULL) ++ const BIGNUM *n = 0, *e = 0, *d = 0; ++ RSA_get0_key(mp_rsaKey, &n, &e, &d); ++ if (n != NULL && d != NULL) + return KEY_RSA_PAIR; + +- if (mp_rsaKey->d != NULL) ++ if (d != NULL) + return KEY_RSA_PRIVATE; + +- if (mp_rsaKey->n != NULL) ++ if (n != NULL) + return KEY_RSA_PUBLIC; + + return KEY_NONE; +@@ -344,7 +346,7 @@ + if (mp_rsaKey == NULL) + mp_rsaKey = RSA_new(); + +- mp_rsaKey->n = OpenSSLCryptoBase64::b642BN((char *) b64, len); ++ RSA_set0_key(mp_rsaKey, OpenSSLCryptoBase64::b642BN((char *) b64, len), 0, 0); + + } + +@@ -353,7 +355,7 @@ + if (mp_rsaKey == NULL) + mp_rsaKey = RSA_new(); + +- mp_rsaKey->e = OpenSSLCryptoBase64::b642BN((char *) b64, len); ++ RSA_set0_key(mp_rsaKey, 0, OpenSSLCryptoBase64::b642BN((char *) b64, len), 0); + + } + +@@ -369,32 +371,17 @@ + + mp_rsaKey = RSA_new(); + +- if (k == NULL || k->type != EVP_PKEY_RSA) ++ if (k == NULL || EVP_PKEY_base_id(k) != EVP_PKEY_RSA) + return; // Nothing to do with us + +- if (k->pkey.rsa->n) +- mp_rsaKey->n = BN_dup(k->pkey.rsa->n); +- +- if (k->pkey.rsa->e) +- mp_rsaKey->e = BN_dup(k->pkey.rsa->e); +- +- if (k->pkey.rsa->d) +- mp_rsaKey->d = BN_dup(k->pkey.rsa->d); +- +- if (k->pkey.rsa->p) +- mp_rsaKey->p = BN_dup(k->pkey.rsa->p); +- +- if (k->pkey.rsa->q) +- mp_rsaKey->q = BN_dup(k->pkey.rsa->q); +- +- if (k->pkey.rsa->dmp1) +- mp_rsaKey->dmp1 = BN_dup(k->pkey.rsa->dmp1); +- +- if (k->pkey.rsa->dmq1) +- mp_rsaKey->dmq1 = BN_dup(k->pkey.rsa->dmq1); +- +- if (k->pkey.rsa->iqmp) +- mp_rsaKey->iqmp = BN_dup(k->pkey.rsa->iqmp); ++ RSA *rsa = EVP_PKEY_get0_RSA(k); ++ const BIGNUM *n = 0, *e = 0, *d = 0, *p = 0, *q = 0, *dmp1 = 0, *dmq1 = 0, *iqmp = 0; ++ RSA_get0_key(rsa, &n, &e, &d); ++ RSA_get0_factors(rsa, &p, &q); ++ RSA_get0_crt_params(rsa, &dmp1, &dmq1, &iqmp); ++ RSA_set0_key(mp_rsaKey, BN_dup(n), BN_dup(e), BN_dup(d)); ++ RSA_set0_factors(mp_rsaKey, BN_dup(p), BN_dup(q)); ++ RSA_set0_crt_params(mp_rsaKey, BN_dup(dmp1), BN_dup(dmq1), BN_dup(iqmp)); + + } + +@@ -427,9 +414,9 @@ + unsigned char* sigVal = new unsigned char[sigLen + 1]; + ArrayJanitor j_sigVal(sigVal); + +- EVP_ENCODE_CTX m_dctx; +- EVP_DecodeInit(&m_dctx); +- int rc = EVP_DecodeUpdate(&m_dctx, ++ EVP_ENCODE_CTX *m_dctx = EVP_ENCODE_CTX_new(); ++ EVP_DecodeInit(m_dctx); ++ int rc = EVP_DecodeUpdate(m_dctx, + sigVal, + &sigValLen, + (unsigned char *) cleanedBase64Signature, +@@ -442,7 +429,8 @@ + } + int t = 0; + +- EVP_DecodeFinal(&m_dctx, &sigVal[sigValLen], &t); ++ EVP_DecodeFinal(m_dctx, &sigVal[sigValLen], &t); ++ EVP_ENCODE_CTX_free(m_dctx); + + sigValLen += t; + +@@ -979,29 +967,13 @@ + + // Duplicate parameters + +- if (mp_rsaKey->n) +- ret->mp_rsaKey->n = BN_dup(mp_rsaKey->n); +- +- if (mp_rsaKey->e) +- ret->mp_rsaKey->e = BN_dup(mp_rsaKey->e); +- +- if (mp_rsaKey->d) +- ret->mp_rsaKey->d = BN_dup(mp_rsaKey->d); +- +- if (mp_rsaKey->p) +- ret->mp_rsaKey->p = BN_dup(mp_rsaKey->p); +- +- if (mp_rsaKey->q) +- ret->mp_rsaKey->q = BN_dup(mp_rsaKey->q); +- +- if (mp_rsaKey->dmp1) +- ret->mp_rsaKey->dmp1 = BN_dup(mp_rsaKey->dmp1); +- +- if (mp_rsaKey->dmq1) +- ret->mp_rsaKey->dmq1 = BN_dup(mp_rsaKey->dmq1); +- +- if (mp_rsaKey->iqmp) +- ret->mp_rsaKey->iqmp = BN_dup(mp_rsaKey->iqmp); ++ const BIGNUM *n = 0, *e = 0, *d = 0, *p = 0, *q = 0, *dmp1 = 0, *dmq1 = 0, *iqmp = 0; ++ RSA_get0_key(mp_rsaKey, &n, &e, &d); ++ RSA_get0_factors(mp_rsaKey, &p, &q); ++ RSA_get0_crt_params(mp_rsaKey, &dmp1, &dmq1, &iqmp); ++ RSA_set0_key(ret->mp_rsaKey, BN_dup(n), BN_dup(e), BN_dup(d)); ++ RSA_set0_factors(ret->mp_rsaKey, BN_dup(p), BN_dup(q)); ++ RSA_set0_crt_params(ret->mp_rsaKey, BN_dup(dmp1), BN_dup(dmq1), BN_dup(iqmp)); + + return ret; + +diff -U3 -r xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoProvider.cpp xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoProvider.cpp +--- xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoProvider.cpp 2012-07-23 19:56:11.000000000 +0300 ++++ xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoProvider.cpp 2017-02-19 21:28:15.000000000 +0200 +@@ -343,7 +343,7 @@ + if (pkey) { + XSECCryptoKey* ret = NULL; + try { +- switch (pkey->type) { ++ switch (EVP_PKEY_base_id(pkey)) { + case EVP_PKEY_RSA: + ret = new OpenSSLCryptoKeyRSA(pkey); + break; +diff -U3 -r xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoSymmetricKey.cpp xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoSymmetricKey.cpp +--- xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoSymmetricKey.cpp 2015-01-29 04:52:17.000000000 +0200 ++++ xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoSymmetricKey.cpp 2017-02-19 21:24:51.000000000 +0200 +@@ -56,7 +56,8 @@ + m_keyLen(0), + m_initialised(false) { + +- EVP_CIPHER_CTX_init(&m_ctx); ++ m_ctx = EVP_CIPHER_CTX_new(); ++ EVP_CIPHER_CTX_init(m_ctx); + m_keyBuf.isSensitive(); + + } +@@ -65,7 +66,7 @@ + + // Clean up the context + +- EVP_CIPHER_CTX_cleanup(&m_ctx); ++ EVP_CIPHER_CTX_free(m_ctx); + } + + // -------------------------------------------------------------------------------- +@@ -149,17 +150,17 @@ + with 0.9.6 */ + + #if defined(XSEC_OPENSSL_CONST_BUFFERS) +- EVP_DecryptInit(&m_ctx, EVP_des_ede3_cbc(),m_keyBuf.rawBuffer(), iv); ++ EVP_DecryptInit(m_ctx, EVP_des_ede3_cbc(),m_keyBuf.rawBuffer(), iv); + #else +- EVP_DecryptInit(&m_ctx, EVP_des_ede3_cbc(),(unsigned char *) m_keyBuf.rawBuffer(), (unsigned char *) iv); ++ EVP_DecryptInit(m_ctx, EVP_des_ede3_cbc(),(unsigned char *) m_keyBuf.rawBuffer(), (unsigned char *) iv); + #endif + m_ivSize = 8; + } + else if (m_keyMode == MODE_ECB) { + #if defined(XSEC_OPENSSL_CONST_BUFFERS) +- EVP_DecryptInit(&m_ctx, EVP_des_ecb(), m_keyBuf.rawBuffer(), NULL); ++ EVP_DecryptInit(m_ctx, EVP_des_ecb(), m_keyBuf.rawBuffer(), NULL); + #else +- EVP_DecryptInit(&m_ctx, EVP_des_ecb(), (unsigned char *) m_keyBuf.rawBuffer(), NULL); ++ EVP_DecryptInit(m_ctx, EVP_des_ecb(), (unsigned char *) m_keyBuf.rawBuffer(), NULL); + #endif + m_ivSize = 0; + } +@@ -184,7 +185,7 @@ + return 0; // Cannot initialise without an IV + } + +- EVP_DecryptInit_ex(&m_ctx, EVP_aes_128_cbc(), NULL, m_keyBuf.rawBuffer(), iv); ++ EVP_DecryptInit_ex(m_ctx, EVP_aes_128_cbc(), NULL, m_keyBuf.rawBuffer(), iv); + + } + #if defined (XSEC_OPENSSL_HAVE_GCM) +@@ -207,15 +208,15 @@ + } + + // We have everything, so we can fully init. +- EVP_CipherInit(&m_ctx, EVP_aes_128_gcm(), NULL, NULL, 0); +- EVP_CIPHER_CTX_ctrl(&m_ctx, EVP_CTRL_GCM_SET_IVLEN, 12, NULL); +- EVP_CIPHER_CTX_ctrl(&m_ctx, EVP_CTRL_GCM_SET_TAG, 16, (void*)m_tagBuf.rawBuffer()); +- EVP_CipherInit(&m_ctx, NULL, m_keyBuf.rawBuffer(), iv, 0); ++ EVP_CipherInit(m_ctx, EVP_aes_128_gcm(), NULL, NULL, 0); ++ EVP_CIPHER_CTX_ctrl(m_ctx, EVP_CTRL_GCM_SET_IVLEN, 12, NULL); ++ EVP_CIPHER_CTX_ctrl(m_ctx, EVP_CTRL_GCM_SET_TAG, 16, (void*)m_tagBuf.rawBuffer()); ++ EVP_CipherInit(m_ctx, NULL, m_keyBuf.rawBuffer(), iv, 0); + } + #endif + else if (m_keyMode == MODE_ECB) { + +- EVP_DecryptInit_ex(&m_ctx, EVP_aes_128_ecb(), NULL, m_keyBuf.rawBuffer(), NULL); ++ EVP_DecryptInit_ex(m_ctx, EVP_aes_128_ecb(), NULL, m_keyBuf.rawBuffer(), NULL); + + } + else { +@@ -236,7 +237,7 @@ + return 0; // Cannot initialise without an IV + } + +- EVP_DecryptInit_ex(&m_ctx, EVP_aes_192_cbc(), NULL, m_keyBuf.rawBuffer(), iv); ++ EVP_DecryptInit_ex(m_ctx, EVP_aes_192_cbc(), NULL, m_keyBuf.rawBuffer(), iv); + + } + #if defined (XSEC_OPENSSL_HAVE_GCM) +@@ -259,16 +260,16 @@ + } + + // We have everything, so we can fully init. +- EVP_CipherInit(&m_ctx, EVP_aes_192_gcm(), NULL, NULL, 0); +- EVP_CIPHER_CTX_ctrl(&m_ctx, EVP_CTRL_GCM_SET_IVLEN, 12, NULL); +- EVP_CIPHER_CTX_ctrl(&m_ctx, EVP_CTRL_GCM_SET_TAG, 16, (void*)m_tagBuf.rawBuffer()); +- EVP_CipherInit(&m_ctx, NULL, m_keyBuf.rawBuffer(), iv, 0); ++ EVP_CipherInit(m_ctx, EVP_aes_192_gcm(), NULL, NULL, 0); ++ EVP_CIPHER_CTX_ctrl(m_ctx, EVP_CTRL_GCM_SET_IVLEN, 12, NULL); ++ EVP_CIPHER_CTX_ctrl(m_ctx, EVP_CTRL_GCM_SET_TAG, 16, (void*)m_tagBuf.rawBuffer()); ++ EVP_CipherInit(m_ctx, NULL, m_keyBuf.rawBuffer(), iv, 0); + + } + #endif + else if (m_keyMode == MODE_ECB) { + +- EVP_DecryptInit_ex(&m_ctx, EVP_aes_192_ecb(), NULL, m_keyBuf.rawBuffer(), NULL); ++ EVP_DecryptInit_ex(m_ctx, EVP_aes_192_ecb(), NULL, m_keyBuf.rawBuffer(), NULL); + + } + else { +@@ -289,7 +290,7 @@ + return 0; // Cannot initialise without an IV + } + +- EVP_DecryptInit_ex(&m_ctx, EVP_aes_256_cbc(), NULL, m_keyBuf.rawBuffer(), iv); ++ EVP_DecryptInit_ex(m_ctx, EVP_aes_256_cbc(), NULL, m_keyBuf.rawBuffer(), iv); + + } + #if defined (XSEC_OPENSSL_HAVE_GCM) +@@ -312,16 +313,16 @@ + } + + // We have everything, so we can fully init. +- EVP_CipherInit(&m_ctx, EVP_aes_256_gcm(), NULL, NULL, 0); +- EVP_CIPHER_CTX_ctrl(&m_ctx, EVP_CTRL_GCM_SET_IVLEN, 12, NULL); +- EVP_CIPHER_CTX_ctrl(&m_ctx, EVP_CTRL_GCM_SET_TAG, 16, (void*)m_tagBuf.rawBuffer()); +- EVP_CipherInit(&m_ctx, NULL, m_keyBuf.rawBuffer(), iv, 0); ++ EVP_CipherInit(m_ctx, EVP_aes_256_gcm(), NULL, NULL, 0); ++ EVP_CIPHER_CTX_ctrl(m_ctx, EVP_CTRL_GCM_SET_IVLEN, 12, NULL); ++ EVP_CIPHER_CTX_ctrl(m_ctx, EVP_CTRL_GCM_SET_TAG, 16, (void*)m_tagBuf.rawBuffer()); ++ EVP_CipherInit(m_ctx, NULL, m_keyBuf.rawBuffer(), iv, 0); + + } + #endif + else if (m_keyMode == MODE_ECB) { + +- EVP_DecryptInit_ex(&m_ctx, EVP_aes_256_ecb(), NULL, m_keyBuf.rawBuffer(), NULL); ++ EVP_DecryptInit_ex(m_ctx, EVP_aes_256_ecb(), NULL, m_keyBuf.rawBuffer(), NULL); + + } + else { +@@ -371,7 +372,7 @@ + // Disable OpenSSL padding - The interop samples have broken PKCS padding - AARGHH + + #if defined (XSEC_OPENSSL_CANSET_PADDING) +- EVP_CIPHER_CTX_set_padding(&m_ctx, 0); ++ EVP_CIPHER_CTX_set_padding(m_ctx, 0); + #endif + + // Return number of bytes chewed up by IV +@@ -439,9 +440,9 @@ + } + + #if defined (XSEC_OPENSSL_CONST_BUFFERS) +- if (EVP_DecryptUpdate(&m_ctx, &plainBuf[m_bytesInLastBlock], &outl, &inBuf[offset], inLength - offset) == 0) { ++ if (EVP_DecryptUpdate(m_ctx, &plainBuf[m_bytesInLastBlock], &outl, &inBuf[offset], inLength - offset) == 0) { + #else +- if (EVP_DecryptUpdate(&m_ctx, &plainBuf[m_bytesInLastBlock], &outl, (unsigned char *) &inBuf[offset], inLength - offset) == 0) { ++ if (EVP_DecryptUpdate(m_ctx, &plainBuf[m_bytesInLastBlock], &outl, (unsigned char *) &inBuf[offset], inLength - offset) == 0) { + #endif + throw XSECCryptoException(XSECCryptoException::SymmetricError, + "OpenSSL:SymmetricKey - Error during OpenSSL decrypt"); +@@ -476,7 +477,7 @@ + + #if defined (XSEC_OPENSSL_CANSET_PADDING) + +- if (EVP_DecryptFinal(&m_ctx, plainBuf, &outl) == 0) { ++ if (EVP_DecryptFinal(m_ctx, plainBuf, &outl) == 0) { + + throw XSECCryptoException(XSECCryptoException::SymmetricError, + "OpenSSL:SymmetricKey - Error during OpenSSL decrypt finalisation"); +@@ -544,7 +545,7 @@ + We can then clean that up ourselves + */ + +- if (EVP_DecryptUpdate(&m_ctx, &scrPlainBuf[offset], &outl, cipherBuf, m_blockSize) == 0) { ++ if (EVP_DecryptUpdate(m_ctx, &scrPlainBuf[offset], &outl, cipherBuf, m_blockSize) == 0) { + throw XSECCryptoException(XSECCryptoException::SymmetricError, + "OpenSSL:SymmetricKey - Error cecrypting final block during OpenSSL"); + } +@@ -641,16 +642,16 @@ + } + + #if defined (XSEC_OPENSSL_CONST_BUFFERS) +- EVP_EncryptInit(&m_ctx, EVP_des_ede3_cbc(), m_keyBuf.rawBuffer(), usedIV); ++ EVP_EncryptInit(m_ctx, EVP_des_ede3_cbc(), m_keyBuf.rawBuffer(), usedIV); + #else +- EVP_EncryptInit(&m_ctx, EVP_des_ede3_cbc(), (unsigned char *) m_keyBuf.rawBuffer(), (unsigned char *) usedIV); ++ EVP_EncryptInit(m_ctx, EVP_des_ede3_cbc(), (unsigned char *) m_keyBuf.rawBuffer(), (unsigned char *) usedIV); + #endif + } + else if (m_keyMode == MODE_ECB) { + #if defined (XSEC_OPENSSL_CONST_BUFFERS) +- EVP_EncryptInit(&m_ctx, EVP_des_ede3_ecb(), m_keyBuf.rawBuffer(), NULL); ++ EVP_EncryptInit(m_ctx, EVP_des_ede3_ecb(), m_keyBuf.rawBuffer(), NULL); + #else +- EVP_EncryptInit(&m_ctx, EVP_des_ede3(), (unsigned char *) m_keyBuf.rawBuffer(), NULL); ++ EVP_EncryptInit(m_ctx, EVP_des_ede3(), (unsigned char *) m_keyBuf.rawBuffer(), NULL); + #endif + } + else { +@@ -684,11 +685,11 @@ + else + usedIV = iv; + +- EVP_EncryptInit_ex(&m_ctx, EVP_aes_128_cbc(), NULL, m_keyBuf.rawBuffer(), usedIV); ++ EVP_EncryptInit_ex(m_ctx, EVP_aes_128_cbc(), NULL, m_keyBuf.rawBuffer(), usedIV); + } + else if (m_keyMode == MODE_ECB) { + +- EVP_EncryptInit_ex(&m_ctx, EVP_aes_128_ecb(), NULL, m_keyBuf.rawBuffer(), NULL); ++ EVP_EncryptInit_ex(m_ctx, EVP_aes_128_ecb(), NULL, m_keyBuf.rawBuffer(), NULL); + + } + #ifdef XSEC_OPENSSL_HAVE_GCM +@@ -708,7 +709,7 @@ + else + usedIV = iv; + +- EVP_EncryptInit_ex(&m_ctx, EVP_aes_128_gcm(), NULL, m_keyBuf.rawBuffer(), usedIV); ++ EVP_EncryptInit_ex(m_ctx, EVP_aes_128_gcm(), NULL, m_keyBuf.rawBuffer(), usedIV); + } + #endif + else { +@@ -739,7 +740,7 @@ + else + usedIV = iv; + +- EVP_EncryptInit_ex(&m_ctx, EVP_aes_192_cbc(), NULL, m_keyBuf.rawBuffer(), usedIV); ++ EVP_EncryptInit_ex(m_ctx, EVP_aes_192_cbc(), NULL, m_keyBuf.rawBuffer(), usedIV); + + } + #ifdef XSEC_OPENSSL_HAVE_GCM +@@ -759,12 +760,12 @@ + else + usedIV = iv; + +- EVP_EncryptInit_ex(&m_ctx, EVP_aes_192_gcm(), NULL, m_keyBuf.rawBuffer(), usedIV); ++ EVP_EncryptInit_ex(m_ctx, EVP_aes_192_gcm(), NULL, m_keyBuf.rawBuffer(), usedIV); + } + #endif + else if (m_keyMode == MODE_ECB) { + +- EVP_EncryptInit_ex(&m_ctx, EVP_aes_192_ecb(), NULL, m_keyBuf.rawBuffer(), NULL); ++ EVP_EncryptInit_ex(m_ctx, EVP_aes_192_ecb(), NULL, m_keyBuf.rawBuffer(), NULL); + } + else { + throw XSECCryptoException(XSECCryptoException::SymmetricError, +@@ -793,7 +794,7 @@ + else + usedIV = iv; + +- EVP_EncryptInit_ex(&m_ctx, EVP_aes_256_cbc(), NULL, m_keyBuf.rawBuffer(), usedIV); ++ EVP_EncryptInit_ex(m_ctx, EVP_aes_256_cbc(), NULL, m_keyBuf.rawBuffer(), usedIV); + + } + #ifdef XSEC_OPENSSL_HAVE_GCM +@@ -813,12 +814,12 @@ + else + usedIV = iv; + +- EVP_EncryptInit_ex(&m_ctx, EVP_aes_256_gcm(), NULL, m_keyBuf.rawBuffer(), usedIV); ++ EVP_EncryptInit_ex(m_ctx, EVP_aes_256_gcm(), NULL, m_keyBuf.rawBuffer(), usedIV); + } + #endif + else if (m_keyMode == MODE_ECB) { + +- EVP_EncryptInit_ex(&m_ctx, EVP_aes_256_ecb(), NULL, m_keyBuf.rawBuffer(), NULL); ++ EVP_EncryptInit_ex(m_ctx, EVP_aes_256_ecb(), NULL, m_keyBuf.rawBuffer(), NULL); + + } + else { +@@ -864,10 +865,10 @@ + #if defined (XSEC_OPENSSL_CANSET_PADDING) + // Setup padding + if (m_doPad) { +- EVP_CIPHER_CTX_set_padding(&m_ctx, 1); ++ EVP_CIPHER_CTX_set_padding(m_ctx, 1); + } + else { +- EVP_CIPHER_CTX_set_padding(&m_ctx, 0); ++ EVP_CIPHER_CTX_set_padding(m_ctx, 0); + } + #endif + +@@ -908,9 +909,9 @@ + + } + #if defined (XSEC_OPENSSL_CONST_BUFFERS) +- if (EVP_EncryptUpdate(&m_ctx, &cipherBuf[offset], &outl, inBuf, inLength) == 0) { ++ if (EVP_EncryptUpdate(m_ctx, &cipherBuf[offset], &outl, inBuf, inLength) == 0) { + #else +- if (EVP_EncryptUpdate(&m_ctx, &cipherBuf[offset], &outl, (unsigned char *) inBuf, inLength) == 0) { ++ if (EVP_EncryptUpdate(m_ctx, &cipherBuf[offset], &outl, (unsigned char *) inBuf, inLength) == 0) { + #endif + + throw XSECCryptoException(XSECCryptoException::SymmetricError, +@@ -929,7 +930,7 @@ + int outl = maxOutLength; + m_initialised = false; + +- if (EVP_EncryptFinal(&m_ctx, cipherBuf, &outl) == 0) { ++ if (EVP_EncryptFinal(m_ctx, cipherBuf, &outl) == 0) { + + throw XSECCryptoException(XSECCryptoException::SymmetricError, + "OpenSSLSymmetricKey::encryptFinish - Error during OpenSSL decrypt finalisation"); +@@ -962,7 +963,7 @@ + } + if (m_keyMode == MODE_GCM) { + #ifdef XSEC_OPENSSL_HAVE_GCM +- EVP_CIPHER_CTX_ctrl(&m_ctx, EVP_CTRL_GCM_GET_TAG, taglen, cipherBuf + outl); ++ EVP_CIPHER_CTX_ctrl(m_ctx, EVP_CTRL_GCM_GET_TAG, taglen, cipherBuf + outl); + outl += taglen; + #else + throw XSECCryptoException(XSECCryptoException::SymmetricError, +diff -U3 -r xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoSymmetricKey.hpp xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoSymmetricKey.hpp +--- xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoSymmetricKey.hpp 2012-07-23 19:56:11.000000000 +0300 ++++ xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoSymmetricKey.hpp 2017-02-19 21:25:39.000000000 +0200 +@@ -283,13 +283,13 @@ + * \brief Get OpenSSL cipher context structure + */ + +- EVP_CIPHER_CTX * getOpenSSLEVP_CIPHER_CTX(void) {return &m_ctx;} ++ EVP_CIPHER_CTX * getOpenSSLEVP_CIPHER_CTX(void) {return m_ctx;} + + /** + * \brief Get OpenSSL cipher context structure + */ + +- const EVP_CIPHER_CTX * getOpenSSLEVP_CIPHER_CTX(void) const {return &m_ctx;} ++ const EVP_CIPHER_CTX * getOpenSSLEVP_CIPHER_CTX(void) const {return m_ctx;} + + //@} + +@@ -307,7 +307,7 @@ + // Private variables + SymmetricKeyType m_keyType; + SymmetricKeyMode m_keyMode; +- EVP_CIPHER_CTX m_ctx; // OpenSSL Cipher Context structure ++ EVP_CIPHER_CTX *m_ctx; // OpenSSL Cipher Context structure + safeBuffer m_keyBuf; // Holder of the key + safeBuffer m_tagBuf; // Holder of authentication tag + unsigned int m_keyLen; +diff -U3 -r xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoX509.cpp xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoX509.cpp +--- xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoX509.cpp 2012-07-23 19:56:11.000000000 +0300 ++++ xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoX509.cpp 2017-02-19 21:09:40.000000000 +0200 +@@ -191,7 +191,7 @@ + + XSECCryptoKey::KeyType ret; + +- switch (pkey->type) { ++ switch (EVP_PKEY_base_id(pkey)) { + + case EVP_PKEY_DSA : + +@@ -241,7 +241,7 @@ + "OpenSSL:X509 - cannot retrieve public key from cert"); + } + +- switch (pkey->type) { ++ switch (EVP_PKEY_base_id(pkey)) { + + case EVP_PKEY_DSA : + +diff -U3 -r xml-security-c-1.7.3.orig/xsec/tools/checksig/InteropResolver.cpp xml-security-c-1.7.3/xsec/tools/checksig/InteropResolver.cpp +--- xml-security-c-1.7.3.orig/xsec/tools/checksig/InteropResolver.cpp 2012-07-23 19:56:10.000000000 +0300 ++++ xml-security-c-1.7.3/xsec/tools/checksig/InteropResolver.cpp 2017-02-19 22:33:50.000000000 +0200 +@@ -318,7 +318,7 @@ + char * cserial = XMLString::transcode(serial); + char * xserial; + +- BIGNUM * bnserial = ASN1_INTEGER_to_BN(x->cert_info->serialNumber, NULL); ++ BIGNUM * bnserial = ASN1_INTEGER_to_BN(X509_get0_serialNumber(x), NULL); + xserial = BN_bn2dec(bnserial); + BN_free(bnserial); + +@@ -360,8 +360,7 @@ + if (xlen != 0) { + + // Have a buffer with a number in it +- STACK_OF(X509_EXTENSION) *exts; +- exts = x->cert_info->extensions; ++ const STACK_OF(X509_EXTENSION) *exts = X509_get0_extensions(x); + + if (exts != NULL) { + +@@ -379,8 +378,8 @@ + memcpy(&octxski[2], xski, xlen); + + ext = sk_X509_EXTENSION_value(exts,extn); +- ASN1_OCTET_STRING *skid = ext->value; +- ASN1_OCTET_STRING * xskid = M_ASN1_OCTET_STRING_new(); ++ ASN1_OCTET_STRING *skid = X509_EXTENSION_get_data(ext); ++ ASN1_OCTET_STRING * xskid = ASN1_OCTET_STRING_new(); + ASN1_STRING_set(xskid, octxski, xlen+2); + + if (ASN1_OCTET_STRING_cmp(xskid, skid) == 0) { +@@ -602,12 +601,12 @@ + // Now check if the cert is in the CRL (code lifted from OpenSSL x509_vfy.c + + int idx; +- X509_REVOKED rtmp; ++ X509_REVOKED *rtmp = X509_REVOKED_new(); + + /* Look for serial number of certificate in CRL */ + +- rtmp.serialNumber = X509_get_serialNumber(x); +- idx = sk_X509_REVOKED_find(c->crl->revoked, &rtmp); ++ X509_REVOKED_set_serialNumber(rtmp, X509_get_serialNumber(x)); ++ idx = sk_X509_REVOKED_find(X509_CRL_get_REVOKED(c), rtmp); + + /* Not found: OK */ + +diff -U3 -r xml-security-c-1.7.3.orig/xsec/tools/cipher/XencInteropResolver.cpp xml-security-c-1.7.3/xsec/tools/cipher/XencInteropResolver.cpp +--- xml-security-c-1.7.3.orig/xsec/tools/cipher/XencInteropResolver.cpp 2012-07-23 19:56:10.000000000 +0300 ++++ xml-security-c-1.7.3/xsec/tools/cipher/XencInteropResolver.cpp 2017-02-19 22:34:57.000000000 +0200 +@@ -521,7 +521,7 @@ + X509 * x509 = OSSLX509->getOpenSSLX509(); + + // Check the serial number +- BIGNUM * bnserial = ASN1_INTEGER_to_BN(x509->cert_info->serialNumber, NULL); ++ BIGNUM * bnserial = ASN1_INTEGER_to_BN(X509_get0_serialNumber(x509), NULL); + BN_free(bnserial); + + BIO * rsaFile = createFileBIO(mp_baseURI, "rsa.p8"); +diff -U3 -r xml-security-c-1.7.3.orig/xsec/tools/cipher/cipher.cpp xml-security-c-1.7.3/xsec/tools/cipher/cipher.cpp +--- xml-security-c-1.7.3.orig/xsec/tools/cipher/cipher.cpp 2015-01-30 05:55:09.000000000 +0200 ++++ xml-security-c-1.7.3/xsec/tools/cipher/cipher.cpp 2017-02-19 22:37:17.000000000 +0200 +@@ -517,7 +517,7 @@ + + pkey = X509_get_pubkey(x); + +- if (pkey == NULL || pkey->type != EVP_PKEY_RSA) { ++ if (pkey == NULL || EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA) { + cerr << "Error extracting RSA key from certificate" << endl; + } + +diff -U3 -r xml-security-c-1.7.3.orig/xsec/tools/templatesign/templatesign.cpp xml-security-c-1.7.3/xsec/tools/templatesign/templatesign.cpp +--- xml-security-c-1.7.3.orig/xsec/tools/templatesign/templatesign.cpp 2015-01-30 05:55:09.000000000 +0200 ++++ xml-security-c-1.7.3/xsec/tools/templatesign/templatesign.cpp 2017-02-19 21:31:14.000000000 +0200 +@@ -726,7 +726,7 @@ + + // Check type is correct + +- if (pkey->type != EVP_PKEY_DSA) { ++ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_DSA) { + cerr << "DSA Key requested, but OpenSSL loaded something else\n"; + exit (1); + } +@@ -739,7 +739,7 @@ + + // Check type is correct + +- if (pkey->type != EVP_PKEY_EC) { ++ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_EC) { + cerr << "EC Key requested, but OpenSSL loaded something else\n"; + exit (1); + } +@@ -749,7 +749,7 @@ + } + # endif + else { +- if (pkey->type != EVP_PKEY_RSA) { ++ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA) { + cerr << "RSA Key requested, but OpenSSL loaded something else\n"; + exit (1); + } +diff -U3 -r xml-security-c-1.7.3.orig/xsec/tools/xklient/xklient.cpp xml-security-c-1.7.3/xsec/tools/xklient/xklient.cpp +--- xml-security-c-1.7.3.orig/xsec/tools/xklient/xklient.cpp 2012-07-23 19:56:10.000000000 +0300 ++++ xml-security-c-1.7.3/xsec/tools/xklient/xklient.cpp 2017-02-19 22:58:32.000000000 +0200 +@@ -284,7 +284,7 @@ + + #if defined (XSEC_HAVE_OPENSSL) + +-XMLCh * BN2b64(BIGNUM * bn) { ++XMLCh * BN2b64(const BIGNUM * bn) { + + int bytes = BN_num_bytes(bn); + unsigned char * binbuf = new unsigned char[bytes + 1]; +@@ -606,7 +606,7 @@ + + // Check type is correct + +- if (pkey->type != EVP_PKEY_DSA) { ++ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_DSA) { + cerr << "DSA Key requested, but OpenSSL loaded something else\n"; + return NULL; + } +@@ -615,10 +615,14 @@ + // Create the XSEC OpenSSL interface + key = new OpenSSLCryptoKeyDSA(pkey); + +- XMLCh * P = BN2b64(pkey->pkey.dsa->p); +- XMLCh * Q = BN2b64(pkey->pkey.dsa->q); +- XMLCh * G = BN2b64(pkey->pkey.dsa->g); +- XMLCh * Y = BN2b64(pkey->pkey.dsa->pub_key); ++ DSA *dsa = EVP_PKEY_get0_DSA(pkey); ++ const BIGNUM *p, *q, *g, *pub_key; ++ DSA_get0_pqg(dsa, &p, &q, &g); ++ DSA_get0_key(dsa, &pub_key, 0); ++ XMLCh * P = BN2b64(p); ++ XMLCh * Q = BN2b64(q); ++ XMLCh * G = BN2b64(g); ++ XMLCh * Y = BN2b64(pub_key); + + sig->appendDSAKeyValue(P,Q,G,Y); + +@@ -628,15 +632,18 @@ + XSEC_RELEASE_XMLCH(Y); + } + else { +- if (pkey->type != EVP_PKEY_RSA) { ++ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA) { + cerr << "RSA Key requested, but OpenSSL loaded something else\n"; + exit (1); + } + sig = lr->addSignature(CANON_C14N_NOC, SIGNATURE_RSA, HASH_SHA1); + key = new OpenSSLCryptoKeyRSA(pkey); + +- XMLCh * mod = BN2b64(pkey->pkey.rsa->n); +- XMLCh * exp = BN2b64(pkey->pkey.rsa->e); ++ RSA *rsa = EVP_PKEY_get0_RSA(pkey); ++ const BIGNUM *n, *e; ++ RSA_get0_key(rsa, &n, &e, 0); ++ XMLCh * mod = BN2b64(n); ++ XMLCh * exp = BN2b64(e); + sig->appendRSAKeyValue(mod, exp); + XSEC_RELEASE_XMLCH(mod); + XSEC_RELEASE_XMLCH(exp); +@@ -878,7 +885,7 @@ + + // Check type is correct + +- if (pkey->type != EVP_PKEY_DSA) { ++ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_DSA) { + cerr << "DSA Key requested, but OpenSSL loaded something else\n"; + return NULL; + } +@@ -887,10 +894,14 @@ + // Create the XSEC OpenSSL interface + key = new OpenSSLCryptoKeyDSA(pkey); + +- XMLCh * P = BN2b64(pkey->pkey.dsa->p); +- XMLCh * Q = BN2b64(pkey->pkey.dsa->q); +- XMLCh * G = BN2b64(pkey->pkey.dsa->g); +- XMLCh * Y = BN2b64(pkey->pkey.dsa->pub_key); ++ DSA *dsa = EVP_PKEY_get0_DSA(pkey); ++ const BIGNUM *p, *q, *g, *pub_key; ++ DSA_get0_pqg(dsa, &p, &q, &g); ++ DSA_get0_key(dsa, &pub_key, 0); ++ XMLCh * P = BN2b64(p); ++ XMLCh * Q = BN2b64(q); ++ XMLCh * G = BN2b64(g); ++ XMLCh * Y = BN2b64(pub_key); + + sig->appendDSAKeyValue(P,Q,G,Y); + +@@ -900,15 +911,18 @@ + XSEC_RELEASE_XMLCH(Y); + } + else { +- if (pkey->type != EVP_PKEY_RSA) { ++ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA) { + cerr << "RSA Key requested, but OpenSSL loaded something else\n"; + exit (1); + } + sig = vr->addSignature(CANON_C14N_NOC, SIGNATURE_RSA, HASH_SHA1); + key = new OpenSSLCryptoKeyRSA(pkey); + +- XMLCh * mod = BN2b64(pkey->pkey.rsa->n); +- XMLCh * exp = BN2b64(pkey->pkey.rsa->e); ++ RSA *rsa = EVP_PKEY_get0_RSA(pkey); ++ const BIGNUM *n, *e; ++ RSA_get0_key(rsa, &n, &e, 0); ++ XMLCh * mod = BN2b64(n); ++ XMLCh * exp = BN2b64(e); + sig->appendRSAKeyValue(mod, exp); + XSEC_RELEASE_XMLCH(mod); + XSEC_RELEASE_XMLCH(exp); +@@ -1229,7 +1243,7 @@ + + // Check type is correct + +- if (pkey->type != EVP_PKEY_DSA) { ++ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_DSA) { + cerr << "DSA Key requested, but OpenSSL loaded something else\n"; + return NULL; + } +@@ -1238,10 +1252,14 @@ + // Create the XSEC OpenSSL interface + key = new OpenSSLCryptoKeyDSA(pkey); + +- XMLCh * P = BN2b64(pkey->pkey.dsa->p); +- XMLCh * Q = BN2b64(pkey->pkey.dsa->q); +- XMLCh * G = BN2b64(pkey->pkey.dsa->g); +- XMLCh * Y = BN2b64(pkey->pkey.dsa->pub_key); ++ DSA *dsa = EVP_PKEY_get0_DSA(pkey); ++ const BIGNUM *p, *q, *g, *pub_key; ++ DSA_get0_pqg(dsa, &p, &q, &g); ++ DSA_get0_key(dsa, &pub_key, 0); ++ XMLCh * P = BN2b64(p); ++ XMLCh * Q = BN2b64(q); ++ XMLCh * G = BN2b64(g); ++ XMLCh * Y = BN2b64(pub_key); + + sig->appendDSAKeyValue(P,Q,G,Y); + +@@ -1251,15 +1269,18 @@ + XSEC_RELEASE_XMLCH(Y); + } + else { +- if (pkey->type != EVP_PKEY_RSA) { ++ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA) { + cerr << "RSA Key requested, but OpenSSL loaded something else\n"; + exit (1); + } + sig = rr->addSignature(CANON_C14N_NOC, SIGNATURE_RSA, HASH_SHA1); + key = new OpenSSLCryptoKeyRSA(pkey); + +- XMLCh * mod = BN2b64(pkey->pkey.rsa->n); +- XMLCh * exp = BN2b64(pkey->pkey.rsa->e); ++ RSA *rsa = EVP_PKEY_get0_RSA(pkey); ++ const BIGNUM *n, *e; ++ RSA_get0_key(rsa, &n, &e, 0); ++ XMLCh * mod = BN2b64(n); ++ XMLCh * exp = BN2b64(e); + sig->appendRSAKeyValue(mod, exp); + XSEC_RELEASE_XMLCH(mod); + XSEC_RELEASE_XMLCH(exp); +@@ -1326,7 +1347,7 @@ + + // Check type is correct + +- if (pkey->type != EVP_PKEY_DSA) { ++ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_DSA) { + cerr << "DSA Key requested, but OpenSSL loaded something else\n"; + return NULL; + } +@@ -1334,10 +1355,14 @@ + proofOfPossessionKey = new OpenSSLCryptoKeyDSA(pkey); + proofOfPossessionSm = SIGNATURE_DSA; + +- XMLCh * P = BN2b64(pkey->pkey.dsa->p); +- XMLCh * Q = BN2b64(pkey->pkey.dsa->q); +- XMLCh * G = BN2b64(pkey->pkey.dsa->g); +- XMLCh * Y = BN2b64(pkey->pkey.dsa->pub_key); ++ DSA *dsa = EVP_PKEY_get0_DSA(pkey); ++ const BIGNUM *p, *q, *g, *pub_key; ++ DSA_get0_pqg(dsa, &p, &q, &g); ++ DSA_get0_key(dsa, &pub_key, 0); ++ XMLCh * P = BN2b64(p); ++ XMLCh * Q = BN2b64(q); ++ XMLCh * G = BN2b64(g); ++ XMLCh * Y = BN2b64(pub_key); + + pkb->appendDSAKeyValue(P,Q,G,Y); + +@@ -1347,7 +1372,7 @@ + XSEC_RELEASE_XMLCH(Y); + } + else { +- if (pkey->type != EVP_PKEY_RSA) { ++ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA) { + cerr << "RSA Key requested, but OpenSSL loaded something else\n"; + exit (1); + } +@@ -1355,8 +1380,11 @@ + proofOfPossessionKey = new OpenSSLCryptoKeyRSA(pkey); + proofOfPossessionSm = SIGNATURE_RSA; + +- XMLCh * mod = BN2b64(pkey->pkey.rsa->n); +- XMLCh * exp = BN2b64(pkey->pkey.rsa->e); ++ RSA *rsa = EVP_PKEY_get0_RSA(pkey); ++ const BIGNUM *n, *e; ++ RSA_get0_key(rsa, &n, &e, 0); ++ XMLCh * mod = BN2b64(n); ++ XMLCh * exp = BN2b64(e); + pkb->appendRSAKeyValue(mod, exp); + XSEC_RELEASE_XMLCH(mod); + XSEC_RELEASE_XMLCH(exp); +@@ -1622,7 +1650,7 @@ + + // Check type is correct + +- if (pkey->type != EVP_PKEY_DSA) { ++ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_DSA) { + cerr << "DSA Key requested, but OpenSSL loaded something else\n"; + return NULL; + } +@@ -1631,10 +1659,14 @@ + // Create the XSEC OpenSSL interface + key = new OpenSSLCryptoKeyDSA(pkey); + +- XMLCh * P = BN2b64(pkey->pkey.dsa->p); +- XMLCh * Q = BN2b64(pkey->pkey.dsa->q); +- XMLCh * G = BN2b64(pkey->pkey.dsa->g); +- XMLCh * Y = BN2b64(pkey->pkey.dsa->pub_key); ++ DSA *dsa = EVP_PKEY_get0_DSA(pkey); ++ const BIGNUM *p, *q, *g, *pub_key; ++ DSA_get0_pqg(dsa, &p, &q, &g); ++ DSA_get0_key(dsa, &pub_key, 0); ++ XMLCh * P = BN2b64(p); ++ XMLCh * Q = BN2b64(q); ++ XMLCh * G = BN2b64(g); ++ XMLCh * Y = BN2b64(pub_key); + + sig->appendDSAKeyValue(P,Q,G,Y); + +@@ -1644,15 +1676,18 @@ + XSEC_RELEASE_XMLCH(Y); + } + else { +- if (pkey->type != EVP_PKEY_RSA) { ++ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA) { + cerr << "RSA Key requested, but OpenSSL loaded something else\n"; + exit (1); + } + sig = rr->addSignature(CANON_C14N_NOC, SIGNATURE_RSA, HASH_SHA1); + key = new OpenSSLCryptoKeyRSA(pkey); + +- XMLCh * mod = BN2b64(pkey->pkey.rsa->n); +- XMLCh * exp = BN2b64(pkey->pkey.rsa->e); ++ RSA *rsa = EVP_PKEY_get0_RSA(pkey); ++ const BIGNUM *n, *e; ++ RSA_get0_key(rsa, &n, &e, 0); ++ XMLCh * mod = BN2b64(n); ++ XMLCh * exp = BN2b64(e); + sig->appendRSAKeyValue(mod, exp); + XSEC_RELEASE_XMLCH(mod); + XSEC_RELEASE_XMLCH(exp); +@@ -1719,15 +1754,19 @@ + + // Check type is correct + +- if (pkey->type != EVP_PKEY_DSA) { ++ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_DSA) { + cerr << "DSA Key requested, but OpenSSL loaded something else\n"; + return NULL; + } + +- XMLCh * P = BN2b64(pkey->pkey.dsa->p); +- XMLCh * Q = BN2b64(pkey->pkey.dsa->q); +- XMLCh * G = BN2b64(pkey->pkey.dsa->g); +- XMLCh * Y = BN2b64(pkey->pkey.dsa->pub_key); ++ DSA *dsa = EVP_PKEY_get0_DSA(pkey); ++ const BIGNUM *p, *q, *g, *pub_key; ++ DSA_get0_pqg(dsa, &p, &q, &g); ++ DSA_get0_key(dsa, &pub_key, 0); ++ XMLCh * P = BN2b64(p); ++ XMLCh * Q = BN2b64(q); ++ XMLCh * G = BN2b64(g); ++ XMLCh * Y = BN2b64(pub_key); + + rkb->appendDSAKeyValue(P,Q,G,Y); + +@@ -1737,13 +1776,16 @@ + XSEC_RELEASE_XMLCH(Y); + } + else { +- if (pkey->type != EVP_PKEY_RSA) { ++ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA) { + cerr << "RSA Key requested, but OpenSSL loaded something else\n"; + exit (1); + } + +- XMLCh * mod = BN2b64(pkey->pkey.rsa->n); +- XMLCh * exp = BN2b64(pkey->pkey.rsa->e); ++ RSA *rsa = EVP_PKEY_get0_RSA(pkey); ++ const BIGNUM *n, *e; ++ RSA_get0_key(rsa, &n, &e, 0); ++ XMLCh * mod = BN2b64(n); ++ XMLCh * exp = BN2b64(e); + rkb->appendRSAKeyValue(mod, exp); + XSEC_RELEASE_XMLCH(mod); + XSEC_RELEASE_XMLCH(exp); +@@ -1977,7 +2019,7 @@ + + // Check type is correct + +- if (pkey->type != EVP_PKEY_DSA) { ++ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_DSA) { + cerr << "DSA Key requested, but OpenSSL loaded something else\n"; + return NULL; + } +@@ -1986,10 +2028,14 @@ + // Create the XSEC OpenSSL interface + key = new OpenSSLCryptoKeyDSA(pkey); + +- XMLCh * P = BN2b64(pkey->pkey.dsa->p); +- XMLCh * Q = BN2b64(pkey->pkey.dsa->q); +- XMLCh * G = BN2b64(pkey->pkey.dsa->g); +- XMLCh * Y = BN2b64(pkey->pkey.dsa->pub_key); ++ DSA *dsa = EVP_PKEY_get0_DSA(pkey); ++ const BIGNUM *p, *q, *g, *pub_key; ++ DSA_get0_pqg(dsa, &p, &q, &g); ++ DSA_get0_key(dsa, &pub_key, 0); ++ XMLCh * P = BN2b64(p); ++ XMLCh * Q = BN2b64(q); ++ XMLCh * G = BN2b64(g); ++ XMLCh * Y = BN2b64(pub_key); + + sig->appendDSAKeyValue(P,Q,G,Y); + +@@ -1999,15 +2045,18 @@ + XSEC_RELEASE_XMLCH(Y); + } + else { +- if (pkey->type != EVP_PKEY_RSA) { ++ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA) { + cerr << "RSA Key requested, but OpenSSL loaded something else\n"; + exit (1); + } + sig = rr->addSignature(CANON_C14N_NOC, SIGNATURE_RSA, HASH_SHA1); + key = new OpenSSLCryptoKeyRSA(pkey); + +- XMLCh * mod = BN2b64(pkey->pkey.rsa->n); +- XMLCh * exp = BN2b64(pkey->pkey.rsa->e); ++ RSA *rsa = EVP_PKEY_get0_RSA(pkey); ++ const BIGNUM *n, *e; ++ RSA_get0_key(rsa, &n, &e, 0); ++ XMLCh * mod = BN2b64(n); ++ XMLCh * exp = BN2b64(e); + sig->appendRSAKeyValue(mod, exp); + XSEC_RELEASE_XMLCH(mod); + XSEC_RELEASE_XMLCH(exp); +@@ -2074,7 +2123,7 @@ + + // Check type is correct + +- if (pkey->type != EVP_PKEY_DSA) { ++ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_DSA) { + cerr << "DSA Key requested, but OpenSSL loaded something else\n"; + return NULL; + } +@@ -2082,10 +2131,14 @@ + proofOfPossessionKey = new OpenSSLCryptoKeyDSA(pkey); + proofOfPossessionSm = SIGNATURE_DSA; + +- XMLCh * P = BN2b64(pkey->pkey.dsa->p); +- XMLCh * Q = BN2b64(pkey->pkey.dsa->q); +- XMLCh * G = BN2b64(pkey->pkey.dsa->g); +- XMLCh * Y = BN2b64(pkey->pkey.dsa->pub_key); ++ DSA *dsa = EVP_PKEY_get0_DSA(pkey); ++ const BIGNUM *p, *q, *g, *pub_key; ++ DSA_get0_pqg(dsa, &p, &q, &g); ++ DSA_get0_key(dsa, &pub_key, 0); ++ XMLCh * P = BN2b64(p); ++ XMLCh * Q = BN2b64(q); ++ XMLCh * G = BN2b64(g); ++ XMLCh * Y = BN2b64(pub_key); + + pkb->appendDSAKeyValue(P,Q,G,Y); + +@@ -2095,7 +2148,7 @@ + XSEC_RELEASE_XMLCH(Y); + } + else { +- if (pkey->type != EVP_PKEY_RSA) { ++ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA) { + cerr << "RSA Key requested, but OpenSSL loaded something else\n"; + exit (1); + } +@@ -2103,8 +2156,11 @@ + proofOfPossessionKey = new OpenSSLCryptoKeyRSA(pkey); + proofOfPossessionSm = SIGNATURE_RSA; + +- XMLCh * mod = BN2b64(pkey->pkey.rsa->n); +- XMLCh * exp = BN2b64(pkey->pkey.rsa->e); ++ RSA *rsa = EVP_PKEY_get0_RSA(pkey); ++ const BIGNUM *n, *e; ++ RSA_get0_key(rsa, &n, &e, 0); ++ XMLCh * mod = BN2b64(n); ++ XMLCh * exp = BN2b64(e); + pkb->appendRSAKeyValue(mod, exp); + XSEC_RELEASE_XMLCH(mod); + XSEC_RELEASE_XMLCH(exp); +@@ -2371,7 +2427,7 @@ + + // Check type is correct + +- if (pkey->type != EVP_PKEY_DSA) { ++ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_DSA) { + cerr << "DSA Key requested, but OpenSSL loaded something else\n"; + return NULL; + } +@@ -2380,10 +2436,14 @@ + // Create the XSEC OpenSSL interface + key = new OpenSSLCryptoKeyDSA(pkey); + +- XMLCh * P = BN2b64(pkey->pkey.dsa->p); +- XMLCh * Q = BN2b64(pkey->pkey.dsa->q); +- XMLCh * G = BN2b64(pkey->pkey.dsa->g); +- XMLCh * Y = BN2b64(pkey->pkey.dsa->pub_key); ++ DSA *dsa = EVP_PKEY_get0_DSA(pkey); ++ const BIGNUM *p, *q, *g, *pub_key; ++ DSA_get0_pqg(dsa, &p, &q, &g); ++ DSA_get0_key(dsa, &pub_key, 0); ++ XMLCh * P = BN2b64(p); ++ XMLCh * Q = BN2b64(q); ++ XMLCh * G = BN2b64(g); ++ XMLCh * Y = BN2b64(pub_key); + + sig->appendDSAKeyValue(P,Q,G,Y); + +@@ -2393,15 +2453,18 @@ + XSEC_RELEASE_XMLCH(Y); + } + else { +- if (pkey->type != EVP_PKEY_RSA) { ++ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA) { + cerr << "RSA Key requested, but OpenSSL loaded something else\n"; + exit (1); + } + sig = rr->addSignature(CANON_C14N_NOC, SIGNATURE_RSA, HASH_SHA1); + key = new OpenSSLCryptoKeyRSA(pkey); + +- XMLCh * mod = BN2b64(pkey->pkey.rsa->n); +- XMLCh * exp = BN2b64(pkey->pkey.rsa->e); ++ RSA *rsa = EVP_PKEY_get0_RSA(pkey); ++ const BIGNUM *n, *e; ++ RSA_get0_key(rsa, &n, &e, 0); ++ XMLCh * mod = BN2b64(n); ++ XMLCh * exp = BN2b64(e); + sig->appendRSAKeyValue(mod, exp); + XSEC_RELEASE_XMLCH(mod); + XSEC_RELEASE_XMLCH(exp); +@@ -2468,15 +2531,19 @@ + + // Check type is correct + +- if (pkey->type != EVP_PKEY_DSA) { ++ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_DSA) { + cerr << "DSA Key requested, but OpenSSL loaded something else\n"; + return NULL; + } + +- XMLCh * P = BN2b64(pkey->pkey.dsa->p); +- XMLCh * Q = BN2b64(pkey->pkey.dsa->q); +- XMLCh * G = BN2b64(pkey->pkey.dsa->g); +- XMLCh * Y = BN2b64(pkey->pkey.dsa->pub_key); ++ DSA *dsa = EVP_PKEY_get0_DSA(pkey); ++ const BIGNUM *p, *q, *g, *pub_key; ++ DSA_get0_pqg(dsa, &p, &q, &g); ++ DSA_get0_key(dsa, &pub_key, 0); ++ XMLCh * P = BN2b64(p); ++ XMLCh * Q = BN2b64(q); ++ XMLCh * G = BN2b64(g); ++ XMLCh * Y = BN2b64(pub_key); + + rkb->appendDSAKeyValue(P,Q,G,Y); + +@@ -2486,13 +2553,16 @@ + XSEC_RELEASE_XMLCH(Y); + } + else { +- if (pkey->type != EVP_PKEY_RSA) { ++ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA) { + cerr << "RSA Key requested, but OpenSSL loaded something else\n"; + exit (1); + } + +- XMLCh * mod = BN2b64(pkey->pkey.rsa->n); +- XMLCh * exp = BN2b64(pkey->pkey.rsa->e); ++ RSA *rsa = EVP_PKEY_get0_RSA(pkey); ++ const BIGNUM *n, *e; ++ RSA_get0_key(rsa, &n, &e, 0); ++ XMLCh * mod = BN2b64(n); ++ XMLCh * exp = BN2b64(e); + rkb->appendRSAKeyValue(mod, exp); + XSEC_RELEASE_XMLCH(mod); + XSEC_RELEASE_XMLCH(exp); +@@ -3251,14 +3321,17 @@ + + // Create the RSA key file + RSA * rsa = RSA_new(); +- rsa->n = OpenSSLCryptoBase64::b642BN(sModulus, (unsigned int) strlen(sModulus)); +- rsa->e = OpenSSLCryptoBase64::b642BN(sExponent, (unsigned int) strlen(sExponent)); +- rsa->d = OpenSSLCryptoBase64::b642BN(sD, (unsigned int) strlen(sD)); +- rsa->p = OpenSSLCryptoBase64::b642BN(sP, (unsigned int) strlen(sP)); +- rsa->q = OpenSSLCryptoBase64::b642BN(sQ, (unsigned int) strlen(sQ)); +- rsa->dmp1 = OpenSSLCryptoBase64::b642BN(sDP, (unsigned int) strlen(sDP)); +- rsa->dmq1 = OpenSSLCryptoBase64::b642BN(sDQ, (unsigned int) strlen(sDQ)); +- rsa->iqmp = OpenSSLCryptoBase64::b642BN(sInverseQ, (unsigned int) strlen(sInverseQ)); ++ RSA_set0_key(rsa, ++ OpenSSLCryptoBase64::b642BN(sModulus, (unsigned int) strlen(sModulus)), ++ OpenSSLCryptoBase64::b642BN(sExponent, (unsigned int) strlen(sExponent)), ++ OpenSSLCryptoBase64::b642BN(sD, (unsigned int) strlen(sD))); ++ RSA_set0_factors(rsa, ++ OpenSSLCryptoBase64::b642BN(sP, (unsigned int) strlen(sP)), ++ OpenSSLCryptoBase64::b642BN(sQ, (unsigned int) strlen(sQ))); ++ RSA_set0_crt_params(rsa, ++ OpenSSLCryptoBase64::b642BN(sDP, (unsigned int) strlen(sDP)), ++ OpenSSLCryptoBase64::b642BN(sDQ, (unsigned int) strlen(sDQ)), ++ OpenSSLCryptoBase64::b642BN(sInverseQ, (unsigned int) strlen(sInverseQ))); + + // Write it to disk + BIO *out; +@@ -3367,14 +3440,17 @@ + + // Create the RSA key file + RSA * rsa = RSA_new(); +- rsa->n = OpenSSLCryptoBase64::b642BN(sModulus, (unsigned int) strlen(sModulus)); +- rsa->e = OpenSSLCryptoBase64::b642BN(sExponent, (unsigned int) strlen(sExponent)); +- rsa->d = OpenSSLCryptoBase64::b642BN(sD, (unsigned int) strlen(sD)); +- rsa->p = OpenSSLCryptoBase64::b642BN(sP, (unsigned int) strlen(sP)); +- rsa->q = OpenSSLCryptoBase64::b642BN(sQ, (unsigned int) strlen(sQ)); +- rsa->dmp1 = OpenSSLCryptoBase64::b642BN(sDP, (unsigned int) strlen(sDP)); +- rsa->dmq1 = OpenSSLCryptoBase64::b642BN(sDQ, (unsigned int) strlen(sDQ)); +- rsa->iqmp = OpenSSLCryptoBase64::b642BN(sInverseQ, (unsigned int) strlen(sInverseQ)); ++ RSA_set0_key(rsa, ++ OpenSSLCryptoBase64::b642BN(sModulus, (unsigned int) strlen(sModulus)), ++ OpenSSLCryptoBase64::b642BN(sExponent, (unsigned int) strlen(sExponent)), ++ OpenSSLCryptoBase64::b642BN(sD, (unsigned int) strlen(sD))); ++ RSA_set0_factors(rsa, ++ OpenSSLCryptoBase64::b642BN(sP, (unsigned int) strlen(sP)), ++ OpenSSLCryptoBase64::b642BN(sQ, (unsigned int) strlen(sQ))); ++ RSA_set0_crt_params(rsa, ++ OpenSSLCryptoBase64::b642BN(sDP, (unsigned int) strlen(sDP)), ++ OpenSSLCryptoBase64::b642BN(sDQ, (unsigned int) strlen(sDQ)), ++ OpenSSLCryptoBase64::b642BN(sInverseQ, (unsigned int) strlen(sInverseQ))); + + // Write it to disk + BIO *out; diff --git a/xml-security-c.spec b/xml-security-c.spec index 9bab4fe..900884c 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,57 +1,58 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 1.7.3 -Release: 1%{?dist} +Release: 2%{?dist} License: ASL 2.0 URL: http://santuario.apache.org/c/ Source: http://www.apache.org/dist/santuario/c-library/xml-security-c-%{version}.tar.gz Patch0: xmlsec-1.6.1-cxx11.patch -BuildRequires: compat-openssl10-devel +Patch1: %{name}-ac_fixes.patch +Patch2: https://raw.githubusercontent.com/open-eid/libdigidocpp/master/xml-security-c-1.7.3_openssl1.1.patch +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libstdc++-devel +BuildRequires: openssl-devel BuildRequires: pkgconfig BuildRequires: xalan-c-devel BuildRequires: xerces-c-devel %description -The xml-security-c library is a C++ implementation of the XML Digital Signature -specification. The library makes use of the Apache XML project's Xerces-C XML -Parser and Xalan-C XSLT processor. The latter is used for processing XPath and -XSLT transforms. +The xml-security-c library is a C++ implementation of the XML Digital +Signature specification. The library makes use of the Apache XML project's +Xerces-C XML Parser and Xalan-C XSLT processor. The latter is used for +processing XPath and XSLT transforms. %package devel Summary: Development files for xml-security-c Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: compat-openssl10-devel +Requires: libstdc++-devel +Requires: openssl-devel Requires: xalan-c-devel Requires: xerces-c-devel %description devel -This package provides development files for xml-security-c, a C++ library for -XML Digital Signatures. +This package provides development files for xml-security-c, a C++ library +for XML Digital Signatures. %prep -%setup -q -# Remove bogus "-O2" from CXXFLAGS to avoid overriding RPM_OPT_FLAGS. -sed -i -e 's/-O2 -DNDEBUG/-DNDEBUG/g' configure -%patch0 -p1 +%autosetup -p1 %build +autoreconf -fiv %configure \ - --disable-static + --disable-debug \ + --disable-static \ + --without-nss \ + --with-openssl \ + --with-xalan \ + %{nil} %{make_build} -%check -# Verify that what was compiled actually works. -./xsec/xtest - %install %{make_install} -# We do not ship .la files. -rm -f $RPM_BUILD_ROOT%{_libdir}/*.la - -# Do not ship library test utilities. These are only needed for -# xml-security-c developers and they should have the whole source anyway. -rm -rf $RPM_BUILD_ROOT%{_bindir} +%check +./xsec/xtest %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -64,8 +65,24 @@ rm -rf $RPM_BUILD_ROOT%{_bindir} %doc CHANGELOG.txt NOTICE.txt %{_includedir}/xsec %{_libdir}/libxml-security-c.so +%exclude %{_libdir}/*.la +%exclude %{_bindir}/* %changelog +* Wed Aug 30 2017 Tomasz Kłoczko - 1.7.3-2 +- added patch which allows build xml-security-c against openssl 1.1 +- added ac_fixes patch: do not use sed to remove hardcoded compile + options. Use patch because you will never know is such correction + still nedded (added autoconf and automake to BuildRequires) +- added libstdc++-devel to BuildReqires and to devel Requires +- add explicit all %%configure options to prevent build by mistake package + against nss and force use openssl +- added --disable-debug to %%configure options +- added use %%autosetup in %%prep +- do not waste IOs on remove not packaged files and add them %%files + with %%exclude +- indent and clean spec (move patch comments to the patch) + * Tue Aug 29 2017 Kalev Lember - 1.7.3-1 - Update to 1.7.3 From 3c3bc50a984aef57c0a3eefd09c064d23dacc5f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20K=C5=82oczko?= Date: Wed, 30 Aug 2017 12:41:30 +0100 Subject: [PATCH 28/66] - fixed typo in %changelog --- xml-security-c.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 900884c..d2fc84d 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -73,7 +73,7 @@ autoreconf -fiv - added patch which allows build xml-security-c against openssl 1.1 - added ac_fixes patch: do not use sed to remove hardcoded compile options. Use patch because you will never know is such correction - still nedded (added autoconf and automake to BuildRequires) + still needed (added autoconf and automake to BuildRequires) - added libstdc++-devel to BuildReqires and to devel Requires - add explicit all %%configure options to prevent build by mistake package against nss and force use openssl From c7cbe5b3cb9d1e9a7dec5854fb84b6251a664340 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20K=C5=82oczko?= Date: Wed, 30 Aug 2017 12:45:36 +0100 Subject: [PATCH 29/66] - rename patch. --- xmlsec-1.6.1-cxx11.patch => xml-security-c-cxx11.patch | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename xmlsec-1.6.1-cxx11.patch => xml-security-c-cxx11.patch (100%) diff --git a/xmlsec-1.6.1-cxx11.patch b/xml-security-c-cxx11.patch similarity index 100% rename from xmlsec-1.6.1-cxx11.patch rename to xml-security-c-cxx11.patch From 3f04a703ab4519e6d3be62a367a60952418953e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20K=C5=82oczko?= Date: Wed, 30 Aug 2017 14:03:26 +0100 Subject: [PATCH 30/66] - reneme Patch0. --- xml-security-c.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index d2fc84d..db75aa0 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -5,7 +5,7 @@ Release: 2%{?dist} License: ASL 2.0 URL: http://santuario.apache.org/c/ Source: http://www.apache.org/dist/santuario/c-library/xml-security-c-%{version}.tar.gz -Patch0: xmlsec-1.6.1-cxx11.patch +Patch0: %{name}-cxx11.patch Patch1: %{name}-ac_fixes.patch Patch2: https://raw.githubusercontent.com/open-eid/libdigidocpp/master/xml-security-c-1.7.3_openssl1.1.patch BuildRequires: autoconf From 1995b2af7705feeb304aec0f80baf8957afd7f9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20K=C5=82oczko?= Date: Thu, 31 Aug 2017 20:47:24 +0100 Subject: [PATCH 31/66] - added libtool to BuildRequires. --- xml-security-c.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index db75aa0..1775a00 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -11,6 +11,7 @@ Patch2: https://raw.githubusercontent.com/open-eid/libdigidocpp/master/xml-secu BuildRequires: autoconf BuildRequires: automake BuildRequires: libstdc++-devel +BuildRequires: libtool BuildRequires: openssl-devel BuildRequires: pkgconfig BuildRequires: xalan-c-devel @@ -73,7 +74,7 @@ autoreconf -fiv - added patch which allows build xml-security-c against openssl 1.1 - added ac_fixes patch: do not use sed to remove hardcoded compile options. Use patch because you will never know is such correction - still needed (added autoconf and automake to BuildRequires) + still needed (added autoconf, automake and libtool to BuildRequires) - added libstdc++-devel to BuildReqires and to devel Requires - add explicit all %%configure options to prevent build by mistake package against nss and force use openssl From e23ac514deaaa6909b74fd6614d421fcf51d9931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20K=C5=82oczko?= Date: Wed, 31 Jan 2018 02:04:12 +0000 Subject: [PATCH 32/66] - release 3 - remove ldconfig scriptlets - more cleanups --- xml-security-c.spec | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 1775a00..634aecd 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,7 +1,7 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 1.7.3 -Release: 2%{?dist} +Release: 3%{?dist} License: ASL 2.0 URL: http://santuario.apache.org/c/ Source: http://www.apache.org/dist/santuario/c-library/xml-security-c-%{version}.tar.gz @@ -47,29 +47,30 @@ autoreconf -fiv --with-openssl \ --with-xalan \ %{nil} -%{make_build} +%make_build %install -%{make_install} +%make_install %check ./xsec/xtest -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig - %files -%{_libdir}/libxml-security-c.so.* +%attr(755,root,root) %{_libdir}/libxml-security-c.so.* %files devel %license LICENSE.txt %doc CHANGELOG.txt NOTICE.txt -%{_includedir}/xsec -%{_libdir}/libxml-security-c.so -%exclude %{_libdir}/*.la %exclude %{_bindir}/* +%attr(755,root,root) %{_libdir}/libxml-security-c.so +%exclude %{_libdir}/*.la +%{_includedir}/xsec %changelog +* Wed Jan 31 2018 Tomasz Kłoczko - 1.7.3-3 +- remove ldconfig scriptlets +- more cleanups + * Wed Aug 30 2017 Tomasz Kłoczko - 1.7.3-2 - added patch which allows build xml-security-c against openssl 1.1 - added ac_fixes patch: do not use sed to remove hardcoded compile From f081bec21f549858896c67142f9c547658d82387 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20K=C5=82oczko?= Date: Wed, 31 Jan 2018 02:05:11 +0000 Subject: [PATCH 33/66] use file patern regexp instead list of exact file names --- .gitignore | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 909c243..e8f33e0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1 @@ -xml-security-c-1.5.1.tar.gz -/xml-security-c-1.6.0.tar.gz -/xml-security-c-1.6.1.tar.gz -/xml-security-c-1.7.3.tar.gz +xml-security-c-*.tar.gz From b4c153ad71d65d38ecaff2c20aba6c7bde4b08d3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 9 Feb 2018 21:45:42 +0000 Subject: [PATCH 34/66] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 634aecd..79ac22b 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,7 +1,7 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 1.7.3 -Release: 3%{?dist} +Release: 4%{?dist} License: ASL 2.0 URL: http://santuario.apache.org/c/ Source: http://www.apache.org/dist/santuario/c-library/xml-security-c-%{version}.tar.gz @@ -67,6 +67,9 @@ autoreconf -fiv %{_includedir}/xsec %changelog +* Fri Feb 09 2018 Fedora Release Engineering - 1.7.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Wed Jan 31 2018 Tomasz Kłoczko - 1.7.3-3 - remove ldconfig scriptlets - more cleanups From 235b5fd3615d8e2b7252480f598c9d6b82343aa6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 14 Jul 2018 09:22:34 +0000 Subject: [PATCH 35/66] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 79ac22b..93ef970 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,7 +1,7 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 1.7.3 -Release: 4%{?dist} +Release: 5%{?dist} License: ASL 2.0 URL: http://santuario.apache.org/c/ Source: http://www.apache.org/dist/santuario/c-library/xml-security-c-%{version}.tar.gz @@ -67,6 +67,9 @@ autoreconf -fiv %{_includedir}/xsec %changelog +* Sat Jul 14 2018 Fedora Release Engineering - 1.7.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Fri Feb 09 2018 Fedora Release Engineering - 1.7.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 0003b52f41373697cc6e3cdf4075359925a62ade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20K=C5=82oczko?= Date: Wed, 18 Jul 2018 02:39:05 +0100 Subject: [PATCH 36/66] added /usr/bin/c++ to BuildRequires --- xml-security-c.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xml-security-c.spec b/xml-security-c.spec index 93ef970..26f8704 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -10,6 +10,7 @@ Patch1: %{name}-ac_fixes.patch Patch2: https://raw.githubusercontent.com/open-eid/libdigidocpp/master/xml-security-c-1.7.3_openssl1.1.patch BuildRequires: autoconf BuildRequires: automake +BuildRequires: /usr/bin/c++ BuildRequires: libstdc++-devel BuildRequires: libtool BuildRequires: openssl-devel @@ -67,6 +68,9 @@ autoreconf -fiv %{_includedir}/xsec %changelog +* Wed 18 Jul 2018 Tomasz Kłoczko - 1.7.3-5 +- added /usr/bin/c++ to BuildRequires + * Sat Jul 14 2018 Fedora Release Engineering - 1.7.3-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From 50ee04bdf1e81c2396d199b32effb0a3c6059afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20K=C5=82oczko?= Date: Wed, 18 Jul 2018 02:47:34 +0100 Subject: [PATCH 37/66] fixed %changelog date --- xml-security-c.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 26f8704..12d55a4 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -68,7 +68,7 @@ autoreconf -fiv %{_includedir}/xsec %changelog -* Wed 18 Jul 2018 Tomasz Kłoczko - 1.7.3-5 +* Wed Jul 18 2018 Tomasz Kłoczko - 1.7.3-5 - added /usr/bin/c++ to BuildRequires * Sat Jul 14 2018 Fedora Release Engineering - 1.7.3-5 From af1ea7655555f0cf783478795dec32b9e5ae47e6 Mon Sep 17 00:00:00 2001 From: Pete Walter Date: Fri, 16 Nov 2018 11:38:30 +0000 Subject: [PATCH 38/66] Update to 2.0.2 --- sources | 2 +- xml-security-c-1.7.3_openssl1.1.patch | 1700 ------------------------- xml-security-c-cxx11.patch | 13 - xml-security-c.spec | 12 +- 4 files changed, 8 insertions(+), 1719 deletions(-) delete mode 100644 xml-security-c-1.7.3_openssl1.1.patch delete mode 100644 xml-security-c-cxx11.patch diff --git a/sources b/sources index 0abc979..b910bcd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xml-security-c-1.7.3.tar.gz) = ea46709d6706edf345e19132d9998774e50dc7b5947a7b4a55e3627998f5ac66f976fdff0a5015ef3cee73c03c04f3c4cf993efd397082491c2000c6548b89d2 +SHA512 (xml-security-c-2.0.2.tar.gz) = bebadee2daf27181f5bcc955a909397976e8fd2e67f5e546f5adbede0ca790647cbec9181b0b609da59d525ff3baa9f899af2a3d815bc7a2f3a57bd8b30c011b diff --git a/xml-security-c-1.7.3_openssl1.1.patch b/xml-security-c-1.7.3_openssl1.1.patch deleted file mode 100644 index 03e564d..0000000 --- a/xml-security-c-1.7.3_openssl1.1.patch +++ /dev/null @@ -1,1700 +0,0 @@ -diff -U3 -r xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoBase64.cpp xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoBase64.cpp ---- xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoBase64.cpp 2012-07-23 19:56:11.000000000 +0300 -+++ xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoBase64.cpp 2017-02-19 20:37:10.000000000 +0200 -@@ -44,6 +44,15 @@ - - XERCES_CPP_NAMESPACE_USE - -+OpenSSLCryptoBase64::OpenSSLCryptoBase64() { -+ m_ectx = EVP_ENCODE_CTX_new(); -+ m_dctx = EVP_ENCODE_CTX_new(); -+} -+ -+OpenSSLCryptoBase64::~OpenSSLCryptoBase64() { -+ EVP_ENCODE_CTX_free(m_ectx); -+ EVP_ENCODE_CTX_free(m_dctx); -+} - - // -------------------------------------------------------------------------------- - // Decoding -@@ -51,7 +60,7 @@ - - void OpenSSLCryptoBase64::decodeInit(void) { - -- EVP_DecodeInit(&m_dctx); -+ EVP_DecodeInit(m_dctx); - - } - -@@ -70,7 +79,7 @@ - - } - -- rc = EVP_DecodeUpdate(&m_dctx, -+ rc = EVP_DecodeUpdate(m_dctx, - outData, - &outLen, - (unsigned char *) inData, -@@ -99,7 +108,7 @@ - int outLen; - outLen = outLength; - -- EVP_DecodeFinal(&m_dctx, outData, &outLen); -+ EVP_DecodeFinal(m_dctx, outData, &outLen); - - return outLen; - -@@ -111,7 +120,7 @@ - - void OpenSSLCryptoBase64::encodeInit(void) { - -- EVP_EncodeInit(&m_ectx); -+ EVP_EncodeInit(m_ectx); - - } - -@@ -130,7 +139,7 @@ - - } - -- EVP_EncodeUpdate(&m_ectx, -+ EVP_EncodeUpdate(m_ectx, - outData, - &outLen, - (unsigned char *) inData, -@@ -153,7 +162,7 @@ - int outLen; - outLen = outLength; - -- EVP_EncodeFinal(&m_ectx, outData, &outLen); -+ EVP_EncodeFinal(m_ectx, outData, &outLen); - - return outLen; - -diff -U3 -r xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoBase64.hpp xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoBase64.hpp ---- xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoBase64.hpp 2012-07-23 19:56:11.000000000 +0300 -+++ xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoBase64.hpp 2017-02-19 10:46:50.000000000 +0200 -@@ -66,8 +66,8 @@ - public : - - -- OpenSSLCryptoBase64() {}; -- virtual ~OpenSSLCryptoBase64() {}; -+ OpenSSLCryptoBase64(); -+ virtual ~OpenSSLCryptoBase64(); - - /** @name Decoding Functions */ - //@{ -@@ -189,20 +189,20 @@ - * \brief Get OpenSSL encode context structure - */ - -- EVP_ENCODE_CTX * getOpenSSLEncodeEVP_ENCODE_CTX(void) {return &m_ectx;} -+ EVP_ENCODE_CTX * getOpenSSLEncodeEVP_ENCODE_CTX(void) {return m_ectx;} - - /** - * \brief Get OpenSSL encode context structure - */ - -- EVP_ENCODE_CTX * getOpenSSLDecodeEVP_ENCODE_CTX(void) {return &m_dctx;} -+ EVP_ENCODE_CTX * getOpenSSLDecodeEVP_ENCODE_CTX(void) {return m_dctx;} - - //@} - - private : - -- EVP_ENCODE_CTX m_ectx; // Encode context -- EVP_ENCODE_CTX m_dctx; // Decode context -+ EVP_ENCODE_CTX *m_ectx; // Encode context -+ EVP_ENCODE_CTX *m_dctx; // Decode context - - }; - -diff -U3 -r xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoHash.cpp xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoHash.cpp ---- xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoHash.cpp 2012-07-23 19:56:11.000000000 +0300 -+++ xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoHash.cpp 2017-02-19 20:48:48.000000000 +0200 -@@ -40,6 +40,7 @@ - - OpenSSLCryptoHash::OpenSSLCryptoHash(HashType alg) { - -+ m_mdctx = EVP_MD_CTX_create(); - switch (alg) { - - case (XSECCryptoHash::HASH_SHA1) : -@@ -104,7 +105,7 @@ - "OpenSSL:Hash - Error loading Message Digest"); - } - -- EVP_DigestInit(&m_mdctx, mp_md); -+ EVP_DigestInit(m_mdctx, mp_md); - m_hashType = alg; - - } -@@ -112,7 +113,7 @@ - - OpenSSLCryptoHash::~OpenSSLCryptoHash() { - -- EVP_MD_CTX_cleanup(&m_mdctx); -+ EVP_MD_CTX_free(m_mdctx); - - } - -@@ -121,16 +122,16 @@ - // Hashing Activities - void OpenSSLCryptoHash::reset(void) { - -- EVP_MD_CTX_cleanup(&m_mdctx); -- -- EVP_DigestInit(&m_mdctx, mp_md); -+ EVP_MD_CTX_free(m_mdctx); -+ m_mdctx = EVP_MD_CTX_new(); -+ EVP_DigestInit(m_mdctx, mp_md); - - } - - void OpenSSLCryptoHash::hash(unsigned char * data, - unsigned int length) { - -- EVP_DigestUpdate(&m_mdctx, data, length); -+ EVP_DigestUpdate(m_mdctx, data, length); - - } - unsigned int OpenSSLCryptoHash::finish(unsigned char * hash, -@@ -140,7 +141,7 @@ - - // Finish up and copy out hash, returning the length - -- EVP_DigestFinal(&m_mdctx, m_mdValue, &m_mdLen); -+ EVP_DigestFinal(m_mdctx, m_mdValue, &m_mdLen); - - // Copy to output buffer - -diff -U3 -r xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoHash.hpp xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoHash.hpp ---- xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoHash.hpp 2012-07-23 19:56:11.000000000 +0300 -+++ xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoHash.hpp 2017-02-19 10:42:32.000000000 +0200 -@@ -138,7 +138,7 @@ - * \brief Get OpenSSL hash context structure - */ - -- EVP_MD_CTX * getOpenSSLEVP_MD_CTX(void) {return &m_mdctx;} -+ EVP_MD_CTX * getOpenSSLEVP_MD_CTX(void) {return m_mdctx;} - - //@} - -@@ -148,7 +148,7 @@ - // Not implemented constructors - OpenSSLCryptoHash(); - -- EVP_MD_CTX m_mdctx; // Context for digest -+ EVP_MD_CTX *m_mdctx; // Context for digest - const EVP_MD * mp_md; // Digest instance - unsigned char m_mdValue[EVP_MAX_MD_SIZE]; // Final output - unsigned int m_mdLen; // Length of digest -diff -U3 -r xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoHashHMAC.cpp xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoHashHMAC.cpp ---- xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoHashHMAC.cpp 2012-07-23 19:56:11.000000000 +0300 -+++ xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoHashHMAC.cpp 2017-02-19 20:50:03.000000000 +0200 -@@ -43,6 +43,7 @@ - OpenSSLCryptoHashHMAC::OpenSSLCryptoHashHMAC(HashType alg) { - - // Initialise the digest -+ m_hctx = HMAC_CTX_new(); - - switch (alg) { - -@@ -127,7 +128,7 @@ - m_keyLen = ((XSECCryptoKeyHMAC *) key)->getKey(m_keyBuf); - - -- HMAC_Init(&m_hctx, -+ HMAC_Init(m_hctx, - m_keyBuf.rawBuffer(), - m_keyLen, - mp_md); -@@ -139,7 +140,7 @@ - OpenSSLCryptoHashHMAC::~OpenSSLCryptoHashHMAC() { - - if (m_initialised) -- HMAC_CTX_cleanup(&m_hctx); -+ HMAC_CTX_free(m_hctx); - - } - -@@ -151,9 +152,9 @@ - - if (m_initialised) { - -- HMAC_CTX_cleanup(&m_hctx); -- -- HMAC_Init(&m_hctx, -+ HMAC_CTX_free(m_hctx); -+ m_hctx = HMAC_CTX_new(); -+ HMAC_Init(m_hctx, - m_keyBuf.rawBuffer(), - m_keyLen, - mp_md); -@@ -170,7 +171,7 @@ - "OpenSSL:HashHMAC - hash called prior to setKey"); - - -- HMAC_Update(&m_hctx, data, (int) length); -+ HMAC_Update(m_hctx, data, (int) length); - - } - -@@ -181,7 +182,7 @@ - - // Finish up and copy out hash, returning the length - -- HMAC_Final(&m_hctx, m_mdValue, &m_mdLen); -+ HMAC_Final(m_hctx, m_mdValue, &m_mdLen); - - // Copy to output buffer - -diff -U3 -r xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoHashHMAC.hpp xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoHashHMAC.hpp ---- xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoHashHMAC.hpp 2012-07-23 19:56:11.000000000 +0300 -+++ xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoHashHMAC.hpp 2017-02-19 10:50:19.000000000 +0200 -@@ -162,7 +162,7 @@ - * \brief Get OpenSSL Hash Context - */ - -- HMAC_CTX * getOpenSSLHMAC_CTX(void) {return &m_hctx;} -+ HMAC_CTX * getOpenSSLHMAC_CTX(void) {return m_hctx;} - - //@} - -@@ -175,7 +175,7 @@ - unsigned char m_mdValue[EVP_MAX_MD_SIZE]; // Final output - unsigned int m_mdLen; // Length of digest - HashType m_hashType; // What type of hash is this? -- HMAC_CTX m_hctx; // Context for HMAC -+ HMAC_CTX *m_hctx; // Context for HMAC - safeBuffer m_keyBuf; // The loaded key - unsigned int m_keyLen; // The loaded key length - bool m_initialised; -diff -U3 -r xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoKeyDSA.cpp xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoKeyDSA.cpp ---- xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoKeyDSA.cpp 2015-01-29 04:52:17.000000000 +0200 -+++ xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoKeyDSA.cpp 2017-02-19 22:39:29.000000000 +0200 -@@ -64,13 +64,15 @@ - if (mp_dsaKey == NULL) - return KEY_NONE; - -- if (mp_dsaKey->priv_key != NULL && mp_dsaKey->pub_key != NULL) -+ const BIGNUM *pub_key = 0, *priv_key = 0; -+ DSA_get0_key(mp_dsaKey, &pub_key, &priv_key); -+ if (priv_key != NULL && pub_key != NULL) - return KEY_DSA_PAIR; - -- if (mp_dsaKey->priv_key != NULL) -+ if (priv_key != NULL) - return KEY_DSA_PRIVATE; - -- if (mp_dsaKey->pub_key != NULL) -+ if (pub_key != NULL) - return KEY_DSA_PUBLIC; - - return KEY_NONE; -@@ -82,7 +84,7 @@ - if (mp_dsaKey == NULL) - mp_dsaKey = DSA_new(); - -- mp_dsaKey->p = OpenSSLCryptoBase64::b642BN((char *) b64, len); -+ DSA_set0_pqg(mp_dsaKey, OpenSSLCryptoBase64::b642BN((char *) b64, len), 0, 0); - - } - -@@ -91,7 +93,7 @@ - if (mp_dsaKey == NULL) - mp_dsaKey = DSA_new(); - -- mp_dsaKey->q = OpenSSLCryptoBase64::b642BN((char *) b64, len); -+ DSA_set0_pqg(mp_dsaKey, 0, OpenSSLCryptoBase64::b642BN((char *) b64, len), 0); - - } - -@@ -100,7 +102,7 @@ - if (mp_dsaKey == NULL) - mp_dsaKey = DSA_new(); - -- mp_dsaKey->g = OpenSSLCryptoBase64::b642BN((char *) b64, len); -+ DSA_set0_pqg(mp_dsaKey, 0, 0, OpenSSLCryptoBase64::b642BN((char *) b64, len)); - - } - -@@ -109,7 +111,7 @@ - if (mp_dsaKey == NULL) - mp_dsaKey = DSA_new(); - -- mp_dsaKey->pub_key = OpenSSLCryptoBase64::b642BN((char *) b64, len); -+ DSA_set0_key(mp_dsaKey, OpenSSLCryptoBase64::b642BN((char *) b64, len), 0); - - } - -@@ -130,20 +132,15 @@ - - mp_dsaKey = DSA_new(); - -- if (k == NULL || k->type != EVP_PKEY_DSA) -+ if (k == NULL || EVP_PKEY_base_id(k) != EVP_PKEY_DSA) - return; // Nothing to do with us - -- -- if (k->pkey.dsa->p) -- mp_dsaKey->p = BN_dup(k->pkey.dsa->p); -- if (k->pkey.dsa->q) -- mp_dsaKey->q = BN_dup(k->pkey.dsa->q); -- if (k->pkey.dsa->g) -- mp_dsaKey->g = BN_dup(k->pkey.dsa->g); -- if (k->pkey.dsa->pub_key) -- mp_dsaKey->pub_key = BN_dup(k->pkey.dsa->pub_key); -- if (k->pkey.dsa->priv_key) -- mp_dsaKey->priv_key = BN_dup(k->pkey.dsa->priv_key); -+ DSA *dsa = EVP_PKEY_get0_DSA(k); -+ const BIGNUM *p = 0, *q = 0, *g = 0, *pub_key = 0, *priv_key = 0; -+ DSA_get0_pqg(dsa, &p, &q, &g); -+ DSA_get0_key(dsa, &pub_key, &priv_key); -+ DSA_set0_pqg(mp_dsaKey, BN_dup(p), BN_dup(q), BN_dup(g)); -+ DSA_set0_key(mp_dsaKey, BN_dup(pub_key), BN_dup(priv_key)); - - } - -@@ -175,9 +172,9 @@ - unsigned char* sigVal = new unsigned char[sigLen + 1]; - ArrayJanitor j_sigVal(sigVal); - -- EVP_ENCODE_CTX m_dctx; -- EVP_DecodeInit(&m_dctx); -- int rc = EVP_DecodeUpdate(&m_dctx, -+ EVP_ENCODE_CTX *m_dctx = EVP_ENCODE_CTX_new(); -+ EVP_DecodeInit(m_dctx); -+ int rc = EVP_DecodeUpdate(m_dctx, - sigVal, - &sigValLen, - (unsigned char *) cleanedBase64Signature, -@@ -190,7 +187,8 @@ - } - int t = 0; - -- EVP_DecodeFinal(&m_dctx, &sigVal[sigValLen], &t); -+ EVP_DecodeFinal(m_dctx, &sigVal[sigValLen], &t); -+ EVP_ENCODE_CTX_free(m_dctx); - - sigValLen += t; - -@@ -223,12 +221,7 @@ - } - - DSA_SIG * dsa_sig = DSA_SIG_new(); -- -- dsa_sig->r = BN_dup(R); -- dsa_sig->s = BN_dup(S); -- -- BN_free(R); -- BN_free(S); -+ DSA_SIG_set0(dsa_sig, R, S); - - // Now we have a signature and a key - lets check - -@@ -267,6 +260,8 @@ - DSA_SIG * dsa_sig; - - dsa_sig = DSA_do_sign(hashBuf, hashLen, mp_dsaKey); -+ const BIGNUM *r = 0, *s = 0; -+ DSA_SIG_get0(dsa_sig, &r, &s); - - if (dsa_sig == NULL) { - -@@ -277,10 +272,10 @@ - - // Now turn the signature into a base64 string - -- unsigned char* rawSigBuf = new unsigned char[(BN_num_bits(dsa_sig->r) + BN_num_bits(dsa_sig->s) + 7) / 8]; -+ unsigned char* rawSigBuf = new unsigned char[(BN_num_bits(r) + BN_num_bits(s) + 7) / 8]; - ArrayJanitor j_sigbuf(rawSigBuf); - -- unsigned int rawLen = BN_bn2bin(dsa_sig->r, rawSigBuf); -+ unsigned int rawLen = BN_bn2bin(r, rawSigBuf); - - if (rawLen <= 0) { - -@@ -289,7 +284,7 @@ - - } - -- unsigned int rawLenS = BN_bn2bin(dsa_sig->s, (unsigned char *) &rawSigBuf[rawLen]); -+ unsigned int rawLenS = BN_bn2bin(s, (unsigned char *) &rawSigBuf[rawLen]); - - if (rawLenS <= 0) { - -@@ -339,16 +334,11 @@ - ret->mp_dsaKey = DSA_new(); - - // Duplicate parameters -- if (mp_dsaKey->p) -- ret->mp_dsaKey->p = BN_dup(mp_dsaKey->p); -- if (mp_dsaKey->q) -- ret->mp_dsaKey->q = BN_dup(mp_dsaKey->q); -- if (mp_dsaKey->g) -- ret->mp_dsaKey->g = BN_dup(mp_dsaKey->g); -- if (mp_dsaKey->pub_key) -- ret->mp_dsaKey->pub_key = BN_dup(mp_dsaKey->pub_key); -- if (mp_dsaKey->priv_key) -- ret->mp_dsaKey->priv_key = BN_dup(mp_dsaKey->priv_key); -+ const BIGNUM *p = 0, *q = 0, *g = 0, *pub_key = 0, *priv_key = 0; -+ DSA_get0_pqg(mp_dsaKey, &p, &q, &g); -+ DSA_get0_key(mp_dsaKey, &pub_key, &priv_key); -+ DSA_set0_pqg(ret->mp_dsaKey, BN_dup(p), BN_dup(q), BN_dup(g)); -+ DSA_set0_key(ret->mp_dsaKey, BN_dup(pub_key), BN_dup(priv_key)); - - return ret; - -diff -U3 -r xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoKeyEC.cpp xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoKeyEC.cpp ---- xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoKeyEC.cpp 2015-02-03 02:57:48.000000000 +0200 -+++ xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoKeyEC.cpp 2017-02-19 21:57:57.000000000 +0200 -@@ -128,10 +128,10 @@ - - // Create a new key to be loaded as we go - -- if (k == NULL || k->type != EVP_PKEY_EC) -+ if (k == NULL || EVP_PKEY_base_id(k) != EVP_PKEY_EC) - return; // Nothing to do with us - -- mp_ecKey = EC_KEY_dup(k->pkey.ec); -+ mp_ecKey = EC_KEY_dup(EVP_PKEY_get0_EC_KEY(k)); - } - - // -------------------------------------------------------------------------------- -@@ -162,9 +162,9 @@ - unsigned char* sigVal = new unsigned char[sigLen + 1]; - ArrayJanitor j_sigVal(sigVal); - -- EVP_ENCODE_CTX m_dctx; -- EVP_DecodeInit(&m_dctx); -- int rc = EVP_DecodeUpdate(&m_dctx, -+ EVP_ENCODE_CTX *m_dctx = EVP_ENCODE_CTX_new(); -+ EVP_DecodeInit(m_dctx); -+ int rc = EVP_DecodeUpdate(m_dctx, - sigVal, - &sigValLen, - (unsigned char *) cleanedBase64Signature, -@@ -177,7 +177,8 @@ - } - int t = 0; - -- EVP_DecodeFinal(&m_dctx, &sigVal[sigValLen], &t); -+ EVP_DecodeFinal(m_dctx, &sigVal[sigValLen], &t); -+ EVP_ENCODE_CTX_free(m_dctx); - - sigValLen += t; - -@@ -189,8 +190,9 @@ - // Translate to BNs by splitting in half, and thence to ECDSA_SIG - - ECDSA_SIG * dsa_sig = ECDSA_SIG_new(); -- dsa_sig->r = BN_bin2bn(sigVal, sigValLen / 2, NULL); -- dsa_sig->s = BN_bin2bn(&sigVal[sigValLen / 2], sigValLen / 2, NULL); -+ ECDSA_SIG_set0(dsa_sig, -+ BN_bin2bn(sigVal, sigValLen / 2, NULL), -+ BN_bin2bn(&sigVal[sigValLen / 2], sigValLen / 2, NULL)); - - // Now we have a signature and a key - lets check - -@@ -228,6 +230,8 @@ - ECDSA_SIG * dsa_sig; - - dsa_sig = ECDSA_do_sign(hashBuf, hashLen, mp_ecKey); -+ const BIGNUM *r, *s; -+ ECDSA_SIG_get0(dsa_sig, &r, &s); - - if (dsa_sig == NULL) { - throw XSECCryptoException(XSECCryptoException::ECError, -@@ -263,14 +267,14 @@ - memset(rawSigBuf, 0, keyLen * 2); - ArrayJanitor j_sigbuf(rawSigBuf); - -- unsigned int rawLen = (BN_num_bits(dsa_sig->r) + 7) / 8; -- if (BN_bn2bin(dsa_sig->r, rawSigBuf + keyLen - rawLen) <= 0) { -+ unsigned int rawLen = (BN_num_bits(r) + 7) / 8; -+ if (BN_bn2bin(r, rawSigBuf + keyLen - rawLen) <= 0) { - throw XSECCryptoException(XSECCryptoException::ECError, - "OpenSSL:EC - Error copying signature 'r' value to buffer"); - } - -- rawLen = (BN_num_bits(dsa_sig->s) + 7) / 8; -- if (BN_bn2bin(dsa_sig->s, rawSigBuf + keyLen + keyLen - rawLen) <= 0) { -+ rawLen = (BN_num_bits(s) + 7) / 8; -+ if (BN_bn2bin(s, rawSigBuf + keyLen + keyLen - rawLen) <= 0) { - throw XSECCryptoException(XSECCryptoException::ECError, - "OpenSSL:EC - Error copying signature 's' value to buffer"); - } -diff -U3 -r xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoKeyRSA.cpp xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoKeyRSA.cpp ---- xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoKeyRSA.cpp 2012-07-23 19:56:11.000000000 +0300 -+++ xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoKeyRSA.cpp 2017-02-19 21:53:14.000000000 +0200 -@@ -326,13 +326,15 @@ - if (mp_rsaKey == NULL) - return KEY_NONE; - -- if (mp_rsaKey->n != NULL && mp_rsaKey->d != NULL) -+ const BIGNUM *n = 0, *e = 0, *d = 0; -+ RSA_get0_key(mp_rsaKey, &n, &e, &d); -+ if (n != NULL && d != NULL) - return KEY_RSA_PAIR; - -- if (mp_rsaKey->d != NULL) -+ if (d != NULL) - return KEY_RSA_PRIVATE; - -- if (mp_rsaKey->n != NULL) -+ if (n != NULL) - return KEY_RSA_PUBLIC; - - return KEY_NONE; -@@ -344,7 +346,7 @@ - if (mp_rsaKey == NULL) - mp_rsaKey = RSA_new(); - -- mp_rsaKey->n = OpenSSLCryptoBase64::b642BN((char *) b64, len); -+ RSA_set0_key(mp_rsaKey, OpenSSLCryptoBase64::b642BN((char *) b64, len), 0, 0); - - } - -@@ -353,7 +355,7 @@ - if (mp_rsaKey == NULL) - mp_rsaKey = RSA_new(); - -- mp_rsaKey->e = OpenSSLCryptoBase64::b642BN((char *) b64, len); -+ RSA_set0_key(mp_rsaKey, 0, OpenSSLCryptoBase64::b642BN((char *) b64, len), 0); - - } - -@@ -369,32 +371,17 @@ - - mp_rsaKey = RSA_new(); - -- if (k == NULL || k->type != EVP_PKEY_RSA) -+ if (k == NULL || EVP_PKEY_base_id(k) != EVP_PKEY_RSA) - return; // Nothing to do with us - -- if (k->pkey.rsa->n) -- mp_rsaKey->n = BN_dup(k->pkey.rsa->n); -- -- if (k->pkey.rsa->e) -- mp_rsaKey->e = BN_dup(k->pkey.rsa->e); -- -- if (k->pkey.rsa->d) -- mp_rsaKey->d = BN_dup(k->pkey.rsa->d); -- -- if (k->pkey.rsa->p) -- mp_rsaKey->p = BN_dup(k->pkey.rsa->p); -- -- if (k->pkey.rsa->q) -- mp_rsaKey->q = BN_dup(k->pkey.rsa->q); -- -- if (k->pkey.rsa->dmp1) -- mp_rsaKey->dmp1 = BN_dup(k->pkey.rsa->dmp1); -- -- if (k->pkey.rsa->dmq1) -- mp_rsaKey->dmq1 = BN_dup(k->pkey.rsa->dmq1); -- -- if (k->pkey.rsa->iqmp) -- mp_rsaKey->iqmp = BN_dup(k->pkey.rsa->iqmp); -+ RSA *rsa = EVP_PKEY_get0_RSA(k); -+ const BIGNUM *n = 0, *e = 0, *d = 0, *p = 0, *q = 0, *dmp1 = 0, *dmq1 = 0, *iqmp = 0; -+ RSA_get0_key(rsa, &n, &e, &d); -+ RSA_get0_factors(rsa, &p, &q); -+ RSA_get0_crt_params(rsa, &dmp1, &dmq1, &iqmp); -+ RSA_set0_key(mp_rsaKey, BN_dup(n), BN_dup(e), BN_dup(d)); -+ RSA_set0_factors(mp_rsaKey, BN_dup(p), BN_dup(q)); -+ RSA_set0_crt_params(mp_rsaKey, BN_dup(dmp1), BN_dup(dmq1), BN_dup(iqmp)); - - } - -@@ -427,9 +414,9 @@ - unsigned char* sigVal = new unsigned char[sigLen + 1]; - ArrayJanitor j_sigVal(sigVal); - -- EVP_ENCODE_CTX m_dctx; -- EVP_DecodeInit(&m_dctx); -- int rc = EVP_DecodeUpdate(&m_dctx, -+ EVP_ENCODE_CTX *m_dctx = EVP_ENCODE_CTX_new(); -+ EVP_DecodeInit(m_dctx); -+ int rc = EVP_DecodeUpdate(m_dctx, - sigVal, - &sigValLen, - (unsigned char *) cleanedBase64Signature, -@@ -442,7 +429,8 @@ - } - int t = 0; - -- EVP_DecodeFinal(&m_dctx, &sigVal[sigValLen], &t); -+ EVP_DecodeFinal(m_dctx, &sigVal[sigValLen], &t); -+ EVP_ENCODE_CTX_free(m_dctx); - - sigValLen += t; - -@@ -979,29 +967,13 @@ - - // Duplicate parameters - -- if (mp_rsaKey->n) -- ret->mp_rsaKey->n = BN_dup(mp_rsaKey->n); -- -- if (mp_rsaKey->e) -- ret->mp_rsaKey->e = BN_dup(mp_rsaKey->e); -- -- if (mp_rsaKey->d) -- ret->mp_rsaKey->d = BN_dup(mp_rsaKey->d); -- -- if (mp_rsaKey->p) -- ret->mp_rsaKey->p = BN_dup(mp_rsaKey->p); -- -- if (mp_rsaKey->q) -- ret->mp_rsaKey->q = BN_dup(mp_rsaKey->q); -- -- if (mp_rsaKey->dmp1) -- ret->mp_rsaKey->dmp1 = BN_dup(mp_rsaKey->dmp1); -- -- if (mp_rsaKey->dmq1) -- ret->mp_rsaKey->dmq1 = BN_dup(mp_rsaKey->dmq1); -- -- if (mp_rsaKey->iqmp) -- ret->mp_rsaKey->iqmp = BN_dup(mp_rsaKey->iqmp); -+ const BIGNUM *n = 0, *e = 0, *d = 0, *p = 0, *q = 0, *dmp1 = 0, *dmq1 = 0, *iqmp = 0; -+ RSA_get0_key(mp_rsaKey, &n, &e, &d); -+ RSA_get0_factors(mp_rsaKey, &p, &q); -+ RSA_get0_crt_params(mp_rsaKey, &dmp1, &dmq1, &iqmp); -+ RSA_set0_key(ret->mp_rsaKey, BN_dup(n), BN_dup(e), BN_dup(d)); -+ RSA_set0_factors(ret->mp_rsaKey, BN_dup(p), BN_dup(q)); -+ RSA_set0_crt_params(ret->mp_rsaKey, BN_dup(dmp1), BN_dup(dmq1), BN_dup(iqmp)); - - return ret; - -diff -U3 -r xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoProvider.cpp xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoProvider.cpp ---- xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoProvider.cpp 2012-07-23 19:56:11.000000000 +0300 -+++ xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoProvider.cpp 2017-02-19 21:28:15.000000000 +0200 -@@ -343,7 +343,7 @@ - if (pkey) { - XSECCryptoKey* ret = NULL; - try { -- switch (pkey->type) { -+ switch (EVP_PKEY_base_id(pkey)) { - case EVP_PKEY_RSA: - ret = new OpenSSLCryptoKeyRSA(pkey); - break; -diff -U3 -r xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoSymmetricKey.cpp xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoSymmetricKey.cpp ---- xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoSymmetricKey.cpp 2015-01-29 04:52:17.000000000 +0200 -+++ xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoSymmetricKey.cpp 2017-02-19 21:24:51.000000000 +0200 -@@ -56,7 +56,8 @@ - m_keyLen(0), - m_initialised(false) { - -- EVP_CIPHER_CTX_init(&m_ctx); -+ m_ctx = EVP_CIPHER_CTX_new(); -+ EVP_CIPHER_CTX_init(m_ctx); - m_keyBuf.isSensitive(); - - } -@@ -65,7 +66,7 @@ - - // Clean up the context - -- EVP_CIPHER_CTX_cleanup(&m_ctx); -+ EVP_CIPHER_CTX_free(m_ctx); - } - - // -------------------------------------------------------------------------------- -@@ -149,17 +150,17 @@ - with 0.9.6 */ - - #if defined(XSEC_OPENSSL_CONST_BUFFERS) -- EVP_DecryptInit(&m_ctx, EVP_des_ede3_cbc(),m_keyBuf.rawBuffer(), iv); -+ EVP_DecryptInit(m_ctx, EVP_des_ede3_cbc(),m_keyBuf.rawBuffer(), iv); - #else -- EVP_DecryptInit(&m_ctx, EVP_des_ede3_cbc(),(unsigned char *) m_keyBuf.rawBuffer(), (unsigned char *) iv); -+ EVP_DecryptInit(m_ctx, EVP_des_ede3_cbc(),(unsigned char *) m_keyBuf.rawBuffer(), (unsigned char *) iv); - #endif - m_ivSize = 8; - } - else if (m_keyMode == MODE_ECB) { - #if defined(XSEC_OPENSSL_CONST_BUFFERS) -- EVP_DecryptInit(&m_ctx, EVP_des_ecb(), m_keyBuf.rawBuffer(), NULL); -+ EVP_DecryptInit(m_ctx, EVP_des_ecb(), m_keyBuf.rawBuffer(), NULL); - #else -- EVP_DecryptInit(&m_ctx, EVP_des_ecb(), (unsigned char *) m_keyBuf.rawBuffer(), NULL); -+ EVP_DecryptInit(m_ctx, EVP_des_ecb(), (unsigned char *) m_keyBuf.rawBuffer(), NULL); - #endif - m_ivSize = 0; - } -@@ -184,7 +185,7 @@ - return 0; // Cannot initialise without an IV - } - -- EVP_DecryptInit_ex(&m_ctx, EVP_aes_128_cbc(), NULL, m_keyBuf.rawBuffer(), iv); -+ EVP_DecryptInit_ex(m_ctx, EVP_aes_128_cbc(), NULL, m_keyBuf.rawBuffer(), iv); - - } - #if defined (XSEC_OPENSSL_HAVE_GCM) -@@ -207,15 +208,15 @@ - } - - // We have everything, so we can fully init. -- EVP_CipherInit(&m_ctx, EVP_aes_128_gcm(), NULL, NULL, 0); -- EVP_CIPHER_CTX_ctrl(&m_ctx, EVP_CTRL_GCM_SET_IVLEN, 12, NULL); -- EVP_CIPHER_CTX_ctrl(&m_ctx, EVP_CTRL_GCM_SET_TAG, 16, (void*)m_tagBuf.rawBuffer()); -- EVP_CipherInit(&m_ctx, NULL, m_keyBuf.rawBuffer(), iv, 0); -+ EVP_CipherInit(m_ctx, EVP_aes_128_gcm(), NULL, NULL, 0); -+ EVP_CIPHER_CTX_ctrl(m_ctx, EVP_CTRL_GCM_SET_IVLEN, 12, NULL); -+ EVP_CIPHER_CTX_ctrl(m_ctx, EVP_CTRL_GCM_SET_TAG, 16, (void*)m_tagBuf.rawBuffer()); -+ EVP_CipherInit(m_ctx, NULL, m_keyBuf.rawBuffer(), iv, 0); - } - #endif - else if (m_keyMode == MODE_ECB) { - -- EVP_DecryptInit_ex(&m_ctx, EVP_aes_128_ecb(), NULL, m_keyBuf.rawBuffer(), NULL); -+ EVP_DecryptInit_ex(m_ctx, EVP_aes_128_ecb(), NULL, m_keyBuf.rawBuffer(), NULL); - - } - else { -@@ -236,7 +237,7 @@ - return 0; // Cannot initialise without an IV - } - -- EVP_DecryptInit_ex(&m_ctx, EVP_aes_192_cbc(), NULL, m_keyBuf.rawBuffer(), iv); -+ EVP_DecryptInit_ex(m_ctx, EVP_aes_192_cbc(), NULL, m_keyBuf.rawBuffer(), iv); - - } - #if defined (XSEC_OPENSSL_HAVE_GCM) -@@ -259,16 +260,16 @@ - } - - // We have everything, so we can fully init. -- EVP_CipherInit(&m_ctx, EVP_aes_192_gcm(), NULL, NULL, 0); -- EVP_CIPHER_CTX_ctrl(&m_ctx, EVP_CTRL_GCM_SET_IVLEN, 12, NULL); -- EVP_CIPHER_CTX_ctrl(&m_ctx, EVP_CTRL_GCM_SET_TAG, 16, (void*)m_tagBuf.rawBuffer()); -- EVP_CipherInit(&m_ctx, NULL, m_keyBuf.rawBuffer(), iv, 0); -+ EVP_CipherInit(m_ctx, EVP_aes_192_gcm(), NULL, NULL, 0); -+ EVP_CIPHER_CTX_ctrl(m_ctx, EVP_CTRL_GCM_SET_IVLEN, 12, NULL); -+ EVP_CIPHER_CTX_ctrl(m_ctx, EVP_CTRL_GCM_SET_TAG, 16, (void*)m_tagBuf.rawBuffer()); -+ EVP_CipherInit(m_ctx, NULL, m_keyBuf.rawBuffer(), iv, 0); - - } - #endif - else if (m_keyMode == MODE_ECB) { - -- EVP_DecryptInit_ex(&m_ctx, EVP_aes_192_ecb(), NULL, m_keyBuf.rawBuffer(), NULL); -+ EVP_DecryptInit_ex(m_ctx, EVP_aes_192_ecb(), NULL, m_keyBuf.rawBuffer(), NULL); - - } - else { -@@ -289,7 +290,7 @@ - return 0; // Cannot initialise without an IV - } - -- EVP_DecryptInit_ex(&m_ctx, EVP_aes_256_cbc(), NULL, m_keyBuf.rawBuffer(), iv); -+ EVP_DecryptInit_ex(m_ctx, EVP_aes_256_cbc(), NULL, m_keyBuf.rawBuffer(), iv); - - } - #if defined (XSEC_OPENSSL_HAVE_GCM) -@@ -312,16 +313,16 @@ - } - - // We have everything, so we can fully init. -- EVP_CipherInit(&m_ctx, EVP_aes_256_gcm(), NULL, NULL, 0); -- EVP_CIPHER_CTX_ctrl(&m_ctx, EVP_CTRL_GCM_SET_IVLEN, 12, NULL); -- EVP_CIPHER_CTX_ctrl(&m_ctx, EVP_CTRL_GCM_SET_TAG, 16, (void*)m_tagBuf.rawBuffer()); -- EVP_CipherInit(&m_ctx, NULL, m_keyBuf.rawBuffer(), iv, 0); -+ EVP_CipherInit(m_ctx, EVP_aes_256_gcm(), NULL, NULL, 0); -+ EVP_CIPHER_CTX_ctrl(m_ctx, EVP_CTRL_GCM_SET_IVLEN, 12, NULL); -+ EVP_CIPHER_CTX_ctrl(m_ctx, EVP_CTRL_GCM_SET_TAG, 16, (void*)m_tagBuf.rawBuffer()); -+ EVP_CipherInit(m_ctx, NULL, m_keyBuf.rawBuffer(), iv, 0); - - } - #endif - else if (m_keyMode == MODE_ECB) { - -- EVP_DecryptInit_ex(&m_ctx, EVP_aes_256_ecb(), NULL, m_keyBuf.rawBuffer(), NULL); -+ EVP_DecryptInit_ex(m_ctx, EVP_aes_256_ecb(), NULL, m_keyBuf.rawBuffer(), NULL); - - } - else { -@@ -371,7 +372,7 @@ - // Disable OpenSSL padding - The interop samples have broken PKCS padding - AARGHH - - #if defined (XSEC_OPENSSL_CANSET_PADDING) -- EVP_CIPHER_CTX_set_padding(&m_ctx, 0); -+ EVP_CIPHER_CTX_set_padding(m_ctx, 0); - #endif - - // Return number of bytes chewed up by IV -@@ -439,9 +440,9 @@ - } - - #if defined (XSEC_OPENSSL_CONST_BUFFERS) -- if (EVP_DecryptUpdate(&m_ctx, &plainBuf[m_bytesInLastBlock], &outl, &inBuf[offset], inLength - offset) == 0) { -+ if (EVP_DecryptUpdate(m_ctx, &plainBuf[m_bytesInLastBlock], &outl, &inBuf[offset], inLength - offset) == 0) { - #else -- if (EVP_DecryptUpdate(&m_ctx, &plainBuf[m_bytesInLastBlock], &outl, (unsigned char *) &inBuf[offset], inLength - offset) == 0) { -+ if (EVP_DecryptUpdate(m_ctx, &plainBuf[m_bytesInLastBlock], &outl, (unsigned char *) &inBuf[offset], inLength - offset) == 0) { - #endif - throw XSECCryptoException(XSECCryptoException::SymmetricError, - "OpenSSL:SymmetricKey - Error during OpenSSL decrypt"); -@@ -476,7 +477,7 @@ - - #if defined (XSEC_OPENSSL_CANSET_PADDING) - -- if (EVP_DecryptFinal(&m_ctx, plainBuf, &outl) == 0) { -+ if (EVP_DecryptFinal(m_ctx, plainBuf, &outl) == 0) { - - throw XSECCryptoException(XSECCryptoException::SymmetricError, - "OpenSSL:SymmetricKey - Error during OpenSSL decrypt finalisation"); -@@ -544,7 +545,7 @@ - We can then clean that up ourselves - */ - -- if (EVP_DecryptUpdate(&m_ctx, &scrPlainBuf[offset], &outl, cipherBuf, m_blockSize) == 0) { -+ if (EVP_DecryptUpdate(m_ctx, &scrPlainBuf[offset], &outl, cipherBuf, m_blockSize) == 0) { - throw XSECCryptoException(XSECCryptoException::SymmetricError, - "OpenSSL:SymmetricKey - Error cecrypting final block during OpenSSL"); - } -@@ -641,16 +642,16 @@ - } - - #if defined (XSEC_OPENSSL_CONST_BUFFERS) -- EVP_EncryptInit(&m_ctx, EVP_des_ede3_cbc(), m_keyBuf.rawBuffer(), usedIV); -+ EVP_EncryptInit(m_ctx, EVP_des_ede3_cbc(), m_keyBuf.rawBuffer(), usedIV); - #else -- EVP_EncryptInit(&m_ctx, EVP_des_ede3_cbc(), (unsigned char *) m_keyBuf.rawBuffer(), (unsigned char *) usedIV); -+ EVP_EncryptInit(m_ctx, EVP_des_ede3_cbc(), (unsigned char *) m_keyBuf.rawBuffer(), (unsigned char *) usedIV); - #endif - } - else if (m_keyMode == MODE_ECB) { - #if defined (XSEC_OPENSSL_CONST_BUFFERS) -- EVP_EncryptInit(&m_ctx, EVP_des_ede3_ecb(), m_keyBuf.rawBuffer(), NULL); -+ EVP_EncryptInit(m_ctx, EVP_des_ede3_ecb(), m_keyBuf.rawBuffer(), NULL); - #else -- EVP_EncryptInit(&m_ctx, EVP_des_ede3(), (unsigned char *) m_keyBuf.rawBuffer(), NULL); -+ EVP_EncryptInit(m_ctx, EVP_des_ede3(), (unsigned char *) m_keyBuf.rawBuffer(), NULL); - #endif - } - else { -@@ -684,11 +685,11 @@ - else - usedIV = iv; - -- EVP_EncryptInit_ex(&m_ctx, EVP_aes_128_cbc(), NULL, m_keyBuf.rawBuffer(), usedIV); -+ EVP_EncryptInit_ex(m_ctx, EVP_aes_128_cbc(), NULL, m_keyBuf.rawBuffer(), usedIV); - } - else if (m_keyMode == MODE_ECB) { - -- EVP_EncryptInit_ex(&m_ctx, EVP_aes_128_ecb(), NULL, m_keyBuf.rawBuffer(), NULL); -+ EVP_EncryptInit_ex(m_ctx, EVP_aes_128_ecb(), NULL, m_keyBuf.rawBuffer(), NULL); - - } - #ifdef XSEC_OPENSSL_HAVE_GCM -@@ -708,7 +709,7 @@ - else - usedIV = iv; - -- EVP_EncryptInit_ex(&m_ctx, EVP_aes_128_gcm(), NULL, m_keyBuf.rawBuffer(), usedIV); -+ EVP_EncryptInit_ex(m_ctx, EVP_aes_128_gcm(), NULL, m_keyBuf.rawBuffer(), usedIV); - } - #endif - else { -@@ -739,7 +740,7 @@ - else - usedIV = iv; - -- EVP_EncryptInit_ex(&m_ctx, EVP_aes_192_cbc(), NULL, m_keyBuf.rawBuffer(), usedIV); -+ EVP_EncryptInit_ex(m_ctx, EVP_aes_192_cbc(), NULL, m_keyBuf.rawBuffer(), usedIV); - - } - #ifdef XSEC_OPENSSL_HAVE_GCM -@@ -759,12 +760,12 @@ - else - usedIV = iv; - -- EVP_EncryptInit_ex(&m_ctx, EVP_aes_192_gcm(), NULL, m_keyBuf.rawBuffer(), usedIV); -+ EVP_EncryptInit_ex(m_ctx, EVP_aes_192_gcm(), NULL, m_keyBuf.rawBuffer(), usedIV); - } - #endif - else if (m_keyMode == MODE_ECB) { - -- EVP_EncryptInit_ex(&m_ctx, EVP_aes_192_ecb(), NULL, m_keyBuf.rawBuffer(), NULL); -+ EVP_EncryptInit_ex(m_ctx, EVP_aes_192_ecb(), NULL, m_keyBuf.rawBuffer(), NULL); - } - else { - throw XSECCryptoException(XSECCryptoException::SymmetricError, -@@ -793,7 +794,7 @@ - else - usedIV = iv; - -- EVP_EncryptInit_ex(&m_ctx, EVP_aes_256_cbc(), NULL, m_keyBuf.rawBuffer(), usedIV); -+ EVP_EncryptInit_ex(m_ctx, EVP_aes_256_cbc(), NULL, m_keyBuf.rawBuffer(), usedIV); - - } - #ifdef XSEC_OPENSSL_HAVE_GCM -@@ -813,12 +814,12 @@ - else - usedIV = iv; - -- EVP_EncryptInit_ex(&m_ctx, EVP_aes_256_gcm(), NULL, m_keyBuf.rawBuffer(), usedIV); -+ EVP_EncryptInit_ex(m_ctx, EVP_aes_256_gcm(), NULL, m_keyBuf.rawBuffer(), usedIV); - } - #endif - else if (m_keyMode == MODE_ECB) { - -- EVP_EncryptInit_ex(&m_ctx, EVP_aes_256_ecb(), NULL, m_keyBuf.rawBuffer(), NULL); -+ EVP_EncryptInit_ex(m_ctx, EVP_aes_256_ecb(), NULL, m_keyBuf.rawBuffer(), NULL); - - } - else { -@@ -864,10 +865,10 @@ - #if defined (XSEC_OPENSSL_CANSET_PADDING) - // Setup padding - if (m_doPad) { -- EVP_CIPHER_CTX_set_padding(&m_ctx, 1); -+ EVP_CIPHER_CTX_set_padding(m_ctx, 1); - } - else { -- EVP_CIPHER_CTX_set_padding(&m_ctx, 0); -+ EVP_CIPHER_CTX_set_padding(m_ctx, 0); - } - #endif - -@@ -908,9 +909,9 @@ - - } - #if defined (XSEC_OPENSSL_CONST_BUFFERS) -- if (EVP_EncryptUpdate(&m_ctx, &cipherBuf[offset], &outl, inBuf, inLength) == 0) { -+ if (EVP_EncryptUpdate(m_ctx, &cipherBuf[offset], &outl, inBuf, inLength) == 0) { - #else -- if (EVP_EncryptUpdate(&m_ctx, &cipherBuf[offset], &outl, (unsigned char *) inBuf, inLength) == 0) { -+ if (EVP_EncryptUpdate(m_ctx, &cipherBuf[offset], &outl, (unsigned char *) inBuf, inLength) == 0) { - #endif - - throw XSECCryptoException(XSECCryptoException::SymmetricError, -@@ -929,7 +930,7 @@ - int outl = maxOutLength; - m_initialised = false; - -- if (EVP_EncryptFinal(&m_ctx, cipherBuf, &outl) == 0) { -+ if (EVP_EncryptFinal(m_ctx, cipherBuf, &outl) == 0) { - - throw XSECCryptoException(XSECCryptoException::SymmetricError, - "OpenSSLSymmetricKey::encryptFinish - Error during OpenSSL decrypt finalisation"); -@@ -962,7 +963,7 @@ - } - if (m_keyMode == MODE_GCM) { - #ifdef XSEC_OPENSSL_HAVE_GCM -- EVP_CIPHER_CTX_ctrl(&m_ctx, EVP_CTRL_GCM_GET_TAG, taglen, cipherBuf + outl); -+ EVP_CIPHER_CTX_ctrl(m_ctx, EVP_CTRL_GCM_GET_TAG, taglen, cipherBuf + outl); - outl += taglen; - #else - throw XSECCryptoException(XSECCryptoException::SymmetricError, -diff -U3 -r xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoSymmetricKey.hpp xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoSymmetricKey.hpp ---- xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoSymmetricKey.hpp 2012-07-23 19:56:11.000000000 +0300 -+++ xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoSymmetricKey.hpp 2017-02-19 21:25:39.000000000 +0200 -@@ -283,13 +283,13 @@ - * \brief Get OpenSSL cipher context structure - */ - -- EVP_CIPHER_CTX * getOpenSSLEVP_CIPHER_CTX(void) {return &m_ctx;} -+ EVP_CIPHER_CTX * getOpenSSLEVP_CIPHER_CTX(void) {return m_ctx;} - - /** - * \brief Get OpenSSL cipher context structure - */ - -- const EVP_CIPHER_CTX * getOpenSSLEVP_CIPHER_CTX(void) const {return &m_ctx;} -+ const EVP_CIPHER_CTX * getOpenSSLEVP_CIPHER_CTX(void) const {return m_ctx;} - - //@} - -@@ -307,7 +307,7 @@ - // Private variables - SymmetricKeyType m_keyType; - SymmetricKeyMode m_keyMode; -- EVP_CIPHER_CTX m_ctx; // OpenSSL Cipher Context structure -+ EVP_CIPHER_CTX *m_ctx; // OpenSSL Cipher Context structure - safeBuffer m_keyBuf; // Holder of the key - safeBuffer m_tagBuf; // Holder of authentication tag - unsigned int m_keyLen; -diff -U3 -r xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoX509.cpp xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoX509.cpp ---- xml-security-c-1.7.3.orig/xsec/enc/OpenSSL/OpenSSLCryptoX509.cpp 2012-07-23 19:56:11.000000000 +0300 -+++ xml-security-c-1.7.3/xsec/enc/OpenSSL/OpenSSLCryptoX509.cpp 2017-02-19 21:09:40.000000000 +0200 -@@ -191,7 +191,7 @@ - - XSECCryptoKey::KeyType ret; - -- switch (pkey->type) { -+ switch (EVP_PKEY_base_id(pkey)) { - - case EVP_PKEY_DSA : - -@@ -241,7 +241,7 @@ - "OpenSSL:X509 - cannot retrieve public key from cert"); - } - -- switch (pkey->type) { -+ switch (EVP_PKEY_base_id(pkey)) { - - case EVP_PKEY_DSA : - -diff -U3 -r xml-security-c-1.7.3.orig/xsec/tools/checksig/InteropResolver.cpp xml-security-c-1.7.3/xsec/tools/checksig/InteropResolver.cpp ---- xml-security-c-1.7.3.orig/xsec/tools/checksig/InteropResolver.cpp 2012-07-23 19:56:10.000000000 +0300 -+++ xml-security-c-1.7.3/xsec/tools/checksig/InteropResolver.cpp 2017-02-19 22:33:50.000000000 +0200 -@@ -318,7 +318,7 @@ - char * cserial = XMLString::transcode(serial); - char * xserial; - -- BIGNUM * bnserial = ASN1_INTEGER_to_BN(x->cert_info->serialNumber, NULL); -+ BIGNUM * bnserial = ASN1_INTEGER_to_BN(X509_get0_serialNumber(x), NULL); - xserial = BN_bn2dec(bnserial); - BN_free(bnserial); - -@@ -360,8 +360,7 @@ - if (xlen != 0) { - - // Have a buffer with a number in it -- STACK_OF(X509_EXTENSION) *exts; -- exts = x->cert_info->extensions; -+ const STACK_OF(X509_EXTENSION) *exts = X509_get0_extensions(x); - - if (exts != NULL) { - -@@ -379,8 +378,8 @@ - memcpy(&octxski[2], xski, xlen); - - ext = sk_X509_EXTENSION_value(exts,extn); -- ASN1_OCTET_STRING *skid = ext->value; -- ASN1_OCTET_STRING * xskid = M_ASN1_OCTET_STRING_new(); -+ ASN1_OCTET_STRING *skid = X509_EXTENSION_get_data(ext); -+ ASN1_OCTET_STRING * xskid = ASN1_OCTET_STRING_new(); - ASN1_STRING_set(xskid, octxski, xlen+2); - - if (ASN1_OCTET_STRING_cmp(xskid, skid) == 0) { -@@ -602,12 +601,12 @@ - // Now check if the cert is in the CRL (code lifted from OpenSSL x509_vfy.c - - int idx; -- X509_REVOKED rtmp; -+ X509_REVOKED *rtmp = X509_REVOKED_new(); - - /* Look for serial number of certificate in CRL */ - -- rtmp.serialNumber = X509_get_serialNumber(x); -- idx = sk_X509_REVOKED_find(c->crl->revoked, &rtmp); -+ X509_REVOKED_set_serialNumber(rtmp, X509_get_serialNumber(x)); -+ idx = sk_X509_REVOKED_find(X509_CRL_get_REVOKED(c), rtmp); - - /* Not found: OK */ - -diff -U3 -r xml-security-c-1.7.3.orig/xsec/tools/cipher/XencInteropResolver.cpp xml-security-c-1.7.3/xsec/tools/cipher/XencInteropResolver.cpp ---- xml-security-c-1.7.3.orig/xsec/tools/cipher/XencInteropResolver.cpp 2012-07-23 19:56:10.000000000 +0300 -+++ xml-security-c-1.7.3/xsec/tools/cipher/XencInteropResolver.cpp 2017-02-19 22:34:57.000000000 +0200 -@@ -521,7 +521,7 @@ - X509 * x509 = OSSLX509->getOpenSSLX509(); - - // Check the serial number -- BIGNUM * bnserial = ASN1_INTEGER_to_BN(x509->cert_info->serialNumber, NULL); -+ BIGNUM * bnserial = ASN1_INTEGER_to_BN(X509_get0_serialNumber(x509), NULL); - BN_free(bnserial); - - BIO * rsaFile = createFileBIO(mp_baseURI, "rsa.p8"); -diff -U3 -r xml-security-c-1.7.3.orig/xsec/tools/cipher/cipher.cpp xml-security-c-1.7.3/xsec/tools/cipher/cipher.cpp ---- xml-security-c-1.7.3.orig/xsec/tools/cipher/cipher.cpp 2015-01-30 05:55:09.000000000 +0200 -+++ xml-security-c-1.7.3/xsec/tools/cipher/cipher.cpp 2017-02-19 22:37:17.000000000 +0200 -@@ -517,7 +517,7 @@ - - pkey = X509_get_pubkey(x); - -- if (pkey == NULL || pkey->type != EVP_PKEY_RSA) { -+ if (pkey == NULL || EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA) { - cerr << "Error extracting RSA key from certificate" << endl; - } - -diff -U3 -r xml-security-c-1.7.3.orig/xsec/tools/templatesign/templatesign.cpp xml-security-c-1.7.3/xsec/tools/templatesign/templatesign.cpp ---- xml-security-c-1.7.3.orig/xsec/tools/templatesign/templatesign.cpp 2015-01-30 05:55:09.000000000 +0200 -+++ xml-security-c-1.7.3/xsec/tools/templatesign/templatesign.cpp 2017-02-19 21:31:14.000000000 +0200 -@@ -726,7 +726,7 @@ - - // Check type is correct - -- if (pkey->type != EVP_PKEY_DSA) { -+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_DSA) { - cerr << "DSA Key requested, but OpenSSL loaded something else\n"; - exit (1); - } -@@ -739,7 +739,7 @@ - - // Check type is correct - -- if (pkey->type != EVP_PKEY_EC) { -+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_EC) { - cerr << "EC Key requested, but OpenSSL loaded something else\n"; - exit (1); - } -@@ -749,7 +749,7 @@ - } - # endif - else { -- if (pkey->type != EVP_PKEY_RSA) { -+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA) { - cerr << "RSA Key requested, but OpenSSL loaded something else\n"; - exit (1); - } -diff -U3 -r xml-security-c-1.7.3.orig/xsec/tools/xklient/xklient.cpp xml-security-c-1.7.3/xsec/tools/xklient/xklient.cpp ---- xml-security-c-1.7.3.orig/xsec/tools/xklient/xklient.cpp 2012-07-23 19:56:10.000000000 +0300 -+++ xml-security-c-1.7.3/xsec/tools/xklient/xklient.cpp 2017-02-19 22:58:32.000000000 +0200 -@@ -284,7 +284,7 @@ - - #if defined (XSEC_HAVE_OPENSSL) - --XMLCh * BN2b64(BIGNUM * bn) { -+XMLCh * BN2b64(const BIGNUM * bn) { - - int bytes = BN_num_bytes(bn); - unsigned char * binbuf = new unsigned char[bytes + 1]; -@@ -606,7 +606,7 @@ - - // Check type is correct - -- if (pkey->type != EVP_PKEY_DSA) { -+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_DSA) { - cerr << "DSA Key requested, but OpenSSL loaded something else\n"; - return NULL; - } -@@ -615,10 +615,14 @@ - // Create the XSEC OpenSSL interface - key = new OpenSSLCryptoKeyDSA(pkey); - -- XMLCh * P = BN2b64(pkey->pkey.dsa->p); -- XMLCh * Q = BN2b64(pkey->pkey.dsa->q); -- XMLCh * G = BN2b64(pkey->pkey.dsa->g); -- XMLCh * Y = BN2b64(pkey->pkey.dsa->pub_key); -+ DSA *dsa = EVP_PKEY_get0_DSA(pkey); -+ const BIGNUM *p, *q, *g, *pub_key; -+ DSA_get0_pqg(dsa, &p, &q, &g); -+ DSA_get0_key(dsa, &pub_key, 0); -+ XMLCh * P = BN2b64(p); -+ XMLCh * Q = BN2b64(q); -+ XMLCh * G = BN2b64(g); -+ XMLCh * Y = BN2b64(pub_key); - - sig->appendDSAKeyValue(P,Q,G,Y); - -@@ -628,15 +632,18 @@ - XSEC_RELEASE_XMLCH(Y); - } - else { -- if (pkey->type != EVP_PKEY_RSA) { -+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA) { - cerr << "RSA Key requested, but OpenSSL loaded something else\n"; - exit (1); - } - sig = lr->addSignature(CANON_C14N_NOC, SIGNATURE_RSA, HASH_SHA1); - key = new OpenSSLCryptoKeyRSA(pkey); - -- XMLCh * mod = BN2b64(pkey->pkey.rsa->n); -- XMLCh * exp = BN2b64(pkey->pkey.rsa->e); -+ RSA *rsa = EVP_PKEY_get0_RSA(pkey); -+ const BIGNUM *n, *e; -+ RSA_get0_key(rsa, &n, &e, 0); -+ XMLCh * mod = BN2b64(n); -+ XMLCh * exp = BN2b64(e); - sig->appendRSAKeyValue(mod, exp); - XSEC_RELEASE_XMLCH(mod); - XSEC_RELEASE_XMLCH(exp); -@@ -878,7 +885,7 @@ - - // Check type is correct - -- if (pkey->type != EVP_PKEY_DSA) { -+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_DSA) { - cerr << "DSA Key requested, but OpenSSL loaded something else\n"; - return NULL; - } -@@ -887,10 +894,14 @@ - // Create the XSEC OpenSSL interface - key = new OpenSSLCryptoKeyDSA(pkey); - -- XMLCh * P = BN2b64(pkey->pkey.dsa->p); -- XMLCh * Q = BN2b64(pkey->pkey.dsa->q); -- XMLCh * G = BN2b64(pkey->pkey.dsa->g); -- XMLCh * Y = BN2b64(pkey->pkey.dsa->pub_key); -+ DSA *dsa = EVP_PKEY_get0_DSA(pkey); -+ const BIGNUM *p, *q, *g, *pub_key; -+ DSA_get0_pqg(dsa, &p, &q, &g); -+ DSA_get0_key(dsa, &pub_key, 0); -+ XMLCh * P = BN2b64(p); -+ XMLCh * Q = BN2b64(q); -+ XMLCh * G = BN2b64(g); -+ XMLCh * Y = BN2b64(pub_key); - - sig->appendDSAKeyValue(P,Q,G,Y); - -@@ -900,15 +911,18 @@ - XSEC_RELEASE_XMLCH(Y); - } - else { -- if (pkey->type != EVP_PKEY_RSA) { -+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA) { - cerr << "RSA Key requested, but OpenSSL loaded something else\n"; - exit (1); - } - sig = vr->addSignature(CANON_C14N_NOC, SIGNATURE_RSA, HASH_SHA1); - key = new OpenSSLCryptoKeyRSA(pkey); - -- XMLCh * mod = BN2b64(pkey->pkey.rsa->n); -- XMLCh * exp = BN2b64(pkey->pkey.rsa->e); -+ RSA *rsa = EVP_PKEY_get0_RSA(pkey); -+ const BIGNUM *n, *e; -+ RSA_get0_key(rsa, &n, &e, 0); -+ XMLCh * mod = BN2b64(n); -+ XMLCh * exp = BN2b64(e); - sig->appendRSAKeyValue(mod, exp); - XSEC_RELEASE_XMLCH(mod); - XSEC_RELEASE_XMLCH(exp); -@@ -1229,7 +1243,7 @@ - - // Check type is correct - -- if (pkey->type != EVP_PKEY_DSA) { -+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_DSA) { - cerr << "DSA Key requested, but OpenSSL loaded something else\n"; - return NULL; - } -@@ -1238,10 +1252,14 @@ - // Create the XSEC OpenSSL interface - key = new OpenSSLCryptoKeyDSA(pkey); - -- XMLCh * P = BN2b64(pkey->pkey.dsa->p); -- XMLCh * Q = BN2b64(pkey->pkey.dsa->q); -- XMLCh * G = BN2b64(pkey->pkey.dsa->g); -- XMLCh * Y = BN2b64(pkey->pkey.dsa->pub_key); -+ DSA *dsa = EVP_PKEY_get0_DSA(pkey); -+ const BIGNUM *p, *q, *g, *pub_key; -+ DSA_get0_pqg(dsa, &p, &q, &g); -+ DSA_get0_key(dsa, &pub_key, 0); -+ XMLCh * P = BN2b64(p); -+ XMLCh * Q = BN2b64(q); -+ XMLCh * G = BN2b64(g); -+ XMLCh * Y = BN2b64(pub_key); - - sig->appendDSAKeyValue(P,Q,G,Y); - -@@ -1251,15 +1269,18 @@ - XSEC_RELEASE_XMLCH(Y); - } - else { -- if (pkey->type != EVP_PKEY_RSA) { -+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA) { - cerr << "RSA Key requested, but OpenSSL loaded something else\n"; - exit (1); - } - sig = rr->addSignature(CANON_C14N_NOC, SIGNATURE_RSA, HASH_SHA1); - key = new OpenSSLCryptoKeyRSA(pkey); - -- XMLCh * mod = BN2b64(pkey->pkey.rsa->n); -- XMLCh * exp = BN2b64(pkey->pkey.rsa->e); -+ RSA *rsa = EVP_PKEY_get0_RSA(pkey); -+ const BIGNUM *n, *e; -+ RSA_get0_key(rsa, &n, &e, 0); -+ XMLCh * mod = BN2b64(n); -+ XMLCh * exp = BN2b64(e); - sig->appendRSAKeyValue(mod, exp); - XSEC_RELEASE_XMLCH(mod); - XSEC_RELEASE_XMLCH(exp); -@@ -1326,7 +1347,7 @@ - - // Check type is correct - -- if (pkey->type != EVP_PKEY_DSA) { -+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_DSA) { - cerr << "DSA Key requested, but OpenSSL loaded something else\n"; - return NULL; - } -@@ -1334,10 +1355,14 @@ - proofOfPossessionKey = new OpenSSLCryptoKeyDSA(pkey); - proofOfPossessionSm = SIGNATURE_DSA; - -- XMLCh * P = BN2b64(pkey->pkey.dsa->p); -- XMLCh * Q = BN2b64(pkey->pkey.dsa->q); -- XMLCh * G = BN2b64(pkey->pkey.dsa->g); -- XMLCh * Y = BN2b64(pkey->pkey.dsa->pub_key); -+ DSA *dsa = EVP_PKEY_get0_DSA(pkey); -+ const BIGNUM *p, *q, *g, *pub_key; -+ DSA_get0_pqg(dsa, &p, &q, &g); -+ DSA_get0_key(dsa, &pub_key, 0); -+ XMLCh * P = BN2b64(p); -+ XMLCh * Q = BN2b64(q); -+ XMLCh * G = BN2b64(g); -+ XMLCh * Y = BN2b64(pub_key); - - pkb->appendDSAKeyValue(P,Q,G,Y); - -@@ -1347,7 +1372,7 @@ - XSEC_RELEASE_XMLCH(Y); - } - else { -- if (pkey->type != EVP_PKEY_RSA) { -+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA) { - cerr << "RSA Key requested, but OpenSSL loaded something else\n"; - exit (1); - } -@@ -1355,8 +1380,11 @@ - proofOfPossessionKey = new OpenSSLCryptoKeyRSA(pkey); - proofOfPossessionSm = SIGNATURE_RSA; - -- XMLCh * mod = BN2b64(pkey->pkey.rsa->n); -- XMLCh * exp = BN2b64(pkey->pkey.rsa->e); -+ RSA *rsa = EVP_PKEY_get0_RSA(pkey); -+ const BIGNUM *n, *e; -+ RSA_get0_key(rsa, &n, &e, 0); -+ XMLCh * mod = BN2b64(n); -+ XMLCh * exp = BN2b64(e); - pkb->appendRSAKeyValue(mod, exp); - XSEC_RELEASE_XMLCH(mod); - XSEC_RELEASE_XMLCH(exp); -@@ -1622,7 +1650,7 @@ - - // Check type is correct - -- if (pkey->type != EVP_PKEY_DSA) { -+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_DSA) { - cerr << "DSA Key requested, but OpenSSL loaded something else\n"; - return NULL; - } -@@ -1631,10 +1659,14 @@ - // Create the XSEC OpenSSL interface - key = new OpenSSLCryptoKeyDSA(pkey); - -- XMLCh * P = BN2b64(pkey->pkey.dsa->p); -- XMLCh * Q = BN2b64(pkey->pkey.dsa->q); -- XMLCh * G = BN2b64(pkey->pkey.dsa->g); -- XMLCh * Y = BN2b64(pkey->pkey.dsa->pub_key); -+ DSA *dsa = EVP_PKEY_get0_DSA(pkey); -+ const BIGNUM *p, *q, *g, *pub_key; -+ DSA_get0_pqg(dsa, &p, &q, &g); -+ DSA_get0_key(dsa, &pub_key, 0); -+ XMLCh * P = BN2b64(p); -+ XMLCh * Q = BN2b64(q); -+ XMLCh * G = BN2b64(g); -+ XMLCh * Y = BN2b64(pub_key); - - sig->appendDSAKeyValue(P,Q,G,Y); - -@@ -1644,15 +1676,18 @@ - XSEC_RELEASE_XMLCH(Y); - } - else { -- if (pkey->type != EVP_PKEY_RSA) { -+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA) { - cerr << "RSA Key requested, but OpenSSL loaded something else\n"; - exit (1); - } - sig = rr->addSignature(CANON_C14N_NOC, SIGNATURE_RSA, HASH_SHA1); - key = new OpenSSLCryptoKeyRSA(pkey); - -- XMLCh * mod = BN2b64(pkey->pkey.rsa->n); -- XMLCh * exp = BN2b64(pkey->pkey.rsa->e); -+ RSA *rsa = EVP_PKEY_get0_RSA(pkey); -+ const BIGNUM *n, *e; -+ RSA_get0_key(rsa, &n, &e, 0); -+ XMLCh * mod = BN2b64(n); -+ XMLCh * exp = BN2b64(e); - sig->appendRSAKeyValue(mod, exp); - XSEC_RELEASE_XMLCH(mod); - XSEC_RELEASE_XMLCH(exp); -@@ -1719,15 +1754,19 @@ - - // Check type is correct - -- if (pkey->type != EVP_PKEY_DSA) { -+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_DSA) { - cerr << "DSA Key requested, but OpenSSL loaded something else\n"; - return NULL; - } - -- XMLCh * P = BN2b64(pkey->pkey.dsa->p); -- XMLCh * Q = BN2b64(pkey->pkey.dsa->q); -- XMLCh * G = BN2b64(pkey->pkey.dsa->g); -- XMLCh * Y = BN2b64(pkey->pkey.dsa->pub_key); -+ DSA *dsa = EVP_PKEY_get0_DSA(pkey); -+ const BIGNUM *p, *q, *g, *pub_key; -+ DSA_get0_pqg(dsa, &p, &q, &g); -+ DSA_get0_key(dsa, &pub_key, 0); -+ XMLCh * P = BN2b64(p); -+ XMLCh * Q = BN2b64(q); -+ XMLCh * G = BN2b64(g); -+ XMLCh * Y = BN2b64(pub_key); - - rkb->appendDSAKeyValue(P,Q,G,Y); - -@@ -1737,13 +1776,16 @@ - XSEC_RELEASE_XMLCH(Y); - } - else { -- if (pkey->type != EVP_PKEY_RSA) { -+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA) { - cerr << "RSA Key requested, but OpenSSL loaded something else\n"; - exit (1); - } - -- XMLCh * mod = BN2b64(pkey->pkey.rsa->n); -- XMLCh * exp = BN2b64(pkey->pkey.rsa->e); -+ RSA *rsa = EVP_PKEY_get0_RSA(pkey); -+ const BIGNUM *n, *e; -+ RSA_get0_key(rsa, &n, &e, 0); -+ XMLCh * mod = BN2b64(n); -+ XMLCh * exp = BN2b64(e); - rkb->appendRSAKeyValue(mod, exp); - XSEC_RELEASE_XMLCH(mod); - XSEC_RELEASE_XMLCH(exp); -@@ -1977,7 +2019,7 @@ - - // Check type is correct - -- if (pkey->type != EVP_PKEY_DSA) { -+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_DSA) { - cerr << "DSA Key requested, but OpenSSL loaded something else\n"; - return NULL; - } -@@ -1986,10 +2028,14 @@ - // Create the XSEC OpenSSL interface - key = new OpenSSLCryptoKeyDSA(pkey); - -- XMLCh * P = BN2b64(pkey->pkey.dsa->p); -- XMLCh * Q = BN2b64(pkey->pkey.dsa->q); -- XMLCh * G = BN2b64(pkey->pkey.dsa->g); -- XMLCh * Y = BN2b64(pkey->pkey.dsa->pub_key); -+ DSA *dsa = EVP_PKEY_get0_DSA(pkey); -+ const BIGNUM *p, *q, *g, *pub_key; -+ DSA_get0_pqg(dsa, &p, &q, &g); -+ DSA_get0_key(dsa, &pub_key, 0); -+ XMLCh * P = BN2b64(p); -+ XMLCh * Q = BN2b64(q); -+ XMLCh * G = BN2b64(g); -+ XMLCh * Y = BN2b64(pub_key); - - sig->appendDSAKeyValue(P,Q,G,Y); - -@@ -1999,15 +2045,18 @@ - XSEC_RELEASE_XMLCH(Y); - } - else { -- if (pkey->type != EVP_PKEY_RSA) { -+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA) { - cerr << "RSA Key requested, but OpenSSL loaded something else\n"; - exit (1); - } - sig = rr->addSignature(CANON_C14N_NOC, SIGNATURE_RSA, HASH_SHA1); - key = new OpenSSLCryptoKeyRSA(pkey); - -- XMLCh * mod = BN2b64(pkey->pkey.rsa->n); -- XMLCh * exp = BN2b64(pkey->pkey.rsa->e); -+ RSA *rsa = EVP_PKEY_get0_RSA(pkey); -+ const BIGNUM *n, *e; -+ RSA_get0_key(rsa, &n, &e, 0); -+ XMLCh * mod = BN2b64(n); -+ XMLCh * exp = BN2b64(e); - sig->appendRSAKeyValue(mod, exp); - XSEC_RELEASE_XMLCH(mod); - XSEC_RELEASE_XMLCH(exp); -@@ -2074,7 +2123,7 @@ - - // Check type is correct - -- if (pkey->type != EVP_PKEY_DSA) { -+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_DSA) { - cerr << "DSA Key requested, but OpenSSL loaded something else\n"; - return NULL; - } -@@ -2082,10 +2131,14 @@ - proofOfPossessionKey = new OpenSSLCryptoKeyDSA(pkey); - proofOfPossessionSm = SIGNATURE_DSA; - -- XMLCh * P = BN2b64(pkey->pkey.dsa->p); -- XMLCh * Q = BN2b64(pkey->pkey.dsa->q); -- XMLCh * G = BN2b64(pkey->pkey.dsa->g); -- XMLCh * Y = BN2b64(pkey->pkey.dsa->pub_key); -+ DSA *dsa = EVP_PKEY_get0_DSA(pkey); -+ const BIGNUM *p, *q, *g, *pub_key; -+ DSA_get0_pqg(dsa, &p, &q, &g); -+ DSA_get0_key(dsa, &pub_key, 0); -+ XMLCh * P = BN2b64(p); -+ XMLCh * Q = BN2b64(q); -+ XMLCh * G = BN2b64(g); -+ XMLCh * Y = BN2b64(pub_key); - - pkb->appendDSAKeyValue(P,Q,G,Y); - -@@ -2095,7 +2148,7 @@ - XSEC_RELEASE_XMLCH(Y); - } - else { -- if (pkey->type != EVP_PKEY_RSA) { -+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA) { - cerr << "RSA Key requested, but OpenSSL loaded something else\n"; - exit (1); - } -@@ -2103,8 +2156,11 @@ - proofOfPossessionKey = new OpenSSLCryptoKeyRSA(pkey); - proofOfPossessionSm = SIGNATURE_RSA; - -- XMLCh * mod = BN2b64(pkey->pkey.rsa->n); -- XMLCh * exp = BN2b64(pkey->pkey.rsa->e); -+ RSA *rsa = EVP_PKEY_get0_RSA(pkey); -+ const BIGNUM *n, *e; -+ RSA_get0_key(rsa, &n, &e, 0); -+ XMLCh * mod = BN2b64(n); -+ XMLCh * exp = BN2b64(e); - pkb->appendRSAKeyValue(mod, exp); - XSEC_RELEASE_XMLCH(mod); - XSEC_RELEASE_XMLCH(exp); -@@ -2371,7 +2427,7 @@ - - // Check type is correct - -- if (pkey->type != EVP_PKEY_DSA) { -+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_DSA) { - cerr << "DSA Key requested, but OpenSSL loaded something else\n"; - return NULL; - } -@@ -2380,10 +2436,14 @@ - // Create the XSEC OpenSSL interface - key = new OpenSSLCryptoKeyDSA(pkey); - -- XMLCh * P = BN2b64(pkey->pkey.dsa->p); -- XMLCh * Q = BN2b64(pkey->pkey.dsa->q); -- XMLCh * G = BN2b64(pkey->pkey.dsa->g); -- XMLCh * Y = BN2b64(pkey->pkey.dsa->pub_key); -+ DSA *dsa = EVP_PKEY_get0_DSA(pkey); -+ const BIGNUM *p, *q, *g, *pub_key; -+ DSA_get0_pqg(dsa, &p, &q, &g); -+ DSA_get0_key(dsa, &pub_key, 0); -+ XMLCh * P = BN2b64(p); -+ XMLCh * Q = BN2b64(q); -+ XMLCh * G = BN2b64(g); -+ XMLCh * Y = BN2b64(pub_key); - - sig->appendDSAKeyValue(P,Q,G,Y); - -@@ -2393,15 +2453,18 @@ - XSEC_RELEASE_XMLCH(Y); - } - else { -- if (pkey->type != EVP_PKEY_RSA) { -+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA) { - cerr << "RSA Key requested, but OpenSSL loaded something else\n"; - exit (1); - } - sig = rr->addSignature(CANON_C14N_NOC, SIGNATURE_RSA, HASH_SHA1); - key = new OpenSSLCryptoKeyRSA(pkey); - -- XMLCh * mod = BN2b64(pkey->pkey.rsa->n); -- XMLCh * exp = BN2b64(pkey->pkey.rsa->e); -+ RSA *rsa = EVP_PKEY_get0_RSA(pkey); -+ const BIGNUM *n, *e; -+ RSA_get0_key(rsa, &n, &e, 0); -+ XMLCh * mod = BN2b64(n); -+ XMLCh * exp = BN2b64(e); - sig->appendRSAKeyValue(mod, exp); - XSEC_RELEASE_XMLCH(mod); - XSEC_RELEASE_XMLCH(exp); -@@ -2468,15 +2531,19 @@ - - // Check type is correct - -- if (pkey->type != EVP_PKEY_DSA) { -+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_DSA) { - cerr << "DSA Key requested, but OpenSSL loaded something else\n"; - return NULL; - } - -- XMLCh * P = BN2b64(pkey->pkey.dsa->p); -- XMLCh * Q = BN2b64(pkey->pkey.dsa->q); -- XMLCh * G = BN2b64(pkey->pkey.dsa->g); -- XMLCh * Y = BN2b64(pkey->pkey.dsa->pub_key); -+ DSA *dsa = EVP_PKEY_get0_DSA(pkey); -+ const BIGNUM *p, *q, *g, *pub_key; -+ DSA_get0_pqg(dsa, &p, &q, &g); -+ DSA_get0_key(dsa, &pub_key, 0); -+ XMLCh * P = BN2b64(p); -+ XMLCh * Q = BN2b64(q); -+ XMLCh * G = BN2b64(g); -+ XMLCh * Y = BN2b64(pub_key); - - rkb->appendDSAKeyValue(P,Q,G,Y); - -@@ -2486,13 +2553,16 @@ - XSEC_RELEASE_XMLCH(Y); - } - else { -- if (pkey->type != EVP_PKEY_RSA) { -+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA) { - cerr << "RSA Key requested, but OpenSSL loaded something else\n"; - exit (1); - } - -- XMLCh * mod = BN2b64(pkey->pkey.rsa->n); -- XMLCh * exp = BN2b64(pkey->pkey.rsa->e); -+ RSA *rsa = EVP_PKEY_get0_RSA(pkey); -+ const BIGNUM *n, *e; -+ RSA_get0_key(rsa, &n, &e, 0); -+ XMLCh * mod = BN2b64(n); -+ XMLCh * exp = BN2b64(e); - rkb->appendRSAKeyValue(mod, exp); - XSEC_RELEASE_XMLCH(mod); - XSEC_RELEASE_XMLCH(exp); -@@ -3251,14 +3321,17 @@ - - // Create the RSA key file - RSA * rsa = RSA_new(); -- rsa->n = OpenSSLCryptoBase64::b642BN(sModulus, (unsigned int) strlen(sModulus)); -- rsa->e = OpenSSLCryptoBase64::b642BN(sExponent, (unsigned int) strlen(sExponent)); -- rsa->d = OpenSSLCryptoBase64::b642BN(sD, (unsigned int) strlen(sD)); -- rsa->p = OpenSSLCryptoBase64::b642BN(sP, (unsigned int) strlen(sP)); -- rsa->q = OpenSSLCryptoBase64::b642BN(sQ, (unsigned int) strlen(sQ)); -- rsa->dmp1 = OpenSSLCryptoBase64::b642BN(sDP, (unsigned int) strlen(sDP)); -- rsa->dmq1 = OpenSSLCryptoBase64::b642BN(sDQ, (unsigned int) strlen(sDQ)); -- rsa->iqmp = OpenSSLCryptoBase64::b642BN(sInverseQ, (unsigned int) strlen(sInverseQ)); -+ RSA_set0_key(rsa, -+ OpenSSLCryptoBase64::b642BN(sModulus, (unsigned int) strlen(sModulus)), -+ OpenSSLCryptoBase64::b642BN(sExponent, (unsigned int) strlen(sExponent)), -+ OpenSSLCryptoBase64::b642BN(sD, (unsigned int) strlen(sD))); -+ RSA_set0_factors(rsa, -+ OpenSSLCryptoBase64::b642BN(sP, (unsigned int) strlen(sP)), -+ OpenSSLCryptoBase64::b642BN(sQ, (unsigned int) strlen(sQ))); -+ RSA_set0_crt_params(rsa, -+ OpenSSLCryptoBase64::b642BN(sDP, (unsigned int) strlen(sDP)), -+ OpenSSLCryptoBase64::b642BN(sDQ, (unsigned int) strlen(sDQ)), -+ OpenSSLCryptoBase64::b642BN(sInverseQ, (unsigned int) strlen(sInverseQ))); - - // Write it to disk - BIO *out; -@@ -3367,14 +3440,17 @@ - - // Create the RSA key file - RSA * rsa = RSA_new(); -- rsa->n = OpenSSLCryptoBase64::b642BN(sModulus, (unsigned int) strlen(sModulus)); -- rsa->e = OpenSSLCryptoBase64::b642BN(sExponent, (unsigned int) strlen(sExponent)); -- rsa->d = OpenSSLCryptoBase64::b642BN(sD, (unsigned int) strlen(sD)); -- rsa->p = OpenSSLCryptoBase64::b642BN(sP, (unsigned int) strlen(sP)); -- rsa->q = OpenSSLCryptoBase64::b642BN(sQ, (unsigned int) strlen(sQ)); -- rsa->dmp1 = OpenSSLCryptoBase64::b642BN(sDP, (unsigned int) strlen(sDP)); -- rsa->dmq1 = OpenSSLCryptoBase64::b642BN(sDQ, (unsigned int) strlen(sDQ)); -- rsa->iqmp = OpenSSLCryptoBase64::b642BN(sInverseQ, (unsigned int) strlen(sInverseQ)); -+ RSA_set0_key(rsa, -+ OpenSSLCryptoBase64::b642BN(sModulus, (unsigned int) strlen(sModulus)), -+ OpenSSLCryptoBase64::b642BN(sExponent, (unsigned int) strlen(sExponent)), -+ OpenSSLCryptoBase64::b642BN(sD, (unsigned int) strlen(sD))); -+ RSA_set0_factors(rsa, -+ OpenSSLCryptoBase64::b642BN(sP, (unsigned int) strlen(sP)), -+ OpenSSLCryptoBase64::b642BN(sQ, (unsigned int) strlen(sQ))); -+ RSA_set0_crt_params(rsa, -+ OpenSSLCryptoBase64::b642BN(sDP, (unsigned int) strlen(sDP)), -+ OpenSSLCryptoBase64::b642BN(sDQ, (unsigned int) strlen(sDQ)), -+ OpenSSLCryptoBase64::b642BN(sInverseQ, (unsigned int) strlen(sInverseQ))); - - // Write it to disk - BIO *out; diff --git a/xml-security-c-cxx11.patch b/xml-security-c-cxx11.patch deleted file mode 100644 index e342b08..0000000 --- a/xml-security-c-cxx11.patch +++ /dev/null @@ -1,13 +0,0 @@ -https://issues.apache.org/jira/browse/SANTUARIO-437 - ---- xml-security-c-1.6.1/xsec/tools/checksig/InteropResolver.cpp.orig 2016-02-02 23:57:26.204655144 +0000 -+++ xml-security-c-1.6.1/xsec/tools/checksig/InteropResolver.cpp 2016-02-02 23:57:35.796692305 +0000 -@@ -645,7 +645,7 @@ - - } - -- return false; -+ return NULL; - - } - diff --git a/xml-security-c.spec b/xml-security-c.spec index 12d55a4..e3abe2b 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,13 +1,11 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c -Version: 1.7.3 -Release: 5%{?dist} +Version: 2.0.2 +Release: 1%{?dist} License: ASL 2.0 URL: http://santuario.apache.org/c/ Source: http://www.apache.org/dist/santuario/c-library/xml-security-c-%{version}.tar.gz -Patch0: %{name}-cxx11.patch Patch1: %{name}-ac_fixes.patch -Patch2: https://raw.githubusercontent.com/open-eid/libdigidocpp/master/xml-security-c-1.7.3_openssl1.1.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: /usr/bin/c++ @@ -54,7 +52,7 @@ autoreconf -fiv %make_install %check -./xsec/xtest +./xsec/xsec-xtest %files %attr(755,root,root) %{_libdir}/libxml-security-c.so.* @@ -66,8 +64,12 @@ autoreconf -fiv %attr(755,root,root) %{_libdir}/libxml-security-c.so %exclude %{_libdir}/*.la %{_includedir}/xsec +%{_libdir}/pkgconfig/xml-security-c.pc %changelog +* Fri Nov 16 2018 Pete Walter - 2.0.2-1 +- Update to 2.0.2 + * Wed Jul 18 2018 Tomasz Kłoczko - 1.7.3-5 - added /usr/bin/c++ to BuildRequires From e669632942a36a6a8fb8974d43f3493bf41b7544 Mon Sep 17 00:00:00 2001 From: Pete Walter Date: Fri, 16 Nov 2018 12:03:35 +0000 Subject: [PATCH 39/66] Remove explicit attr modes Fixes RPM build errors: Explicit %attr() mode not applicable to symlink: xml-security-c-2.0.2-1.fc30.x86_64/usr/lib64/libxml-security-c.so.20 Explicit %attr() mode not applicable to symlink: xml-security-c-2.0.2-1.fc30.x86_64/usr/lib64/libxml-security-c.so --- xml-security-c.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index e3abe2b..7100580 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -55,20 +55,21 @@ autoreconf -fiv ./xsec/xsec-xtest %files -%attr(755,root,root) %{_libdir}/libxml-security-c.so.* +%{_libdir}/libxml-security-c.so.* %files devel %license LICENSE.txt %doc CHANGELOG.txt NOTICE.txt %exclude %{_bindir}/* -%attr(755,root,root) %{_libdir}/libxml-security-c.so %exclude %{_libdir}/*.la %{_includedir}/xsec +%{_libdir}/libxml-security-c.so %{_libdir}/pkgconfig/xml-security-c.pc %changelog * Fri Nov 16 2018 Pete Walter - 2.0.2-1 - Update to 2.0.2 +- Remove explicit attr modes * Wed Jul 18 2018 Tomasz Kłoczko - 1.7.3-5 - added /usr/bin/c++ to BuildRequires From 6cd31c79d2c7e91cd88c06bd4a4905a6b65c65f0 Mon Sep 17 00:00:00 2001 From: Pete Walter Date: Fri, 16 Nov 2018 12:16:16 +0000 Subject: [PATCH 40/66] Use standard tag order --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 7100580..d3343bb 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,11 +1,13 @@ -Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 2.0.2 Release: 1%{?dist} +Summary: C++ Implementation of W3C security standards for XML + License: ASL 2.0 URL: http://santuario.apache.org/c/ Source: http://www.apache.org/dist/santuario/c-library/xml-security-c-%{version}.tar.gz Patch1: %{name}-ac_fixes.patch + BuildRequires: autoconf BuildRequires: automake BuildRequires: /usr/bin/c++ @@ -46,6 +48,7 @@ autoreconf -fiv --with-openssl \ --with-xalan \ %{nil} + %make_build %install From 8c8685bf2871c88192bab66e6b20f47b90678b7e Mon Sep 17 00:00:00 2001 From: Pete Walter Date: Fri, 16 Nov 2018 12:16:29 +0000 Subject: [PATCH 41/66] Don't include debuginfo for uninstalled binaries Remove unwanted files in %install to make sure the rpm brp scripts don't see them, instead of using %exclude. --- xml-security-c.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index d3343bb..d0f5ad3 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -54,6 +54,12 @@ autoreconf -fiv %install %make_install +# Remove .la files +find $RPM_BUILD_ROOT -name '*.la' -delete + +# Do not ship library test utilities +rm -f $RPM_BUILD_ROOT%{_bindir}/* + %check ./xsec/xsec-xtest @@ -63,8 +69,6 @@ autoreconf -fiv %files devel %license LICENSE.txt %doc CHANGELOG.txt NOTICE.txt -%exclude %{_bindir}/* -%exclude %{_libdir}/*.la %{_includedir}/xsec %{_libdir}/libxml-security-c.so %{_libdir}/pkgconfig/xml-security-c.pc From 68937cce98913fa5aef3ddad9312589c7857f53d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20K=C5=82oczko?= Date: Wed, 30 Jan 2019 14:23:23 +0100 Subject: [PATCH 42/66] - use %%exclude does not cause include those files into package %%files (revert last commit) - format text to 80 col - use https:// in Source0 url - improved BuildRequires --- xml-security-c.spec | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index d0f5ad3..c08ea58 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,17 +1,14 @@ +Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 2.0.2 Release: 1%{?dist} -Summary: C++ Implementation of W3C security standards for XML - License: ASL 2.0 URL: http://santuario.apache.org/c/ -Source: http://www.apache.org/dist/santuario/c-library/xml-security-c-%{version}.tar.gz +Source0: https://www.apache.org/dist/santuario/c-library/%{name}-%{version}.tar.gz Patch1: %{name}-ac_fixes.patch - BuildRequires: autoconf BuildRequires: automake -BuildRequires: /usr/bin/c++ -BuildRequires: libstdc++-devel +BuildRequires: gcc-c++ BuildRequires: libtool BuildRequires: openssl-devel BuildRequires: pkgconfig @@ -19,10 +16,10 @@ BuildRequires: xalan-c-devel BuildRequires: xerces-c-devel %description -The xml-security-c library is a C++ implementation of the XML Digital -Signature specification. The library makes use of the Apache XML project's -Xerces-C XML Parser and Xalan-C XSLT processor. The latter is used for -processing XPath and XSLT transforms. +The xml-security-c library is a C++ implementation of the XML Digital Signature +specification. The library makes use of the Apache XML project's Xerces-C XML +Parser and Xalan-C XSLT processor. The latter is used for processing XPath and +XSLT transforms. %package devel Summary: Development files for xml-security-c @@ -33,8 +30,8 @@ Requires: xalan-c-devel Requires: xerces-c-devel %description devel -This package provides development files for xml-security-c, a C++ library -for XML Digital Signatures. +This package provides development files for xml-security-c, a C++ library for +XML Digital Signatures. %prep %autosetup -p1 @@ -48,18 +45,11 @@ autoreconf -fiv --with-openssl \ --with-xalan \ %{nil} - %make_build %install %make_install -# Remove .la files -find $RPM_BUILD_ROOT -name '*.la' -delete - -# Do not ship library test utilities -rm -f $RPM_BUILD_ROOT%{_bindir}/* - %check ./xsec/xsec-xtest @@ -72,8 +62,16 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/* %{_includedir}/xsec %{_libdir}/libxml-security-c.so %{_libdir}/pkgconfig/xml-security-c.pc +%exclude %{_bindir}/* +%exclude %{_libdir}/libxml-security-c.la %changelog +* Wed Jan 30 2019 Tomasz Kłoczko - 2.0.2-1 +- use %%exclude does not cause include those files into package %%files (revert last commit) +- format text to 80 col +- use https:// in Source0 url +- improved BuildRequires + * Fri Nov 16 2018 Pete Walter - 2.0.2-1 - Update to 2.0.2 - Remove explicit attr modes @@ -179,7 +177,7 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/* - New upstream release * Tue Apr 28 2009 Antti Andreimann - 1.4.0-2 -- Execute sed magic against configure instead of configure.ac to +- Execute sed magic against configure instead of configure.ac to avoid calling autotools - Removed build dependency on autotools. - Do not ship test binaries (not needed for end-users) From 9b67a700415057a123732df768813b00f33a273c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 3 Feb 2019 12:31:42 +0000 Subject: [PATCH 43/66] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index c08ea58..7a7ff92 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,7 +1,7 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 2.0.2 -Release: 1%{?dist} +Release: 2%{?dist} License: ASL 2.0 URL: http://santuario.apache.org/c/ Source0: https://www.apache.org/dist/santuario/c-library/%{name}-%{version}.tar.gz @@ -66,6 +66,9 @@ autoreconf -fiv %exclude %{_libdir}/libxml-security-c.la %changelog +* Sun Feb 03 2019 Fedora Release Engineering - 2.0.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Wed Jan 30 2019 Tomasz Kłoczko - 2.0.2-1 - use %%exclude does not cause include those files into package %%files (revert last commit) - format text to 80 col From aa0d635315b89b24b790b885363f20f84f74587f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jul 2019 04:19:19 +0000 Subject: [PATCH 44/66] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 7a7ff92..fa9b273 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,7 +1,7 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 2.0.2 -Release: 2%{?dist} +Release: 3%{?dist} License: ASL 2.0 URL: http://santuario.apache.org/c/ Source0: https://www.apache.org/dist/santuario/c-library/%{name}-%{version}.tar.gz @@ -66,6 +66,9 @@ autoreconf -fiv %exclude %{_libdir}/libxml-security-c.la %changelog +* Sat Jul 27 2019 Fedora Release Engineering - 2.0.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Sun Feb 03 2019 Fedora Release Engineering - 2.0.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 57c510ba22b2bff07d65be136632ffc83e45ee42 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 31 Jan 2020 04:35:17 +0000 Subject: [PATCH 45/66] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index fa9b273..469b2a2 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,7 +1,7 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 2.0.2 -Release: 3%{?dist} +Release: 4%{?dist} License: ASL 2.0 URL: http://santuario.apache.org/c/ Source0: https://www.apache.org/dist/santuario/c-library/%{name}-%{version}.tar.gz @@ -66,6 +66,9 @@ autoreconf -fiv %exclude %{_libdir}/libxml-security-c.la %changelog +* Fri Jan 31 2020 Fedora Release Engineering - 2.0.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Sat Jul 27 2019 Fedora Release Engineering - 2.0.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 836bd62b594b98d252ccd4801d233203a87ab9b6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jul 2020 14:49:32 +0000 Subject: [PATCH 46/66] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 469b2a2..698c4a0 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,7 +1,7 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 2.0.2 -Release: 4%{?dist} +Release: 5%{?dist} License: ASL 2.0 URL: http://santuario.apache.org/c/ Source0: https://www.apache.org/dist/santuario/c-library/%{name}-%{version}.tar.gz @@ -66,6 +66,9 @@ autoreconf -fiv %exclude %{_libdir}/libxml-security-c.la %changelog +* Wed Jul 29 2020 Fedora Release Engineering - 2.0.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Fri Jan 31 2020 Fedora Release Engineering - 2.0.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 32809527b4e704c96465c160015b1f7a9c6bcfee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 7 Dec 2020 19:42:40 +0100 Subject: [PATCH 47/66] Rebuilt for xalan-c 1.12.0 --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 698c4a0..64c838e 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,7 +1,7 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 2.0.2 -Release: 5%{?dist} +Release: 6%{?dist} License: ASL 2.0 URL: http://santuario.apache.org/c/ Source0: https://www.apache.org/dist/santuario/c-library/%{name}-%{version}.tar.gz @@ -66,6 +66,9 @@ autoreconf -fiv %exclude %{_libdir}/libxml-security-c.la %changelog +* Mon Dec 7 19:42:40 CET 2020 Zbigniew Jędrzejewski-Szmek - 2.0.2-6 +- Rebuilt for xalan-c 1.12.0 + * Wed Jul 29 2020 Fedora Release Engineering - 2.0.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 1b550bd7b68279cbe24e76a122481cfedc03f237 Mon Sep 17 00:00:00 2001 From: Benjamin Beasley Date: Mon, 7 Dec 2020 18:16:32 -0500 Subject: [PATCH 48/66] Work around removed XALAN_USING_XALAN compatibility macro in xalan-c 1.12 --- xml-security-c.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 64c838e..fb3bd84 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,7 +1,7 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 2.0.2 -Release: 6%{?dist} +Release: 7%{?dist} License: ASL 2.0 URL: http://santuario.apache.org/c/ Source0: https://www.apache.org/dist/santuario/c-library/%{name}-%{version}.tar.gz @@ -35,6 +35,11 @@ XML Digital Signatures. %prep %autosetup -p1 +# Compatibility macro XALAN_USING_XALAN() was removed in xalan-c 1.12. This +# workaround is harmless when using older xalan-c versions. See +# https://issues.apache.org/jira/browse/SANTUARIO-560. +find . -type f -execdir sed -r -i \ + 's/XALAN_USING_XALAN\(([^\(\)]+)\);*/using xalanc::\1;/g' '{}' '+' %build autoreconf -fiv @@ -66,6 +71,9 @@ autoreconf -fiv %exclude %{_libdir}/libxml-security-c.la %changelog +* Mon Dec 7 18:18:40 EST 2020 Benjamin A. Beasley - 2.0.2-7 +- Work around removed XALAN_USING_XALAN compatibility macro in xalan-c 1.12 + * Mon Dec 7 19:42:40 CET 2020 Zbigniew Jędrzejewski-Szmek - 2.0.2-6 - Rebuilt for xalan-c 1.12.0 From 1055f2ffbcfc3cd2d39455fb9203b9ab7e6d536e Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 9 Jan 2021 01:32:08 +0000 Subject: [PATCH 49/66] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- xml-security-c.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xml-security-c.spec b/xml-security-c.spec index fb3bd84..cd1a3ea 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -6,6 +6,7 @@ License: ASL 2.0 URL: http://santuario.apache.org/c/ Source0: https://www.apache.org/dist/santuario/c-library/%{name}-%{version}.tar.gz Patch1: %{name}-ac_fixes.patch +BuildRequires: make BuildRequires: autoconf BuildRequires: automake BuildRequires: gcc-c++ From 2e90415c165139350192e99a894bcfe657cbfac7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 28 Jan 2021 00:08:58 +0000 Subject: [PATCH 50/66] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index cd1a3ea..432e891 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,7 +1,7 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 2.0.2 -Release: 7%{?dist} +Release: 8%{?dist} License: ASL 2.0 URL: http://santuario.apache.org/c/ Source0: https://www.apache.org/dist/santuario/c-library/%{name}-%{version}.tar.gz @@ -72,6 +72,9 @@ autoreconf -fiv %exclude %{_libdir}/libxml-security-c.la %changelog +* Thu Jan 28 2021 Fedora Release Engineering - 2.0.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Mon Dec 7 18:18:40 EST 2020 Benjamin A. Beasley - 2.0.2-7 - Work around removed XALAN_USING_XALAN compatibility macro in xalan-c 1.12 From 1768a29a1921efe190e6e6e15fb085ec92d6e9eb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 21:42:23 +0000 Subject: [PATCH 51/66] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 432e891..ea16a54 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,7 +1,7 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 2.0.2 -Release: 8%{?dist} +Release: 9%{?dist} License: ASL 2.0 URL: http://santuario.apache.org/c/ Source0: https://www.apache.org/dist/santuario/c-library/%{name}-%{version}.tar.gz @@ -72,6 +72,9 @@ autoreconf -fiv %exclude %{_libdir}/libxml-security-c.la %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 2.0.2-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Thu Jan 28 2021 Fedora Release Engineering - 2.0.2-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 65512acb7248574c30e4f56e108b584921a2fffd Mon Sep 17 00:00:00 2001 From: Sahana Prasad Date: Tue, 14 Sep 2021 19:18:05 +0200 Subject: [PATCH 52/66] Rebuilt with OpenSSL 3.0.0 --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index ea16a54..78813b5 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,7 +1,7 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 2.0.2 -Release: 9%{?dist} +Release: 10%{?dist} License: ASL 2.0 URL: http://santuario.apache.org/c/ Source0: https://www.apache.org/dist/santuario/c-library/%{name}-%{version}.tar.gz @@ -72,6 +72,9 @@ autoreconf -fiv %exclude %{_libdir}/libxml-security-c.la %changelog +* Tue Sep 14 2021 Sahana Prasad - 2.0.2-10 +- Rebuilt with OpenSSL 3.0.0 + * Fri Jul 23 2021 Fedora Release Engineering - 2.0.2-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 4d608dd089cf6e003ee0278862b2462eb698b19b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jan 2022 05:14:51 +0000 Subject: [PATCH 53/66] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 78813b5..0545d21 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,7 +1,7 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 2.0.2 -Release: 10%{?dist} +Release: 11%{?dist} License: ASL 2.0 URL: http://santuario.apache.org/c/ Source0: https://www.apache.org/dist/santuario/c-library/%{name}-%{version}.tar.gz @@ -72,6 +72,9 @@ autoreconf -fiv %exclude %{_libdir}/libxml-security-c.la %changelog +* Sat Jan 22 2022 Fedora Release Engineering - 2.0.2-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Tue Sep 14 2021 Sahana Prasad - 2.0.2-10 - Rebuilt with OpenSSL 3.0.0 From ca4a8efdabf11be19a7e3ba9e6348bf574d49e0e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 13:16:44 +0000 Subject: [PATCH 54/66] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 0545d21..5f26482 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,7 +1,7 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 2.0.2 -Release: 11%{?dist} +Release: 12%{?dist} License: ASL 2.0 URL: http://santuario.apache.org/c/ Source0: https://www.apache.org/dist/santuario/c-library/%{name}-%{version}.tar.gz @@ -72,6 +72,9 @@ autoreconf -fiv %exclude %{_libdir}/libxml-security-c.la %changelog +* Sat Jul 23 2022 Fedora Release Engineering - 2.0.2-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Sat Jan 22 2022 Fedora Release Engineering - 2.0.2-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From d1bca964ee2fd6fd2cffeb02c9ac5d1d35fa948b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 21 Jan 2023 07:36:56 +0000 Subject: [PATCH 55/66] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 5f26482..c287fd5 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,7 +1,7 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 2.0.2 -Release: 12%{?dist} +Release: 13%{?dist} License: ASL 2.0 URL: http://santuario.apache.org/c/ Source0: https://www.apache.org/dist/santuario/c-library/%{name}-%{version}.tar.gz @@ -72,6 +72,9 @@ autoreconf -fiv %exclude %{_libdir}/libxml-security-c.la %changelog +* Sat Jan 21 2023 Fedora Release Engineering - 2.0.2-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Sat Jul 23 2022 Fedora Release Engineering - 2.0.2-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 1361fe4bddc41374f621589b0d9a0604b94df8c3 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Wed, 25 Jan 2023 22:09:41 -0500 Subject: [PATCH 56/66] Update to 2.0.4 --- sources | 2 +- xml-security-c-ac_fixes.patch | 24 ------------------------ xml-security-c.spec | 18 +++++++----------- 3 files changed, 8 insertions(+), 36 deletions(-) delete mode 100644 xml-security-c-ac_fixes.patch diff --git a/sources b/sources index b910bcd..45ff318 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xml-security-c-2.0.2.tar.gz) = bebadee2daf27181f5bcc955a909397976e8fd2e67f5e546f5adbede0ca790647cbec9181b0b609da59d525ff3baa9f899af2a3d815bc7a2f3a57bd8b30c011b +SHA512 (xml-security-c-2.0.4.tar.gz) = c2a83b0415ec0a83c932bffb709beac5763e20397f3ec4dfb350a3190de878a860b75482c095b9ac1cae3bbfbcc968b2a26ea912816b0dd4456c7ea0e07f3060 diff --git a/xml-security-c-ac_fixes.patch b/xml-security-c-ac_fixes.patch deleted file mode 100644 index 939107a..0000000 --- a/xml-security-c-ac_fixes.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- xml-security-c-1.7.3/configure.ac~ 2015-01-30 03:55:09.000000000 +0000 -+++ xml-security-c-1.7.3/configure.ac 2017-08-30 10:10:04.161889660 +0100 -@@ -26,16 +26,13 @@ - - AC_ARG_ENABLE(debug, - AS_HELP_STRING([--enable-debug],[Have GCC compile with symbols (Default = no)]), -- enable_debug=$enableval, enable_debug=no) -- --if test "$enable_debug" = "yes" ; then -+ [ - GCC_CFLAGS="$CFLAGS -g -D_DEBUG" - GCC_CXXFLAGS="$CXXFLAGS -g -D_DEBUG" --else -- GCC_CFLAGS="$CFLAGS -O2 -DNDEBUG" -- GCC_CXXFLAGS="$CXXFLAGS -O2 -DNDEBUG" --fi -- -+ ],[ -+ GCC_CFLAGS="$CFLAGS -DNDEBUG" -+ GCC_CXXFLAGS="$CXXFLAGS -DNDEBUG" -+ ]) - - # Define the files we wish to generate - diff --git a/xml-security-c.spec b/xml-security-c.spec index c287fd5..4e63e9e 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,11 +1,10 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c -Version: 2.0.2 -Release: 13%{?dist} +Version: 2.0.4 +Release: 1%{?dist} License: ASL 2.0 -URL: http://santuario.apache.org/c/ +URL: http://santuario.apache.org/cindex.html Source0: https://www.apache.org/dist/santuario/c-library/%{name}-%{version}.tar.gz -Patch1: %{name}-ac_fixes.patch BuildRequires: make BuildRequires: autoconf BuildRequires: automake @@ -36,11 +35,6 @@ XML Digital Signatures. %prep %autosetup -p1 -# Compatibility macro XALAN_USING_XALAN() was removed in xalan-c 1.12. This -# workaround is harmless when using older xalan-c versions. See -# https://issues.apache.org/jira/browse/SANTUARIO-560. -find . -type f -execdir sed -r -i \ - 's/XALAN_USING_XALAN\(([^\(\)]+)\);*/using xalanc::\1;/g' '{}' '+' %build autoreconf -fiv @@ -60,7 +54,7 @@ autoreconf -fiv ./xsec/xsec-xtest %files -%{_libdir}/libxml-security-c.so.* +%{_libdir}/libxml-security-c.so.20{,.*} %files devel %license LICENSE.txt @@ -69,9 +63,11 @@ autoreconf -fiv %{_libdir}/libxml-security-c.so %{_libdir}/pkgconfig/xml-security-c.pc %exclude %{_bindir}/* -%exclude %{_libdir}/libxml-security-c.la %changelog +* Thu Jan 26 2023 Yaakov Selkowitz - 2.0.4-1 +- Update to 2.0.4 + * Sat Jan 21 2023 Fedora Release Engineering - 2.0.2-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 4099711939912e83c0f7abf8ec6506b85d364eb6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jul 2023 19:00:55 +0000 Subject: [PATCH 57/66] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 4e63e9e..51ea47b 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,7 +1,7 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 2.0.4 -Release: 1%{?dist} +Release: 2%{?dist} License: ASL 2.0 URL: http://santuario.apache.org/cindex.html Source0: https://www.apache.org/dist/santuario/c-library/%{name}-%{version}.tar.gz @@ -65,6 +65,9 @@ autoreconf -fiv %exclude %{_bindir}/* %changelog +* Sat Jul 22 2023 Fedora Release Engineering - 2.0.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Thu Jan 26 2023 Yaakov Selkowitz - 2.0.4-1 - Update to 2.0.4 From 74e9b583c48d7ec3aecd0c1d706083ce4a460b18 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jan 2024 09:51:56 +0000 Subject: [PATCH 58/66] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 51ea47b..f819b97 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,7 +1,7 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 2.0.4 -Release: 2%{?dist} +Release: 3%{?dist} License: ASL 2.0 URL: http://santuario.apache.org/cindex.html Source0: https://www.apache.org/dist/santuario/c-library/%{name}-%{version}.tar.gz @@ -65,6 +65,9 @@ autoreconf -fiv %exclude %{_bindir}/* %changelog +* Sat Jan 27 2024 Fedora Release Engineering - 2.0.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sat Jul 22 2023 Fedora Release Engineering - 2.0.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 23db82e673f743d1c3b4c6a104bf07db23b9b2fc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 10:12:51 +0000 Subject: [PATCH 59/66] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index f819b97..38da30f 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,7 +1,7 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 2.0.4 -Release: 3%{?dist} +Release: 4%{?dist} License: ASL 2.0 URL: http://santuario.apache.org/cindex.html Source0: https://www.apache.org/dist/santuario/c-library/%{name}-%{version}.tar.gz @@ -65,6 +65,9 @@ autoreconf -fiv %exclude %{_bindir}/* %changelog +* Sat Jul 20 2024 Fedora Release Engineering - 2.0.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Sat Jan 27 2024 Fedora Release Engineering - 2.0.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From a1c3139c89536fb96b8c30540d8c8cc295d3106e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Wed, 24 Jul 2024 18:10:31 +0200 Subject: [PATCH 60/66] convert ASL 2.0 license to SPDX This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4 --- xml-security-c.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 38da30f..c7e7094 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,8 +1,9 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 2.0.4 -Release: 4%{?dist} -License: ASL 2.0 +Release: 5%{?dist} +# Automatically converted from old format: ASL 2.0 - review is highly recommended. +License: Apache-2.0 URL: http://santuario.apache.org/cindex.html Source0: https://www.apache.org/dist/santuario/c-library/%{name}-%{version}.tar.gz BuildRequires: make @@ -65,6 +66,9 @@ autoreconf -fiv %exclude %{_bindir}/* %changelog +* Wed Jul 24 2024 Miroslav Suchý - 2.0.4-5 +- convert license to SPDX + * Sat Jul 20 2024 Fedora Release Engineering - 2.0.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 6b201a7b7013a155e997e79a7661c912971d353d Mon Sep 17 00:00:00 2001 From: Pete Walter Date: Fri, 18 Oct 2024 14:09:13 +0100 Subject: [PATCH 61/66] Rebuild for xerces-c 3.3 --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index c7e7094..187e596 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,7 +1,7 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 2.0.4 -Release: 5%{?dist} +Release: 6%{?dist} # Automatically converted from old format: ASL 2.0 - review is highly recommended. License: Apache-2.0 URL: http://santuario.apache.org/cindex.html @@ -66,6 +66,9 @@ autoreconf -fiv %exclude %{_bindir}/* %changelog +* Fri Oct 18 2024 Pete Walter - 2.0.4-6 +- Rebuild for xerces-c 3.3 + * Wed Jul 24 2024 Miroslav Suchý - 2.0.4-5 - convert license to SPDX From 331f9b69abc81c8af2d613175cfeb92cddd0d9a1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 19 Jan 2025 16:00:27 +0000 Subject: [PATCH 62/66] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 187e596..4c6e96b 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,7 +1,7 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 2.0.4 -Release: 6%{?dist} +Release: 7%{?dist} # Automatically converted from old format: ASL 2.0 - review is highly recommended. License: Apache-2.0 URL: http://santuario.apache.org/cindex.html @@ -66,6 +66,9 @@ autoreconf -fiv %exclude %{_bindir}/* %changelog +* Sun Jan 19 2025 Fedora Release Engineering - 2.0.4-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Fri Oct 18 2024 Pete Walter - 2.0.4-6 - Rebuild for xerces-c 3.3 From 85fba6ac6a5bd95992ccbee4d4d3f92ea9a5afc3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 20:55:40 +0000 Subject: [PATCH 63/66] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 4c6e96b..7b7fefa 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,7 +1,7 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 2.0.4 -Release: 7%{?dist} +Release: 8%{?dist} # Automatically converted from old format: ASL 2.0 - review is highly recommended. License: Apache-2.0 URL: http://santuario.apache.org/cindex.html @@ -66,6 +66,9 @@ autoreconf -fiv %exclude %{_bindir}/* %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 2.0.4-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Sun Jan 19 2025 Fedora Release Engineering - 2.0.4-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 1fdb3b4f16577e7a9acd1284dd949e61a313a85c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 17 Jan 2026 20:45:19 +0000 Subject: [PATCH 64/66] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 7b7fefa..1fbcfca 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,7 +1,7 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 2.0.4 -Release: 8%{?dist} +Release: 9%{?dist} # Automatically converted from old format: ASL 2.0 - review is highly recommended. License: Apache-2.0 URL: http://santuario.apache.org/cindex.html @@ -66,6 +66,9 @@ autoreconf -fiv %exclude %{_bindir}/* %changelog +* Sat Jan 17 2026 Fedora Release Engineering - 2.0.4-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + * Fri Jul 25 2025 Fedora Release Engineering - 2.0.4-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From bae3e5c34c3c0a7e304b14f071965301bba30076 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Fri, 12 Jun 2026 16:41:27 -0400 Subject: [PATCH 65/66] Rebuilt for openssl 4.0 --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 1fbcfca..1629cfd 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,7 +1,7 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 2.0.4 -Release: 9%{?dist} +Release: 10%{?dist} # Automatically converted from old format: ASL 2.0 - review is highly recommended. License: Apache-2.0 URL: http://santuario.apache.org/cindex.html @@ -66,6 +66,9 @@ autoreconf -fiv %exclude %{_bindir}/* %changelog +* Fri Jun 12 2026 Yaakov Selkowitz - 2.0.4-10 +- Rebuilt for openssl 4.0 + * Sat Jan 17 2026 Fedora Release Engineering - 2.0.4-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild From d5f59e47c1693c5dbe403ec26155f7629e42eee7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jul 2026 09:18:08 +0000 Subject: [PATCH 66/66] Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild --- xml-security-c.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml-security-c.spec b/xml-security-c.spec index 1629cfd..650efee 100644 --- a/xml-security-c.spec +++ b/xml-security-c.spec @@ -1,7 +1,7 @@ Summary: C++ Implementation of W3C security standards for XML Name: xml-security-c Version: 2.0.4 -Release: 10%{?dist} +Release: 11%{?dist} # Automatically converted from old format: ASL 2.0 - review is highly recommended. License: Apache-2.0 URL: http://santuario.apache.org/cindex.html @@ -66,6 +66,9 @@ autoreconf -fiv %exclude %{_bindir}/* %changelog +* Fri Jul 17 2026 Fedora Release Engineering - 2.0.4-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild + * Fri Jun 12 2026 Yaakov Selkowitz - 2.0.4-10 - Rebuilt for openssl 4.0