diff options
Diffstat (limited to 'src/userpref.h')
| -rw-r--r-- | src/userpref.h | 48 |
1 files changed, 21 insertions, 27 deletions
diff --git a/src/userpref.h b/src/userpref.h index 441c7be..c437e52 100644 --- a/src/userpref.h +++ b/src/userpref.h | |||
| @@ -24,54 +24,48 @@ | |||
| 24 | 24 | ||
| 25 | #include <gnutls/gnutls.h> | 25 | #include <gnutls/gnutls.h> |
| 26 | /** | 26 | /** |
| 27 | * \fn char* get_host_id() | 27 | * Method to get user's HostID. Caller must free returned buffer. |
| 28 | * method to get user's HostID. Caller must free returned buffer. | 28 | * |
| 29 | * \return the HostID if exist in config file. Returns NULL otherwise. | 29 | * @return the HostID if exist in config file. Returns NULL otherwise. |
| 30 | */ | 30 | */ |
| 31 | char* get_host_id(); | 31 | char* get_host_id(); |
| 32 | 32 | ||
| 33 | /** | 33 | /** |
| 34 | * \fn int is_device_known(char* public_key) | 34 | * Determine if we already paired this device. |
| 35 | * determine if we already paired this device. | 35 | * |
| 36 | * \return 1 if device is already paired. Returns 0 otherwise. | 36 | * @return 1 if device is already paired. Returns 0 otherwise. |
| 37 | */ | 37 | */ |
| 38 | int is_device_known(char* public_key); | 38 | int is_device_known(char* public_key); |
| 39 | 39 | ||
| 40 | /** | 40 | /** |
| 41 | * \fn int store_device_public_key(char* public_key) | 41 | * @return 1 if everything went well. Returns 0 otherwise. |
| 42 | * \return 1 if everything went well. Returns 0 otherwise. | 42 | */ |
| 43 | */ | ||
| 44 | int store_device_public_key(char* public_key); | 43 | int store_device_public_key(char* public_key); |
| 45 | 44 | ||
| 46 | /** | 45 | /** |
| 47 | * \fn int get_root_private_key(gnutls_datum_t* root_privkey) | 46 | * @return 1 if everything went well. Returns 0 otherwise. |
| 48 | * \return 1 if everything went well. Returns 0 otherwise. | 47 | */ |
| 49 | */ | ||
| 50 | int get_root_private_key(gnutls_datum_t* root_privkey); | 48 | int get_root_private_key(gnutls_datum_t* root_privkey); |
| 51 | 49 | ||
| 52 | /** | 50 | /** |
| 53 | * \fn int get_host_private_key(gnutls_datum_t* host_privkey) | 51 | * @return 1 if everything went well. Returns 0 otherwise. |
| 54 | * \return 1 if everything went well. Returns 0 otherwise. | 52 | */ |
| 55 | */ | ||
| 56 | int get_host_private_key(gnutls_datum_t* host_privkey); | 53 | int get_host_private_key(gnutls_datum_t* host_privkey); |
| 57 | 54 | ||
| 58 | /** | 55 | /** |
| 59 | * \fn int get_root_certificate(gnutls_datum_t* root_cert) | 56 | * @return 1 if everything went well. Returns 0 otherwise. |
| 60 | * \return 1 if everything went well. Returns 0 otherwise. | 57 | */ |
| 61 | */ | ||
| 62 | int get_root_certificate(gnutls_datum_t* root_cert); | 58 | int get_root_certificate(gnutls_datum_t* root_cert); |
| 63 | 59 | ||
| 64 | /** | 60 | /** |
| 65 | * \fn int get_host_certificate(gnutls_datum_t* host_cert) | 61 | * @return 1 if everything went well. Returns 0 otherwise. |
| 66 | * \return 1 if everything went well. Returns 0 otherwise. | 62 | */ |
| 67 | */ | ||
| 68 | int get_host_certificate(gnutls_datum_t* host_cert); | 63 | int get_host_certificate(gnutls_datum_t* host_cert); |
| 69 | 64 | ||
| 70 | /** | 65 | /** |
| 71 | * \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) | 66 | * Setup a brand new config file. |
| 72 | * setup a brand new config file. | 67 | * @return 1 if everything went well. Returns 0 otherwise. |
| 73 | * \return 1 if everything went well. Returns 0 otherwise. | 68 | */ |
| 74 | */ | ||
| 75 | 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); | 69 | 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); |
| 76 | #endif | 70 | #endif |
| 77 | 71 | ||
