summaryrefslogtreecommitdiffstats
path: root/kio/kssl/kopenssl.h
diff options
context:
space:
mode:
Diffstat (limited to 'kio/kssl/kopenssl.h')
-rw-r--r--kio/kssl/kopenssl.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/kio/kssl/kopenssl.h b/kio/kssl/kopenssl.h
index 68d6733cd..e4f6de0e8 100644
--- a/kio/kssl/kopenssl.h
+++ b/kio/kssl/kopenssl.h
@@ -48,6 +48,9 @@ class KOpenSSLProxyPrivate;
#include <openssl/stack.h>
#include <openssl/bn.h>
#undef crypt
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+#define STACK _STACK
+#endif
#endif
#include <kstaticdeleter.h>
@@ -446,12 +449,12 @@ public:
*/
int PEM_write_bio_X509(BIO *bp, X509 *x);
-
+#if OPENSSL_VERSION_NUMBER < 0x10000000L
/*
* X509_asn1_meth - used for netscape output
*/
ASN1_METHOD *X509_asn1_meth();
-
+#endif
/*
* ASN1_i2d_fp - used for netscape output
@@ -531,6 +534,9 @@ public:
*/
void sk_free(STACK *s);
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+ void sk_free(void *s) { return sk_free(reinterpret_cast<STACK*>(s)); }
+#endif
/*
* Number of elements in the stack
@@ -543,6 +549,9 @@ public:
*/
char *sk_value(STACK *s, int n);
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+ char *sk_value(void *s, int n) { return sk_value(reinterpret_cast<STACK*>(s), n); }
+#endif
/*
* Create a new stack
@@ -555,6 +564,9 @@ public:
*/
int sk_push(STACK *s, char *d);
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+ int sk_push(void *s, void *d) { return sk_push(reinterpret_cast<STACK*>(s), reinterpret_cast<char*>(d)); }
+#endif
/*
* Duplicate the stack