Test suite requires all ECC algorithms to be supported

... which is currently not the case in Fedora OpenSSL.

The attached patch hard-codes usage of only those algorithms that
are supported; a real solution should probably auto-detect
supported algorithms (at least in test_ec_curves).

https://bugzilla.osafoundation.org/show_bug.cgi?id=13100
Use SIGTERM, not SIGHUP, to terminate openssl

Koji, the Fedora build system, is apparently setting up the build
processes to ignore SIGHUP by default, leading the helper
processes used by test_ssl to never terminate.  We could override
the SIGHUP handling, but sending SIGTERM is more correct anyway.

https://bugzilla.osafoundation.org/show_bug.cgi?id=13101
Stop assuming that export ciphers work

Since
http://pkgs.fedoraproject.org/cgit/openssl.git/commit/?id=dc728e2d8bdb640557032ec02ab55abc9f4fc702
and related commits Fedora's openssl no longer uses export ciphers by
default, so test_use_weak_cipher as is is failing.

The attached patch is more or less a placeholder, skipping the test
unconditionally.  We might want either test that explicitly enabling
export ciphers on both ends work, or to remove the test entirely once
upstream defaults change as well (because nobody should be realying on
export ciphers doing anything useful any more anyway).

https://bugzilla.osafoundation.org/show_bug.cgi?id=13103
Don't hard-code ports used by the test suite

test_ssl always uses the same port numbers for tests.

Two reasons this is a problem:
* On a multi-user system, using fixed ports is somewhat rude to other
  users.
* Fedora's Koji build system may allocate both 32-bit and 64-bit builds
  to chroots on the same physical machine, causing the tests that reuse
  the ports to fail.

The attached patch asks the kernel to allocate a free port, and closes
the socket and immediately reopens that port by (openssl s_server).
This is still racy but good enough in practice.

https://bugzilla.osafoundation.org/show_bug.cgi?id=13104
Otest_x509_name fails with OpenSSL 1.0.1h

OpenSSL 1.0.1h switched from encoding strings as PRINTABLESTRING
(the first hash value) to UTF8STRING (the second one)

Also modified the assertion to make the different hash value visible.

https://github.com/martinpaljak/M2Crypto/issues/42