summaryrefslogtreecommitdiffstats
path: root/lib/libcrypt
Commit message (Collapse)AuthorAgeFilesLines
* Replace sys/crypto/sha2/sha2.c with lib/libmd/sha512c.callanjude2015-12-271-0/+1
| | | | | | | | | | | | | | | | | | cperciva's libmd implementation is 5-30% faster The same was done for SHA256 previously in r263218 cperciva's implementation was lacking SHA-384 which I implemented, validated against OpenSSL and the NIST documentation Extend sbin/md5 to create sha384(1) Chase dependancies on sys/crypto/sha2/sha2.{c,h} and replace them with sha512{c.c,.h} Reviewed by: cperciva, des, delphij Approved by: secteam, bapt (mentor) MFC after: 2 weeks Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D3929
* Enable libcrypt tests.rodrigc2015-12-011-7/+7
| | | | | | kyua 0.12 has fix for https://github.com/jmmv/kyua/pull/148 which eliminates invalid XML characters from being written to test reports with "kyua report-junit".
* META MODE: Avoid dirdep dependency on lib/libmd.bdrewery2015-11-251-1/+2
| | | | | | | | | | This avoids using the staged headers for sys/crypto/sha2/*.h, such as sha256.h, which added an unneeded pre-build dependency on libmd to libcrypt. This header is an INCS in lib/libmd, but found via .PATH in sys/crypto/sha2. Since the libcrypt build was already using the in-src libmd headers directly, just teach it how to find the sha256.h header as well. Sponsored by: EMC / Isilon Storage Division
* META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host.bdrewery2015-11-251-1/+0
| | | | | | | | This both avoids some dependencies on xinstall.host and allows bootstrapping on older releases to work due to lack of at least 'install -l' support. Sponsored by: EMC / Isilon Storage Division
* Temporarily comment out the libcrypt tests.rodrigc2015-11-181-7/+7
| | | | | | | | | | They are emitting characters which are triggering a kyua bug which causes kyua to emit invalid XML. This invalid XML is causing false failures in Jenkins. On a separate note, kyua needs to be fixed with this: https://github.com/jmmv/kyua/pull/148 or something similar.
* Integrate contrib/netbsd-tests/lib/libcrypt/t_crypt.c in to the FreeBSDngie2015-11-161-2/+4
| | | | | | | test suite as lib/libcrypt/crypt_test MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) andngie2015-10-121-2/+0
| | | | | | | | | | | | netbsd-tests.test.mk (r289151) - Eliminate explicit OBJTOP/SRCTOP setting - Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk - Remove unnecessary TESTSDIR setting - Use SRCTOP where possible for clarity MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Divison
* META_MODE: Remove DEP_RELDIR from Makefile.depend files.bdrewery2015-09-251-2/+0
| | | | | | This has not been needed since r284171 in projects/bmake. Sponsored by: EMC / Isilon Storage Division
* new dependssjg2015-06-161-0/+1
|
* Revert r284417 it is not necessary anymorebapt2015-06-151-1/+1
|
* Enforce overwritting SHLIBDIRbapt2015-06-151-1/+1
| | | | | | | | | Since METAMODE has been added, sys.mk loads bsd.mkopt.mk which ends load loading bsd.own.mk which then defines SHLIBDIR before all the Makefile.inc everywhere. This makes /lib being populated again. Reported by: many
* Add META_MODE support.sjg2015-06-132-0/+41
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Fix include of atf-c.hsjg2015-05-302-1/+3
| |
| * Merge sync of headsjg2015-05-271-2/+1
| |\ | |/ |/|
| * Merge from head@274682sjg2014-11-192-8/+12
| |\
| * \ Merge head from 7/28sjg2014-08-192-2/+6
| |\ \
| * | | Updated dependenciessjg2014-05-161-1/+1
| | | |
| * | | Updated dependenciessjg2014-05-101-0/+2
| | | |
| * | | Merge from headsjg2014-05-081-1/+1
| |\ \ \
| * \ \ \ Merge headsjg2014-04-285-112/+102
| |\ \ \ \
| * | | | | Fix building of crypt_testssjg2013-06-252-2/+20
| | | | | |
| * | | | | Updated dependenciessjg2013-03-111-0/+1
| | | | | |
| * | | | | Updated dependenciessjg2013-02-161-2/+0
| | | | | |
| * | | | | Sync with HEAD.obrien2013-02-082-0/+64
| |\ \ \ \ \
| | \ \ \ \ \
| | \ \ \ \ \
| *-. \ \ \ \ \ Sync from headsjg2012-11-044-21/+12
| |\ \ \ \ \ \ \
| * | | | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | | | | | | Convert libraries to use LIBADDbapt2014-11-251-2/+1
| |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | While here reduce a bit overlinking
* | | | | | | | Change the hardcoded default back from SHA512 to DES.des2014-10-091-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR: 192277 MFC after: 3 days
* | | | | | | | Add LIBCRYPT to DPADD, remove LDFLAGS from LDADD, and sort the Makefile ↵ngie2014-08-181-1/+2
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | variables This fixes "make checkdpadd" Phabric: D620 Approved by: jmmv (mentor) PR: 192729 MFC after: 5 days
* | | | | | | use .Mt to mark up email addresses consistently (part3)bapt2014-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco at lastsummer.de>
* | | | | | | Don't break the legacy applications which setume2014-05-281-1/+5
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | just 2 bytes to salt. MFC after: 1 week
* | | | | | Use src.opts.mk in preference to bsd.own.mk except where we need stuffimp2014-05-061-1/+1
| |_|_|_|/ |/| | | | | | | | | | | | | | from the latter.
* | | | | r261913 broke DES passwords, because the only way they could work,des2014-04-261-77/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | since they don't have an easily recognizable signature, was if they were the default. This commit rewrites crypt_set_format(3) etc to address this: - Use a pointer instead of an index to identify the default format. This pointer is initialized at compile time to point to the first first element in the list of supported formats, eliminating the need for crypt_setdefault(). Using a pointer also simplifies iterating through the list. - Associate DES with the magic string "_", which takes care of the Extended DES format. - Finally, as a special case, if the salt does not match any known magic string but matches ^[./0-9A-Za-z]{13}$, it is assumed to be a DES password and is passed on to crypt_des(). MFC after: 1 week
* | | | | replace the kernel's version w/ cperciva's implementation... In alljmg2014-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | my tests, it is faster ~20%, even on an old IXP425 533MHz it is ~45% faster... This is partly due to loop unrolling, so the code size does significantly increase... I do plan on committing a version that rolls up the loops again for smaller code size for embedded systems where size is more important than absolute performance (it'll save ~6k code)... The kernel implementation is now shared w/ userland's libcrypt and libmd... We drop support for sha256 from sha2.c, so now sha2.c only contains sha384 and sha512... Reviewed by: secteam@
* | | | | Make bsd.test.mk the only public mk fragment for the building of tests.jmmv2014-03-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change {atf,plain,tap}.test.mk to be internal implementation details of bsd.test.mk. Makefiles that build tests should now only include bsd.test.mk and declaratively specify what they want to build, without worrying about the internal implementation of the mk files. The reason for this change is to permit building test programs of different interfaces from a single directory, which is something I had a need for while porting tests over from src/tools/regression/. Additionally, this change makes it possible to perform some other requested changes to bsd.test.mk in an easier manner. Coming soon.
* | | | | various formating fixes, use NUL for NUL bytes..jmg2014-03-091-29/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drop out dated perf numbers (can't imagine people are still running Pentium MMX 166's anymore)... bump date... drop max length of salt of 8 since _PASSWORD_LEN is now large, 128.. and state the max length of the salt depends upon the module, sha-{256,512} have a max salt of 16.. recommend 8 characters of salt instead of just 2... MFC after: 1 week
* | | | | Switch the hardcoded default hash function from MD5 / DES to SHA512.des2014-02-151-5/+1
| | | | |
* | | | | Set up the /usr/tests hierarchy.rpaulo2013-10-252-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Populate /usr/tests with the only test programs that currently live in the tree (those in lib/libcrypt/tests/) and add all the build machinery to accompany this change. In particular: - Add a WITHOUT_TESTS variable that users can define to request that no tests be put in /usr/tests. - Add a top-level Kyuafile for /usr/tests and a way to create similar Kyuafiles in top-level subdirectories. - Add a BSD.tests.dist file to define the directory layout of /usr/tests. Submitted by: Julio Merino jmmv google.com Reviewed by: sjg MFC after: 2 weeks
* | | | | Clearly split the logic to build ATF and plain tests apart.rpaulo2013-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces a new plain.test.mk file that provides the build infrastructure to build test programs that don't use any framework. Most of the code previously in bsd.test.mk moves to plain.test.mk and atf.test.mk is extended with the missing pieces. In doing so, this change pushes all test program building logic to the various *.test.mk files instead of trying to reuse some tiny bits. In fact, this attempt to reuse some definitions makes the code harder to read and harder to extend. The clear benefit of this is that the interface of bsd.test.mk is now clearly delimited. Submitted by: Julio Merino jmmv google.com MFC after: 2 weeks
* | | | | Remove most of the ATF tools and the _atf user.rpaulo2013-10-121-1/+1
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | This is necessary because ATF is deprecated and it will be replaced by Kyua. Submitted by: jmmv@netbsd.org Reviewed by: Garrett Cooper Approved by: re
* | | | Simple unit-tests for libcrypt, to show how easy it is.sjg2012-11-072-0/+64
| |/ / |/| | | | | | | | Approved by: marcel (mentor)
* | | Stop using auth_getval() now that it always returns NULL. Instead,des2012-06-123-20/+8
| |/ |/| | | | | | | | | | | hardcode the default to what it would be if we didn't hardcode it, i.e. DES if supported and MD5 otherwise. MFC after: 3 weeks
* | mdoc: minor Bl improvements.joel2012-06-021-1/+1
|/
* Make the item numbers match the crypt magic numbereadler2012-04-111-0/+2
| | | | | | | PR: docs/166497 Submitted by: Mike Kelly <pioto@pioto.org> Approved by: cperciva MFC after: 1 week
* Remove superfluous paragraph macro.joel2012-03-251-4/+0
|
* s/shaN_crypt/crypt_shaN/g to be a more consistent with the existing naming.obrien2011-05-054-14/+14
| | | | Reviewed by: markm
* Protect the reachover built symbols after the SHA256/512 crypt(3) addition.obrien2011-04-271-1/+3
|
* Document SHA256/512 modes.markm2011-04-091-2/+8
| | | | MFC after: 1 month
* Add SHA256/512 ($5$ and $6$) to crypt(3). Used in linux-world, doesn'tmarkm2011-04-096-1/+1009
| | | | | | | | hurt us. PR: misc/124164 Submitted by: KIMURA Yasuhiro < yasu utahime org > MFC after: 1 month
OpenPOWER on IntegriCloud