summaryrefslogtreecommitdiffstats
path: root/src/idevice.h
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2011-09-14 18:55:59 +0200
committerGravatar Martin Szulecki2012-03-19 01:43:29 +0100
commit8b1af4cf80eff619d3465925dce7fe572fc09224 (patch)
tree1fc167114f574c2ff3470c97d6ce74938778f9db /src/idevice.h
parent294cf69b256419e407b1eac04634752412ee7756 (diff)
downloadlibimobiledevice-8b1af4cf80eff619d3465925dce7fe572fc09224.tar.gz
libimobiledevice-8b1af4cf80eff619d3465925dce7fe572fc09224.tar.bz2
Add OpenSSL support
Diffstat (limited to 'src/idevice.h')
-rw-r--r--src/idevice.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/idevice.h b/src/idevice.h
index 231b3ab..65fdae0 100644
--- a/src/idevice.h
+++ b/src/idevice.h
@@ -21,8 +21,18 @@
#ifndef IDEVICE_H
#define IDEVICE_H
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_OPENSSL
+#include <openssl/ssl.h>
+#else
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
+#endif
+
+#include "userpref.h"
#include "libimobiledevice/libimobiledevice.h"
@@ -31,12 +41,18 @@ enum connection_type {
};
struct ssl_data_private {
+#ifdef HAVE_OPENSSL
+ SSL *session;
+ SSL_CTX *ctx;
+ BIO *bio;
+#else
gnutls_certificate_credentials_t certificate;
gnutls_session_t session;
gnutls_x509_privkey_t root_privkey;
gnutls_x509_crt_t root_cert;
gnutls_x509_privkey_t host_privkey;
gnutls_x509_crt_t host_cert;
+#endif
};
typedef struct ssl_data_private *ssl_data_t;