Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Fri, 6 Mar 2015 12:08:06 +0100
From: Spil Oss <spil.oss@...il.com>
To: john-dev@...ts.openwall.com
Subject: Replace deprecated des_ methods with DES_

Hi,

During a recent build of all FreeBSD ports with LibreSSL as a
replacement of OpenSSL we've discovered that John the Ripper doesn't
build with LibreSSL. This is due to the use of des_ methods and types
that have been deprecated with OpenSSL 0.9.7 and will be removed with
OpenSSL 1.1.0.

Attached patches replace the deprecated des_ methods and calls that
were available in openssl/des_old.h with the supported DES_
counterparts.

Please consider including this in your code.

Kind regards,

Bernard Spil.

--- src/keychain_fmt_plug.c.orig	2012-09-17 10:30:39.000000000 +0200
+++ src/keychain_fmt_plug.c	2015-02-28 20:31:01.902977498 +0100
@@ -119,9 +119,9 @@
 	memcpy(key1, key, 8);
 	memcpy(key2, key + 8, 8);
 	memcpy(key3, key + 16, 8);
-	DES_set_key((C_Block *) key1, &ks1);
-	DES_set_key((C_Block *) key2, &ks2);
-	DES_set_key((C_Block *) key3, &ks3);
+	DES_set_key((DES_cblock *) key1, &ks1);
+	DES_set_key((DES_cblock *) key2, &ks2);
+	DES_set_key((DES_cblock *) key3, &ks3);
 	memcpy(ivec, iv, 8);
 	DES_ede3_cbc_encrypt(data, out, CTLEN, &ks1, &ks2, &ks3, &ivec,  DES_DECRYPT);
 

--- src/KRB4_fmt_plug.c.orig	2012-09-17 10:30:39.000000000 +0200
+++ src/KRB4_fmt_plug.c	2015-02-28 20:34:23.845351319 +0100
@@ -182,7 +182,7 @@
 	if (saved_salt->realm[0] != '\0')
 		afs_string_to_key(key, saved_salt->realm, &saved_key.key);
 	else
-		des_string_to_key(key, &saved_key.key);
+		DES_string_to_key(key, &saved_key.key);
 
 	strnzcpy(saved_key.string, key, sizeof(saved_key.string));
 }

--- src/KRB4_std_plug.c.orig	2012-07-10 12:35:20.000000000 +0200
+++ src/KRB4_std_plug.c	2015-02-28 20:32:34.494881776 +0100
@@ -29,7 +29,7 @@
 #include "KRB4_std.h"
 
 #ifndef des_fixup_key_parity
-#define des_fixup_key_parity	des_set_odd_parity
+#define des_fixup_key_parity	DES_set_odd_parity
 #endif
 
 static void

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ