On Mon, 2019-10-14 at 18:15 +0200, Laszlo Ersek wrote: > My understanding is that a fix purely in edk2 -- that is, without > advancing our openssl submodule reference at once Haha, I love the fact that I am hoist by my own petard on patching OpenSSL. I evidently did such a good job of upstreaming all the quirks we need for EDK2, that we're now *incapable* of carrying any local patches to OpenSSL. I'll take that as a win, I suppose :) > -- is possible, based > on your comment > > https://bugzilla.tianocore.org/show_bug.cgi?id=960#c32 > > Namely, edk2 commit 9396cdfeaa7a ("CryptoPkg: Add new TlsLib library", > 2016-12-22) added a SSL_set_verify() call (in function TlsSetVerify()). > The last argument of that call is currently NULL. > > We should change that, to a callback function that implements what > ssl_app_verify_callback() and match_cert_hostname() do, in your source file > > http://git.infradead.org/users/dwmw2/openconnect.git/blob/HEAD:/openssl.c > > There seems to be a GEN_* switch inside a loop in there. That's harder than it needs to be; it's the version for OpenSSL < 1.0.2 where they made the users jump through *lots* of hoops to validate certs correctly. These days it's much easier; you only need the version at http://git.infradead.org/users/dwmw2/openconnect.git/blob/HEAD:/openssl.c#l1369 which is called from the actual callback at http://git.infradead.org/users/dwmw2/openconnect.git/blob/HEAD:/openssl.c#l1507 I'll see if I can throw something together for you at least as an example.