diff options
| author | 2013-09-06 01:19:12 +0200 | |
|---|---|---|
| committer | 2013-09-17 11:43:34 +0200 | |
| commit | 49eb72122d3d95f6aa80f6b17c393d75fd6077bc (patch) | |
| tree | 78b8459804c14ca1545dbbc7689f94e11c7c8669 | |
| parent | 55869758d72338696139806f32cee696848f9875 (diff) | |
| download | libimobiledevice-49eb72122d3d95f6aa80f6b17c393d75fd6077bc.tar.gz libimobiledevice-49eb72122d3d95f6aa80f6b17c393d75fd6077bc.tar.bz2 | |
Fix broken build of GnuTLS and silence two compiler warnings
| -rw-r--r-- | common/userpref.c | 4 | ||||
| -rw-r--r-- | src/idevice.c | 2 | ||||
| -rw-r--r-- | src/lockdown.c | 4 |
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 | |||
| 986 | key->size = length; | 986 | key->size = length; |
| 987 | ret = USERPREF_E_SUCCESS; | 987 | ret = USERPREF_E_SUCCESS; |
| 988 | #else | 988 | #else |
| 989 | key_data_t pem = { buffer, length }; | 989 | key_data_t pem = { (unsigned char*)buffer, length }; |
| 990 | if (GNUTLS_E_SUCCESS == gnutls_x509_privkey_import(key, &pem, GNUTLS_X509_FMT_PEM)) | 990 | if (GNUTLS_E_SUCCESS == gnutls_x509_privkey_import(key, &pem, GNUTLS_X509_FMT_PEM)) |
| 991 | ret = USERPREF_E_SUCCESS; | 991 | ret = USERPREF_E_SUCCESS; |
| 992 | else | 992 | else |
| @@ -1036,7 +1036,7 @@ static userpref_error_t userpref_device_record_import_crt(const char* udid, cons | |||
| 1036 | cert->size = length; | 1036 | cert->size = length; |
| 1037 | ret = USERPREF_E_SUCCESS; | 1037 | ret = USERPREF_E_SUCCESS; |
| 1038 | #else | 1038 | #else |
| 1039 | key_data_t pem = { buffer, length }; | 1039 | key_data_t pem = { (unsigned char*)buffer, length }; |
| 1040 | if (GNUTLS_E_SUCCESS == gnutls_x509_crt_import(cert, &pem, GNUTLS_X509_FMT_PEM)) | 1040 | if (GNUTLS_E_SUCCESS == gnutls_x509_crt_import(cert, &pem, GNUTLS_X509_FMT_PEM)) |
| 1041 | ret = USERPREF_E_SUCCESS; | 1041 | ret = USERPREF_E_SUCCESS; |
| 1042 | else | 1042 | 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) | |||
| 758 | gnutls_x509_privkey_init(&ssl_data_loc->root_privkey); | 758 | gnutls_x509_privkey_init(&ssl_data_loc->root_privkey); |
| 759 | gnutls_x509_privkey_init(&ssl_data_loc->host_privkey); | 759 | gnutls_x509_privkey_init(&ssl_data_loc->host_privkey); |
| 760 | 760 | ||
| 761 | 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); | 761 | 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); |
| 762 | if (uerr != USERPREF_E_SUCCESS) { | 762 | if (uerr != USERPREF_E_SUCCESS) { |
| 763 | debug_info("Error %d when loading keys and certificates! %d", uerr); | 763 | debug_info("Error %d when loading keys and certificates! %d", uerr); |
| 764 | } | 764 | } |
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 | |||
| 1473 | gnutls_x509_privkey_init(&root_privkey); | 1473 | gnutls_x509_privkey_init(&root_privkey); |
| 1474 | gnutls_x509_privkey_init(&host_privkey); | 1474 | gnutls_x509_privkey_init(&host_privkey); |
| 1475 | 1475 | ||
| 1476 | uret = userpref_get_keys_and_certs(root_privkey, root_cert, host_privkey, host_cert); | 1476 | uret = userpref_device_record_get_keys_and_certs(udid, root_privkey, root_cert, host_privkey, host_cert); |
| 1477 | 1477 | ||
| 1478 | if (USERPREF_E_SUCCESS == uret) { | 1478 | if (USERPREF_E_SUCCESS == uret) { |
| 1479 | /* generate device certificate */ | 1479 | /* generate device certificate */ |
| @@ -1497,7 +1497,7 @@ lockdownd_error_t lockdownd_gen_pair_cert_for_udid(const char *udid, key_data_t | |||
| 1497 | gnutls_datum_t pem_root_cert = { NULL, 0 }; | 1497 | gnutls_datum_t pem_root_cert = { NULL, 0 }; |
| 1498 | gnutls_datum_t pem_host_cert = { NULL, 0 }; | 1498 | gnutls_datum_t pem_host_cert = { NULL, 0 }; |
| 1499 | 1499 | ||
| 1500 | uret = userpref_get_certs_as_pem(&pem_root_cert, &pem_host_cert); | 1500 | uret = userpref_device_record_get_certs_as_pem(udid, &pem_root_cert, &pem_host_cert); |
| 1501 | 1501 | ||
| 1502 | if (USERPREF_E_SUCCESS == uret) { | 1502 | if (USERPREF_E_SUCCESS == uret) { |
| 1503 | /* copy buffer for output */ | 1503 | /* copy buffer for output */ |
