ctx = (glb_ctx *) calloc(1, sizeof(*ctx));
if (!ctx)
return NULL;
+
+ SSL_library_init();
+ SSL_load_error_strings();
return ctx;
}
goto end;
}
- SSL_library_init();
- SSL_load_error_strings();
-
end:
if (err) {
update_error(g_cc,"cannot create canl_io_handler");
set_error (cc, err, posix_error, "Connection stuck"
" during handshake: timeout reached");
}
- else if (ret2 < 0)
- set_error (cc, 0, unknown_error, "connection closed by"
+ else if (ret2 <= 0)
+ set_error (cc, ssl_err, ssl_error, "Connection closed by"
" the other side");
else
set_error (cc, 0, unknown_error, "Error during SSL handshake");