Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add support for extracting timestamp from a Fernet token (#4229) | Paul Kehrer | 2018-05-12 | 1 | -0/+9 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add API for retrieving the seconds-to-expiry for the token, given a TTL. * Process PR feedback: * Do compute the TTL, but just the age of the token. The caller can decided what to do next. * Factored out the HMAC signature verification to a separate function. * Fixed a copy&paste mistake in the test cases * Tests cleanup. * `struct` no longer needed * Document `def age()` * typo in `age()` documentation * token, not data * remove test for TTL expiry that is already covered by the parameterized `test_invalid()`. * let's call this extract_timestamp and just return timestamp * review comments * it's UNIX I know this | ||||
* | Add Multifernet.rotate method (#3979) | Chris Wolfe | 2017-10-19 | 1 | -0/+53 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add rotate method * add some more tests for the failure modes * start adding some documentation for the rotate method * operate on a single token at a time, leave lists to the caller * add versionadded add versionadded, drop rotate from class doctest * give rotate a doctest * single level, not aligned * add changelog for mf.rotate * show that, once rotated, the old fernet instance can no longer decrypt the token * add the instead of just the how * update docs to reflect removal of ttl from rotate * update tests * refactor internal methods so that we can extract the timestamp * implement rotate * update wordlist (case sensitive?) * lints * consistent naming * get_token_data/get_unverified_token_data -> better name * doc changes * use the static method, do not treat as imethod * move up to MultiFernet docs * add to authors * alter wording * monkeypatch time to make it less possible for the test to pass simply due to calls occuring in less than one second * set the time after encryption to make sure that the time is preserved as part of re-encryption | ||||
* | pass bytes to modes/algorithms like we should | Paul Kehrer | 2016-03-07 | 1 | -2/+2 |
| | |||||
* | fernet fix: ignore the timestamp entirely when no ttl is set | Paul Kehrer | 2016-01-21 | 1 | -0/+9 |
| | | | | | | Previously if the token claimed to have been generated more than 60 seconds in the future we would raise InvalidToken even if ttl was set to None. | ||||
* | Replace the remaining occurrences of six.u with the u prefix | Eeshan Garg | 2015-04-29 | 1 | -2/+2 |
| | |||||
* | alter vector file loader to support passing read mode | Paul Kehrer | 2014-11-27 | 1 | -1/+4 |
| | |||||
* | Update the license header for every source file, as well as the documentation. | Alex Gaynor | 2014-11-16 | 1 | -12/+3 |
| | | | | Fixes #1209 | ||||
* | Fixed #1436 -- mark the multifernet tests as requiring the backends they need | Alex Gaynor | 2014-10-24 | 1 | -1/+4 |
| | |||||
* | Change how we represented that a test requires a backend. | Alex Gaynor | 2014-10-23 | 1 | -1/+2 |
| | | | | This way is more extensible and requires less maintaince | ||||
* | flake8 + cleanup | Alex Gaynor | 2014-10-20 | 1 | -7/+6 |
| | |||||
* | Handle non-iterable arguments reasonable | Alex Gaynor | 2014-10-20 | 1 | -0/+4 |
| | |||||
* | Fixes #1327 -- adds multifernet | Alex Gaynor | 2014-10-20 | 1 | -1/+32 |
| | |||||
* | Fixed an issue in fernet where the wrong exception would occur on an ↵ | Alex Gaynor | 2014-10-19 | 1 | -2/+7 |
| | | | | | | all-nulls input. Also switched a few tests to not generate a key | ||||
* | Move the supported marks to class level for fernet | Alex Gaynor | 2014-10-19 | 1 | -52/+11 |
| | |||||
* | Move cryptography.vectors to cryptography_vectors | Alex Stapleton | 2014-03-24 | 1 | -7/+9 |
| | | | | | | | All vectors are now stored in the subpackage in the vectors/ folder. This package is automatically installed by setup.py test and will also be uploaded with a matching version number by the PyPI upload task. | ||||
* | Load vectors from cryptography.vectors | Matthew Iversen | 2014-03-22 | 1 | -5/+4 |
| | |||||
* | Added future imports and licenses that are missing | Alex Gaynor | 2014-03-08 | 1 | -0/+2 |
| | |||||
* | add test marks to fernet so backends without cipher (or AES/CBC) will skip | Paul Kehrer | 2014-01-09 | 1 | -0/+50 |
| | |||||
* | Handle invalid timestamp length | Alex Gaynor | 2013-12-20 | 1 | -0/+5 |
| | |||||
* | Replace assertions with real error checks | Alex Gaynor | 2013-12-16 | 1 | -0/+9 |
| | |||||
* | Address dreid's comments | Alex Gaynor | 2013-12-16 | 1 | -10/+16 |
| | |||||
* | An API for generating keys | Alex Gaynor | 2013-11-22 | 1 | -1/+1 |
| | |||||
* | fix, technically | Alex Gaynor | 2013-11-22 | 1 | -1/+1 |
| | |||||
* | Hide the dangerous bits | Alex Gaynor | 2013-11-22 | 1 | -8/+7 |
| | |||||
* | Key in the right place | Alex Gaynor | 2013-11-20 | 1 | -5/+5 |
| | |||||
* | Include the license | Alex Gaynor | 2013-11-02 | 1 | -0/+13 |
| | |||||
* | py3k fixes | Alex Gaynor | 2013-10-31 | 1 | -2/+2 |
| | |||||
* | write more readably | Alex Gaynor | 2013-10-31 | 1 | -3/+1 |
| | |||||
* | A test for roundtripping | Alex Gaynor | 2013-10-31 | 1 | -0/+7 |
| | |||||
* | Fixed pep8 issues | Alex Gaynor | 2013-10-31 | 1 | -6/+4 |
| | |||||
* | Started working on the invalid cases | Alex Gaynor | 2013-10-31 | 1 | -6/+22 |
| | |||||
* | Use raw vector files | Alex Gaynor | 2013-10-31 | 1 | -19/+37 |
| | |||||
* | py3k syntax fix | Alex Gaynor | 2013-10-31 | 1 | -2/+2 |
| | |||||
* | Address pep8 concerns | Alex Gaynor | 2013-10-31 | 1 | -3/+5 |
| | |||||
* | Fixed test and implementation | Alex Gaynor | 2013-10-31 | 1 | -2/+8 |
| | |||||
* | Added test cases, fixed a bug | Alex Gaynor | 2013-10-31 | 1 | -0/+23 |