Commit Graph

229 Commits

Author SHA1 Message Date
Vincent Prouillet 2484d47f7d v7.0.1 2020-01-30 21:28:00 -08:00
Vincent Prouillet aae977651c
Merge pull request #117 from fujiapple852/hotfix-display-stack-overflow
Fix recursive Display::fmt implementation on Error to avoid stack overflow
2020-01-30 21:26:06 -08:00
FujiApple 2f359b515c - Fix recursive `Display::fmt` implementation on `Error` to avoid stack overflow
- Added unit test to cover a sample case
2020-01-31 13:11:40 +08:00
Vincent Prouillet e89fa41b7a
Merge pull request #91 from Keats/next
7.0.0
2020-01-28 23:00:26 -08:00
Vincent Prouillet b9989d14cf Prepare for release 2020-01-28 18:18:21 -08:00
Vincent Prouillet c2f6093309 Get rid of deprecrated std error description 2020-01-27 20:52:46 -08:00
Vincent Prouillet 1cc14b04eb Beta 1 2020-01-21 07:41:55 -08:00
Vincent Prouillet e46f8f9d58
Merge pull request #113 from Keats/keys_struct
Add EncodingKey & DecodingKey
2020-01-17 20:18:30 +01:00
Vincent Prouillet 689cc6d32e Validate key type with algo in encode/decode 2020-01-13 19:41:06 +01:00
Vincent Prouillet 4dd2f12c6d Remove EncodingKey lifetime 2020-01-02 19:40:53 +01:00
Vincent Prouillet 77ae0effc8 Add DecodingKey 2019-12-29 21:50:06 +01:00
Vincent Prouillet 0abeeac25f Add EncodingKey 2019-12-29 19:33:17 +01:00
Vincent Prouillet 771f955690 Better GH workflow 2019-11-28 19:28:59 +01:00
Vincent Prouillet bfcfc1d341 Handle aud not being a sequence
Closes #110
2019-11-28 19:27:33 +01:00
Vincent Prouillet 499b439cb0 Wrong badge 2019-11-15 20:39:19 +01:00
Vincent Prouillet 8d678086eb v7 alpha 1 2019-11-15 20:37:47 +01:00
Vincent Prouillet 1a727f7095
Merge pull request #107 from Keats/pem-handling
Add PEM decoding support (#106)
2019-11-15 20:29:59 +01:00
Vincent Prouillet d550c5f318 Add more tests and document SEC1 lack of support 2019-11-15 20:16:38 +01:00
Vincent Prouillet 6121db3d07 Min version is 1.36? 2019-11-14 20:35:20 +01:00
Vincent Prouillet b35719b555 Point to validation example 2019-11-14 20:32:03 +01:00
Vincent Prouillet 3fe0bc1f83 Update README 2019-11-14 20:24:38 +01:00
Vincent Prouillet dd642bed1d Use GH actions 2019-11-14 20:02:59 +01:00
Vincent Prouillet 6e8d4a4be6 Remove pem encoding for now 2019-11-14 19:48:38 +01:00
Vincent Prouillet 51dacd9bc4 Update docs 2019-11-14 19:43:43 +01:00
Vincent Prouillet 8e4757cb1d More refactoring in the crypto mod 2019-11-11 20:29:57 +01:00
Vincent Prouillet 1f6d0ffb2c Refactor decoding 2019-11-11 20:16:34 +01:00
Vincent Prouillet 8169ee3d9f Remove chrono from deps 2019-11-11 19:47:35 +01:00
Vincent Prouillet 614f3610a7 Fix stupid bug 2019-11-11 12:08:11 +01:00
Vincent Prouillet b27981549f Not working yet jwk decoding 2019-11-09 11:42:40 +00:00
Vincent Prouillet 34ea194179 Move crypto to a dir 2019-11-08 19:00:19 +00:00
Vincent Prouillet e3632b3a2c Remove Key approach in favour of &[u8] with pem 2019-11-06 22:32:13 +00:00
Vincent Prouillet a6ea8c2c1a clippy + fmt 2019-11-06 18:41:51 +00:00
Vincent Prouillet 382e4478cf Move pem encoding tests 2019-11-06 18:30:59 +00:00
Levi 53188e1f40 Add functions to create pems and ders of the public keys (#108) 2019-11-06 13:58:49 +00:00
Vincent Prouillet 73d96357c3 Simplify header decoding 2019-11-03 16:13:22 +00:00
Vincent Prouillet 417e00780d Use serde with derive feature 2019-11-03 15:46:08 +00:00
Vincent Prouillet 210e96063d Reorganise tests 2019-11-03 15:36:19 +00:00
Vincent Prouillet caef740ad4 Refactoring + more idiomatic enum names 2019-11-03 13:17:04 +00:00
Vincent Prouillet 06bebeaae3 cargo fmt 2019-11-03 12:55:36 +00:00
Vincent Prouillet b9a3e3086f Fix Option handling 2019-11-03 12:36:52 +00:00
Levi 571898252f Add PEM decoding support (#106)
* Add PEM support with pem and simple_asn1. Documentation TODO

* Make pkcs1 and pkcs8 versions of the RSA key, confirm they pass tests.

* Add documentation, simplify

* Update readme

* Bump pem version

* Remove extra print
2019-11-03 12:22:51 +00:00
Vincent Prouillet 639915f25b
Merge pull request #105 from Dowwie/next
Updated aud within Validation, including membership validation testing
2019-11-01 20:06:49 +00:00
dowwie 60a030874a updated imports in validation.rs 2019-10-31 14:12:08 -04:00
dowwie 68d6c84c8c revised set_audience, cleaned up validation, and cleared compiler warnings 2019-10-28 11:49:02 -04:00
dowwie fe10accb6e markedown edit to changelog 2019-10-27 15:16:43 -04:00
dowwie 0d7184a787 added update to aud type and aud validation 2019-10-27 15:14:52 -04:00
Vincent Prouillet 6e2f461a1b Fix readme wrt exp validation
Closes #104
2019-10-23 13:44:46 +01:00
Vincent Prouillet 88187e0365
Merge pull request #96 from briansmith/b/ring-0.16
Use *ring* 0.16.5.
2019-08-11 11:02:26 +02:00
Brian Smith f7423d075a Use *ring* 0.16.5. 2019-08-10 11:38:54 -10:00
Vincent Prouillet 10105af2fd Add support for modulus/exponent 2019-07-13 17:43:44 +02:00
Vincent Prouillet b8627260b2 Update to edition 2018 2019-07-06 20:36:32 +02:00
Vincent Prouillet 22cd4dbb62 Remove unused test key 2019-07-06 20:24:14 +02:00
Vincent Prouillet 3c62b98bd9 Update example to v7 style 2019-06-16 18:15:14 +02:00
Vincent Prouillet d6d0da7ab9
Merge pull request #83 from rakenodiax/chrono-example
Add example of using `chrono::DateTime` in claims
2019-06-16 18:13:43 +02:00
Vincent Prouillet 357eb4c539 Update changelog 2019-06-16 18:03:21 +02:00
Vincent Prouillet 2def25ee87 Merge branch 'kanru-rsa-pss' into next 2019-06-16 18:00:42 +02:00
Vincent Prouillet 20013a4e4f Fixed conflicts 2019-06-16 18:00:00 +02:00
Vincent Prouillet 84ee604e88 trait -> enum 2019-06-16 17:51:43 +02:00
Kan-Ru Chen c26bdf7e06 Support for RSASSA-PSS signing algorithm
As specified in https://tools.ietf.org/html/rfc7518#section-3.5

- PS256 - RSASSA-PSS using SHA-256 hash algorithm
- PS384 - RSASSA-PSS using SHA-384 hash algorithm
- PS512 - RSASSA-PSS using SHA-512 hash algorithm
2019-06-08 03:08:54 +09:00
Vincent Prouillet e2e11b1e56
Merge pull request #89 from EmbarkStudios/key_formats
Clarify Key formats
2019-05-25 17:52:16 +02:00
Vincent Prouillet 920d6f6759 Start work on 7.0.0 2019-05-25 17:51:31 +02:00
Jake Shadle d51a3f632d Fix benches 2019-05-15 16:20:32 +02:00
Jake Shadle c5db9fbe32 Fix tests 2019-05-15 16:20:25 +02:00
Jake Shadle bae7a12a4b Fix examples 2019-05-15 16:20:09 +02:00
Jake Shadle 6cfb5c7c0e Add Key trait and the supported formats 2019-05-15 16:19:38 +02:00
Jake Shadle 5d01baea94 Bump ring 2019-05-15 16:16:49 +02:00
Vincent Prouillet b2d57edc72 Release new version 2019-05-10 16:49:31 -07:00
Vincent Prouillet cd8bd15234
Merge pull request #88 from maxburke/fix_algorithm_mapping
Fix algorithm mapping.
2019-05-10 16:47:48 -07:00
Max Burke f68210c688
Fix algorithm mapping.
RS256/384/512 algorithm strings were mapped to HMAC-SHA256/384/512
enumerators.
2019-05-10 16:36:28 -07:00
Vincent Prouillet 89fbd8f0ce
Merge pull request #75 from Keats/next
v6
2019-04-21 10:22:46 +02:00
Vincent Prouillet 88cee37fb9 Add release date 2019-04-21 10:13:32 +02:00
Kellen Frodelius-Fujimoto 6bac1bdbf0
Add example of using `chrono::DateTime` in claims
Using `chrono`'s `serde` feature uses ISO 8601 instead of a Unix 
timestamp as specified in RFC 7519 section 2, "NumericDate". This 
example uses  custom de/serialize functions as shown in the [serde.rs 
example, "Custom Date 
Format"](https://serde.rs/custom-date-format.html).

NOTE: Currently fractional values are not supported in the example, 
though they are in the spec.
2019-04-01 12:11:28 +02:00
Vincent Prouillet 0ccb61eea5 Update some things for v6 2019-03-22 09:40:08 +01:00
Vincent Prouillet da0f01a64f
Merge pull request #73 from jbg/master
ECDSA signing and verification (ES256, ES384)
2019-03-22 09:27:41 +01:00
Vincent Prouillet b4e0ae5f6d
Merge branch 'next' into master 2019-03-22 09:24:02 +01:00
Vincent Prouillet be27206088 Remove iat validation, it isnt supposed to be done 2019-02-04 18:44:08 +01:00
Vincent Prouillet 71d5cb19f7 Update base64 2019-02-04 18:39:46 +01:00
Vincent Prouillet 86dce0003e
Merge pull request #72 from endor/master
Fix documentation of default values in validation
2019-02-04 18:36:48 +01:00
Vincent Prouillet cf9908948b
Merge pull request #70 from alex/ring-0.14
Upgraded ring to 0.14
2019-02-04 18:36:23 +01:00
Vincent Prouillet 86ba9d3d50 Start on v6 2019-02-04 18:35:39 +01:00
Jasper Bryant-Greene 8a495d3a4e updated ring dependency 2019-02-01 12:12:33 +08:00
Jasper Bryant-Greene e10b049d9a implemented verification of ECDSA signatures and added tests 2019-02-01 12:11:20 +08:00
Frank Prößdorf 2793bc2be4 Fix documentation of default values in validation 2019-01-18 09:31:56 +02:00
Jasper Bryant-Greene 1f6ae28566 ring -> 0.14.1, updated other deps 2019-01-18 10:34:12 +08:00
Alex Gaynor 716fe8b64d Upgraded ring to 0.14 2019-01-13 00:20:34 +00:00
Jasper Bryant-Greene 9883fab729 implemented ECDSA signing, updated ring to 0.14 alpha 2019-01-09 09:46:06 +08:00
Jasper Bryant-Greene 6768230077 Added ES256/ES384/ES512 Algorithm stubs 2019-01-09 09:18:49 +08:00
Vincent Prouillet 8f0809318d rustfmt 2018-10-28 19:58:35 +01:00
Vincent Prouillet d63af8d6e0 clippy 2018-10-28 19:58:06 +01:00
Vincent Prouillet ab0ab9b48b Update examples and readme for exp use 2018-10-28 19:54:35 +01:00
Vincent Prouillet e725bea1d2 Update docs for RSA signing/verification 2018-10-15 13:26:03 +02:00
Vincent Prouillet 4a5d69bdc0 Release 5.0.1 2018-09-10 12:43:45 +02:00
Vincent Prouillet cfdfa29bf3
Merge pull request #61 from himanoa/feat/implement-string-to-algorithm
feat: Implement FromStr trait for Algorithm
2018-09-02 21:50:00 +02:00
himanoa 4bd4c8b3de feat: Implement FromStr trait for Algorithm 2018-08-31 03:53:55 +09:00
Vincent Prouillet 1f9af2e505 Releasing v5 today 2018-08-13 16:06:55 +02:00
Vincent Prouillet af18ff9230
Merge pull request #59 from Keats/next
Next
2018-08-13 16:02:04 +02:00
Vincent Prouillet c78574aae4 Remove some commented out code 2018-07-26 09:43:21 +02:00
Vincent Prouillet 5528497f5a Fix validation not working properly
Close #51
2018-07-25 15:42:02 +02:00
Vincent Prouillet 109978ab6b Remove error-chain
Fix #52, #56, #57
2018-07-25 14:46:30 +02:00
Vincent Prouillet 126ee4b1a3
Merge pull request #58 from matthauck/master
Update ring
2018-07-25 13:04:20 +02:00