quiche
quiche copied to clipboard
FFI: Expose the peer cert chain
Just wanted to use Connection::peer_cert_chain() and realized it's not actually exposed via FFI.
The vector cannot be trivially returned by FFI, except by translating the vector to a &[Certificate] with a struct Certificate { *mut u8; size_t; }, and then adding a free-function for this.
I think directly fetching the values one by one is a superior approach for FFI purposes in terms of usability and complexity, hence this PR proposes this.
@LPardue Sorry that I ping you here after 2 months now, but is there a chance that this will be reviewed and merged? Thanks!