14 Commits

Author SHA1 Message Date
23bd58fdc3 * support/passwd_common.c (mkhash): Fix salt buffer size for SHA2
(caught by gcc 10).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877251 13f79535-47bb-0310-9956-ffa450edef68
2020-05-01 08:17:32 +00:00
57748d60a5 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
2019-06-21 16:20:29 +00:00
6b7f4310e7 htpasswd: report the right limit when get_password() overflows.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1781516 13f79535-47bb-0310-9956-ffa450edef68
2017-02-03 09:11:03 +00:00
0a16ce1aa5 Silence a sparse warning about inconsistent indenting
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1700322 13f79535-47bb-0310-9956-ffa450edef68
2015-08-31 19:56:47 +00:00
e169772873 Make MSVC compilers happy.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1494317 13f79535-47bb-0310-9956-ffa450edef68
2013-06-18 21:30:53 +00:00
099561a7e1 Fix commit 1465115.
truncpw was allocated from a pool and not via malloc

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1490507 13f79535-47bb-0310-9956-ffa450edef68
2013-06-07 04:41:45 +00:00
728bc90cc0 Fixed include for Windows.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1481677 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 00:36:41 +00:00
b02101b083 htpasswd: Add -v option to verify a password
htpasswd and htdbm could use some more refactoring...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1465116 13f79535-47bb-0310-9956-ffa450edef68
2013-04-05 20:20:33 +00:00
e84335b00d fix htpasswd/htdbm brown paper bag bugs
- use the correct string to generate the hash from. PR 54735
- print error message instead of empty string

while there, replace strdup + check for oom with apr_pstrdup


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1465115 13f79535-47bb-0310-9956-ffa450edef68
2013-04-05 20:15:15 +00:00
93d536555a htdbm, htpasswd: print error message if out of memory
PR: 54345


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1425775 13f79535-47bb-0310-9956-ffa450edef68
2012-12-25 21:16:17 +00:00
1de0d804da Removed __func__ usage which is c99.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1395792 13f79535-47bb-0310-9956-ffa450edef68
2012-10-08 22:16:43 +00:00
566312f891 Optionally read passwords from stdin
PR: 40243
Submitted by: Adomas Paltanavicius <adomas paltanavicius gmail com>, sf


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1395256 13f79535-47bb-0310-9956-ffa450edef68
2012-10-07 09:10:14 +00:00
c2eb43db55 add support for bcrypt
PR: 49288


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1395255 13f79535-47bb-0310-9956-ffa450edef68
2012-10-07 09:06:10 +00:00
7d8882b4b4 Start refactoring of htpasswd and htdbm
- Move many common code parts into separate source file. This adds some
  of htpasswd's recent improvements to htdbm.
- Rework salt generation to use the full 48bit of entropy for MD5
  Previously, it would only generate 2^32 different salts on a given
  platform.
- Use apr_getopt().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1395253 13f79535-47bb-0310-9956-ffa450edef68
2012-10-07 09:02:19 +00:00