On Tue, 2019-10-15 at 19:34 +0200, Laszlo Ersek wrote: > Ehh, I failed to ask the actual question. > > Is it OK to call X509_VERIFY_PARAM_set1*() multiple times -- basically, > every time just before we call X509_verify_cert()? > > My concern is not with the crypto functionality, but whether we could be > leaking memory allocations. You had to ask yourself that before approving the original version of TlsSetVerifyHost(), didn't you? Because the TlsLib API hasn't imposed any restriction on calling TlsSetVerifyHost() more than once... The answer is yes, btw — it's fine. Note also my observation that we should insist on TlsSetVerifyHost being called at *least* once, or the connection should fail.