mirror of
https://github.com/irssi/irssi.git
synced 2026-08-21 01:22:26 +02:00
Restore compatibility with old OpenSSL versions
Let's implement X509_STORE_up_ref on our own.
This commit is contained in:
parent
96d5a4669d
commit
36d8b974fc
1 changed files with 13 additions and 0 deletions
|
|
@ -45,6 +45,19 @@
|
||||||
#define ASN1_STRING_data(x) ASN1_STRING_get0_data(x)
|
#define ASN1_STRING_data(x) ASN1_STRING_get0_data(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* OpenSSL 1.1.0 also introduced some useful additions to the api */
|
||||||
|
#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined (LIBRESSL_VERSION_NUMBER)
|
||||||
|
static int X509_STORE_up_ref(X509_STORE *vfy)
|
||||||
|
{
|
||||||
|
int n;
|
||||||
|
|
||||||
|
n = CRYPTO_add(&vfy->references, 1, CRYPTO_LOCK_X509_STORE);
|
||||||
|
g_assert(n > 1);
|
||||||
|
|
||||||
|
return (n > 1) ? 1 : 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ssl i/o channel object */
|
/* ssl i/o channel object */
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue