switch nmcclain/asn1-ber to go-asn1-ber/asn1-ber.
This newer package has ben updated with tests, and looks to actually be supported. It is also is a forked version of nmcclain/asn1-ber, so supports the same API.
TestBindSSL is flaky, it doesn’t seem to actually bind correctly for some reason. Other then that all tests seem to pass.
Now all tests pass. SSL was failing to work as the certs were untrusted. and ldapsearch does not connect to ldap servers with untrusted certs. A simple configuration change for ldapsearch was all that was needed.
The flakiness I was seeing was because starting and stopping the server quickly in the tests could cause one to be started while the other still hadn't shutoff yet. I added a Close() method that correctly waits for the Quit channel to be closed before returning. This way the caller can be assured that the server is in fact shutdown.