-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate to coset and ciborium #94
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good to me except the CBOR Value
type you introduced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still not convinced you need to define this wrapper around ciborium::Value
, it seems to me you could use ciborium::Value
directly. Maybe I missed an instance where it is necessary?
…s primitives - Use actions-rs to setup Rust in CI so it works with act also locally - Add CborValueKey as wrapper over ciborium::Value to impl Ord and PartialOrd to be used as Key in Map
…s primitives - Use actions-rs to setup Rust in CI so it works with act also locally - Add CborValueKey as wrapper over ciborium::Value to impl Ord and PartialOrd to be used as Key in Map
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks almost ready to be merged. My last issue will be with the roundtrip to Vec<u8>
you make to serialize/deserialize values. You can use the functions provided by the ciborium
library.
Co-authored-by: Jacob <[email protected]>
…other changes - use dtolnay/rust-toolchain@stable to setup Rus when running in act - use Into where possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One final change needed, otherwise looks good to me.
Co-authored-by: Jacob <[email protected]>
Description
Integrate
coset
, having withMaybeTagged
wrapper forCoseSign1
andCoseMac0
andPrepared*
structs to build them. Also migrate tociborium
usingserde
integration.Changes
coset
crate.cose
where we havesign1
andmac0
modules with their implementations.PreparedCoseSign1
andPreparedCoseMac0
used to construct COSE objects.iana::Algorithm
.CoseMac0
toDeviceAuth
CWT
Reviewers, please pay special attention to…
CoseSign1
andCoseMac0
is created and used along side withMaybeTagged
.Reviewers, please pay special attention to…
CoseSign1
andCoseMac0
are created and used along side toMaybeTagged
.Tested
Tested locally, running all tests.
Built with these targets:
Checklist
CoseSign1
verify
methodCOSEMac0
COSEMac0
toDeviceAuth
CWT