From: Marcel Poul Date: Sun, 26 Feb 2012 19:26:13 +0000 (+0000) Subject: be compatible with FIPS openssl releases X-Git-Tag: gridsite-core_R_1_7_17~12 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=fb8dae3d111e1bbbb8232ae58ca9b311c07e4aaa;p=jra1mw.git be compatible with FIPS openssl releases --- diff --git a/emi.canl.canl-c/src/canl_ssl.c b/emi.canl.canl-c/src/canl_ssl.c index b752d65..50f018a 100644 --- a/emi.canl.canl-c/src/canl_ssl.c +++ b/emi.canl.canl-c/src/canl_ssl.c @@ -26,6 +26,7 @@ ssl_initialize(glb_ctx *cc, mech_glb_ctx **m_glb_ctx) SSL_library_init(); SSL_load_error_strings(); + OpenSSL_add_all_algorithms(); ERR_clear_error(); ssl_ctx = SSL_CTX_new(SSLv23_method()); @@ -586,6 +587,16 @@ static int do_ssl_accept(glb_ctx *cc, io_handler *io, (curtime - starttime) < locl_timeout)) && (errorcode == SSL_ERROR_WANT_READ || errorcode == SSL_ERROR_WANT_WRITE))); +#ifdef DEBUG +if (errorcode == SSL_ERROR_WANT_READ) + printf("SSL_ERR_WANT_READ"); +if (errorcode == SSL_ERROR_WANT_WRITE) + printf("SSL_ERR_WANT_WRITE"); +printf ("STR: %s \n",ERR_error_string(ssl_err,NULL)); +printf ("LIB: %s ;",ERR_lib_error_string(ssl_err)); +printf ("FUNC: %s ;",ERR_func_error_string(ssl_err)); +printf ("LIB: %s \n",ERR_reason_error_string(ssl_err)); +#endif //TODO split ret2 and ret into 2 ifs to set approp. error message if (ret2 <= 0 || ret <= 0) {