Skip to content
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

RFC8949 obsoletes RFC7049 #17

Open
hellekin opened this issue Dec 19, 2020 · 1 comment
Open

RFC8949 obsoletes RFC7049 #17

hellekin opened this issue Dec 19, 2020 · 1 comment

Comments

@hellekin
Copy link

Hi,

https://datatracker.ietf.org/doc/rfc8949/ was released this month, updating RFC7049.

Is there a summary of the work required to update this code to match the new RFC?

@cabo
Copy link
Owner

cabo commented Dec 19, 2020

I don't think there is any such work "required", cbor-ruby should work out of the box for RFC 8949.
Please have a look at Appendix G of RFC 8949 for some details on what changed in the 2020 Edition of this spec.
There are a few things that probably should be addressed:

  • cbor-ruby does not itself provide RFC 7049 canonical encoding, which has been supplemented by "deterministic encoding" in RFC 8949. I plan to make a variant of the cbor-canonical gem available to cover this base.
  • The API for cbor-ruby has been inherited from msgpack, so it makes some modern CBOR things harder than they'd have to be (e.g., RFC 8742 sequences). We should think about adding appropriate API, or possibly document how to use the msgpack-style API for this.
  • RFC 8949 has some documentation requirements that we probably should address.

One underlying problem of Ruby Hashes is that there is no simple operation to add a key unless the key already existed.
That makes it hard (really: expensive) to implement the now preferred variant of map key validity checking.

cabo added a commit that referenced this issue Dec 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants