Got it compiling, but not running due to OpenSSL version problem,
CRYPTO_THREADID_set_callback.
Record errors correctly.