summaryrefslogtreecommitdiffstats
path: root/src/userpref.h
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2008-08-04 22:31:43 +0200
committerGravatar Matt Colyer2008-08-05 23:28:10 -0700
commit4b558a53f61005b0ca49665d2da92303f6e14872 (patch)
tree3631ebdcfbf681a239bde3192172d3014b56322b /src/userpref.h
parent20a6f8797add1a44aa6ea2cc1d089122d1f39be3 (diff)
downloadlibimobiledevice-4b558a53f61005b0ca49665d2da92303f6e14872.tar.gz
libimobiledevice-4b558a53f61005b0ca49665d2da92303f6e14872.tar.bz2
Store certificates and private keys as PEM files instead of storing them in config file. Added functions to generate proper pairing request.
Signed-off-by: Matt Colyer <matt@colyer.name>
Diffstat (limited to 'src/userpref.h')
-rw-r--r--src/userpref.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/userpref.h b/src/userpref.h
index cef0bed..441c7be 100644
--- a/src/userpref.h
+++ b/src/userpref.h
@@ -22,6 +22,7 @@
#ifndef USERPREF_H
#define USERPREF_H
+#include <gnutls/gnutls.h>
/**
* \fn char* get_host_id()
* method to get user's HostID. Caller must free returned buffer.
@@ -43,34 +44,34 @@ int is_device_known(char* public_key);
int store_device_public_key(char* public_key);
/**
-* \fn char* get_root_private_key()
-* \return RootPrivateKey if exists. Returns NULL otherwise.
+* \fn int get_root_private_key(gnutls_datum_t* root_privkey)
+* \return 1 if everything went well. Returns 0 otherwise.
*/
-char* get_root_private_key();
+int get_root_private_key(gnutls_datum_t* root_privkey);
/**
-* \fn char* get_host_private_key()
-* \return HostPrivateKey if exists. Returns NULL otherwise.
+* \fn int get_host_private_key(gnutls_datum_t* host_privkey)
+* \return 1 if everything went well. Returns 0 otherwise.
*/
-char* get_host_private_key();
+int get_host_private_key(gnutls_datum_t* host_privkey);
/**
-* \fn char* get_root_certificate()
-* \return RootCertificate if exists. Returns NULL otherwise.
+* \fn int get_root_certificate(gnutls_datum_t* root_cert)
+* \return 1 if everything went well. Returns 0 otherwise.
*/
-char* get_root_certificate();
+int get_root_certificate(gnutls_datum_t* root_cert);
/**
-* \fn char* get_host_certificate()
-* \return HostCertificate if exists. Returns NULL otherwise.
+* \fn int get_host_certificate(gnutls_datum_t* host_cert)
+* \return 1 if everything went well. Returns 0 otherwise.
*/
-char* get_host_certificate();
+int get_host_certificate(gnutls_datum_t* host_cert);
/**
-* \fn int init_config_file(char* host_id, char* root_private_key, char* host_private_key, char* root_cert, char* host_cert)
+* \fn int init_config_file(char* host_id, gnutls_datum_t* root_key, gnutls_datum_t* host_key, gnutls_datum_t* root_cert, gnutls_datum_t* host_cert)
* setup a brand new config file.
* \return 1 if everything went well. Returns 0 otherwise.
*/
-int init_config_file(char* host_id, char* root_private_key, char* host_private_key, char* root_cert, char* host_cert);
+int init_config_file(char* host_id, gnutls_datum_t* root_key, gnutls_datum_t* host_key, gnutls_datum_t* root_cert, gnutls_datum_t* host_cert);
#endif