summaryrefslogtreecommitdiffstats
path: root/vnc/vnc.c
diff options
context:
space:
mode:
authorjsorg71 <jsorg71>2005-03-13 01:17:30 +0000
committerjsorg71 <jsorg71>2005-03-13 01:17:30 +0000
commit7ac2f6506f4db7325d7e6ad3d3964e52aeed0112 (patch)
tree3d09fbfe55935662e5bf1b1982949e49ecd6a50d /vnc/vnc.c
parent013c11499584361d6743588dd63db258c4f93848 (diff)
downloadxrdp-proprietary-7ac2f6506f4db7325d7e6ad3d3964e52aeed0112.tar.gz
xrdp-proprietary-7ac2f6506f4db7325d7e6ad3d3964e52aeed0112.zip
remove vncauth.c
Diffstat (limited to 'vnc/vnc.c')
-rw-r--r--vnc/vnc.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/vnc/vnc.c b/vnc/vnc.c
index 2a62ba5e..375c8c11 100644
--- a/vnc/vnc.c
+++ b/vnc/vnc.c
@@ -23,6 +23,20 @@
#include "vnc.h"
/******************************************************************************/
+/* taken from vncauth.c */
+void rfbEncryptBytes(char* bytes, char* passwd)
+{
+ char key[12];
+
+ /* key is simply password padded with nulls */
+ g_memset(key, 0, sizeof(key));
+ g_strncpy(key, passwd, 8);
+ rfbDesKey((unsigned char*)key, EN0); /* 0, encrypt */
+ rfbDes((unsigned char*)bytes, (unsigned char*)bytes);
+ rfbDes((unsigned char*)(bytes + 8), (unsigned char*)(bytes + 8));
+}
+
+/******************************************************************************/
/* returns error */
int lib_recv(struct vnc* v, char* data, int len)
{
@@ -849,7 +863,7 @@ int lib_mod_connect(struct vnc* v)
error = lib_recv(v, s->data, 16);
if (error == 0)
{
- rfbEncryptBytes((unsigned char*)s->data, v->password);
+ rfbEncryptBytes(s->data, v->password);
error = lib_send(v, s->data, 16);
}
}