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]; |
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 |
|
|
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 */ |