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
dc0d001a
Commit
dc0d001a
authored
9 years ago
by
Ryan Tandy
Committed by
Quanah Gibson-Mount
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ITS#8198 use #elif instead of #else for gnutls cases
Reserve #else for actual fallback cases.
parent
3e5b0254
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
contrib/slapd-modules/passwd/pbkdf2/pw-pbkdf2.c
+6
-6
6 additions, 6 deletions
contrib/slapd-modules/passwd/pbkdf2/pw-pbkdf2.c
with
6 additions
and
6 deletions
contrib/slapd-modules/passwd/pbkdf2/pw-pbkdf2.c
+
6
−
6
View file @
dc0d001a
...
...
@@ -152,7 +152,7 @@ static int pbkdf2_encrypt(
int
rc
;
#ifdef HAVE_OPENSSL
const
EVP_MD
*
md
;
#el
se
#el
if HAVE_GNUTLS
struct
hmac_sha1_ctx
sha1_ctx
;
struct
hmac_sha256_ctx
sha256_ctx
;
struct
hmac_sha512_ctx
sha512_ctx
;
...
...
@@ -181,7 +181,7 @@ static int pbkdf2_encrypt(
}
else
{
return
LUTIL_PASSWD_ERR
;
}
#el
se
#el
if HAVE_GNUTLS
if
(
!
ber_bvcmp
(
scheme
,
&
pbkdf2_scheme
)){
dk
.
bv_len
=
PBKDF2_SHA1_DK_SIZE
;
current_ctx
=
&
sha1_ctx
;
...
...
@@ -221,7 +221,7 @@ static int pbkdf2_encrypt(
iteration
,
md
,
dk
.
bv_len
,
dk_value
)){
return
LUTIL_PASSWD_ERR
;
}
#el
se
#el
if HAVE_GNUTLS
PBKDF2
(
current_ctx
,
current_hmac_update
,
current_hmac_digest
,
dk
.
bv_len
,
iteration
,
salt
.
bv_len
,
(
const
uint8_t
*
)
salt
.
bv_val
,
...
...
@@ -275,7 +275,7 @@ static int pbkdf2_check(
size_t
dk_len
;
#ifdef HAVE_OPENSSL
const
EVP_MD
*
md
;
#el
se
#el
if HAVE_GNUTLS
struct
hmac_sha1_ctx
sha1_ctx
;
struct
hmac_sha256_ctx
sha256_ctx
;
struct
hmac_sha512_ctx
sha512_ctx
;
...
...
@@ -306,7 +306,7 @@ static int pbkdf2_check(
}
else
{
return
LUTIL_PASSWD_ERR
;
}
#el
se
#el
if HAVE_GNUTLS
if
(
!
ber_bvcmp
(
scheme
,
&
pbkdf2_scheme
)){
dk_len
=
PBKDF2_SHA1_DK_SIZE
;
current_ctx
=
&
sha1_ctx
;
...
...
@@ -390,7 +390,7 @@ static int pbkdf2_check(
iteration
,
md
,
dk_len
,
input_dk_value
)){
return
LUTIL_PASSWD_ERR
;
}
#el
se
#el
if HAVE_GNUTLS
PBKDF2
(
current_ctx
,
current_hmac_update
,
current_hmac_digest
,
dk_len
,
iteration
,
PBKDF2_SALT_SIZE
,
salt_value
,
...
...
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