From 50a5cac2445bc0c199958ac04d5127e4be09fb1e Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Thu, 22 Sep 2011 10:39:44 +0200 Subject: waitress: Initial TLS implementation (using gnutls) --- src/main.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index ed80753..bcc7997 100644 --- a/src/main.c +++ b/src/main.c @@ -338,11 +338,16 @@ int main (int argc, char **argv) { /* init some things */ ao_initialize (); +#ifdef ENABLE_TLS + gnutls_global_init (); +#endif PianoInit (&app.ph); WaitressInit (&app.waith); app.waith.url.host = strdup (PIANO_RPC_HOST); - app.waith.url.port = strdup (PIANO_RPC_PORT); +#ifdef ENABLE_TLS + app.waith.url.tls = true; +#endif BarSettingsInit (&app.settings); BarSettingsRead (&app.settings); @@ -384,6 +389,9 @@ int main (int argc, char **argv) { PianoDestroyPlaylist (app.songHistory); PianoDestroyPlaylist (app.playlist); ao_shutdown(); +#ifdef ENABLE_TLS + gnutls_global_deinit (); +#endif BarSettingsDestroy (&app.settings); /* restore terminal attributes, zsh doesn't need this, bash does... */ -- cgit v1.2.3