File tree Expand file tree Collapse file tree 4 files changed +70
-13
lines changed
Expand file tree Collapse file tree 4 files changed +70
-13
lines changed Original file line number Diff line number Diff line change 88 pull_request :
99
1010jobs :
11- linux :
12- name : Linux (${{ matrix.backend }})
11+ linux_botan :
12+ name : Linux with Botan
1313 runs-on : ubuntu-24.04
14- strategy :
15- fail-fast : false
16- matrix :
17- include :
18- - backend : openssl
19- - backend : botan
2014 steps :
2115 - uses : actions/checkout@v4
2216 - name : Prepare
2317 run : |
2418 sudo apt update -qq
2519 sudo apt install libcppunit-dev libbotan-2-dev p11-kit
20+ - name : Build
21+ env :
22+ CXXFLAGS : -Werror -DBOTAN_NO_DEPRECATED_WARNINGS
23+ run : |
24+ ./autogen.sh
25+ ./configure --with-crypto-backend=botan
26+ make
27+ - name : Test
28+ run : |
29+ make check || (find . -name test-suite.log -exec cat {} \; && false)
30+
31+ linux_ossl_1 :
32+ name : Linux with OpenSSL 1.1.1
33+ runs-on : ubuntu-24.04
34+ steps :
35+ - uses : actions/checkout@v4
36+ - name : Prepare
37+ run : |
38+ sudo apt update -qq
39+ sudo apt install libcppunit-dev p11-kit
2640 # Replace installed OpenSSL with the supported version 1.1.1
2741 curl -O http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.24_amd64.deb
2842 curl -O http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.1.1f-1ubuntu2.24_amd64.deb
@@ -32,10 +46,31 @@ jobs:
3246 libssl-dev_1.1.1f-1ubuntu2.24_amd64.deb
3347 - name : Build
3448 env :
35- CXXFLAGS : -Werror -DBOTAN_NO_DEPRECATED_WARNINGS
49+ CXXFLAGS : -Werror
50+ run : |
51+ ./autogen.sh
52+ ./configure --with-crypto-backend=openssl
53+ make
54+ - name : Test
55+ run : |
56+ make check || (find . -name test-suite.log -exec cat {} \; && false)
57+
58+ linux_ossl_30 :
59+ name : Linux (openssl 3.0)
60+ runs-on : ubuntu-24.04
61+ steps :
62+ - uses : actions/checkout@v4
63+ - name : Prepare
64+ run : |
65+ sudo apt update -qq
66+ sudo apt install libcppunit-dev p11-kit
67+ - name : Build
68+ # Once all OpenSSL deprecations fixed, uncomment this
69+ # env:
70+ # CXXFLAGS: -Werror
3671 run : |
3772 ./autogen.sh
38- ./configure --with-crypto-backend=${{ matrix.backend }}
73+ ./configure --with-crypto-backend=openssl
3974 make
4075 - name : Test
4176 run : |
Original file line number Diff line number Diff line change 4444#include " MutexFactory.h"
4545#include " SecureMemoryRegistry.h"
4646
47- #if defined( WITH_OPENSSL)
47+ #ifdef WITH_OPENSSL
4848#include " OSSLCryptoFactory.h"
49+ #if OPENSSL_VERSION_NUMBER >= 0x30000000L
50+ #include < openssl/provider.h>
51+ #endif
4952#else
5053#include " BotanCryptoFactory.h"
5154#endif
@@ -75,6 +78,11 @@ std::auto_ptr<BotanCryptoFactory> BotanCryptoFactory::instance(NULL);
7578
7679int main (int /* argc*/ , char ** /* argv*/ )
7780{
81+ #if defined(WITH_OPENSSL) && OPENSSL_VERSION_NUMBER >= 0x30000000L
82+ OSSL_PROVIDER_load (NULL , " legacy" );
83+ OSSL_PROVIDER_load (NULL , " default" );
84+ #endif
85+
7886 CppUnit::TestResult controller;
7987 CppUnit::TestResultCollector result;
8088 CppUnit::TextUi::TestRunner runner;
Original file line number Diff line number Diff line change 11MAINTAINERCLEANFILES = $(srcdir ) /Makefile.in
22
3- AM_CPPFLAGS = -I$(srcdir ) /.. \
3+ AM_CPPFLAGS = -I$(srcdir ) /../.. \
4+ -I$(srcdir ) /.. \
45 -I$(srcdir ) /../common \
56 -I$(srcdir ) /../pkcs11 \
6- @CPPUNIT_CFLAGS@
7+ @CPPUNIT_CFLAGS@ \
8+ @CRYPTO_INCLUDES@
79
810check_PROGRAMS = p11test
911
Original file line number Diff line number Diff line change 4545#include < fstream>
4646#include < stdlib.h>
4747#include < iostream>
48+ #include " config.h"
4849#ifdef _WIN32
4950#include " setenv.h"
5051#endif
52+ #ifdef WITH_OPENSSL
53+ #include < openssl/opensslv.h>
54+ #if OPENSSL_VERSION_NUMBER >= 0x30000000L
55+ #include < openssl/provider.h>
56+ #endif
57+ #endif
5158
5259class MyListener : public CPPUNIT_NS ::TestListener {
5360 virtual void startTest ( CPPUNIT_NS::Test* pTest ) {
@@ -71,6 +78,11 @@ int main(int /*argc*/, char**const /*argv*/)
7178#endif
7279#endif
7380
81+ #if defined(WITH_OPENSSL) && OPENSSL_VERSION_NUMBER >= 0x30000000L
82+ OSSL_PROVIDER_load (NULL , " legacy" );
83+ OSSL_PROVIDER_load (NULL , " default" );
84+ #endif
85+
7486 CPPUNIT_NS::TestFactoryRegistry ®istry ( CPPUNIT_NS::TestFactoryRegistry::getRegistry () );
7587
7688 CPPUNIT_NS::TextTestRunner runner;
You can’t perform that action at this time.
0 commit comments