Skip to content

Commit 6e01272

Browse files
committed
Fallback to newest version assumption in shims.
1 parent 87db8e0 commit 6e01272

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/cryptopp.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,13 @@ using CryptoPP::Integer;
9595
static jclass provider_class;
9696
static std::unique_ptr<RandomNumberGenerator> rng = std::make_unique<AutoSeededRandomPool>();
9797

98+
// Fallback to newest
99+
#if !(defined(ECTESTER_CRYPTOPP_MAJOR) && defined(ECTESTER_CRYPTOPP_MINOR) && defined(ECTESTER_CRYPTOPP_PATCH))
100+
#define ECTESTER_CRYPTOPP_MAJOR 99
101+
#define ECTESTER_CRYPTOPP_MINOR 99
102+
#define ECTESTER_CRYPTOPP_PATCH 99
103+
#endif
104+
98105

99106
JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_CryptoppLib_createProvider(JNIEnv *env, jobject self) {
100107
/* Create the custom provider. */

standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/mbedtls.c

+8
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ static mbedtls_entropy_context fixed_entropy;
2121
static jclass provider_class;
2222

2323

24+
// Fallback to newest
25+
#if !(defined(ECTESTER_MBEDTLS_MAJOR) && defined(ECTESTER_MBEDTLS_MINOR) && defined(ECTESTER_MBEDTLS_PATCH))
26+
#define ECTESTER_MBEDTLS_MAJOR 99
27+
#define ECTESTER_MBEDTLS_MINOR 99
28+
#define ECTESTER_MBEDTLS_PATCH 99
29+
#endif
30+
31+
2432
#if VERSION_LT(MBEDTLS, 3, 0, 0)
2533
#define MBEDTLS_PRIVATE(member) member
2634
#else

0 commit comments

Comments
 (0)