diff options
-rw-r--r-- | src/openssl.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/openssl.c b/src/openssl.c index ee2cd68..c33d934 100644 --- a/src/openssl.c +++ b/src/openssl.c | |||
@@ -281,14 +281,14 @@ | |||
281 | #define HAVE_X509_STORE_REFERENCES (!OPENSSL_PREREQ(1,1,0)) | 281 | #define HAVE_X509_STORE_REFERENCES (!OPENSSL_PREREQ(1,1,0)) |
282 | #endif | 282 | #endif |
283 | 283 | ||
284 | #ifndef HAVE_X509_UP_REF | ||
285 | #define HAVE_X509_UP_REF OPENSSL_PREREQ(1,1,0) | ||
286 | #endif | ||
287 | |||
288 | #ifndef HAVE_X509_STORE_UP_REF | 284 | #ifndef HAVE_X509_STORE_UP_REF |
289 | #define HAVE_X509_STORE_UP_REF OPENSSL_PREREQ(1,1,0) | 285 | #define HAVE_X509_STORE_UP_REF OPENSSL_PREREQ(1,1,0) |
290 | #endif | 286 | #endif |
291 | 287 | ||
288 | #ifndef HAVE_X509_UP_REF | ||
289 | #define HAVE_X509_UP_REF OPENSSL_PREREQ(1,1,0) | ||
290 | #endif | ||
291 | |||
292 | #ifndef HMAC_INIT_EX_INT | 292 | #ifndef HMAC_INIT_EX_INT |
293 | #define HMAC_INIT_EX_INT OPENSSL_PREREQ(1,0,0) | 293 | #define HMAC_INIT_EX_INT OPENSSL_PREREQ(1,0,0) |
294 | #endif | 294 | #endif |
@@ -1629,28 +1629,28 @@ static void compat_init_X509_STORE_onfree(void *store, void *data NOTUSED, CRYPT | |||
1629 | compat.tmp.store = NULL; | 1629 | compat.tmp.store = NULL; |
1630 | } /* compat_init_X509_STORE_onfree() */ | 1630 | } /* compat_init_X509_STORE_onfree() */ |
1631 | 1631 | ||
1632 | #if !HAVE_X509_UP_REF | 1632 | #if !HAVE_X509_STORE_UP_REF |
1633 | #define X509_up_ref(...) compat_X509_up_ref(__VA_ARGS__) | 1633 | #define X509_STORE_up_ref(...) compat_X509_STORE_up_ref(__VA_ARGS__) |
1634 | 1634 | ||
1635 | static int compat_X509_up_ref(X509 *crt) { | 1635 | static int compat_X509_STORE_up_ref(X509_STORE *crt) { |
1636 | /* our caller should already have had a proper reference */ | 1636 | /* our caller should already have had a proper reference */ |
1637 | if (CRYPTO_add(&crt->references, 1, CRYPTO_LOCK_X509) < 2) | 1637 | if (CRYPTO_add(&crt->references, 1, CRYPTO_LOCK_X509_STORE) < 2) |
1638 | return 0; /* fail */ | 1638 | return 0; /* fail */ |
1639 | 1639 | ||
1640 | return 1; | 1640 | return 1; |
1641 | } /* compat_X509_up_ref() */ | 1641 | } /* compat_X509_STORE_up_ref() */ |
1642 | #endif | 1642 | #endif |
1643 | 1643 | ||
1644 | #if !HAVE_X509_STORE_UP_REF | 1644 | #if !HAVE_X509_UP_REF |
1645 | #define X509_STORE_up_ref(...) compat_X509_STORE_up_ref(__VA_ARGS__) | 1645 | #define X509_up_ref(...) compat_X509_up_ref(__VA_ARGS__) |
1646 | 1646 | ||
1647 | static int compat_X509_STORE_up_ref(X509_STORE *crt) { | 1647 | static int compat_X509_up_ref(X509 *crt) { |
1648 | /* our caller should already have had a proper reference */ | 1648 | /* our caller should already have had a proper reference */ |
1649 | if (CRYPTO_add(&crt->references, 1, CRYPTO_LOCK_X509_STORE) < 2) | 1649 | if (CRYPTO_add(&crt->references, 1, CRYPTO_LOCK_X509) < 2) |
1650 | return 0; /* fail */ | 1650 | return 0; /* fail */ |
1651 | 1651 | ||
1652 | return 1; | 1652 | return 1; |
1653 | } /* compat_X509_STORE_up_ref() */ | 1653 | } /* compat_X509_up_ref() */ |
1654 | #endif | 1654 | #endif |
1655 | 1655 | ||
1656 | static int compat_init(void) { | 1656 | static int compat_init(void) { |