| 1 |
Descriptionscip-debian debian samdump2 3.0.0-8 samdump2/patches/`50_openssl.patch`#Description.: fix a FTBFS with OpenSSL 1.1.0. (Closes: #828537) |
| 2 |
Authorscip-debian debian samdump2 3.0.0-8 samdump2/patches/`50_openssl.patch`#Author.: Joao Eriberto Mota Filho <[email protected]scip-debian . . . identity/`[email protected]`.> |
| 3 |
Last-Updatescip-debian debian samdump2 3.0.0-8 samdump2/patches/`50_openssl.patch`#Last-Update.: 2016-11-22 |
| 4 |
Index: samdump2-3.0.0/samdump2.cscip-debian debian samdump2 3.0.0-8 samdump2/upstream/`samdump2-3.0.0/samdump2.c`: |
| 5 |
=================================================================== |
| 6 |
--- samdump2-3.0.0.orig/samdump2.cscip-debian debian samdump2 3.0.0-8 samdump2/upstream/`samdump2-3.0.0.orig/samdump2.c`: |
| 7 |
+++ samdump2-3.0.0/samdump2.c |
| 8 |
@@ -72,7 +72,7 @@ void str_to_key(unsigned char *str,unsig |
| 9 |
for (i=0;i<8;i++) { |
| 10 |
key[i] = (key[i]<<1); |
| 11 |
} |
| 12 |
|
| 13 |
+ DES_set_odd_parity((DES_cblock *)key); |
| 14 |
} |
| 15 |
|
| 16 |
/* |
| 17 |
@@ -210,8 +210,8 @@ unsigned char* utf16_to_utf8 (unsigned c |
| 18 |
unsigned char hbootkey[0x20]; |
| 19 |
|
| 20 |
/* Des */ |
| 21 |
|
| 22 |
|
| 23 |
+ DES_key_schedule ks1, ks2; |
| 24 |
+ DES_cblock deskey1, deskey2; |
| 25 |
|
| 26 |
int i, j; |
| 27 |
|
| 28 |
@@ -419,15 +419,15 @@ unsigned char* utf16_to_utf8 (unsigned c |
| 29 |
|
| 30 |
/* Get the two decrpt keys. */ |
| 31 |
sid_to_key1(rid,(unsigned char *)deskey1); |
| 32 |
|
| 33 |
+ DES_set_key_checked((DES_cblock *)deskey1, &ks1); |
| 34 |
sid_to_key2(rid,(unsigned char *)deskey2); |
| 35 |
|
| 36 |
+ DES_set_key_unchecked((DES_cblock *)deskey2, &ks2); |
| 37 |
|
| 38 |
/* Decrypt the lanman password hash as two 8 byte blocks. */ |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
+ DES_ecb_encrypt((DES_cblock *)obfkey, |
| 44 |
+ (DES_cblock *)fb, &ks1, DES_DECRYPT); |
| 45 |
+ DES_ecb_encrypt((DES_cblock *)(obfkey + 8), |
| 46 |
+ (DES_cblock *)&fb[8], &ks2, DES_DECRYPT); |
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
@@ -472,16 +472,16 @@ unsigned char* utf16_to_utf8 (unsigned c |
| 51 |
if (lm_size != 0x14) { |
| 52 |
/* Get the two decrpt keys. */ |
| 53 |
sid_to_key1(rid,(unsigned char *)deskey1); |
| 54 |
|
| 55 |
+ DES_set_key((DES_cblock *)deskey1,&ks1); |
| 56 |
sid_to_key2(rid,(unsigned char *)deskey2); |
| 57 |
|
| 58 |
+ DES_set_key((DES_cblock *)deskey2,&ks2); |
| 59 |
} |
| 60 |
|
| 61 |
/* Decrypt the NT md4 password hash as two 8 byte blocks. */ |
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
+ DES_ecb_encrypt((DES_cblock *)obfkey, |
| 67 |
+ (DES_cblock *)fb, &ks1, DES_DECRYPT); |
| 68 |
+ DES_ecb_encrypt((DES_cblock *)(obfkey + 8), |
| 69 |
+ (DES_cblock *)&fb[8], &ks2, DES_DECRYPT); |
| 70 |
|
| 71 |
/* sf27 wrap to sf25 */ |
| 72 |
//sf27( obfkey, (int*)&rid, fb ); |