summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2010-01-08 17:21:19 +0000
committerjoerg <joerg@pkgsrc.org>2010-01-08 17:21:19 +0000
commit34458866006ef90fc9c8be2a241171f47f134254 (patch)
treecb8c789a081630a9c5cc145eb443d51dfc58d40c
parenta708dcb958ef002d508ff1129a9d5547edf6119a (diff)
downloadpkgsrc-34458866006ef90fc9c8be2a241171f47f134254.tar.gz
Use the modern DES API.
-rw-r--r--databases/gq/distinfo3
-rw-r--r--databases/gq/patches/patch-ae62
2 files changed, 64 insertions, 1 deletions
diff --git a/databases/gq/distinfo b/databases/gq/distinfo
index bcbaa5b5153..62b636dc695 100644
--- a/databases/gq/distinfo
+++ b/databases/gq/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.9 2008/01/10 21:42:51 adam Exp $
+$NetBSD: distinfo,v 1.10 2010/01/08 17:21:19 joerg Exp $
SHA1 (gq-1.2.3.tar.gz) = dc11f4c1c05037786ca6b212f4945fc20ecd33a4
RMD160 (gq-1.2.3.tar.gz) = 4e8bf1700f4d7aacd906559e01a11654f6ce0f90
@@ -7,4 +7,5 @@ SHA1 (patch-aa) = b243ab8d862e1aae6dc3a1e4769faa8e8949efe6
SHA1 (patch-ab) = aa4918c9ee9900b839c58692e68c4adb675dcb17
SHA1 (patch-ac) = d2180a16425a672c93c19697d9648e4c552cdcb8
SHA1 (patch-ad) = 9a9a2e038163ab6a39f5325bbcdd01fa7589885b
+SHA1 (patch-ae) = aeda3e38a58b8211b8df2534409d928766078287
SHA1 (patch-an) = 29806e725bfa9f4827b2f7367006005b7ad44c6c
diff --git a/databases/gq/patches/patch-ae b/databases/gq/patches/patch-ae
new file mode 100644
index 00000000000..631b9d350cc
--- /dev/null
+++ b/databases/gq/patches/patch-ae
@@ -0,0 +1,62 @@
+$NetBSD: patch-ae,v 1.3 2010/01/08 17:21:19 joerg Exp $
+
+--- src/gq-hash-openssl.c.orig 2007-05-14 16:26:50.000000000 +0000
++++ src/gq-hash-openssl.c
+@@ -60,7 +60,7 @@ gq_hash_crypt(gchar const *data, gsize l
+ salt->str[2] = 0;
+
+ g_byte_array_append(gb, (guchar*)"{CRYPT}", 7);
+- des_fcrypt((gchar*)password, salt->str, (gchar*)cryptbuf);
++ DES_fcrypt((gchar*)password, salt->str, (gchar*)cryptbuf);
+
+ g_byte_array_append(gb, cryptbuf, strlen((gchar*)cryptbuf));
+
+@@ -242,7 +242,7 @@ static const char *lmhash_key = "KGS!@#$
+ /* FIXME: silently assumes US-ASCII (or a single-byte encoding to be
+ handled by toupper) */
+
+-static void lm_make_key(const char *pw, des_cblock *key)
++static void lm_make_key(const char *pw, DES_cblock *key)
+ {
+ int i;
+ char *k = (char *) key;
+@@ -253,7 +253,7 @@ static void lm_make_key(const char *pw,
+ k[i+1] = (pw[i] << (7 - i)) & 0xff;
+ }
+
+- des_set_odd_parity(key);
++ DES_set_odd_parity(key);
+ }
+
+ GByteArray*
+@@ -262,10 +262,10 @@ gq_hash_lmhash(gchar const* data, gsize
+ unsigned int i;
+ char hex[2];
+ char plain[15];
+- des_key_schedule schedule;
++ DES_key_schedule schedule;
+ GByteArray *gb = NULL;
+- des_cblock ckey1, ckey2;
+- des_cblock bin1, bin2;
++ DES_cblock ckey1, ckey2;
++ DES_cblock bin1, bin2;
+
+ memset(plain, 0, sizeof(plain));
+
+@@ -274,12 +274,12 @@ gq_hash_lmhash(gchar const* data, gsize
+ }
+
+ lm_make_key(plain, &ckey1);
+- des_set_key_unchecked(&ckey1, schedule);
+- des_ecb_encrypt((des_cblock*)lmhash_key, &bin1, schedule, DES_ENCRYPT);
++ DES_set_key_unchecked(&ckey1, &schedule);
++ DES_ecb_encrypt((DES_cblock*)lmhash_key, &bin1, &schedule, DES_ENCRYPT);
+
+ lm_make_key(plain + 7, &ckey2);
+- des_set_key_unchecked(&ckey2, schedule);
+- des_ecb_encrypt((des_cblock*)lmhash_key, &bin2, schedule, DES_ENCRYPT);
++ DES_set_key_unchecked(&ckey2, &schedule);
++ DES_ecb_encrypt((DES_cblock*)lmhash_key, &bin2, &schedule, DES_ENCRYPT);
+
+ gb = g_byte_array_new();
+