#ifdef DEBUG
/* Setup our SIGINT signal handler which allows a "normal" termination of
* the server in DEBUG mode. */
#ifdef DEBUG
/* Setup our SIGINT signal handler which allows a "normal" termination of
* the server in DEBUG mode. */
int socket_option = 1;
setsockopt(server_socket, SOL_SOCKET, SO_REUSEADDR,
&socket_option, sizeof(socket_option));
int socket_option = 1;
setsockopt(server_socket, SOL_SOCKET, SO_REUSEADDR,
&socket_option, sizeof(socket_option));
printf("tlsproxy %s\n", VERSION);
printf("Listening for connections on port %d.\n", port);
printf("tlsproxy %s\n", VERSION);
printf("Listening for connections on port %d.\n", port);
/* Initialize GnuTLS. */
result = gnutls_global_init();
GNUTLS_ERROR_EXIT(result, "gnutls_global_init()");
/* Initialize GnuTLS. */
result = gnutls_global_init();
GNUTLS_ERROR_EXIT(result, "gnutls_global_init()");
/* Setup GnuTLS cipher suites. */
result = gnutls_priority_init(&global_tls_priority_cache, "NORMAL", NULL);
GNUTLS_ERROR_EXIT(result, "gnutls_priority_init()");
/* Setup GnuTLS cipher suites. */
result = gnutls_priority_init(&global_tls_priority_cache, "NORMAL", NULL);
GNUTLS_ERROR_EXIT(result, "gnutls_priority_init()");