summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2018-08-04 16:41:40 +0000
committerYann Ylavic <ylavic@apache.org>2018-08-04 16:41:40 +0000
commit8ca89dd5ecf6de93c260d4d9d575b7b59a1f978b (patch)
tree86f11efb9eb2eadf2ff6910ff3d6fc308fc63654 /crypto
parenteef861372d3a97677ba51bd2cb690f2eebe62621 (diff)
downloadapr-8ca89dd5ecf6de93c260d4d9d575b7b59a1f978b.tar.gz
crypto: move APR_USE_OPENSSL_PRE* definitions to apr_crypto_internal.h.
They can (and will) be used by other openssl related code, so share them. s/#ifndef APR_USE_OPENSSL_PRE_1_1_1_API/#if !APR_USE_OPENSSL_PRE_1_1_1_API/ and fix revealed compilation error. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1837429 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'crypto')
-rw-r--r--crypto/apr_crypto_openssl.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/crypto/apr_crypto_openssl.c b/crypto/apr_crypto_openssl.c
index 5186e6b42..dcaa01a30 100644
--- a/crypto/apr_crypto_openssl.c
+++ b/crypto/apr_crypto_openssl.c
@@ -38,22 +38,6 @@
#define LOG_PREFIX "apr_crypto_openssl: "
-#ifndef APR_USE_OPENSSL_PRE_1_1_API
-#if defined(LIBRESSL_VERSION_NUMBER)
-/* LibreSSL declares OPENSSL_VERSION_NUMBER == 2.0 but does not include most
- * changes from OpenSSL >= 1.1 (new functions, macros, deprecations, ...), so
- * we have to work around this...
- */
-#define APR_USE_OPENSSL_PRE_1_1_API (1)
-#define APR_USE_OPENSSL_PRE_1_1_1_API (1)
-#define APR_USE_OPENSSL_PRE_1_0_API (0)
-#else
-#define APR_USE_OPENSSL_PRE_1_1_API (OPENSSL_VERSION_NUMBER < 0x10100000L)
-#define APR_USE_OPENSSL_PRE_1_1_1_API (OPENSSL_VERSION_NUMBER < 0x10101000L)
-#define APR_USE_OPENSSL_PRE_1_0_API (OPENSSL_VERSION_NUMBER < 0x10000000L)
-#endif
-#endif
-
struct apr_crypto_t {
apr_pool_t *pool;
const apr_crypto_driver_t *provider;
@@ -681,7 +665,7 @@ static apr_status_t crypto_key(apr_crypto_key_t **k,
case APR_CRYPTO_KTYPE_CMAC: {
-#ifndef APR_USE_OPENSSL_PRE_1_1_1_API
+#if !APR_USE_OPENSSL_PRE_1_1_1_API
apr_crypto_config_t *config = f->config;
/* decide on what cipher mechanism we will be using */
@@ -696,7 +680,7 @@ static apr_status_t crypto_key(apr_crypto_key_t **k,
return APR_ENOKEY;
}
- switch (rec->k.hmac.hmac) {
+ switch (rec->k.hmac.digest) {
case APR_CRYPTO_DIGEST_MD5:
key->hmac = EVP_md5();
break;