Commit Graph

23 Commits

Author SHA1 Message Date
José Padilla 37926ea0dd Throw if key is an PKCS1 PEM-encoded public key 2017-06-22 09:58:04 -04:00
Mark Adams 299d196383 Add a failing test for OpenSSH-formatted ECDSA public keys 2017-03-14 07:37:32 -05:00
Mark Adams 42b011410b Add JWK support for HMAC and RSA keys
- JWKs for RSA and HMAC can be encoded / decoded using the .to_jwk() and
  .from_jwk() methods on their respective jwt.algorithms instances

- Replaced tests.utils ensure_unicode and ensure_bytes with jwt.utils versions
2016-08-28 18:08:55 -05:00
Mark Adams 2fe85a3380 Fix a bug where a PEM private key as bytes raises a TypeError 2016-08-04 18:03:31 -05:00
Mark Adams 7c8c5c62ca Remove some erroenous @pytest.mark.skipif decorators 2016-05-05 23:49:02 -05:00
Mark Adams 37077e4984 Removed tests that are no longer necessary now that we have test vectors from RFC 7520 2015-05-19 22:30:06 -05:00
Mark Adams d1f6de2c4b Removed the @skipif from the RSA-PSS test vector test. 2015-05-19 22:28:06 -05:00
Mark Adams d634f528d3 Merged master branch in to remove Python 3.2 support and add the new
test vectors from #160
2015-05-18 23:21:54 -05:00
Mark Adams 06f461a211 Added test vectors from the IETF JOSE Cookbook for HMAC, RSA, and EC. 2015-05-18 23:13:02 -05:00
esneider 3c479e21b4 Test signatures with wrong length 2015-05-15 18:24:14 -03:00
esneider 01b7fb0e65 Fix the ECDSA signature serialization format when using cryptography 2015-05-13 03:15:56 -03:00
Mark Adams 109f44cf72 Removed all references to unittest 2015-04-14 11:35:26 -05:00
Mark Adams 03b7356e1a Minor refactorings to move some utils code around and remove unneeded code. 2015-04-14 09:53:39 -05:00
Mark Adams 6315f86943 Converted all unittest constructs to pytest 2015-04-14 09:52:49 -05:00
Mark Adams 90577f7cef Added a test to improve coverage and cleaned up some existing tests. 2015-04-12 20:57:39 -05:00
Mark Adams 68d1f89a95 Added support for RSASSA-PSS algorithms (PS256, PS384, PS512) 2015-04-08 23:05:02 -05:00
Mark Adams ce65da1beb Fixed a flaky test by making sure we actually make the signature invalid from within the base64 instead of afterwards. 2015-03-18 11:13:28 -05:00
Mark Adams f6d0ff2778 Added tests to cover invalid string validations on HMAC 2015-03-17 20:21:43 -05:00
Mark Adams 507d2c9c1d Revived PyCrypto and ecdsa-based algorithms as optional jwt.contrib modules. 2015-03-15 22:09:43 -05:00
Mark Adams d9727ca98a Made algorithm class dependence on hash functions more direct.
- Algorithms now have SHA256, SHA384, and SHA512 static properties that
  refer to the callable that instantiates their hash class
- All algorithms now expect a class (callable) as their hash_alg now.
  This behavior was inconsistent before.
2015-03-15 20:27:35 -05:00
Mark Adams 0f9f0da524 Fixed a typo in the class name for TestAlgorithms 2015-01-25 06:46:07 -06:00
Mark Adams 78742f7bee Removed json from compat since this only applies to Python < 2.6 and pyjwt only builds on >= 2.6. 2015-01-25 06:42:16 -06:00
Mark Adams 85f2397696 Made several changes to testing to increase code coverage
- Added a ton of tests to cover areas that weren't covered before
- Added a pep8 tox env to run pep8 tests as part of the build
- Moved keys into tests/keys
- Added test_algorithms.py for algorithms module tests
- Changed setup.py to run all tests in tests/
2015-01-25 06:25:45 -06:00