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 @@
21#ifndef IDEVICE_H 21#ifndef IDEVICE_H
22#define IDEVICE_H 22#define IDEVICE_H
23 23
24#ifdef HAVE_CONFIG_H
25#include <config.h>
26#endif
27
28#ifdef HAVE_OPENSSL
29#include <openssl/ssl.h>
30#else
24#include <gnutls/gnutls.h> 31#include <gnutls/gnutls.h>
25#include <gnutls/x509.h> 32#include <gnutls/x509.h>
33#endif
34
35#include "userpref.h"
26 36
27#include "libimobiledevice/libimobiledevice.h" 37#include "libimobiledevice/libimobiledevice.h"
28 38
@@ -31,12 +41,18 @@ enum connection_type {
31}; 41};
32 42
33struct ssl_data_private { 43struct ssl_data_private {
44#ifdef HAVE_OPENSSL
45 SSL *session;
46 SSL_CTX *ctx;
47 BIO *bio;
48#else
34 gnutls_certificate_credentials_t certificate; 49 gnutls_certificate_credentials_t certificate;
35 gnutls_session_t session; 50 gnutls_session_t session;
36 gnutls_x509_privkey_t root_privkey; 51 gnutls_x509_privkey_t root_privkey;
37 gnutls_x509_crt_t root_cert; 52 gnutls_x509_crt_t root_cert;
38 gnutls_x509_privkey_t host_privkey; 53 gnutls_x509_privkey_t host_privkey;
39 gnutls_x509_crt_t host_cert; 54 gnutls_x509_crt_t host_cert;
55#endif
40}; 56};
41typedef struct ssl_data_private *ssl_data_t; 57typedef struct ssl_data_private *ssl_data_t;
42 58