diff options
3 files changed, 53 insertions, 8 deletions
diff --git a/meta-oe/recipes-support/poco/poco/0001-fix-test-Use-96-bit-IV-with-aes-256-gcm-to-fix-4347.patch b/meta-oe/recipes-support/poco/poco/0001-fix-test-Use-96-bit-IV-with-aes-256-gcm-to-fix-4347.patch new file mode 100644 index 0000000000..54d005d0c1 --- /dev/null +++ b/meta-oe/recipes-support/poco/poco/0001-fix-test-Use-96-bit-IV-with-aes-256-gcm-to-fix-4347.patch | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | From aa202b4eedfef259718b74a66cf0abfe7b49bb6f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Matej Kenda <matejken@gmail.com> | ||
| 3 | Date: Wed, 3 Jan 2024 20:13:57 +0100 | ||
| 4 | Subject: [PATCH] fix(test): Use 96-bit IV with aes-256-gcm to fix (#4347): | ||
| 5 | |||
| 6 | I/O error: error:1C800066:Provider routines::cipher operation failed | ||
| 7 | |||
| 8 | Upstream-Status: Backport [https://github.com/pocoproject/poco/commit/0f25b4c114f23c22681a981d8aed3464530fa6b1] | ||
| 9 | Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> | ||
| 10 | --- | ||
| 11 | Crypto/testsuite/src/CryptoTest.cpp | 2 +- | ||
| 12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 13 | |||
| 14 | diff --git a/Crypto/testsuite/src/CryptoTest.cpp b/Crypto/testsuite/src/CryptoTest.cpp | ||
| 15 | index d60f1988e..fd798e72b 100644 | ||
| 16 | --- a/Crypto/testsuite/src/CryptoTest.cpp | ||
| 17 | +++ b/Crypto/testsuite/src/CryptoTest.cpp | ||
| 18 | @@ -214,7 +214,7 @@ void CryptoTest::testEncryptDecryptGCM() | ||
| 19 | { | ||
| 20 | CipherKey key("aes-256-gcm"); | ||
| 21 | |||
| 22 | - CipherKey::ByteVec iv(20, 213); | ||
| 23 | + CipherKey::ByteVec iv(12, 213); | ||
| 24 | key.setIV(iv); | ||
| 25 | |||
| 26 | Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(key); | ||
diff --git a/meta-oe/recipes-support/poco/poco/run-ptest b/meta-oe/recipes-support/poco/poco/run-ptest index 521cc08a75..d40c7ac975 100644 --- a/meta-oe/recipes-support/poco/poco/run-ptest +++ b/meta-oe/recipes-support/poco/poco/run-ptest | |||
| @@ -1,8 +1,24 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | |||
| 3 | KILL_MONGODB=false | ||
| 4 | |||
| 5 | if ! pidof mongod; then | ||
| 6 | /usr/bin/mongod --config /etc/mongod.conf & | ||
| 7 | KILL_MONGODB=true | ||
| 8 | fi | ||
| 9 | |||
| 10 | if ! nslookup example.com; then | ||
| 11 | mv /etc/resolv.conf /etc/resolv.conf.bak | ||
| 12 | echo "nameserver 8.8.8.8" > /etc/resolv.conf | ||
| 13 | trap "mv /etc/resolv.conf.bak /etc/resolv.conf" INT EXIT | ||
| 14 | fi | ||
| 15 | |||
| 2 | while read runner; do | 16 | while read runner; do |
| 3 | oldpath=`pwd` >/dev/null | 17 | oldpath=`pwd` >/dev/null |
| 4 | cd bin | 18 | cd bin |
| 5 | echo Testing $runner | 19 | echo Testing $runner |
| 6 | ./$runner -ignore $oldpath/cppignore.lnx -all | 20 | ./$runner -ignore $oldpath/cppignore.lnx -all && echo PASS: $runner || echo FAIL: $runner |
| 7 | cd $oldpath >/dev/null | 21 | cd $oldpath >/dev/null |
| 8 | done < testrunners | 22 | done < testrunners |
| 23 | |||
| 24 | [ "$KILL_MONGODB" = "true" ] && killall mongod | ||
diff --git a/meta-oe/recipes-support/poco/poco_1.11.2.bb b/meta-oe/recipes-support/poco/poco_1.11.2.bb index 4711c6bb92..53ea13a480 100644 --- a/meta-oe/recipes-support/poco/poco_1.11.2.bb +++ b/meta-oe/recipes-support/poco/poco_1.11.2.bb | |||
| @@ -8,11 +8,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=4267f48fc738f50380cbeeb76f95cebc" | |||
| 8 | # These dependencies are required by Foundation | 8 | # These dependencies are required by Foundation |
| 9 | DEPENDS = "libpcre zlib" | 9 | DEPENDS = "libpcre zlib" |
| 10 | 10 | ||
| 11 | SRC_URI = " \ | 11 | SRC_URI = "git://github.com/pocoproject/poco.git;branch=main;protocol=https \ |
| 12 | git://github.com/pocoproject/poco.git;branch=main;protocol=https \ | 12 | file://run-ptest \ |
| 13 | file://run-ptest \ | 13 | file://CVE-2025-6375.patch \ |
| 14 | file://CVE-2025-6375.patch \ | 14 | file://0001-fix-test-Use-96-bit-IV-with-aes-256-gcm-to-fix-4347.patch \ |
| 15 | " | 15 | " |
| 16 | SRCREV = "9d1c428c861f2e5ccf09149bbe8d2149720c5896" | 16 | SRCREV = "9d1c428c861f2e5ccf09149bbe8d2149720c5896" |
| 17 | 17 | ||
| 18 | UPSTREAM_CHECK_GITTAGREGEX = "poco-(?P<pver>\d+(\.\d+)+)" | 18 | UPSTREAM_CHECK_GITTAGREGEX = "poco-(?P<pver>\d+(\.\d+)+)" |
| @@ -79,13 +79,15 @@ python populate_packages:prepend () { | |||
| 79 | do_install_ptest () { | 79 | do_install_ptest () { |
| 80 | cp -rf ${B}/bin/ ${D}${PTEST_PATH} | 80 | cp -rf ${B}/bin/ ${D}${PTEST_PATH} |
| 81 | cp -f ${B}/lib/libCppUnit.so* ${D}${libdir} | 81 | cp -f ${B}/lib/libCppUnit.so* ${D}${libdir} |
| 82 | cp -rf ${B}/*/testsuite/data ${D}${PTEST_PATH}/bin/ | 82 | cp -rf ${S}/*/testsuite/data ${D}${PTEST_PATH}/bin/ |
| 83 | find "${D}${PTEST_PATH}" -executable -exec chrpath -d {} \; | 83 | find "${D}${PTEST_PATH}" -executable -exec chrpath -d {} \; |
| 84 | rm -f ${D}${PTEST_PATH}/testrunners | 84 | rm -f ${D}${PTEST_PATH}/testrunners |
| 85 | for f in ${D}${PTEST_PATH}/bin/*-testrunner; do | 85 | for f in ${D}${PTEST_PATH}/bin/*-testrunner; do |
| 86 | echo `basename $f` >> ${D}${PTEST_PATH}/testrunners | 86 | echo `basename $f` >> ${D}${PTEST_PATH}/testrunners |
| 87 | done | 87 | done |
| 88 | install -Dm 0644 ${S}/cppignore.lnx ${D}${PTEST_PATH}/cppignore.lnx | 88 | install -Dm 0644 ${S}/cppignore.lnx ${D}${PTEST_PATH}/cppignore.lnx |
| 89 | install ${B}/bin/TestLibrary.so ${D}${libdir} | ||
| 90 | install -D ${B}/bin/TestApp ${D}${bindir}/TestApp | ||
| 89 | } | 91 | } |
| 90 | 92 | ||
| 91 | PACKAGES_DYNAMIC = "poco-.*" | 93 | PACKAGES_DYNAMIC = "poco-.*" |
| @@ -97,7 +99,8 @@ ALLOW_EMPTY:${PN} = "1" | |||
| 97 | PACKAGES =+ "${PN}-cppunit" | 99 | PACKAGES =+ "${PN}-cppunit" |
| 98 | FILES:${PN}-cppunit += "${libdir}/libCppUnit.so*" | 100 | FILES:${PN}-cppunit += "${libdir}/libCppUnit.so*" |
| 99 | ALLOW_EMPTY:${PN}-cppunit = "1" | 101 | ALLOW_EMPTY:${PN}-cppunit = "1" |
| 102 | FILES:${PN}-ptest += "${bindir}/TestApp ${libdir}/TestLibrary.so" | ||
| 100 | 103 | ||
| 101 | RDEPENDS:${PN}-ptest += "${PN}-cppunit" | 104 | RDEPENDS:${PN}-ptest += "${PN}-cppunit redis mongodb" |
| 102 | 105 | ||
| 103 | BBCLASSEXTEND = "native" | 106 | BBCLASSEXTEND = "native" |
