diff options
author | jsorg71 <jsorg71> | 2005-03-13 01:17:30 +0000 |
---|---|---|
committer | jsorg71 <jsorg71> | 2005-03-13 01:17:30 +0000 |
commit | 7ac2f6506f4db7325d7e6ad3d3964e52aeed0112 (patch) | |
tree | 3d09fbfe55935662e5bf1b1982949e49ecd6a50d /vnc/vnc.c | |
parent | 013c11499584361d6743588dd63db258c4f93848 (diff) | |
download | xrdp-proprietary-7ac2f6506f4db7325d7e6ad3d3964e52aeed0112.tar.gz xrdp-proprietary-7ac2f6506f4db7325d7e6ad3d3964e52aeed0112.zip |
remove vncauth.c
Diffstat (limited to 'vnc/vnc.c')
-rw-r--r-- | vnc/vnc.c | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -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); } } |