Commit Graph

1216 Commits

Author SHA1 Message Date
Jean-Michel Picod
826c4f3021 Fix coveralls badge not pointing to the branch (#341) 2021-07-06 11:22:21 +02:00
Fabian Kaczmarczyck
eefc171076 adds a storage type for later usage 2021-07-05 13:13:14 +02:00
Jean-Michel Picod
46bbef2996 Coveralls (#339)
* Add code coverage report as part of the workflows

* Remove -Clink-dead-code which seems to be problematic

* Manually set features to avoid debug_* failing unit tests.

* Update badges

* Add libraries directory to trigger code coverage reporting.
2021-07-05 12:55:21 +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
ce0ee6c054 Kernel minimization (#334)
* adds patch to remove unused kernel components

* new boards, rebase patches to match

* rename boards for deployment
2021-06-28 14:55:20 +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
Fabian Kaczmarczyck
dbce426e9f removes std from CBOR tests 2021-06-18 19:00:52 +02:00
Fabian Kaczmarczyck
9ca17b17e1 configuration changes to reduce binary size 2021-06-18 16:57:23 +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
Jean-Michel Picod
fe0a9f208e Fix broken parsing. (#317) (#323)
* Fix broken parsing.

By setting the default value before pre-parsing we ensure that the item
can't be None. As an extra safety the custom action also checks for
None.

Co-authored-by: kaczmarczyck <43844792+kaczmarczyck@users.noreply.github.com>
2021-06-09 22:52:52 +02:00
kaczmarczyck
c86905f592 build.rs additions (#319) 2021-06-09 16:16:47 +02:00
Julien Cretin
d9e32ac103 Merge pull request #322 from ia0/fix_320
Stop using try_trait in persistent_store
2021-06-09 15:39:32 +02:00
Julien Cretin
6aa6a8acf0 Only build and test nightly
Prod is already built by opensk test.
2021-06-09 15:10:30 +02:00
Julien Cretin
67311e6c9f Fix typo 2021-06-09 13:55:53 +02:00
Julien Cretin
b3b652aa53 Stop using try_trait
It is too much instable.
2021-06-09 13:51:04 +02:00
Julien Cretin
bb4b94a141 Build persistent store with frozen compiler
But still make sure it passes tests with the most recent nightly.
2021-06-09 13:42:28 +02:00
Julien Cretin
67c4b3d158 Merge pull request #216 from ia0/usize_32_or_std
Make sure production store only builds with usize=u32
2021-04-26 13:29:47 +02:00
Julien Cretin
e32eb5358f Merge branch 'develop' into usize_32_or_std 2021-04-26 13:12:55 +02:00
kaczmarczyck
c03605aa0c opt level and no Debug by unwrap (#311) 2021-04-21 11:45:01 +02:00
Jean-Michel Picod
7c8894bb04 Compare all timestamps using UTC timezone (#308) 2021-04-15 17:22:38 +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
Jean-Michel Picod
e9c66a2764 Merge branch 'bugfix' into develop 2021-04-13 15:04:58 +02:00
Jean-Michel Picod
2957c800cd Merge remote-tracking branch 'origin/develop' into bugfix 2021-04-13 15:04:14 +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
kaczmarczyck
054e303d11 move MAX_MSG_SIZE to customization and use it in HID (#302) 2021-04-09 07:40:11 +02:00
kaczmarczyck
6216a3214d final changes to CTAP2.1 algorithm (#299) 2021-04-07 09:07:46 +02:00
kaczmarczyck
e7797a5683 Separate file crypto wrappers, starting with AES-CBC (#298)
* refactor key wrapping with tests

* remove backwards compatiblity tests

* adds AES-CBC tests for IV and RNG
2021-03-31 16:41:20 +02:00
kaczmarczyck
c596f785ff Output parameters for CTAP2.1 (#297)
* finalizes output parameters for CTAP2.1

* explanation for internal UV
2021-03-23 12:07:15 +01:00
kaczmarczyck
63232cfe60 adds PIN token state with timeouts (#296) 2021-03-22 14:03:51 +01:00
kaczmarczyck
aec1e0a409 adds PIN protocol V2 to all commands (#295) 2021-03-18 17:29:32 +01:00
Julien Cretin
b1773d1cf3 Merge pull request #294 from ia0/doc
Update the documentation to use linking by name
2021-03-15 14:13:46 +01:00
kaczmarczyck
e50d89e28b Merge branch 'develop' into doc 2021-03-15 13:36:41 +01:00
kaczmarczyck
e5313057f9 PIN protocol V2 in ClientPin (#293)
* PIN protocol V2 in ClientPin

* the test ClientPin has a random second private key
2021-03-15 13:36:28 +01:00
Julien Cretin
6cb6538db6 Fix typography 2021-03-15 12:10:13 +01:00
Julien Cretin
3c7c5a4810 Update the documentation to use linking by name
See https://doc.rust-lang.org/stable/rustdoc/linking-to-items-by-name.html
2021-03-13 13:16:57 +01:00
kaczmarczyck
eb0a0770dd adds the PIN protocol trait (#292)
* adds the PIN protocol trait

* improved documentation

* SharedSecret not mutable
2021-03-10 13:20:29 +01:00
kaczmarczyck
351e6c12c6 renames PIN protocol related variables to prepare PIN protocol v2 (#291) 2021-03-04 10:37:19 +01:00
kaczmarczyck
5e9c32dff5 HKDF for CTAP2.1 (#290)
* implements hkdf, both regular and FIDO specific

* improved documentation

* constant usage in function return type
2021-03-03 16:33:25 +01:00
kaczmarczyck
f11a838cc7 Improved documentation for customization (#287)
* move constants to new file, and update documentation

* documentation improvements, deploy checks tests

* fix pylint

* improved code style

* swap build and check
2021-02-19 14:20:23 +01:00
kaczmarczyck
c014d21ff8 adds README changes, logo and certificate (#285) 2021-02-11 19:53:45 +01:00
Jean-Michel Picod
958d7a29dc Fix config.py tool according to the new API of fido2 python package (#284)
* Fix fido2 API update.

Since fido2 0.8.1 the device descriptor moved to NamedTuple, breaking
our configuration tool.
Code is now updated accordingly and the setup script ensure we're
using the correct version for fido2 package.

* Make Yapf happy

* Fix missing update for fido2 0.9.1

Also split the comment into 2 lines so that the touch is not hidden
at the end of the screen.
2021-02-11 17:44:49 +01:00
kaczmarczyck
6480682d95 Merge pull request #283 from kaczmarczyck/always-uv
Add the option alwaysUv
2021-02-11 16:49:21 +01:00
Fabian Kaczmarczyck
6a31e06a55 move some logic into storage.rs 2021-02-08 21:54:22 +01:00