summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/userpref.c4
-rw-r--r--src/idevice.c2
-rw-r--r--src/lockdown.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/common/userpref.c b/common/userpref.c
index 4f5d6d7..571b660 100644
--- a/common/userpref.c
+++ b/common/userpref.c
@@ -986,7 +986,7 @@ static userpref_error_t userpref_device_record_import_key(const char* udid, cons
key->size = length;
ret = USERPREF_E_SUCCESS;
#else
- key_data_t pem = { buffer, length };
+ key_data_t pem = { (unsigned char*)buffer, length };
if (GNUTLS_E_SUCCESS == gnutls_x509_privkey_import(key, &pem, GNUTLS_X509_FMT_PEM))
ret = USERPREF_E_SUCCESS;
else
@@ -1036,7 +1036,7 @@ static userpref_error_t userpref_device_record_import_crt(const char* udid, cons
cert->size = length;
ret = USERPREF_E_SUCCESS;
#else
- key_data_t pem = { buffer, length };
+ key_data_t pem = { (unsigned char*)buffer, length };
if (GNUTLS_E_SUCCESS == gnutls_x509_crt_import(cert, &pem, GNUTLS_X509_FMT_PEM))
ret = USERPREF_E_SUCCESS;
else
diff --git a/src/idevice.c b/src/idevice.c
index 4a6f544..f35c666 100644
--- a/src/idevice.c
+++ b/src/idevice.c
@@ -758,7 +758,7 @@ idevice_error_t idevice_connection_enable_ssl(idevice_connection_t connection)
gnutls_x509_privkey_init(&ssl_data_loc->root_privkey);
gnutls_x509_privkey_init(&ssl_data_loc->host_privkey);
- userpref_error_t uerr = userpref_get_keys_and_certs(ssl_data_loc->root_privkey, ssl_data_loc->root_cert, ssl_data_loc->host_privkey, ssl_data_loc->host_cert);
+ userpref_error_t uerr = userpref_device_record_get_keys_and_certs(connection->udid, ssl_data_loc->root_privkey, ssl_data_loc->root_cert, ssl_data_loc->host_privkey, ssl_data_loc->host_cert);
if (uerr != USERPREF_E_SUCCESS) {
debug_info("Error %d when loading keys and certificates! %d", uerr);
}
diff --git a/src/lockdown.c b/src/lockdown.c
index c7a3c0d..a8f3e1e 100644
--- a/src/lockdown.c
+++ b/src/lockdown.c
@@ -1473,7 +1473,7 @@ lockdownd_error_t lockdownd_gen_pair_cert_for_udid(const char *udid, key_data_t
gnutls_x509_privkey_init(&root_privkey);
gnutls_x509_privkey_init(&host_privkey);
- uret = userpref_get_keys_and_certs(root_privkey, root_cert, host_privkey, host_cert);
+ uret = userpref_device_record_get_keys_and_certs(udid, root_privkey, root_cert, host_privkey, host_cert);
if (USERPREF_E_SUCCESS == uret) {
/* generate device certificate */
@@ -1497,7 +1497,7 @@ lockdownd_error_t lockdownd_gen_pair_cert_for_udid(const char *udid, key_data_t
gnutls_datum_t pem_root_cert = { NULL, 0 };
gnutls_datum_t pem_host_cert = { NULL, 0 };
- uret = userpref_get_certs_as_pem(&pem_root_cert, &pem_host_cert);
+ uret = userpref_device_record_get_certs_as_pem(udid, &pem_root_cert, &pem_host_cert);
if (USERPREF_E_SUCCESS == uret) {
/* copy buffer for output */