/*
* Global variables/defines.
*
* Copyright (C) 2011 Simon Ruderich
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
#ifndef TLSPROXY_H
#define TLSPROXY_H
#include
#include
#include
#include
/* GnuTLS */
#include
/* Log level constants. */
#define LOG_ERROR 0
#define LOG_WARNING 1
#define LOG_DEBUG 2
/* Macros for shorter error handling. */
#define GNUTLS_ERROR_EXIT(error, message) \
if (GNUTLS_E_SUCCESS != error) { \
fprintf(stderr, "%s: %s\n", message, gnutls_strerror(error)); \
exit(EXIT_FAILURE); \
}
/* Proxy hostname and port if specified on the command line. */
char *global_proxy_host;
char *global_proxy_port;
/* Log level, command line option. */
int global_log_level;
/* "Global" GnuTLS data used by all threads, read only. */
gnutls_priority_t tls_priority_cache;
gnutls_dh_params_t tls_dh_params;
#endif