diff options
author | danfe <danfe@FreeBSD.org> | 2015-03-30 11:04:24 +0800 |
---|---|---|
committer | danfe <danfe@FreeBSD.org> | 2015-03-30 11:04:24 +0800 |
commit | 2b158b5c38771d693f6158bc02d9f68a0b0606cb (patch) | |
tree | 10736fcb694af3bba3becabbaa881e0453853834 /security/ophcrack | |
parent | 64f6d9bcc461be9f46551dee56164507e70e5bb9 (diff) | |
download | freebsd-ports-gnome-2b158b5c38771d693f6158bc02d9f68a0b0606cb.tar.gz freebsd-ports-gnome-2b158b5c38771d693f6158bc02d9f68a0b0606cb.tar.zst freebsd-ports-gnome-2b158b5c38771d693f6158bc02d9f68a0b0606cb.zip |
Replace methods and types that were marked deprecated by OpenSSL 0.9.7
and will be removed in OpenSSL 1.1.0.
PR: 198348, 198352
Submitted by: Bernard Spil
Diffstat (limited to 'security/ophcrack')
-rw-r--r-- | security/ophcrack/files/patch-src_lmtable.c | 24 | ||||
-rw-r--r-- | security/ophcrack/files/patch-src_samdump2_samdump2.c | 67 |
2 files changed, 91 insertions, 0 deletions
diff --git a/security/ophcrack/files/patch-src_lmtable.c b/security/ophcrack/files/patch-src_lmtable.c new file mode 100644 index 000000000000..59eabb7fb04b --- /dev/null +++ b/security/ophcrack/files/patch-src_lmtable.c @@ -0,0 +1,24 @@ +--- src/lmtable.c.orig 2013-06-04 07:42:47 UTC ++++ src/lmtable.c +@@ -470,8 +470,8 @@ void lmtable_mkredux(table_t *tbl, uchar + /*-------------------------------------------------------------------------*/ + void lmtable_mkhash(uchar_t *pwd, uchar_t *hash) { + uchar_t key[8]; +- des_key_schedule ks; +- des_cblock *magic = (des_cblock*)lmmagic; ++ DES_key_schedule ks; ++ DES_cblock *magic = (DES_cblock*)lmmagic; + + key[0] = pwd[0]; + key[1] = (pwd[0] << 7) | (pwd[1] >> 1); +@@ -482,7 +482,7 @@ void lmtable_mkhash(uchar_t *pwd, uchar_ + key[6] = (pwd[5] << 2) | (pwd[6] >> 6); + key[7] = (pwd[6] << 1) ; + +- des_set_odd_parity(&key); +- des_set_key(&key, ks); +- des_ecb_encrypt(magic, (des_cblock*)hash, ks, DES_ENCRYPT); ++ DES_set_odd_parity(&key); ++ DES_set_key(&key, &ks); ++ DES_ecb_encrypt(magic, (DES_cblock*)hash, &ks, DES_ENCRYPT); + } diff --git a/security/ophcrack/files/patch-src_samdump2_samdump2.c b/security/ophcrack/files/patch-src_samdump2_samdump2.c new file mode 100644 index 000000000000..e6e954af504a --- /dev/null +++ b/security/ophcrack/files/patch-src_samdump2_samdump2.c @@ -0,0 +1,67 @@ +--- src/samdump2/samdump2.c.orig 2015-03-30 02:26:33 UTC ++++ src/samdump2/samdump2.c +@@ -71,7 +71,7 @@ void str_to_key(unsigned char *str,unsig + for (i=0;i<8;i++) { + key[i] = (key[i]<<1); + } +- des_set_odd_parity((des_cblock *)key); ++ DES_set_odd_parity((DES_cblock *)key); + } + + /* +@@ -209,8 +209,8 @@ unsigned char* utf16_to_utf8 (unsigned c + unsigned char hbootkey[0x20]; + + /* Des */ +- des_key_schedule ks1, ks2; +- des_cblock deskey1, deskey2; ++ DES_key_schedule ks1, ks2; ++ DES_cblock deskey1, deskey2; + + int i, j; + +@@ -418,15 +418,15 @@ unsigned char* utf16_to_utf8 (unsigned c + + /* Get the two decrpt keys. */ + sid_to_key1(rid,(unsigned char *)deskey1); +- des_set_key_checked((des_cblock *)deskey1,ks1); ++ DES_set_key_checked((DES_cblock *)deskey1, &ks1); + sid_to_key2(rid,(unsigned char *)deskey2); +- des_set_key_unchecked((des_cblock *)deskey2,ks2); ++ DES_set_key_unchecked((DES_cblock *)deskey2, &ks2); + + /* Decrypt the lanman password hash as two 8 byte blocks. */ +- des_ecb_encrypt((des_cblock *)obfkey, +- (des_cblock *)fb, ks1, DES_DECRYPT); +- des_ecb_encrypt((des_cblock *)(obfkey + 8), +- (des_cblock *)&fb[8], ks2, DES_DECRYPT); ++ DES_ecb_encrypt((DES_cblock *)obfkey, ++ (DES_cblock *)fb, &ks1, DES_DECRYPT); ++ DES_ecb_encrypt((DES_cblock *)(obfkey + 8), ++ (DES_cblock *)&fb[8], &ks2, DES_DECRYPT); + + + +@@ -471,16 +471,16 @@ unsigned char* utf16_to_utf8 (unsigned c + if (lm_size != 0x14) { + /* Get the two decrpt keys. */ + sid_to_key1(rid,(unsigned char *)deskey1); +- des_set_key((des_cblock *)deskey1,ks1); ++ DES_set_key((DES_cblock *)deskey1, &ks1); + sid_to_key2(rid,(unsigned char *)deskey2); +- des_set_key((des_cblock *)deskey2,ks2); ++ DES_set_key((DES_cblock *)deskey2, &ks2); + } + + /* Decrypt the NT md4 password hash as two 8 byte blocks. */ +- des_ecb_encrypt((des_cblock *)obfkey, +- (des_cblock *)fb, ks1, DES_DECRYPT); +- des_ecb_encrypt((des_cblock *)(obfkey + 8), +- (des_cblock *)&fb[8], ks2, DES_DECRYPT); ++ DES_ecb_encrypt((DES_cblock *)obfkey, ++ (DES_cblock *)fb, &ks1, DES_DECRYPT); ++ DES_ecb_encrypt((DES_cblock *)(obfkey + 8), ++ (DES_cblock *)&fb[8], &ks2, DES_DECRYPT); + + /* sf27 wrap to sf25 */ + //sf27( obfkey, (int*)&rid, fb ); |