Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
ae77343d
Commit
ae77343d
authored
Apr 09, 2021
by
Ondřej Kuzník
Browse files
ITS#9520 Refuse parallelism if not compiled with libargon2
parent
8b353df0
Pipeline
#2528
passed with stage
in 46 minutes and 17 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
doc/man/man5/slappw-argon2.5
View file @
ae77343d
...
...
@@ -39,7 +39,8 @@ kiB.
.BI p= <parallelism>
Set parallelism to
.I <parallelism>
threads.
threads. Currently supported only when linked with
.BR libargon2 .
.TP
.BI t= <iterations>
Set the number of iterations to
...
...
servers/slapd/pwmods/argon2.c
View file @
ae77343d
...
...
@@ -20,6 +20,8 @@
#include "lber_pvt.h"
#include "lutil.h"
#include "slap.h"
#include <stdint.h>
#include <stdlib.h>
...
...
@@ -216,6 +218,22 @@ int init_module( int argc, char *argv[] )
}
}
#ifndef HAVE_LIBARGON2
/* At the moment, we can only use libargon2 to set parallelism for new
* hashes */
if
(
parallelism
!=
SLAPD_ARGON2_PARALLELISM
)
{
Debug
(
LDAP_DEBUG_ANY
,
"pw-argon2: "
"non-default parallelism only supported when linked with "
"libargon2, got p=%lu
\n
"
,
parallelism
);
if
(
(
slapMode
&
SLAP_MODE
)
!=
SLAP_TOOL_MODE
||
slapTool
==
SLAPPASSWD
||
slapTool
==
SLAPTEST
)
{
return
1
;
}
}
#endif
return
lutil_passwd_add
(
(
struct
berval
*
)
&
slapd_argon2_scheme
,
slapd_argon2_verify
,
slapd_argon2_hash
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment