mirror of
https://github.com/profanity-im/profanity.git
synced 2024-09-01 19:24:15 -04:00
Removed --disable-tls command line option
This commit is contained in:
parent
31ecd41c8f
commit
9d2745e462
@ -3,7 +3,7 @@
|
|||||||
Profanity \- a simple console based XMPP chat client.
|
Profanity \- a simple console based XMPP chat client.
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B profanity
|
.B profanity
|
||||||
[\-vhd] [\-l level] [\-a account]
|
[\-vh] [\-l level] [\-a account]
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.B Profanity
|
.B Profanity
|
||||||
is a simple lightweight console based XMPP chat client. Its emphasis is
|
is a simple lightweight console based XMPP chat client. Its emphasis is
|
||||||
@ -25,10 +25,6 @@ Auto connect to an account on startup,
|
|||||||
.I ACCOUNT
|
.I ACCOUNT
|
||||||
must be an existing account.
|
must be an existing account.
|
||||||
.TP
|
.TP
|
||||||
.BI "\-d, \-\-disable\-tls"
|
|
||||||
Disable TLS for servers that either don't support it, or claim to but do not
|
|
||||||
complete the handshake.
|
|
||||||
.TP
|
|
||||||
.BI "\-l, \-\-log "LEVEL
|
.BI "\-l, \-\-log "LEVEL
|
||||||
Set the logging level,
|
Set the logging level,
|
||||||
.I LEVEL
|
.I LEVEL
|
||||||
|
@ -42,7 +42,6 @@
|
|||||||
#include "profanity.h"
|
#include "profanity.h"
|
||||||
#include "command/command.h"
|
#include "command/command.h"
|
||||||
|
|
||||||
static gboolean disable_tls = FALSE;
|
|
||||||
static gboolean version = FALSE;
|
static gboolean version = FALSE;
|
||||||
static char *log = "INFO";
|
static char *log = "INFO";
|
||||||
static char *account_name = NULL;
|
static char *account_name = NULL;
|
||||||
@ -58,7 +57,6 @@ main(int argc, char **argv)
|
|||||||
static GOptionEntry entries[] =
|
static GOptionEntry entries[] =
|
||||||
{
|
{
|
||||||
{ "version", 'v', 0, G_OPTION_ARG_NONE, &version, "Show version information", NULL },
|
{ "version", 'v', 0, G_OPTION_ARG_NONE, &version, "Show version information", NULL },
|
||||||
{ "disable-tls", 'd', 0, G_OPTION_ARG_NONE, &disable_tls, "Disable TLS", NULL },
|
|
||||||
{ "account", 'a', 0, G_OPTION_ARG_STRING, &account_name, "Auto connect to an account on startup" },
|
{ "account", 'a', 0, G_OPTION_ARG_STRING, &account_name, "Auto connect to an account on startup" },
|
||||||
{ "log",'l', 0, G_OPTION_ARG_STRING, &log, "Set logging levels, DEBUG, INFO (default), WARN, ERROR", "LEVEL" },
|
{ "log",'l', 0, G_OPTION_ARG_STRING, &log, "Set logging levels, DEBUG, INFO (default), WARN, ERROR", "LEVEL" },
|
||||||
{ NULL }
|
{ NULL }
|
||||||
@ -137,7 +135,7 @@ main(int argc, char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
prof_run(disable_tls, log, account_name);
|
prof_run(log, account_name);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
#include "config/tlscerts.h"
|
#include "config/tlscerts.h"
|
||||||
|
|
||||||
static void _check_autoaway(void);
|
static void _check_autoaway(void);
|
||||||
static void _init(const int disable_tls, char *log_level);
|
static void _init(char *log_level);
|
||||||
static void _shutdown(void);
|
static void _shutdown(void);
|
||||||
static void _create_directories(void);
|
static void _create_directories(void);
|
||||||
static void _connect_default(const char * const account);
|
static void _connect_default(const char * const account);
|
||||||
@ -92,9 +92,9 @@ char *saved_status;
|
|||||||
static gboolean cont = TRUE;
|
static gboolean cont = TRUE;
|
||||||
|
|
||||||
void
|
void
|
||||||
prof_run(const int disable_tls, char *log_level, char *account_name)
|
prof_run(char *log_level, char *account_name)
|
||||||
{
|
{
|
||||||
_init(disable_tls, log_level);
|
_init(log_level);
|
||||||
_connect_default(account_name);
|
_connect_default(account_name);
|
||||||
ui_update();
|
ui_update();
|
||||||
|
|
||||||
@ -297,7 +297,7 @@ _check_autoaway()
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_init(const int disable_tls, char *log_level)
|
_init(char *log_level)
|
||||||
{
|
{
|
||||||
setlocale(LC_ALL, "");
|
setlocale(LC_ALL, "");
|
||||||
// ignore SIGPIPE
|
// ignore SIGPIPE
|
||||||
@ -326,7 +326,7 @@ _init(const int disable_tls, char *log_level)
|
|||||||
theme_init(theme);
|
theme_init(theme);
|
||||||
prefs_free_string(theme);
|
prefs_free_string(theme);
|
||||||
ui_init();
|
ui_init();
|
||||||
jabber_init(disable_tls);
|
jabber_init();
|
||||||
cmd_init();
|
cmd_init();
|
||||||
log_info("Initialising contact list");
|
log_info("Initialising contact list");
|
||||||
roster_init();
|
roster_init();
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
#include "xmpp/xmpp.h"
|
#include "xmpp/xmpp.h"
|
||||||
|
|
||||||
void prof_run(const int disable_tls, char *log_level, char *account_name);
|
void prof_run(char *log_level, char *account_name);
|
||||||
|
|
||||||
void prof_handle_idle(void);
|
void prof_handle_idle(void);
|
||||||
void prof_handle_activity(void);
|
void prof_handle_activity(void);
|
||||||
|
@ -70,7 +70,6 @@ static struct _jabber_conn_t {
|
|||||||
jabber_conn_status_t conn_status;
|
jabber_conn_status_t conn_status;
|
||||||
char *presence_message;
|
char *presence_message;
|
||||||
int priority;
|
int priority;
|
||||||
int tls_disabled;
|
|
||||||
char *domain;
|
char *domain;
|
||||||
} jabber_conn;
|
} jabber_conn;
|
||||||
|
|
||||||
@ -115,14 +114,13 @@ void _connection_free_saved_details(void);
|
|||||||
void _connection_free_session_data(void);
|
void _connection_free_session_data(void);
|
||||||
|
|
||||||
void
|
void
|
||||||
jabber_init(const int disable_tls)
|
jabber_init(void)
|
||||||
{
|
{
|
||||||
log_info("Initialising XMPP");
|
log_info("Initialising XMPP");
|
||||||
jabber_conn.conn_status = JABBER_STARTED;
|
jabber_conn.conn_status = JABBER_STARTED;
|
||||||
jabber_conn.presence_message = NULL;
|
jabber_conn.presence_message = NULL;
|
||||||
jabber_conn.conn = NULL;
|
jabber_conn.conn = NULL;
|
||||||
jabber_conn.ctx = NULL;
|
jabber_conn.ctx = NULL;
|
||||||
jabber_conn.tls_disabled = disable_tls;
|
|
||||||
jabber_conn.domain = NULL;
|
jabber_conn.domain = NULL;
|
||||||
presence_sub_requests_init();
|
presence_sub_requests_init();
|
||||||
caps_init();
|
caps_init();
|
||||||
@ -430,9 +428,6 @@ _jabber_connect(const char * const fulljid, const char * const passwd,
|
|||||||
}
|
}
|
||||||
xmpp_conn_set_jid(jabber_conn.conn, fulljid);
|
xmpp_conn_set_jid(jabber_conn.conn, fulljid);
|
||||||
xmpp_conn_set_pass(jabber_conn.conn, passwd);
|
xmpp_conn_set_pass(jabber_conn.conn, passwd);
|
||||||
if (jabber_conn.tls_disabled) {
|
|
||||||
xmpp_conn_disable_tls(jabber_conn.conn);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HAVE_LIBMESODE
|
#ifdef HAVE_LIBMESODE
|
||||||
char *cert_path = prefs_get_string(PREF_TLS_CERTPATH);
|
char *cert_path = prefs_get_string(PREF_TLS_CERTPATH);
|
||||||
|
@ -137,7 +137,7 @@ typedef struct data_form_t {
|
|||||||
} DataForm;
|
} DataForm;
|
||||||
|
|
||||||
// connection functions
|
// connection functions
|
||||||
void jabber_init(const int disable_tls);
|
void jabber_init(void);
|
||||||
jabber_conn_status_t jabber_connect_with_details(const char * const jid,
|
jabber_conn_status_t jabber_connect_with_details(const char * const jid,
|
||||||
const char * const passwd, const char * const altdomain, const int port);
|
const char * const passwd, const char * const altdomain, const int port);
|
||||||
jabber_conn_status_t jabber_connect_with_account(const ProfAccount * const account);
|
jabber_conn_status_t jabber_connect_with_account(const ProfAccount * const account);
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include "xmpp/xmpp.h"
|
#include "xmpp/xmpp.h"
|
||||||
|
|
||||||
// connection functions
|
// connection functions
|
||||||
void jabber_init(const int disable_tls) {}
|
void jabber_init(void) {}
|
||||||
|
|
||||||
jabber_conn_status_t jabber_connect_with_details(const char * const jid,
|
jabber_conn_status_t jabber_connect_with_details(const char * const jid,
|
||||||
const char * const passwd, const char * const altdomain, const int port)
|
const char * const passwd, const char * const altdomain, const int port)
|
||||||
|
Loading…
Reference in New Issue
Block a user