Skip to content
Snippets Groups Projects
Commit b7135a31 authored by deuce's avatar deuce
Browse files

Make requirement for Cryptlib optional.

Does not disable SSH options in menus, just makes the binary NEVER work
with Cryptlib.
parent 09b3dd40
No related branches found
No related tags found
No related merge requests found
......@@ -50,6 +50,12 @@ ifeq ($(os),sunos) # Solaris
CFLAGS += -DNEED_CFMAKERAW
endif
ifdef WITHOUT_CRYPTLIB
CFLAGS += -DWITHOUT_CRYPTLIB
else
OBJS += $(MTOBJODIR)$(DIRSEP)ssh$(OFILE)
endif
ifdef STATIC_CRYPTLIB
CFLAGS += -DSTATIC_CRYPTLIB
LDFLAGS += -lz
......
......@@ -300,9 +300,18 @@ int conn_connect(struct bbslist *bbs)
conn_api.close=raw_close;
break;
case CONN_TYPE_SSH:
#ifdef WITHOUT_CRYPTLIB
init_uifc(TRUE, TRUE);
uifcmsg("SSH inoperative", "`Compiled without cryptlib`\n\n"
"This binary was compiled without Cryptlib,\n"
"which is required for SSH support."
);
return(-1);
#else
conn_api.connect=ssh_connect;
conn_api.close=ssh_close;
break;
#endif
case CONN_TYPE_SERIAL:
conn_api.connect=modem_connect;
conn_api.close=serial_close;
......
......@@ -4,7 +4,6 @@ OBJS = \
$(MTOBJODIR)$(DIRSEP)filepick$(OFILE) \
$(MTOBJODIR)$(DIRSEP)fonts$(OFILE) \
$(MTOBJODIR)$(DIRSEP)rlogin$(OFILE) \
$(MTOBJODIR)$(DIRSEP)ssh$(OFILE) \
$(MTOBJODIR)$(DIRSEP)telnet_io$(OFILE) \
$(MTOBJODIR)$(DIRSEP)modem$(OFILE) \
$(MTOBJODIR)$(DIRSEP)conn_telnet$(OFILE) \
......
......@@ -7,9 +7,23 @@
#include "st_crypt.h"
struct crypt_funcs cl;
int crypt_loaded=0;
#ifdef WITHOUT_CRYPTLIB
int init_crypt()
{
return(-1);
}
void exit_crypt()
{
}
#else
struct crypt_funcs cl;
int init_crypt(void)
{
#ifdef STATIC_CRYPTLIB
......@@ -159,3 +173,5 @@ void exit_crypt(void)
if(crypt_loaded)
cl.End();
}
#endif
......@@ -3,6 +3,7 @@
#ifndef _ST_CRYPT_H_
#define _ST_CRYPT_H_
#ifndef WITHOUT_CRYPTLIB
#include"cryptlib.h"
#if defined(_MSC_VER)
......@@ -45,6 +46,7 @@ struct crypt_funcs {
};
#undef HACK_HACK_HACK
#endif
extern struct crypt_funcs cl;
extern int crypt_loaded;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment