diff options
Diffstat (limited to 'common/userpref.h')
| -rw-r--r-- | common/userpref.h | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/common/userpref.h b/common/userpref.h index 07fed8d..a39417a 100644 --- a/common/userpref.h +++ b/common/userpref.h | |||
| @@ -69,27 +69,29 @@ typedef gnutls_datum_t key_data_t; | |||
| 69 | 69 | ||
| 70 | typedef int16_t userpref_error_t; | 70 | typedef int16_t userpref_error_t; |
| 71 | 71 | ||
| 72 | const char *userpref_get_config_dir(); | ||
| 73 | int userpref_read_system_buid(char **system_buid); | ||
| 74 | userpref_error_t userpref_read_pair_record(const char *udid, plist_t *pair_record); | ||
| 75 | userpref_error_t userpref_save_pair_record(const char *udid, plist_t pair_record); | ||
| 76 | userpref_error_t userpref_delete_pair_record(const char *udid); | ||
| 77 | |||
| 78 | LIBIMOBILEDEVICE_INTERNAL userpref_error_t pair_record_generate_keys_and_certs(plist_t pair_record); | ||
| 79 | LIBIMOBILEDEVICE_INTERNAL userpref_error_t pair_record_generate_from_device_public_key(plist_t pair_record, key_data_t public_key); | ||
| 72 | #ifdef HAVE_OPENSSL | 80 | #ifdef HAVE_OPENSSL |
| 73 | LIBIMOBILEDEVICE_INTERNAL userpref_error_t userpref_device_record_get_keys_and_certs(const char *udid, key_data_t* root_privkey, key_data_t* root_crt, key_data_t* host_privkey, key_data_t* host_crt); | 81 | LIBIMOBILEDEVICE_INTERNAL userpref_error_t pair_record_import_key_with_name(plist_t pair_record, const char* name, key_data_t* key); |
| 82 | LIBIMOBILEDEVICE_INTERNAL userpref_error_t pair_record_import_crt_with_name(plist_t pair_record, const char* name, key_data_t* cert); | ||
| 74 | #else | 83 | #else |
| 75 | LIBIMOBILEDEVICE_INTERNAL userpref_error_t userpref_device_record_get_keys_and_certs(const char *udid, gnutls_x509_privkey_t root_privkey, gnutls_x509_crt_t root_crt, gnutls_x509_privkey_t host_privkey, gnutls_x509_crt_t host_crt); | 84 | LIBIMOBILEDEVICE_INTERNAL userpref_error_t pair_record_import_key_with_name(plist_t pair_record, const char* name, gnutls_x509_privkey_t key); |
| 85 | LIBIMOBILEDEVICE_INTERNAL userpref_error_t pair_record_import_crt_with_name(plist_t pair_record, const char* name, gnutls_x509_crt_t cert); | ||
| 76 | #endif | 86 | #endif |
| 77 | LIBIMOBILEDEVICE_INTERNAL userpref_error_t userpref_device_record_set_keys_and_certs(const char *udid, key_data_t * root_key, key_data_t * root_cert, key_data_t * host_key, key_data_t * host_cert); | ||
| 78 | LIBIMOBILEDEVICE_INTERNAL userpref_error_t userpref_device_record_get_certs_as_pem(const char *udid, key_data_t *pem_root_cert, key_data_t *pem_host_cert, key_data_t *pem_device_cert); | ||
| 79 | 87 | ||
| 80 | LIBIMOBILEDEVICE_INTERNAL userpref_error_t userpref_set_device_record(const char *udid, plist_t device_record); | 88 | userpref_error_t pair_record_get_host_id(plist_t pair_record, char** host_id); |
| 81 | userpref_error_t userpref_remove_device_record(const char *udid); | 89 | userpref_error_t pair_record_set_host_id(plist_t pair_record, const char* host_id); |
| 82 | LIBIMOBILEDEVICE_INTERNAL int userpref_has_device_record(const char *udid); | 90 | userpref_error_t pair_record_get_item_as_key_data(plist_t pair_record, const char* name, key_data_t *value); |
| 91 | userpref_error_t pair_record_set_item_from_key_data(plist_t pair_record, const char* name, key_data_t *value); | ||
| 83 | 92 | ||
| 93 | /* deprecated */ | ||
| 84 | userpref_error_t userpref_get_paired_udids(char ***list, unsigned int *count); | 94 | userpref_error_t userpref_get_paired_udids(char ***list, unsigned int *count); |
| 85 | void userpref_device_record_get_host_id(const char *udid, char **host_id); | 95 | LIBIMOBILEDEVICE_INTERNAL int userpref_has_pair_record(const char *udid); |
| 86 | void userpref_get_system_buid(char **system_buid); | ||
| 87 | const char *userpref_get_config_dir(); | ||
| 88 | |||
| 89 | userpref_error_t userpref_get_device_record(const char *udid, plist_t *device_record); | ||
| 90 | int userpref_get_value(const char *key, plist_t *value); | ||
| 91 | int userpref_set_value(const char *key, plist_t value); | ||
| 92 | int userpref_device_record_get_value(const char *udid, const char *key, plist_t *value); | ||
| 93 | int userpref_device_record_set_value(const char *udid, const char *key, plist_t value); | ||
| 94 | 96 | ||
| 95 | #endif | 97 | #endif |
