kaczmarczyck
8a53986961
CBOR API changes ( #639 )
...
* adds extract_* functions to CBOR library
* hides Value implementation details
* CBOR API fixes
* README adapted to API changes
2023-08-11 17:28:59 +02:00
kaczmarczyck
ca65902a8f
CTAP library move ( #602 )
...
* Moves all CTAP logic into its own library
* workflows fix test
* more coveralls workflow tests
2023-03-07 15:56:46 +01:00
kaczmarczyck
6610a29a67
Fixed proc-macro2 version ( #550 )
...
* fixes proc-macro2 in dependencies
* adds missing locked versions, and a verbose print for cargo check
* commits Cargo.lock files
* removes unnecessary Cargo.lock entries
* adds missing Cargo.lock
2022-09-27 10:12:45 +02:00
Howard Yang
17ecd46b04
Generate valid structure for MakeCredential params
...
* Add crate arbitrary as ctap's optional dependency, when feature "fuzz"
is activated.
* Derive Arbitrary for all the necessary types in order to generate the
concrete types from random bytes.
* Add a fuzz target that transforms the input to valid format for
MakeCredential.
2022-03-22 19:06:20 +08:00
kaczmarczyck
7e7d5e38a1
enforces Module imports granularity ( #445 )
2022-03-14 20:44:48 +01:00
kaczmarczyck
930a44c105
Fix CBOR fuzzing timeout ( #384 )
...
* early return for map and array comparison
* leaner ordering assignment
2021-09-22 10:33:08 +02:00
David Drysdale
c2b3aeca88
cbor: don't allow infinite nesting by default
...
Change the read()/write() methods to use a nesting limit of 127
internally, to avoid the possibility of heavily nested inputs exhausting
the stack.
Library users that still want to skip nesting checks can still get at
this functionality by using `{read,write}_nested(..., None)`.
2021-09-09 07:03:27 +02:00
David Drysdale
74d712da0d
cbor: add local copy of LICENSE
...
Also bump crate version to 0.1.2 in preparation for release.
2021-06-29 10:01:29 +02:00
kaczmarczyck
5f20ba544b
CBOR annotations for crates.io ( #333 )
...
* add default readme to fix crates.io
* badges in README
2021-06-25 15:14:14 +02:00
David Drysdale
0287a09573
cbor: allow user to control nesting ( #329 )
...
* cbor: allow user to control nesting
- Make the default read/write entrypoints allow infinite nesting.
- Add {read,write}_nested() entrypoints that allow the crate user to
control the depth of nesting that's allowed.
- Along the way, convert the write[_nested] variants to return a
`Result<(), EncoderError>` rather than a bool. This exposes
more failure information (and forces the caller to take notice
of those tailures), and allows use of the ? operator.
* fixup: transmute error
Co-authored-by: kaczmarczyck <43844792+kaczmarczyck@users.noreply.github.com >
2021-06-18 19:39:54 +02:00
David Drysdale
c7750a4e8c
cbor: fix spelling of 'extraneous'
2021-06-17 12:31:10 +02:00
David Drysdale
1cee2414f4
fixup: more comparisons, re-order tests slightly
2021-06-17 10:33:36 +02:00
David Drysdale
fbe68b55cd
cbor: support tagged values
2021-06-17 10:33:36 +02:00
David Drysdale
3aca5fbc74
cbor: prepare for publishing as standalone crate
...
- Add an example of usage
- Add a minimal README, including the example code
- Document public items
- Add more info to Cargo.toml
2021-06-16 17:16:05 +02:00
David Drysdale
7719078d46
cbor: rename crate to sk-cbor
...
In anticipation of publishing to crates.io, which already has a `cbor`
crate.
2021-06-16 17:16:05 +02:00
David Drysdale
f2812e4fe2
cbor: drop std feature, use core in tests ( #327 )
2021-06-16 15:40:18 +02:00
kaczmarczyck
77f6db6110
don't clone map keys ( #325 )
2021-06-15 08:46:04 +02:00
kaczmarczyck
9a1c060234
Remove KeyType from CBOR ( #306 )
...
* removes KeyType from CBOR
* type_label usage in writer
2021-04-14 10:19:10 +02:00
kaczmarczyck
78b7767682
CBOR maps use Vec instead of BTreeMap ( #303 )
...
* CBOR uses Vec for map internally
* remove BTreeMap from get_info
* rename cbor_map_btree and clean up cbor_array_vec
* destructure now takes Vec, not BTreeMap
* adds dedup in CBOR writer
* fail to write CBOR maps with duplicates
* CBOR interface refinements
* macro documentation for CBOR map and array
2021-04-13 14:46:28 +02:00
Guillaume Endignoux
85a34ad085
Migrate import statements and macros to Rust 2018.
2020-09-24 11:28:24 +02:00
mingxguo27
6ebb69f275
Refactoring
2020-08-12 17:21:00 +00:00
mingxguo27
b09d64a015
Resolve pull request comments: refactoring and workflow
2020-08-12 10:18:17 +00:00
mingxguo27
1e9da1e2d6
Add fuzz target for CBOR
2020-08-11 09:48:44 +00:00
Guillaume Endignoux
09c9fb3a3e
Apply suggestion to remove additional semi-colons.
2020-06-22 11:49:47 +02:00
Guillaume Endignoux
240ba7580d
Improve comments.
2020-06-22 11:49:47 +02:00
Guillaume Endignoux
db70c3e66d
s/read_cbor_map/destructure_cbor_map/g
2020-06-22 11:49:47 +02:00
Guillaume Endignoux
2589eb99b3
Update read_cbor_map example to use a text key as well.
2020-06-22 11:49:47 +02:00
Guillaume Endignoux
493efa9b25
Apply syntax suggestion to read_cbor_map! macro.
2020-06-22 11:49:46 +02:00
Guillaume Endignoux
c8864666e0
Extract some logic to a separate function, to reduce binary size overhead of read_cbor_map.
2020-06-22 11:49:46 +02:00
Guillaume Endignoux
2124511913
Simplify syntax of the read_cbor_map! macro, to align it with cbor_map.
2020-06-22 11:49:46 +02:00
Guillaume Endignoux
2c4bf7d422
Add documentation for read_cbor_map! macro.
2020-06-22 11:49:46 +02:00
Guillaume Endignoux
97fb222455
Add a read_cbor_map macro to avoid the overhead of removing values on-by-one in BTreeMap.
2020-06-22 11:49:46 +02:00
Julien Cretin
ca6f910c26
Remove unknown fields
2020-05-13 11:09:32 +02:00
Julien Cretin
479de32a95
Rename $initial to $map
2020-05-11 16:40:11 +02:00
Julien Cretin
491721b421
Rename extend_cbor_map_options
2020-05-11 16:07:59 +02:00
Julien Cretin
f4b791ed91
Encode credentials as a protocol buffer message
...
This permits to decode a credential of a different version without failing.
2020-05-09 20:57:13 +02:00
Jean-Michel Picod
f91d2fd3db
Initial commit
2020-01-30 11:47:29 +01:00