summaryrefslogtreecommitdiffstats
path: root/vnc
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2015-08-18 18:05:45 -0700
committerJay Sorg <jay.sorg@gmail.com>2015-08-18 18:05:45 -0700
commitbfe69badc338c5978555aa98a0047f3707b45be4 (patch)
tree6671b8ee4c86c170cb04c2aeecdbe95c50218ca3 /vnc
parentd91de3c1cc8d66ab151ad69a3ce780c781ca9018 (diff)
downloadxrdp-proprietary-bfe69badc338c5978555aa98a0047f3707b45be4.tar.gz
xrdp-proprietary-bfe69badc338c5978555aa98a0047f3707b45be4.zip
vnc: remove rfbDes calls
Diffstat (limited to 'vnc')
-rw-r--r--vnc/vnc.c15
-rw-r--r--vnc/vnc.h1
2 files changed, 10 insertions, 6 deletions
diff --git a/vnc/vnc.c b/vnc/vnc.c
index ae9b192c..66e70225 100644
--- a/vnc/vnc.c
+++ b/vnc/vnc.c
@@ -21,6 +21,7 @@
#include "vnc.h"
#include "log.h"
#include "trans.h"
+#include "ssl_calls.h"
#define LLOG_LEVEL 1
#define LLOGLN(_level, _args) \
@@ -51,14 +52,18 @@ lib_send_copy(struct vnc *v, struct stream *s)
void DEFAULT_CC
rfbEncryptBytes(char *bytes, char *passwd)
{
- char key[12];
+ char key[24];
+ void *des;
/* 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));
+ g_mirror_memcpy(key, passwd, g_strlen(passwd));
+ des = ssl_des3_encrypt_info_create(key, 0);
+ ssl_des3_encrypt(des, 8, bytes, bytes);
+ ssl_des3_info_delete(des);
+ des = ssl_des3_encrypt_info_create(key, 0);
+ ssl_des3_encrypt(des, 8, bytes + 8, bytes + 8);
+ ssl_des3_info_delete(des);
}
/******************************************************************************/
diff --git a/vnc/vnc.h b/vnc/vnc.h
index 6cd74b0d..d7249f3d 100644
--- a/vnc/vnc.h
+++ b/vnc/vnc.h
@@ -22,7 +22,6 @@
#include "arch.h"
#include "parse.h"
#include "os_calls.h"
-#include "d3des.h"
#include "defines.h"
#define CURRENT_MOD_VER 3