From c58482a7dbb3978bacfb5ffd8085d915bcde297d Mon Sep 17 00:00:00 2001 From: Jonathan Beck Date: Sun, 3 Aug 2008 20:21:23 +0200 Subject: prepare config for pairing Signed-off-by: Matt Colyer --- src/userpref.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'src/userpref.h') diff --git a/src/userpref.h b/src/userpref.h index b097084..cef0bed 100644 --- a/src/userpref.h +++ b/src/userpref.h @@ -29,4 +29,48 @@ */ char* get_host_id(); +/** +* \fn int is_device_known(char* public_key) +* determine if we already paired this device. +* \return 1 if device is already paired. Returns 0 otherwise. +*/ +int is_device_known(char* public_key); + +/** +* \fn int store_device_public_key(char* public_key) +* \return 1 if everything went well. Returns 0 otherwise. +*/ +int store_device_public_key(char* public_key); + +/** +* \fn char* get_root_private_key() +* \return RootPrivateKey if exists. Returns NULL otherwise. +*/ +char* get_root_private_key(); + +/** +* \fn char* get_host_private_key() +* \return HostPrivateKey if exists. Returns NULL otherwise. +*/ +char* get_host_private_key(); + +/** +* \fn char* get_root_certificate() +* \return RootCertificate if exists. Returns NULL otherwise. +*/ +char* get_root_certificate(); + +/** +* \fn char* get_host_certificate() +* \return HostCertificate if exists. Returns NULL otherwise. +*/ +char* get_host_certificate(); + +/** +* \fn int init_config_file(char* host_id, char* root_private_key, char* host_private_key, char* root_cert, char* 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); #endif + -- cgit v1.1-32-gdbae