View | Details | Raw Unified | Return to bug 198340
Collapse All | Expand All

(-)net/gq/files/patch-src_gq-hash-openssl.c (+60 lines)
Line 0 Link Here
1
--- src/gq-hash-openssl.c.orig	2008-01-09 15:55:46.000000000 +0100
2
+++ src/gq-hash-openssl.c	2015-02-28 19:27:54.038020011 +0100
3
@@ -60,7 +60,7 @@
4
      salt->str[2] = 0;
5
 
6
      g_byte_array_append(gb, (guchar*)"{CRYPT}", 7);
7
-     des_fcrypt((gchar*)password, salt->str, (gchar*)cryptbuf);
8
+     DES_fcrypt((gchar*)password, salt->str, (gchar*)cryptbuf);
9
 
10
      g_byte_array_append(gb, cryptbuf, strlen((gchar*)cryptbuf));
11
 
12
@@ -242,7 +242,7 @@
13
 /* FIXME: silently assumes US-ASCII (or a single-byte encoding to be
14
    handled by toupper) */
15
 
16
-static void lm_make_key(const char *pw, des_cblock *key)
17
+static void lm_make_key(const char *pw, DES_cblock *key)
18
 {
19
      int i;
20
      char *k = (char *) key;
21
@@ -253,7 +253,7 @@
22
 	  k[i+1]  = (pw[i] << (7 - i)) & 0xff;
23
      }
24
 
25
-     des_set_odd_parity(key);
26
+     DES_set_odd_parity(key);
27
 }
28
 
29
 GByteArray*
30
@@ -262,10 +262,10 @@
31
      unsigned int i;
32
      char hex[2];
33
      char plain[15];
34
-     des_key_schedule schedule;
35
+     DES_key_schedule schedule;
36
      GByteArray *gb = NULL;
37
-     des_cblock ckey1, ckey2;
38
-     des_cblock bin1,  bin2;
39
+     DES_cblock ckey1, ckey2;
40
+     DES_cblock bin1,  bin2;
41
 
42
      memset(plain, 0, sizeof(plain));
43
 
44
@@ -274,12 +274,12 @@
45
      }
46
 
47
      lm_make_key(plain, &ckey1);
48
-     des_set_key_unchecked(&ckey1, schedule);
49
-     des_ecb_encrypt((des_cblock*)lmhash_key, &bin1, schedule, DES_ENCRYPT);
50
+     DES_set_key_unchecked(&ckey1, &schedule);
51
+     DES_ecb_encrypt((DES_cblock*)lmhash_key, &bin1, &schedule, DES_ENCRYPT);
52
 
53
      lm_make_key(plain + 7, &ckey2);
54
-     des_set_key_unchecked(&ckey2, schedule);
55
-     des_ecb_encrypt((des_cblock*)lmhash_key, &bin2, schedule, DES_ENCRYPT);
56
+     DES_set_key_unchecked(&ckey2, &schedule);
57
+     DES_ecb_encrypt((DES_cblock*)lmhash_key, &bin2, &schedule, DES_ENCRYPT);
58
 
59
      gb = g_byte_array_new();
60
 

Return to bug 198340