diff --git a/src/Platform.h b/src/Platform.h index bdda9a3..f7cd6dc 100644 --- a/src/Platform.h +++ b/src/Platform.h @@ -77,7 +77,7 @@ #define BSWAP32(x) __builtin_bswap32(x) #define BSWAP64(x) __builtin_bswap64(x) #else -#error Please define your platform's byteswap macros! +#error Please define your platform byteswap macros! #endif #if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) || defined(__BIG_ENDIAN__) diff --git a/src/PlatformCrypto.c b/src/PlatformCrypto.c index 18ced76..c8bbebe 100644 --- a/src/PlatformCrypto.c +++ b/src/PlatformCrypto.c @@ -11,6 +11,10 @@ bool RandomStateInitialized = false; #include #include +#if OPENSSL_VERSION_NUMBER < 0x10100000L +#define EVP_CIPHER_CTX_reset(x) EVP_CIPHER_CTX_cleanup(x); EVP_CIPHER_CTX_init(x) +#endif + static int addPkcs7PaddingInPlace(unsigned char* plaintext, int plaintextLen) { int paddedLength = ROUND_TO_PKCS7_PADDED_LEN(plaintextLen); unsigned char paddingByte = (unsigned char)(16 - (plaintextLen % 16));