This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
We need procedures to encode the subjectPublicKeyInfo and privateKeyInfo ASN.1 structures.
Changeset 19be0e9a2f81
https://dvcs.w3.org/hg/webcrypto-api/rev/19be0e9a2f81 doesn't really resolve the issue; it describes a generic algorithm, except that algorithm doesn't really work for any of the ASN.1 structures. Plus, the whole recursive nature of CHOICE, ANY, etc are unnecessary for the actual conversion.
(In reply to Ryan Sleevi from comment #2) > https://dvcs.w3.org/hg/webcrypto-api/rev/19be0e9a2f81 doesn't really resolve > the issue; it describes a generic algorithm, except that algorithm doesn't > really work for any of the ASN.1 structures. > > Plus, the whole recursive nature of CHOICE, ANY, etc are unnecessary for the > actual conversion. CHOICE yes, because the structures we care about don't have CHOICE members. ANY does not recurse - it expects the member to be already converted because only the procedure using this encoding procedure knows the correct abstract syntax (unless we have this generic procedure look up the OID in a table). SEQUENCE needs to recurse because we have SEQUENCES that contain SEQUENCES. Can you explain why it doesn't work ? An alternative would be to specify a logical mapping between members of the ASN.1 abstract syntax structure and members of an internal object structure and then just say "encode this with that" in one step. The definition of that mapping would still need the same recursion.