/[rdesktop]/jpeg/rdesktop/trunk/rdesktop.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /jpeg/rdesktop/trunk/rdesktop.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1372 by jsorg71, Mon Jan 8 04:47:06 2007 UTC revision 1374 by jsorg71, Tue Jan 9 07:24:44 2007 UTC
# Line 45  Line 45 
45  #include <sys/un.h>             /* sockaddr_un */  #include <sys/un.h>             /* sockaddr_un */
46  #endif  #endif
47    
48  #include <openssl/md5.h>  #include "ssl.h"
49    
50  char g_title[64] = "";  char g_title[64] = "";
51  char g_username[64];  char g_username[64];
# Line 1052  generate_random(uint8 * random) Line 1052  generate_random(uint8 * random)
1052  {  {
1053          struct stat st;          struct stat st;
1054          struct tms tmsbuf;          struct tms tmsbuf;
1055          MD5_CTX md5;          SSL_MD5 md5;
1056          uint32 *r;          uint32 *r;
1057          int fd, n;          int fd, n;
1058    
# Line 1084  generate_random(uint8 * random) Line 1084  generate_random(uint8 * random)
1084          r[7] = st.st_ctime;          r[7] = st.st_ctime;
1085    
1086          /* Hash both halves with MD5 to obscure possible patterns */          /* Hash both halves with MD5 to obscure possible patterns */
1087          MD5_Init(&md5);          ssl_md5_init(&md5);
1088          MD5_Update(&md5, random, 16);          ssl_md5_update(&md5, random, 16);
1089          MD5_Final(random, &md5);          ssl_md5_final(&md5, random);
1090          MD5_Update(&md5, random + 16, 16);          ssl_md5_update(&md5, random + 16, 16);
1091          MD5_Final(random + 16, &md5);          ssl_md5_final(&md5, random + 16);
1092  }  }
1093    
1094  /* malloc; exit if out of memory */  /* malloc; exit if out of memory */

Legend:
Removed from v.1372  
changed lines
  Added in v.1374

  ViewVC Help
Powered by ViewVC 1.1.26