Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 478246 Details for
Bug 620854
net-nds/openldap-2.4.44[libressl samba] error: unknown type name ‘des_cblock’ - error: subscripted value is neither array nor pointer nor vector
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Complete DES changes
openldap_des_change_complete-dwok.diff (text/plain), 5.81 KB, created by
Attila Tóth
on 2017-06-27 19:35:03 UTC
(
hide
)
Description:
Complete DES changes
Filename:
MIME Type:
Creator:
Attila Tóth
Created:
2017-06-27 19:35:03 UTC
Size:
5.81 KB
patch
obsolete
>diff -urNp orig/libraries/liblutil/passwd.c dwok/libraries/liblutil/passwd.c >--- orig/libraries/liblutil/passwd.c 2017-06-27 10:28:24.636949967 +0200 >+++ dwok/libraries/liblutil/passwd.c 2017-06-27 20:44:25.354944232 +0200 >@@ -38,11 +38,11 @@ > # include <openssl/des.h> > > >-typedef DES_cblock des_key; >-typedef DES_cblock des_data_block; >-typedef DES_key_schedule des_context[1]; >-#define des_failed(encrypted) 0 >-#define des_finish(key, schedule) >+typedef DES_cblock DES_key; >+typedef DES_cblock DES_data_block; >+typedef DES_key_schedule DES_context[1]; >+#define DES_failed(encrypted) 0 >+#define DES_finish(key, schedule) > > #elif defined(HAVE_MOZNSS) > /* >@@ -53,22 +53,22 @@ typedef DES_key_schedule des_context[1]; > */ > #define PROTYPES_H 1 > # include <nss/pk11pub.h> >-typedef PK11SymKey *des_key; >-typedef unsigned char des_data_block[8]; >-typedef PK11Context *des_context[1]; >+typedef PK11SymKey *DES_key; >+typedef unsigned char DES_data_block[8]; >+typedef PK11Context *DES_context[1]; > #define DES_ENCRYPT CKA_ENCRYPT > > #elif defined(HAVE_GNUTLS_GNUTLS_H) && !defined(DES_ENCRYPT) > # include <gcrypt.h> > static int gcrypt_init = 0; > >-typedef const void* des_key; >+typedef const void* DES_key; > typedef unsigned char DES_cblock[8]; >-typedef des_cblock des_data_block; >+typedef DES_cblock DES_data_block; > typedef int DES_key_schedule; /* unused */ >-typedef DES_key_schedule des_context; /* unused */ >-#define des_failed(encrypted) 0 >-#define des_finish(key, schedule) >+typedef DES_key_schedule DES_context; /* unused */ >+#define DES_failed(encrypted) 0 >+#define DES_finish(key, schedule) > > #define DES_set_key_unchecked( key, key_sched ) \ > gcry_cipher_setkey( hd, key, 8 ) >@@ -684,7 +684,7 @@ static int chk_md5( > * abstract away setting the parity. > */ > static void >-des_set_key_and_parity( des_key *key, unsigned char *keyData) >+DES_set_key_and_parity( DES_key *key, unsigned char *keyData) > { > memcpy(key, keyData, 8); > DES_set_odd_parity( key ); >@@ -697,7 +697,7 @@ des_set_key_and_parity( des_key *key, un > * implement MozNSS wrappers for the openSSL calls > */ > static void >-des_set_key_and_parity( des_key *key, unsigned char *keyData) >+DES_set_key_and_parity( DES_key *key, unsigned char *keyData) > { > SECItem keyDataItem; > PK11SlotInfo *slot; >@@ -719,7 +719,7 @@ des_set_key_and_parity( des_key *key, un > } > > static void >-DES_set_key_unchecked( des_key *key, des_context ctxt ) >+DES_set_key_unchecked( DES_key *key, DES_context ctxt ) > { > ctxt[0] = NULL; > >@@ -732,37 +732,37 @@ DES_set_key_unchecked( des_key *key, des > } > > static void >-DES_ecb_encrypt( des_data_block *plain, des_data_block *encrypted, >- des_context ctxt, int op) >+DES_ecb_encrypt( DES_data_block *plain, DES_data_block *encrypted, >+ DES_context ctxt, int op) > { > SECStatus rv; > int size; > > if (ctxt[0] == NULL) { > /* need to fail here... */ >- memset(encrypted, 0, sizeof(des_data_block)); >+ memset(encrypted, 0, sizeof(DES_data_block)); > return; > } > rv = PK11_CipherOp(ctxt[0], (unsigned char *)&encrypted[0], >- &size, sizeof(des_data_block), >- (unsigned char *)&plain[0], sizeof(des_data_block)); >+ &size, sizeof(DES_data_block), >+ (unsigned char *)&plain[0], sizeof(DES_data_block)); > if (rv != SECSuccess) { > /* signal failure */ >- memset(encrypted, 0, sizeof(des_data_block)); >+ memset(encrypted, 0, sizeof(DES_data_block)); > return; > } > return; > } > > static int >-des_failed(des_data_block *encrypted) >+DES_failed(DES_data_block *encrypted) > { >- static const des_data_block zero = { 0 }; >+ static const DES_data_block zero = { 0 }; > return memcmp(encrypted, zero, sizeof(zero)) == 0; > } > > static void >-des_finish(des_key *key, des_context ctxt) >+DES_finish(DES_key *key, DES_context ctxt) > { > if (*key) { > PK11_FreeSymKey(*key); >@@ -837,7 +837,7 @@ des_finish(des_key *key, des_context ctx > > static void lmPasswd_to_key( > const char *lmPasswd, >- des_key *key) >+ DES_key *key) > { > const unsigned char *lpw = (const unsigned char *) lmPasswd; > unsigned char k[8]; >@@ -852,7 +852,7 @@ static void lmPasswd_to_key( > k[6] = ((lpw[5] & 0x3F) << 2) | (lpw[6] >> 6); > k[7] = ((lpw[6] & 0x7F) << 1); > >- des_set_key_and_parity( key, k ); >+ DES_set_key_and_parity( key, k ); > } > > static int chk_lanman( >@@ -863,10 +863,10 @@ static int chk_lanman( > { > ber_len_t i; > char UcasePassword[15]; >- des_key key; >- des_context schedule; >- des_data_block StdText = "KGS!@#$%"; >- des_data_block PasswordHash1, PasswordHash2; >+ DES_key key; >+ DES_context schedule; >+ DES_data_block StdText = "KGS!@#$%"; >+ DES_data_block PasswordHash1, PasswordHash2; > char PasswordHash[33], storedPasswordHash[33]; > > #if defined(HAVE_GNUTLS_GNUTLS_H) && !defined(DES_ENCRYPT) >@@ -900,18 +900,18 @@ static int chk_lanman( > DES_set_key_unchecked( &key, schedule ); > DES_ecb_encrypt( &StdText, &PasswordHash1, schedule , DES_ENCRYPT ); > >- if (des_failed(&PasswordHash1)) { >+ if (DES_failed(&PasswordHash1)) { > return LUTIL_PASSWD_ERR; > } > > lmPasswd_to_key( &UcasePassword[7], &key ); > DES_set_key_unchecked( &key, schedule ); > DES_ecb_encrypt( &StdText, &PasswordHash2, schedule , DES_ENCRYPT ); >- if (des_failed(&PasswordHash2)) { >+ if (DES_failed(&PasswordHash2)) { > return LUTIL_PASSWD_ERR; > } > >- des_finish( &key, schedule ); >+ DES_finish( &key, schedule ); > > sprintf( PasswordHash, "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", > PasswordHash1[0],PasswordHash1[1],PasswordHash1[2],PasswordHash1[3], >@@ -1176,10 +1176,10 @@ static int hash_lanman( > > ber_len_t i; > char UcasePassword[15]; >- des_key key; >- des_context schedule; >- des_data_block StdText = "KGS!@#$%"; >- des_data_block PasswordHash1, PasswordHash2; >+ DES_key key; >+ DES_context schedule; >+ DES_data_block StdText = "KGS!@#$%"; >+ DES_data_block PasswordHash1, PasswordHash2; > char PasswordHash[33]; > > #if defined(HAVE_GNUTLS_GNUTLS_H) && !defined(DES_ENCRYPT)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 620854
:
475192
|
475196
|
475198
| 478246