Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
James Lowden
OpenLDAP
Commits
e927ef83
Commit
e927ef83
authored
7 years ago
by
Quanah Gibson-Mount
Browse files
Options
Downloads
Patches
Plain Diff
ITS#8634 - Fix DES API function calls to current DES API
parent
75c8e9f8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/liblutil/passwd.c
+14
-14
14 additions, 14 deletions
libraries/liblutil/passwd.c
with
14 additions
and
14 deletions
libraries/liblutil/passwd.c
+
14
−
14
View file @
e927ef83
...
...
@@ -38,9 +38,9 @@
# include <openssl/des.h>
typedef
des
_cblock
des_key
;
typedef
des
_cblock
des_data_block
;
typedef
des
_key_schedule
des_context
;
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)
...
...
@@ -667,7 +667,7 @@ static void
des_set_key_and_parity
(
des_key
*
key
,
unsigned
char
*
keyData
)
{
memcpy
(
key
,
keyData
,
8
);
des
_set_odd_parity
(
key
);
DES
_set_odd_parity
(
key
);
}
...
...
@@ -699,7 +699,7 @@ des_set_key_and_parity( des_key *key, unsigned char *keyData)
}
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
;
...
...
@@ -712,7 +712,7 @@ des_set_key_unchecked( des_key *key, des_context ctxt )
}
static
void
des
_ecb_encrypt
(
des_data_block
*
plain
,
des_data_block
*
encrypted
,
DES
_ecb_encrypt
(
des_data_block
*
plain
,
des_data_block
*
encrypted
,
des_context
ctxt
,
int
op
)
{
SECStatus
rv
;
...
...
@@ -864,16 +864,16 @@ static int chk_lanman(
ldap_pvt_str2upper
(
UcasePassword
);
lmPasswd_to_key
(
UcasePassword
,
&
key
);
des
_set_key_unchecked
(
&
key
,
schedule
);
des
_ecb_encrypt
(
&
StdText
,
&
PasswordHash1
,
schedule
,
DES_ENCRYPT
);
DES
_set_key_unchecked
(
&
key
,
schedule
);
DES
_ecb_encrypt
(
&
StdText
,
&
PasswordHash1
,
schedule
,
DES_ENCRYPT
);
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
);
DES
_set_key_unchecked
(
&
key
,
schedule
);
DES
_ecb_encrypt
(
&
StdText
,
&
PasswordHash2
,
schedule
,
DES_ENCRYPT
);
if
(
des_failed
(
&
PasswordHash2
))
{
return
LUTIL_PASSWD_ERR
;
}
...
...
@@ -1160,12 +1160,12 @@ static int hash_lanman(
ldap_pvt_str2upper
(
UcasePassword
);
lmPasswd_to_key
(
UcasePassword
,
&
key
);
des
_set_key_unchecked
(
&
key
,
schedule
);
des
_ecb_encrypt
(
&
StdText
,
&
PasswordHash1
,
schedule
,
DES_ENCRYPT
);
DES
_set_key_unchecked
(
&
key
,
schedule
);
DES
_ecb_encrypt
(
&
StdText
,
&
PasswordHash1
,
schedule
,
DES_ENCRYPT
);
lmPasswd_to_key
(
&
UcasePassword
[
7
],
&
key
);
des
_set_key_unchecked
(
&
key
,
schedule
);
des
_ecb_encrypt
(
&
StdText
,
&
PasswordHash2
,
schedule
,
DES_ENCRYPT
);
DES
_set_key_unchecked
(
&
key
,
schedule
);
DES
_ecb_encrypt
(
&
StdText
,
&
PasswordHash2
,
schedule
,
DES_ENCRYPT
);
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
],
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment