@@ -1,3 +1,6 @@
+maint
+ * Prevent crashing on startup if openssl can not be loaded
+
1.4.1 - http://wraith.botpack.net/milestone/1.4.1
* Update server list, 'set -yes servers -' and 'set -yes servers6 -' to get new list.
* Remove 'chanset +meankicks'. You can customize your kicks in doc/responses.txt and recompile.
@@ -107,7 +107,7 @@ int load_libcrypto() {
}
if (!libcrypto_handle) {
- sdprintf("Unable to find libcrypto");
+ fprintf(stderr, STR("Unable to find libcrypto\n"));
return(1);
@@ -80,7 +80,7 @@ int load_libssl() {
if (!libssl_handle) {
- sdprintf("Unable to find libssl");
+ fprintf(stderr, STR("Unable to find libssl\n"));
@@ -28,6 +28,7 @@
#include "common.h"
#include "main.h"
#include "dl.h"
+#include "shell.h"
#include <bdlib/src/String.h>
#include <bdlib/src/Array.h>
@@ -66,8 +67,9 @@ static DH* tmp_dh_callback(SSL* ssl, int is_export, int keylength) {
int init_openssl() {
- load_libcrypto();
- load_libssl();
+ if (load_libcrypto() || load_libssl()) {
+ werr(ERR_LIBS);
+ }
#ifdef EGG_SSL_EXT
/* good place to init ssl stuff */
@@ -653,6 +653,8 @@ const char *werr_tostr(int errnum)
return STR("Binary data is not initialized; try ./binary -C");
case ERR_TOOMANYBOTS:
return STR("Too many bots defined. 5 max. Too many will lead to klines.\nSpread out into multiple accounts/shells/ip ranges.");
+ case ERR_LIBS:
+ return STR("Failed to load required libraries");
default:
return STR("Unforseen error");
@@ -23,7 +23,8 @@
#define ERR_NOHOMEDIR 21
#define ERR_NOTINIT 22
#define ERR_TOOMANYBOTS 23
-#define ERR_MAX 24
+#define ERR_LIBS 24
+#define ERR_MAX 25
#define DETECT_LOGIN 1
#define DETECT_TRACE 2