diff options
Diffstat (limited to 'common/userpref.h')
-rw-r--r-- | common/userpref.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/common/userpref.h b/common/userpref.h index 4ea630f..75bb8b7 100644 --- a/common/userpref.h +++ b/common/userpref.h @@ -27,7 +27,7 @@ #include <config.h> #endif -#ifdef HAVE_OPENSSL +#if defined(HAVE_OPENSSL) || defined(HAVE_MBEDTLS) typedef struct { unsigned char *data; unsigned int size; @@ -54,10 +54,11 @@ typedef gnutls_datum_t key_data_t; typedef enum { USERPREF_E_SUCCESS = 0, USERPREF_E_INVALID_ARG = -1, - USERPREF_E_INVALID_CONF = -2, - USERPREF_E_SSL_ERROR = -3, - USERPREF_E_READ_ERROR = -4, - USERPREF_E_WRITE_ERROR = -5, + USERPREF_E_NOENT = -2, + USERPREF_E_INVALID_CONF = -3, + USERPREF_E_SSL_ERROR = -4, + USERPREF_E_READ_ERROR = -5, + USERPREF_E_WRITE_ERROR = -6, USERPREF_E_UNKNOWN_ERROR = -256 } userpref_error_t; @@ -68,7 +69,7 @@ userpref_error_t userpref_save_pair_record(const char *udid, uint32_t device_id, userpref_error_t userpref_delete_pair_record(const char *udid); userpref_error_t pair_record_generate_keys_and_certs(plist_t pair_record, key_data_t public_key); -#ifdef HAVE_OPENSSL +#if defined(HAVE_OPENSSL) || defined(HAVE_MBEDTLS) userpref_error_t pair_record_import_key_with_name(plist_t pair_record, const char* name, key_data_t* key); userpref_error_t pair_record_import_crt_with_name(plist_t pair_record, const char* name, key_data_t* cert); #else |