summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* did rewrite of unix_fallback as unix_disabled; unix_fallback is now deprecatedEli Collins2012-03-1010-72/+173
|
* added Window's DCC hashes (aka mscache / mscash) version 1 & 2Eli Collins2012-03-107-6/+405
|
* renamed nthash -> bsd_nthash; added real nthash implementedEli Collins2012-03-109-86/+184
| | | | | | | after some thought, realized the 'nthash' name should implement the raw hash. since bsd_nthash was very rarely used, it shouldn't present backwards incompatibility issues at this point to go ahead and rename it.
* added support for lmhashEli Collins2012-03-107-5/+310
|
* added support for Cisco PIX & Type 7 hashesEli Collins2012-03-1010-20/+697
| | | | | | | | * Cisco Type 5 appears to be same as md5_crypt * added requires_user=False support to HandlerCase * added more through salt-generation test (since cisco_pix has only 4 bits of salt) * added HandlerCase test to ensure user is used as salt
* added mssql 2000/2005 hashes; enhanced HandlerCase's password case sensitive ↵Eli Collins2012-03-108-3/+622
| | | | test
* more test vectors!Eli Collins2012-03-091-144/+481
| | | | | | * incorporated test vectors from various sources (esp JTR) for various hashes * tried to document sources for existing vectors * added at least one unicode/8bit test vector for every hash
* renamed test_handlers classes to match alg name + "_test" (tired of having ↵Eli Collins2012-03-093-188/+142
| | | | to guess capitalization)
* utils.handlers framework reworked; removed a bunch of boilerplate codeEli Collins2012-03-0920-643/+627
| | | | | | | | | | | | | | | | | | | | | | | | | | | * StaticHandler is now subclass of GenericHandler - _calc_checksum() should be implemented instead of encrypt(). (compatibility stub added so old code should continue to work) - _norm_hash() no longer needs to handle ->unicode conversion - default from_string() contains a bunch of features, including stripping a known prefix, etc. * context kwds now pulled into constructor, so GenericHandler supports context kwds properly; HasUserContext mixin added to support common 'user' context kwd * identify_regexp & identify_prefix removed, functionality rolled into default GenericHandler.identify() implementation. - default identify checks _hash_regex as potential way to identify hashes * HasStubChecksum removed, functionality rolled into GenericHandler * HasRawChecksum now just sets a flag, functionality moved into GenericHandler * HasManyIdents._parse_ident() helper added to valid & split identifier from hashes. * GenericHandler._norm_checksum() is now strict about unicode / bytes
* base HandlerCase class reworkedEli Collins2012-03-097-666/+1133
| | | | | | | | | | | | * reworked warning-matching code into assertWarningList() method * reorganized HandlerCase hash tests based on cross-cutting topic, not per-function; this combined many tests together to eliminate redundant setup * added test of reported rounds limits * added better fuzz testing - tests random passwords & options using encrypt(), and verifies against any all available backends * added flags to properly support 'disabled' handlers, and other border cases. * added tests for password & user case-sensitivity * restores warning filters after every test
* tweak to setup scriptEli Collins2012-02-091-8/+8
|
* consolidated some unit testsEli Collins2012-02-094-161/+126
|
* MergeEli Collins2012-02-0842-602/+737
|\
| * renamed calc_checksum() -> _calc_checksum(), hiding the last of the private ↵Eli Collins2012-02-0816-47/+48
| | | | | | | | methods of most handlers
| * renamed passlib.exc warning classesEli Collins2012-02-0811-38/+38
| |
| * documentation updates for last two commitsEli Collins2012-02-0820-161/+185
| |
| * minor tweaks & fixesEli Collins2012-02-085-12/+14
| |
| * large refactor of GenericHandler internalsEli Collins2012-02-0820-359/+467
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | strict keyword -------------- * GenericHandler's "strict" keyword had poorly defined semantics; replaced this with "use_defaults" and "relaxed" keywords. Most handlers' from_string() method specified strict=True. This is now the default behavior, use_defaults=True is enabled only for encrypt() and genconfig(). relaxed=True is enabled only for specific handlers (and unittests) whose code requires it. This *does* break backward compat with passlib 1.5 handlers, but this is mostly and internal class. * missing required settings now throws a TypeError instead of a ValueError, to be more in line with std python behavior. * The norm_xxx functions provided by the GenericHandler mixins (e.g. norm_salt) have been renamed to _norm_xxx() to reflect their private nature; and converted from class methods to instance methods, to simplify their call signature for subclassing. misc ---- * rewrote GenericHandler unittests to use constructor only, instead of poking into norm_salt/norm_rounds internals. * checksum/salt charset checks speed up using set comparison * some small cleanups to FHSP implementation
* | fix to lazy handler loadingEli Collins2012-01-191-4/+4
| |
* | deprecating min_verify_time option; doesn't meaningfully increase security, ↵Eli Collins2012-01-195-30/+57
|/ | | | and adds code complexity
* minor updatesEli Collins2012-01-192-1/+5
|
* assertEquals() -> assertEqual()Eli Collins2012-01-193-42/+42
|
* simplified crypt.crypt() wrappersEli Collins2012-01-1914-203/+220
| | | | | | | * safe_crypt() improved - accepts unicode/bytes for salt, checks for NULL, returns None on failure * added test_crypt() wrapper to simplify backend checks. * removed native=True from most to_string() implementations, unused now. * updated UTs
* split exceptions/warnings to separate module; added some additional warning ↵Eli Collins2012-01-1819-72/+152
| | | | classes to make filtering easier
* documentation updates for latest round of changesEli Collins2012-01-188-85/+114
|
* misc bugfixes from round of changesEli Collins2012-01-1816-91/+174
| | | | | | | | | * added str_to_[ub]ascii to wrap hexdigest() calls * fixed some h64big calls I missed * some py3 fixes * removed utils.compat.aliases, using overlay to replace real compat module instead (to agree w/ imports already in code)
* StaticHandler._norm_hash() should return native str typeEli Collins2012-01-186-38/+23
|
* import cleanupsEli Collins2012-01-1836-280/+292
| | | | | | | | | | | | | | | * moved bytes compat functions from utils to utils.compat (bord, bjoin, bjoin_ints, bjoin_elems, ujoin) * renamed bord -> belem_ord for clarify * a bunch of to_native_str() always use ascii, and have fixed input types (always bytes or always unicode). these don't need overhead of to_native_str(), so replaced those calls with two new funcs: compat.bascii_to_str() / compat.uascii_to_str() * cleaned up a lot of imports from utils/utils.compat to pull from correct module * simplified the to_string() logic of a bunch of handlers to reduce unicode<->byte transitions
* changed test_utils to import subjects within test functions, instead of globallyEli Collins2012-01-183-25/+36
|
* cleanups to utilsEli Collins2012-01-186-97/+82
|
* reordered contents of utilsEli Collins2012-01-181-271/+264
|
* scram norm_digest_name() now normalizes 'sha-2-256' -> 'sha-256'Eli Collins2012-01-182-6/+8
|
* deprecated unused int<->bytes utilsEli Collins2012-01-184-44/+16
|
* cleaned up utils a littleEli Collins2012-01-182-64/+61
|
* renamed the utils.handlers.XX_CHARS constants to match utils.XX_CHARS (old ↵Eli Collins2012-01-1816-51/+51
| | | | aliases kept for now)
* replaced utils.h64 module with utils.Base64Engine instanceEli Collins2012-01-1820-545/+942
| | | | | | | | | | | * new utils.Base64Engine() provides flexible class for encoding arbitrary base64 charmaps. it should also be a bit faster than the old h64 module. * predefined 'h64' instance has mostly the same methods as the old h64 module which it takes the place off - so imports should be unaffected. (the only the exception of the xxx_dc_xxx methods, which now use the 'h64big' instance) * replaced utils._blowfish base64 encoding with custom Base64Engine instance to reduce code duplication. * more through unittests for Base64Engine.
* added some function deprecation helpersEli Collins2012-01-181-6/+83
|
* Merge scram-dev: adds hash for storing SCRAM protocol digestsEli Collins2012-01-1013-22/+1102
|\
| * scram hash finished, closing branchscram-devEli Collins2012-01-100-0/+0
| |
| * finished up UTs for scram hashEli Collins2012-01-102-8/+34
| |
| * added example hashes to scram documentation, other doc tweaksEli Collins2012-01-104-54/+73
| |
| * documented some dev code used to test against SCRAM examplesEli Collins2012-01-091-147/+154
| |
| * lots of work on scram hashEli Collins2012-01-0911-123/+861
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | handler ------- * added 'scram' to default registry list * handler 'algs' keyword now parsed & validated correctly * digest names normalized -> IANA spec * saslprep() integrated into code * added config string format related ------- * added documentation (still needs cleaning up though) * added majority of UTs, still need to add a few edge cases other ----- * redid context->handler deprecation link - code now looks for handler._deprecated_detector(settings) to generate a callable, should be more efficient, and allow errors to be throw at bind-time instead of call-time. * pbkdf2() function now treats keylen = -1 as request for keylen = PRF digest size.
| * updated scram for py3 compatEli Collins2012-01-091-9/+10
| |
| * Merge defaultEli Collins2012-01-091-0/+289
| |\ |/ /
| * initial draft of SCRAM-specific hash storage format (issue 23) --Eli Collins2011-12-051-0/+289
| | | | | | | | this is not yet functional, just a quick draft of an interface, along with some notes
* | clarified border case where verify() accepted configuration strings instead ↵Eli Collins2012-01-0913-26/+84
| | | | | | | | of throwing ValueError for some handlers
* | minor fixesEli Collins2012-01-092-3/+4
| |
* | builtin implementations of md5_crypt and sha256/512_crypt sped up by about 25%Eli Collins2012-01-054-137/+155
| |
* | renamed utils.timer -> utils.tickEli Collins2012-01-053-12/+12
| |