diff options
| author | Jay Sorg <jay.sorg@gmail.com> | 2015-08-18 18:05:45 -0700 | 
|---|---|---|
| committer | Jay Sorg <jay.sorg@gmail.com> | 2015-08-18 18:05:45 -0700 | 
| commit | bfe69badc338c5978555aa98a0047f3707b45be4 (patch) | |
| tree | 6671b8ee4c86c170cb04c2aeecdbe95c50218ca3 | |
| parent | d91de3c1cc8d66ab151ad69a3ce780c781ca9018 (diff) | |
| download | xrdp-proprietary-bfe69badc338c5978555aa98a0047f3707b45be4.tar.gz xrdp-proprietary-bfe69badc338c5978555aa98a0047f3707b45be4.zip | |
vnc: remove rfbDes calls
| -rw-r--r-- | vnc/vnc.c | 15 | ||||
| -rw-r--r-- | vnc/vnc.h | 1 | 
2 files changed, 10 insertions, 6 deletions
| @@ -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);  }  /******************************************************************************/ @@ -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 | 
