Add openssl support to build system.
Limit copying of error to the length of the error.
Fix order of return statements in tls_conn_get_error.