summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-04-09 22:59:38 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-04-09 22:59:38 (GMT)
commit5ad85cf30b2355ca727904d1a0d25240283813b3 (patch)
tree1e1fdce3b7be4bf878161b4e9001686dd0d89ba3 /src/main.c
parent865be356c53afc3bdeae21c640bf0c3d5433fc4b (diff)
Signed and verified the MD5 hash of a given user name.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index bd98b32..09fcf42 100644
--- a/src/main.c
+++ b/src/main.c
@@ -97,6 +97,11 @@ int main(int argc, char **argv)
GDbServer *server; /* Enregistrements locaux */
GGenConfig *config; /* Configuration globale */
bool status; /* Bilan d'opérations */
+
+
+ char *author; /* Identification à diffuser */
+ char *pub; /* Chemin de la clef publique */
+
const char *filename; /* Chemin du dernier projet */
GStudyProject *project; /* Nouveau projet courant */
@@ -176,7 +181,19 @@ int main(int argc, char **argv)
status = complete_loading_of_all_gui_components(config);
if (!status) goto exit_complete_gui;
- server = g_db_server_new("localhost", 1337);
+
+
+ /* Utilisateur représenté */
+
+ if (!g_generic_config_get_value(config, MPK_AUTHOR_NAME, &author))
+ /*goto glbcl_exit*/;
+
+ /* Chemin vers la clef privée */
+
+ pub = get_xdg_config_dir("chrysalide" G_DIR_SEPARATOR_S "id_rsa.pub");
+
+
+ server = g_db_server_new(author, pub, "localhost", 1337);
g_db_server_start(server);
/* Charge le dernier projet */