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

Use the new cryptlib patch.

It is NO LONGER POSSIBLE to use Cryptlib from upstream, you MUST use the
included one now, so it really needs to be statically linked.
parent 88d0c30c
Branches
Tags
No related merge requests found
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include "bbslist.h" #include "bbslist.h"
#include "conn.h" #include "conn.h"
#include "uifcinit.h" #include "uifcinit.h"
#include "ciolib.h"
#include "st_crypt.h" #include "st_crypt.h"
...@@ -140,6 +141,8 @@ int ssh_connect(struct bbslist *bbs) ...@@ -140,6 +141,8 @@ int ssh_connect(struct bbslist *bbs)
int status; int status;
char password[MAX_PASSWD_LEN+1]; char password[MAX_PASSWD_LEN+1];
char username[MAX_USER_LEN+1]; char username[MAX_USER_LEN+1];
struct winsize ws;
struct text_info ti;
init_uifc(TRUE, TRUE); init_uifc(TRUE, TRUE);
pthread_mutex_init(&ssh_mutex, NULL); pthread_mutex_init(&ssh_mutex, NULL);
...@@ -227,6 +230,38 @@ int ssh_connect(struct bbslist *bbs) ...@@ -227,6 +230,38 @@ int ssh_connect(struct bbslist *bbs)
return(-1); return(-1);
} }
uifc.pop(NULL);
uifc.pop("Setting Terminal Type");
status=cl.SetAttributeString(ssh_session, CRYPT_SESSINFO_SSH_TERMINAL, "syncterm", 8);
/* Horrible way to determine the screen size */
textmode(screen_to_ciolib(bbs->screen_mode));
gettextinfo(&ti);
if(ti.screenwidth < 80)
ws.ws_col=40;
else {
if(ti.screenwidth < 132)
ws.ws_col=80;
else
ws.ws_col=132;
}
ws.ws_row=ti.screenheight;
if(!bbs->nostatus)
ws.ws_row--;
if(ws.ws_row<24)
ws.ws_row=24;
uifc.pop(NULL);
uifc.pop("Setting Terminal Width");
/* Pass socket to cryptlib */
status=cl.SetAttribute(ssh_session, CRYPT_SESSINFO_SSH_WIDTH, ws.ws_col);
uifc.pop(NULL);
uifc.pop("Setting Terminal Height");
/* Pass socket to cryptlib */
status=cl.SetAttribute(ssh_session, CRYPT_SESSINFO_SSH_HEIGHT, ws.ws_row);
/* Activate the session */ /* Activate the session */
uifc.pop(NULL); uifc.pop(NULL);
uifc.pop("Activating Session"); uifc.pop("Activating Session");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment