polyphony-chat/polyproto-rs

`Capabilities` from and to `x509_cert::Extensions`

Closed this issue · 1 comments

To be a proper adapter type, this crate should implement TryFrom Extensions for Capabilities and TryFrom Capabilities for Extensions for the Capabilities struct. This will abstract the PKCS #10 "Abilities" and X.501 "Extensions" types offered by the x509-cert crate to a higher level, which makes them more trivial to use.

While I still think that this should be fully implemented, I also think that a full implementation of this is out of scope for now.
Currently, on the branch capabilities-extensions, you can do things likex509_cert::Extensions::from(Capabilities::default_actor()) just fine. However, I cannot really think of a reason to create Capabilities from Extensions at this time/this stage of the project. The Capabilities struct is currently just supposed to be a helpful, higher-level abstraction of x509 Extensions for polyproto users.