diff options
Diffstat (limited to 'src/lockdown.h')
| -rw-r--r-- | src/lockdown.h | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/src/lockdown.h b/src/lockdown.h index 1f9d84c..185d27a 100644 --- a/src/lockdown.h +++ b/src/lockdown.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * lockdown.h | 2 | * lockdownd.h |
| 3 | * Defines lockdown stuff, like the client struct. | 3 | * Defines lockdown stuff, like the client struct. |
| 4 | * | 4 | * |
| 5 | * Copyright (c) 2008 Zach C. All Rights Reserved. | 5 | * Copyright (c) 2008 Zach C. All Rights Reserved. |
| @@ -24,36 +24,22 @@ | |||
| 24 | 24 | ||
| 25 | #include <gnutls/gnutls.h> | 25 | #include <gnutls/gnutls.h> |
| 26 | #include <string.h> | 26 | #include <string.h> |
| 27 | #include <libiphone/libiphone.h> | 27 | #include "libiphone/lockdown.h" |
| 28 | 28 | ||
| 29 | 29 | struct lockdownd_client_int { | |
| 30 | |||
| 31 | |||
| 32 | struct iphone_lckd_client_int { | ||
| 33 | int sfd; | 30 | int sfd; |
| 34 | gnutls_session_t *ssl_session; | 31 | gnutls_session_t *ssl_session; |
| 35 | int in_SSL; | 32 | int in_SSL; |
| 36 | char session_id[40]; | 33 | char session_id[40]; |
| 37 | }; | 34 | }; |
| 38 | 35 | ||
| 39 | iphone_lckd_client_t new_lockdownd_client(iphone_device_t phone); | 36 | iphone_error_t lockdownd_get_device_public_key(lockdownd_client_t client, gnutls_datum_t * public_key); |
| 40 | iphone_error_t lockdownd_hello(iphone_lckd_client_t control); | ||
| 41 | |||
| 42 | iphone_error_t lockdownd_generic_get_value(iphone_lckd_client_t control, const char *req_key, const char *req_string, | ||
| 43 | gnutls_datum_t * value); | ||
| 44 | |||
| 45 | iphone_error_t lockdownd_get_device_public_key(iphone_lckd_client_t control, gnutls_datum_t * public_key); | ||
| 46 | |||
| 47 | iphone_error_t lockdownd_gen_pair_cert(gnutls_datum_t public_key, gnutls_datum_t * device_cert, | 37 | iphone_error_t lockdownd_gen_pair_cert(gnutls_datum_t public_key, gnutls_datum_t * device_cert, |
| 48 | gnutls_datum_t * host_cert, gnutls_datum_t * root_cert); | 38 | gnutls_datum_t * host_cert, gnutls_datum_t * root_cert); |
| 49 | iphone_error_t lockdownd_pair_device(iphone_lckd_client_t control, char *uid, char *host_id); | ||
| 50 | void lockdownd_close(iphone_lckd_client_t control); | ||
| 51 | 39 | ||
| 52 | // SSL functions | 40 | // SSL functions |
| 53 | 41 | iphone_error_t lockdownd_start_ssl_session(lockdownd_client_t client, const char *HostID); | |
| 54 | iphone_error_t lockdownd_start_SSL_session(iphone_lckd_client_t control, const char *HostID); | ||
| 55 | ssize_t lockdownd_securead(gnutls_transport_ptr_t transport, char *buffer, size_t length); | 42 | ssize_t lockdownd_securead(gnutls_transport_ptr_t transport, char *buffer, size_t length); |
| 56 | ssize_t lockdownd_secuwrite(gnutls_transport_ptr_t transport, char *buffer, size_t length); | 43 | ssize_t lockdownd_secuwrite(gnutls_transport_ptr_t transport, char *buffer, size_t length); |
| 57 | 44 | ||
| 58 | |||
| 59 | #endif | 45 | #endif |
