summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* unittest cleanups, better coverage, etcEli Collins2012-04-305-599/+823
| | | | | | | | | | | | | | | * split ut2 backports into separate module to keep them distinct from customizations * added backport of skip() / skipIf(), simplified a bunch of code * "PASSLIB_TESTS" env var renamed to "PASSLIB_TEST_MODE", has one of three values (quick,default,full) * assertWarningList() can now be used as context manager * added TestCase.mktemp(), and some capability tests via TestCase.require_xxx() * HandlerCase - subclasses can now modify do_xxx() settings and context using unified interface. - defaults to lower number of rounds for all hashes, to speed up UTs - create_backend_case() is now classmethod that yields multiple backends - added test to ensure os_crypt hashes forbid NULL chars - EncodingHandlerMixin for common tests of 'encoding' keyword
* added some missing tests; fixed a bunch of bugsEli Collins2012-04-2817-71/+167
|
* forgot to list django 1.4 hashes in registry, some other notesEli Collins2012-04-273-3/+7
|
* mass rename of old alias for PasswordHash interfaceEli Collins2012-04-2721-47/+47
|
* assorted small details that weren't covered in the last few mergesEli Collins2012-04-277-14/+36
|
* updated front matter and other documentationEli Collins2012-04-2721-297/+438
|
* merged rewrite of CryptContext documentation - (near-) full tutorial and ↵Eli Collins2012-04-2710-911/+1384
| | | | reference
* merging rewrite of all hash documentation, and password hash apiEli Collins2012-04-2761-1492/+1701
| | | | | | | * password hash api rewritten to center around PasswordHash abstract class * extended walkthrough and documentation for PasswordHash interface * pared down the per-hash examples, added links to PasswordHash * updates docs and warnings
* near complete rewrite of django plugin, now making publicEli Collins2012-04-2715-808/+1518
| | | | | | | | | | | - monkeypatching now formalized w/ a patch manager, and should be *much* more resilient. - patch states reduced greatly, simplified code and tests - now handles django 1.4 correctly - patches hashers module as well (had to write some new wrappers) - added experimental methods GenericHandler.parsehash() to back our wrapper of Hasher.safe_summary() - XXX: doesn't currently import current HASHER state, - XXX: can't import hashers into passlib either -- though left initial notes on this
* added support for the new Django 1.4 hash formatsEli Collins2012-04-276-99/+393
| | | | | | - updated salt handling of the existing django hashes, in a way which should be backwards compatible w/ django 1.0 - UTs now test Django hasher output against passlib handlers (reverse was already being done) - refactor of fuzz testing to reuse some of the methods.
* finally added abstract base class for the password hash interface -- ↵Eli Collins2012-04-275-33/+208
| | | | | | passlib.ifc.PasswordHash (also had to make some tweaks to fix class repr due to ABCMeta)
* added undocumented apps.master_context to add in testing - context ↵Eli Collins2012-04-271-0/+44
| | | | containing ALL hashes, with the exception of ones with problematic identify() methods
* added experimental GenericHandler.bitsize() method, which estimates bitsize ↵Eli Collins2012-04-272-9/+78
| | | | of hash components
* made support for encoding context keyword uniformEli Collins2012-04-274-33/+42
| | | | | | - plaintext, ldap_plaintext, lmhash, htdigest all support it - also expose default_encoding attribute - moved HasEncodingContext from lmhash to handlers
* added deprecated="auto" support to CryptContextEli Collins2012-04-274-6/+67
|
* stripping out "passprep" feature - code was working, but the api isn't read ↵Eli Collins2012-04-275-164/+2
| | | | for release. will adjust issue 24.
* context change - shortened hash_needs_update() to needs_update()Eli Collins2012-04-277-50/+64
| | | | | | | - renamed internal update hooks as well - needs_update() now accepts an optional copy of the password. this is unused for now, but should pave the way for properly migrating crypt_blowfish $2x$ hashes in the next release.
* internal changed to contextEli Collins2012-04-271-29/+37
| | | | | | - handler() uses scheme=None instead of "default" for default scheme - factored out common _get_or_identify_record() from genhash, verify, etc - added schemes & category typecheck to _get_record(), takes care of primary interface methods
* cleaned up the registry code -- less redundant data, more type checksEli Collins2012-04-275-213/+222
|
* renamed 'errname' to 'param' for to_unicode, etc; to match some of the other ↵Eli Collins2012-04-278-42/+42
| | | | helper functions
* sped up pbkdf2 implementation by 60% or so - upped the rounds for all pbkdf2 ↵Eli Collins2012-04-195-65/+84
| | | | hashes
* add posargs supports to tox config, passes all args to noseEli Collins2012-04-171-6/+12
|
* setup warning filters early in TestCase to work around HandlerCase warning ↵Eli Collins2012-04-173-4/+7
| | | | issue w/ os_crypt proxying builtin bcrypt
* added missed package to setupEli Collins2012-04-171-1/+2
|
* updated tox config, moved GAE helper into tests module to silence tox warningEli Collins2012-04-174-31/+99
|
* changed bcrypt's os_crypt backend to try alternatives before bailing.Eli Collins2012-04-173-9/+10
|
* reworked fuzz verifier system, so that we can skip $2x$ hashes during bcrypt ↵Eli Collins2012-04-172-66/+93
| | | | crypt() testing
* disabling saslprep() support under Jython - it lacks the stringprep moduleEli Collins2012-04-178-63/+51
|
* a bunch of bugfixes found during unittestingEli Collins2012-04-179-20/+56
| | | | | | | | | | * bsdi_crypt apparently available on openbsd 4.9 * typo fixes * ConfigParser apparently only uses OrderedDict for >= PY27, adjusted CryptContext test accordingly * fixed test that depended on sha256_crypt.default_rounds * handle os_crypt backend w/ no fallback (bcrypt) * let _norm_rounds accept longs
* retuned default_rounds for a few hashes based on benchmarksEli Collins2012-04-174-12/+16
|
* added deprecation detector so CryptContext will upgrade bsdi_crypt hashes ↵Eli Collins2012-04-171-0/+13
| | | | with even rounds
* CryptPolicy deprecation, part 5 - updated docs, changelog, benchmark scriptEli Collins2012-04-177-193/+318
|
* CryptPolicy deprecation, part 4 - updated context testsEli Collins2012-04-175-762/+2176
| | | | | | * moved test_context to test_context_deprecated, to ensure pre-1.6 behavior is retained, at least until 1.8 * new test_context merges CryptPolicy tests into CryptContextTest
* CryptPolicy deprecated, part2 - updated rest of library to use CryptContext ↵Eli Collins2012-04-1711-38/+58
| | | | directly
* _CryptRecord cleaned up a little internally, default_rounds clipping logic ↵Eli Collins2012-04-171-138/+182
| | | | tweaked a little
* deprecated CryptPolicy, moved all of it's features into CryptContext (part 1)Eli Collins2012-04-171-682/+1508
| | | | | | | | | | * this should simplify the api for users, CryptPolicy encapsulated an implementation detail they didn't need to deal with. * config file parsing is a lot stricter, easier for apps to add custom hacks * CryptContext instances can now be reconfigured much easier. * loads should be faster. (breaking changes into multiple commits)
* bugfix: set des_crypt.checksum_size, so it will now reject hashes with ↵Eli Collins2012-04-173-9/+17
| | | | missing chars
* updated passlib.apache module's api - more flexible to use, changed some ↵Eli Collins2012-04-178-497/+1163
| | | | ambiguous method names
* issue warning if app requests even bsdi_crypt roundsEli Collins2012-04-135-11/+49
|
* work on des_crypt familyEli Collins2012-04-136-677/+867
| | | | | * cleaned up source of des_crypt variants and DES util functions * DES utils functions now have tighter input validation, full UT coverage
* assorted bugfixes, tweaks, and tests added; based on coverage examinationEli Collins2012-04-1218-179/+453
| | | | | | | * test os_crypt backend has functional fallback * test handler methods accept all unicode/bytes combinations for secret & hash * fixed some incorrect error messages & types being caught & raised * other minor cleanups
* scram hash: improved UTs to cover some edge cases, full-verify now throws ↵Eli Collins2012-04-122-7/+28
| | | | error for inconsistent hashes.
* ran full UTs, found and fixed a few bugs introduced in last few commits.Eli Collins2012-04-1115-34/+48
|
* rearranged some test casesEli Collins2012-04-112-45/+113
|
* clarify behavior for secret=None and hash=NoneEli Collins2012-04-1130-305/+298
| | | | | | | | | | | | | | | | | | | | | | | * passing a non-string secret or non-string hash to any CryptContext or handler method will now reliably result in a TypeError. previously, passing hash=None to many handler identify() and verify() methods would return False, while others would raise a TypeError. other handler methods would alternately throw ValueError or TypeError when passed a value that wasn't unicode or bytes. the various CryptContext methods also behaved inconsistently, depending on the behavior of the underlying handler. all of these behaviors are gone, they should all raise the same TypeError. * redid many of the from_string() methods to verify the hash type. * moved secret type & size validation to GenericHandler's encrypt/genhash/verify methods. this cheaply made the secret validation global to all hashes, and lets _calc_digest() implementations trust that the secret is valid. * updated the CryptContext and handler unittests to verify the above behavior is adhered to.
* replaced some common string ops with util funcs (repeat_string, ↵Eli Collins2012-04-108-30/+37
| | | | right_pad_string)
* tightened OS crypt backend testsEli Collins2012-04-107-36/+229
| | | | | | | | | * split os_crypt tests into separate mixin * tests now require os_crypt backends to detect some simple incorrect returns from crypt() - e.g. returning wrong ident prefix, wrong size, etc - added relevant asserts to all os_crypt backends * tests now check if platform crypt detection is functioning correctly via platform_crypt_support dict in tests.
* minor constant & comment tweaksEli Collins2012-04-104-12/+9
|
* md5_crypt / sha2-crypt cleanupEli Collins2012-04-104-512/+489
| | | | | * tried to clarify documentation & alg for builtin md5_crypt / sha2-crypt backends * replaced regex parser in sha2-crypt with index-based one - less redundant, and should be faster.
* parse_mc3/render_mc3 helpers now handle rounds str<->int, consolidated a ↵Eli Collins2012-04-104-91/+102
| | | | bunch of redundant code