summaryrefslogtreecommitdiff
path: root/secure/lib/libcrypt/crypt-des.c
Commit message (Collapse)AuthorAgeFilesLines
* Make libcrypt thread-safe. Add crypt_r(3).Ed Schouten2016-08-101-36/+23
| | | | | | | | | | | | | | | | | | | | | | glibc has a pretty nice function called crypt_r(3), which is nothing more than crypt(3), but thread-safe. It accomplishes this by introducing a 'struct crypt_data' structure that contains a buffer that is large enough to hold the resulting string. Let's go ahead and also add this function. It would be a shame if a useful function like this wouldn't be usable in multithreaded apps. Refactor crypt.c and all of the backends to no longer declare static arrays, but write their output in a provided buffer. There is no need to do any buffer length computation here, as we'll just need to ensure that 'struct crypt_data' is large enough, which it is. _PASSWORD_LEN is defined to 128 bytes, but in this case I'm picking 256, as this is going to be part of the actual ABI. Differential Revision: https://reviews.freebsd.org/D7306 Notes: svn path=/head/; revision=303920
* Update the previous openssl fix. [12:01]Bjoern A. Zeeb2012-05-301-1/+1
| | | | | | | | | | | Fix a bug in crypt(3) ignoring characters of a passphrase. [12:02] Security: FreeBSD-SA-12:01.openssl (revised) Security: FreeBSD-SA-12:02.crypt Approved by: so (bz, simon) Notes: svn path=/head/; revision=236304
* No functional change, but big code cleanup. WARNS, lint(1) and style(9).Mark Murray2002-03-061-34/+40
| | | | Notes: svn path=/head/; revision=91754
* o Move NTOHL() and associated macros into <sys/param.h>. These areMike Barcroft2002-02-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | deprecated in favor of the POSIX-defined lowercase variants. o Change all occurrences of NTOHL() and associated marcros in the source tree to use the lowercase function variants. o Add missing license bits to sparc64's <machine/endian.h>. Approved by: jake o Clean up <machine/endian.h> files. o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>. o Remove prototypes for non-existent bswapXX() functions. o Include <machine/endian.h> in <arpa/inet.h> to define the POSIX-required ntohl() family of functions. o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>, and <sys/param.h>. o Prepend underscores to the ntohl() family to help deal with complexities associated with having MD (asm and inline) versions, and having to prevent exposure of these functions in other headers that happen to make use of endian-specific defines. o Create weak aliases to the canonical function name to help deal with third-party software forgetting to include an appropriate header. o Remove some now unneeded pollution from <sys/types.h>. o Add missing <arpa/inet.h> includes in userland. Tested on: alpha, i386 Reviewed by: bde, jake, tmm Notes: svn path=/head/; revision=90868
* __FBSDID() (second half of src/lib/libcrypt changes)Peter Wemm2001-10-231-2/+4
| | | | Notes: svn path=/head/; revision=85358
* Make this completely dependant on the exportable libcrypt, to avoidMark Murray1999-09-201-45/+43
| | | | | | | | duplication of effort. Also a large cleanup of the code, inspired by Brandon Gillespie. Notes: svn path=/head/; revision=51461
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50479
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=22990
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* Dual personality crypt(3). This crypt will choose its encryption algorithmMark Murray1995-12-161-10/+10
| | | | | | | | (DES or MD5) based on the type of salt used. Salt beginning with "$1$" indicates MD5. Notes: svn path=/head/; revision=12884
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-3/+3
| | | | Notes: svn path=/head/; revision=8871
* More elegant fix for short settings.Geoff Rehmet1994-09-191-11/+19
| | | | | | | | (Our existing fixes already plugged the security holes involved.) Submitted by: Geoff Rehmet after consultation with David Burren Notes: svn path=/head/; revision=2900
* Back out static hacks & build of usr.bin until Geoff informs thePaul Traina1994-09-071-3/+3
| | | | | | | | | world of his master plan. Submitted by: pst Notes: svn path=/head/; revision=2539
* Remove static in front of declarations for des_setkey and des_cipherPaul Traina1994-09-071-3/+3
| | | | | | | | | | | | | | so that linking against -lcrypt (-ldescrypt) will give us the good versions instead of the stubs in libc. (These changes need to be made to the non-US version of libdescrypt too!) Allow building and support for bdes program. A bit more work still needs to be done on secure telnet. Submitted by: pst Notes: svn path=/head/; revision=2536
* Modify libcrypt so that the only exported symbol is _crypt().Geoff Rehmet1994-08-081-53/+12
| | | | | | | Submitted by: Geoff Rehmet Notes: svn path=/head/; revision=1959
* Unecumbered securedist from FreeBSD 1.1.5.1 - sources for libcrypt.Geoff Rehmet1994-08-081-0/+730
The next commit will remove all symbols except _crypt() Reviewed by: Geoff Rehmet Submitted by: David Burren Notes: svn path=/cvs2svn/branches/Burren/; revision=1956