summaryrefslogtreecommitdiffstats
path: root/support/htpasswd.c
diff options
context:
space:
mode:
authorJoe Orton <jorton@apache.org>2019-06-21 18:20:29 +0200
committerJoe Orton <jorton@apache.org>2019-06-21 18:20:29 +0200
commit57748d60a5e58598b8f66feaa7760ebed9a02dbf (patch)
tree712d8a3456a19cdd4b0f20bf62f65912e83517a4 /support/htpasswd.c
parent* configure.in, acinclude.m4: Inline APACHE_GEN_MAKEFILES in AC_CONFIG_COMMANDS (diff)
downloadapache2-57748d60a5e58598b8f66feaa7760ebed9a02dbf.tar.xz
apache2-57748d60a5e58598b8f66feaa7760ebed9a02dbf.zip
Add support for SHA-2 crypt() algorithm in htpasswd.
* configure.in: Detect SHA-2 support in crypt(). * support/passwd_common.h: Define ALG_CRYPT_SHA256, ALG_CRYPT_SHA512, include ap_config_auto.h. * support/htpasswd.c (check_args): Allow -2, -5, -r arguments for SHA-256, SHA-256 and rounds options respectively. * support/passwd_common.c (parse_common_options): Parse -2, -5, -r args. (mkhash): Generate crypt hash for SHA256/SHA512 algorithms. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1861793 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'support/htpasswd.c')
-rw-r--r--support/htpasswd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/support/htpasswd.c b/support/htpasswd.c
index 73b291d72c..f399a9b423 100644
--- a/support/htpasswd.c
+++ b/support/htpasswd.c
@@ -178,7 +178,7 @@ static void check_args(int argc, const char *const argv[],
if (rv != APR_SUCCESS)
exit(ERR_SYNTAX);
- while ((rv = apr_getopt(state, "cnmspdBbDiC:v", &opt, &opt_arg)) == APR_SUCCESS) {
+ while ((rv = apr_getopt(state, "cnmspdBbDi25C:r:v", &opt, &opt_arg)) == APR_SUCCESS) {
switch (opt) {
case 'c':
*mask |= APHTP_NEWFILE;