From 517394e7f9b938425df107e6b6ebe6391149063a Mon Sep 17 00:00:00 2001 From: Aaron Blakely Date: Thu, 14 Mar 2024 04:06:33 -0500 Subject: [PATCH] openssl module working on windows, added configuration option for setting the ssl module --- lib/irc.h | 1 + mods/openssl.dll | Bin 47104 -> 47616 bytes mods/openssl.lib | Bin 3020 -> 3020 bytes mods/openssl/openssl.c | 16 +++++++++++++--- src/config.c | 20 +++++++++++++++++++- xbot.cfg | 6 ++++-- 6 files changed, 37 insertions(+), 6 deletions(-) diff --git a/lib/irc.h b/lib/irc.h index 2540b99..da5f13a 100755 --- a/lib/irc.h +++ b/lib/irc.h @@ -36,6 +36,7 @@ struct irc_conn #else FILE *srv_fd; #endif + char ssl_module[256]; char nick[50]; char user[50]; char admin[256]; diff --git a/mods/openssl.dll b/mods/openssl.dll index 6b88717580d7612adee7897cec07d67625e93866..0ae4fcf0a7fa2cfa3ff856fa1f8cd1834f7a7bc5 100755 GIT binary patch delta 13690 zcmb7q3w%?>*6&W5v;k5Qpe+^p2+&fX1@nG1*+~%!l}8N}S|S3KXDEmj5=8}5OyePJ zs^Fl4;yKi!R}XxgDxj!5Qi>D=u_9^}P*l|26Yx|;C|cRye|A#P`~B|k-dosvX4b4( zvu3R|Yu2pnnht5r73l_tq;n%Xrm{+PIXG%ru(kWiOH;QNpl$kPSgTbmGg~z%N2h1E zju6|~ts_y6TK0JB17dr4>q@aqZ@pbCv&3@h;(1<5bK{`&;qGFFnIw@hPaXJq0Tchb zz(@!6lJsPlw0^$HnC8?*B-2CSv z31w8{t)v*~vB@YeTr$O&!oL;6;8JOGD*sY!&ITD;L6*KLJ8S9SidYx--K^%5H~+BU zdIhlD-krb+#K|c{n1~02;3Wk=2!q4LogDs`D5r3#l=4*GBa&2vBA800HiYB1`Q$&TB;**AZ z#yF=c;)<1SZn8q;gSh3X()1>>NIv|w7*|`xkxH-|T;0h899~Bgc}+e{I-`kvEFYwa z@irmG371TpQ+QLn2{DqCM7!Dx7QAceYdw8!C36xpi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284 zcmX>jenxzP9E-Vusp%vp@r{;;8NuvLOiv&Tpy1^H%=}FKdnXI9Y+{n0JNX!!`sCLv zMj)m<>wBn9vB?^20w6_JY+VpV`Va+DlLgt0;fmte!HNpl!6vD2D8m#bbHEgdPp;<_ z2AOn>!vd;LVzLyc5J*Um(+nyES2cwbqH6L5PA!mjenxzP9E*vup~)mB@r{;;8NuvLOiv&Tpy1^H%=}EZHcb{_*~FAzHu)Hv`sCLv zMj)m<>wBn9vB?^20w6_JY+VpV`Va+DlLgt0;fmte!HNpl!6vD2D8m#bbHEgdPp;<_ z2AOn>!vd;LVzLyc5J*Um(+nyES2cwbqH6L5PA!mverify_ssl) + if (bot->verify_ssl == true) { + printf("SSL: Verifying server certificate\n"); SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL); } else { + printf("SSL: Not verifying server certificate\n"); SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, NULL); } @@ -42,12 +46,12 @@ MY_API void sslmod_init(struct irc_conn *bot) MY_API int get_ssl_fd() { - printf("ssl_fd: %d\n", ssl_fd); return ssl_fd; } MY_API void sslmod_connect() { + unsigned long ssl_err; struct irc_conn *bot = get_bot(); #ifdef _WIN32 @@ -62,6 +66,12 @@ MY_API void sslmod_connect() if (SSL_connect(ssl) != 1) { eprint("Error: Cannot connect to SSL server\n"); + + ssl_err = ERR_get_error(); + if (ssl_err) + { + eprint("SSL error: %s\n", ERR_error_string(ssl_err, NULL)); + } } #ifdef _WIN32 diff --git a/src/config.c b/src/config.c index 307eab4..a6bbca0 100755 --- a/src/config.c +++ b/src/config.c @@ -14,8 +14,9 @@ struct irc_conn read_config(struct irc_conn bot, char *file) const char *base = (const char*)malloc(sizeof(char) * 1024); const char *mod = NULL; int boolbase; - char *modpath = (char *)malloc(sizeof(char) * 500); + bot.verify_ssl = 0; + bot.use_ssl = 0; cf = &cfg; config_init(cf); @@ -90,6 +91,22 @@ void run_autoload(struct irc_conn *bot) exit(-1); } + if (bot->use_ssl) + { + if (config_lookup_string(cf, "server.ssl_module", &base)) + { + strlcpy(bot->ssl_module, base, sizeof bot->ssl_module); + + // Load the SSL module +#ifdef _WIN32 + sprintf(modpath, "./mods/%s.dll", bot->ssl_module); +#else + sprintf(modpath, "./mods/%s.so", bot->ssl_module); +#endif + load_module(bot, "main", "runtime", modpath); + } + } + autoload = config_lookup(cf, "mods.autoload"); count = config_setting_length(autoload); @@ -105,4 +122,5 @@ void run_autoload(struct irc_conn *bot) } config_destroy(cf); + free(modpath); } diff --git a/xbot.cfg b/xbot.cfg index d16b2c9..15b0446 100755 --- a/xbot.cfg +++ b/xbot.cfg @@ -20,9 +20,11 @@ bot: server: { host = "memphis.ephasic.org"; - port = "6667"; + port = "6697"; - ssl = false; + # ssl options + ssl = true; + ssl_module = "openssl"; ssl_verify = false; };