18 Commits

Author SHA1 Message Date
Bernhard Reutner-Fischer
78b154a95b libcrypt: return NULL on unsupported salt
BZ #7808 asks us not to fallback to DES if the optional SHA are disabled
but requested by the user.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-01-19 17:29:21 +01:00
Peter S. Mazinger
1533e2876b remove __FORCE_GLIBC
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15 14:00:21 +02:00
Bernhard Reutner-Fischer
de5964178b libcrypt: shrink crypt() again - unmodularise
modularisation added too much bloat for no benefit, undo.

$ ../busybox/scripts/bloat-o-meter .lib.05/libcrypt-0.9.33-rc1-git.so lib/libcrypt-0.9.33-rc1-git.so
function                                             old     new   delta
crypt                                                130      46     -84
.rodata                                             2704       -   -2704
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-2788)         Total: -2788 bytes

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-01-18 08:41:18 +01:00
William Pitcock
3ac5fd7eca libcrypt: add support for SHA256-CRYPT password hashing
This is based on Ulrich Drepper's implementation in GLIBC, but hacked up to work
in uClibc.  The differences from the GLIBC version are as follows:

- b64_from_24bit() has been converted into a macro
- Usage of GLIBC-isms (such as libc_freeres_ptr) have been removed

It is enabled by the UCLIBC_HAS_SHA256_CRYPT_IMPL configuration symbol.  You must
have UCLIBC_HAS_CRYPT_IMPL enabled as well.

Signed-off-by: William Pitcock <nenolod@dereferenced.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-12-22 14:07:08 +01:00
William Pitcock
4c24dabb9c libcrypt: add support for SHA512-CRYPT password hashing
This is based on Ulrich Drepper's implementation in GLIBC, but hacked up to work
in uClibc.  The differences from the GLIBC version are as follows:

- b64_from_24bit() has been converted into a macro
- Usage of GLIBC-isms (such as libc_freeres_ptr) have been removed

It is enabled by the UCLIBC_HAS_SHA512_CRYPT_IMPL configuration symbol.  You must
have UCLIBC_HAS_CRYPT_IMPL enabled as well.

Signed-off-by: William Pitcock <nenolod@dereferenced.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-12-22 13:59:24 +01:00
William Pitcock
40c426ae8f libcrypt: make crypt() itself more modular
By using a function table, we can more cleanly support new crypt
implementations, such as SHA256 ($5$) and SHA512 ($6$).

Signed-off-by: William Pitcock <nenolod@dereferenced.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-12-22 11:28:05 +01:00
Mike Frysinger
4a2b0641a3 libcrypt: do not cast away const of key/salt
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-11-20 02:35:00 -05:00
Mike Frysinger
8d9ff89b64 fix by Bernhard Fischer to move local prototypes to a header to keep things sane 2006-08-24 02:43:08 +00:00
Eric Andersen
f79ff0842e fixup my copyright notice, trim stale remnants of older notices which
I had clearly run search/replace on that were cluttering things up.
2006-07-05 18:38:37 +00:00
Peter S. Mazinger
3f87a95da8 Update license 2006-01-16 21:54:26 +00:00
Peter S. Mazinger
62f6efafe2 Hidden __md5_crypt/__des_crypt, missed to adapt prototype 2005-12-13 10:07:09 +00:00
Mike Frysinger
0d0b54076d import license updates from glibc 2005-11-23 13:18:44 +00:00
Eric Andersen
cf0a78c882 Cleanup crypt and remove the crypt_r stuff, since SuSv3
(IEEE Std 1003.1-2001) states that crypt need not be reentrant.
 -Erik
2002-08-07 15:11:51 +00:00
Eric Andersen
3e87ecb2f6 Rework libcrypt based on the openbsd crypt implementation so that it passes the
DES validation suite.  setkey_r, encrypt_r, and __des_crypt_r are not really
reentrant now, and that should be fixed (or we should drop crypt_r and friends
which are not supported by SuSv3).
 -Erik
2002-04-25 01:39:08 +00:00
Eric Andersen
25c3f872df Don't try to return stuff from void funcs 2002-02-26 10:43:39 +00:00
Eric Andersen
41cb95ae3f Adjust function naming and make sure everything is properly
static to avoid symbol leakage.
 -Erik
2002-02-26 02:28:55 +00:00
Eric Andersen
5a65349824 Update my email address. I am no longer andersen@lineo.com 2001-12-19 15:53:08 +00:00
Eric Andersen
08012e2446 Add in a libcrypt implementation. About 8k.
-Erik
2001-04-19 20:53:49 +00:00