In Bug #556654 use-flag dependency for "dev-libs/openssl" was changed to "-bindist", as this is needed for ecdh. This blocks update on systems where openssl was not build with -bindist and openssh was also not build with -bindist. net-misc/openssh has bindist-useflag and dev-libs/openssl[bindist=] as bdep. This should be a more common approach to allow users both versions. Please add bindist to metadata.xml and add change useflags to conditional setting "bindist=".
Build exim-4.87 with openssl[bindist] successfully, build did not failed as described in #556654.
hmmm, I can't really find proof of a fix for this. There was some libressl commit, that went in 4.87, but the rest seems openssl version number checks to determine if ecdh can be used. Odd.
The code was slightly changed to avoid the compilation error, so I removed the conditional. Exim works both with and without ECDH support in OpenSSL.