On 2025-01-17, at 15:15, Sipos, Brian J. <[email protected]> wrote: > > • It is currently difficult to extract a full CDDL document for this > draft. Could one be extracted and added to the Github repo for reference? Or > some procedure for how we can extract a full, valid CDDL definition from the > markdown? > I did some copy-paste work to get this and am running into tool errors, it > seems like the “time” rule is missing… but maybe I’m extracting an incomplete > set..? > Also some reference CDDL like the “oid” from RFC 9090 needs to be included > somehow; manually in a Github file is fine, but having a complete and > parseable CDDL document would be very valuable for users. >
I just made a pull request with various kramdown-rfc and cddl cleanups: https://github.com/cose-wg/CBOR-certificates/pull/215 This allows the use of kramdown-rfc-extract-sourcecode -tfiles draft-ietf-cose-cbor-encoded-cert.xml to create a file sourcecode/cddl/c509.cddl from the collected CDDL in the I-D. This c509.cddl can then be used for instance as follows: cddlc -s C509CertificateRequest -r2i rfc9090 sourcecode/cddl/c509.cddl -tcddl | cddl - gp (Use v and not g as the cddl option to validate and not generate an example.) The -r2i rfc9090 imports the oid rule from RFC 9090 (see draft-ietf-cbor-cddl-modules). (The specific example generated is not that useful because of the heavy use of “any” in the CDDL, so you may want to dive in with different -s arguments.) Grüße, Carsten _______________________________________________ COSE mailing list -- [email protected] To unsubscribe send an email to [email protected]
