Closed dasJ closed 2 years ago
Thanks for the PR (and sorry about the delay in responding). The motivation behind the proposed functionality is sound, but there are two issues which make the implementation inadequate:
LdapConnAsync
(as it must be), but that struct is only briefly available in the async workflow, before being handed over to drive!()
, and not available at all in the sync case.The only way I see to have this kind of method implemented would involve adding another MPSC channel to LdapConnAsync
, having Ldap
/LdapConn
fire a request containing a oneshot sender to LdapConnAsync
's select!
loop, and retrieving the result via the corresponding receiver.
Hey @inejge,
thanks for your answer. I am a college of dasJ, who writes a little bit more rust and had a little bit more down time, so i took over. I implemented your proposed solution using channels. I still need to test it against our slapd server but i plan to do that in the next couple of days.
Review would be appreciated, i will test it later against our production slapd.
Thanks, LGTM aside from the timeout issue I've highlighted. When you address that, please squash the commits and force-push the result, which I'm going to merge. I'll probably make a couple of further small stylistic changes, for which I won't bother with additional back-and-forth.
Merged. Heads up, I renemed get_peer_certificate_der
to get_peer_certificate
, I like it better that way.
Thanks :) also thanks for working on this whole project, its been really useful :D
There is only the DER format available because both libraries only support this format and returning a Vec allows us to have a library-independant way of returning the data.