summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2014-12-30 11:18:21 +0100
committerCedric BAIL <cedric@osg.samsung.com>2014-12-30 11:21:47 +0100
commit8ed636c9ada1a46240c0e36476b6812ccf12df9b (patch)
tree913cec8031b9c1e402ee253811f6349824fb7769
parentb1d46ddf658207102cee6747d358d85dbe762c8a (diff)
ecore_con: SSL error function is waiting for Eo object not their private data.
-rw-r--r--src/lib/ecore_con/ecore_con_ssl.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/ecore_con/ecore_con_ssl.c b/src/lib/ecore_con/ecore_con_ssl.c
index d31b44e17c..3ae056019a 100644
--- a/src/lib/ecore_con/ecore_con_ssl.c
+++ b/src/lib/ecore_con/ecore_con_ssl.c
@@ -55,7 +55,7 @@ static int _client_connected = 0;
55 55
56#if HAVE_GNUTLS 56#if HAVE_GNUTLS
57static void 57static void
58_gnutls_print_errors(void *conn, int type, int ret) 58_gnutls_print_errors(Eo *conn, int type, int ret)
59{ 59{
60 char buf[1024]; 60 char buf[1024];
61 61
@@ -326,7 +326,7 @@ case (X): \
326} 326}
327 327
328static void 328static void
329_openssl_print_errors(void *conn, int type) 329_openssl_print_errors(Eo *conn, int type)
330{ 330{
331 char buf[1024]; 331 char buf[1024];
332 do 332 do
@@ -938,7 +938,7 @@ _ecore_con_ssl_server_prepare_gnutls(Ecore_Con_Server *obj,
938 return ECORE_CON_SSL_ERROR_NONE; 938 return ECORE_CON_SSL_ERROR_NONE;
939 939
940error: 940error:
941 _gnutls_print_errors(svr, ECORE_CON_EVENT_SERVER_ERROR, ret); 941 _gnutls_print_errors(obj, ECORE_CON_EVENT_SERVER_ERROR, ret);
942 _ecore_con_ssl_server_shutdown_gnutls(obj); 942 _ecore_con_ssl_server_shutdown_gnutls(obj);
943 return ECORE_CON_SSL_ERROR_SERVER_INIT_FAILED; 943 return ECORE_CON_SSL_ERROR_SERVER_INIT_FAILED;
944} 944}
@@ -1065,7 +1065,7 @@ _ecore_con_ssl_server_init_gnutls(Ecore_Con_Server *obj)
1065 return ECORE_CON_SSL_ERROR_NONE; 1065 return ECORE_CON_SSL_ERROR_NONE;
1066 1066
1067error: 1067error:
1068 _gnutls_print_errors(svr, ECORE_CON_EVENT_SERVER_ERROR, ret); 1068 _gnutls_print_errors(obj, ECORE_CON_EVENT_SERVER_ERROR, ret);
1069 if ((ret == GNUTLS_E_WARNING_ALERT_RECEIVED) || (ret == GNUTLS_E_FATAL_ALERT_RECEIVED)) 1069 if ((ret == GNUTLS_E_WARNING_ALERT_RECEIVED) || (ret == GNUTLS_E_FATAL_ALERT_RECEIVED))
1070 ERR("Also received alert: %s", gnutls_alert_get_name(gnutls_alert_get(svr->session))); 1070 ERR("Also received alert: %s", gnutls_alert_get_name(gnutls_alert_get(svr->session)));
1071 if (svr->session && (svr->ssl_state != ECORE_CON_SSL_STATE_DONE)) 1071 if (svr->session && (svr->ssl_state != ECORE_CON_SSL_STATE_DONE))
@@ -1399,7 +1399,7 @@ _ecore_con_ssl_client_init_gnutls(Ecore_Con_Client *obj)
1399 return ECORE_CON_SSL_ERROR_NONE; 1399 return ECORE_CON_SSL_ERROR_NONE;
1400 1400
1401error: 1401error:
1402 _gnutls_print_errors(cl, ECORE_CON_EVENT_CLIENT_ERROR, ret); 1402 _gnutls_print_errors(obj, ECORE_CON_EVENT_CLIENT_ERROR, ret);
1403 if ((ret == GNUTLS_E_WARNING_ALERT_RECEIVED) || (ret == GNUTLS_E_FATAL_ALERT_RECEIVED)) 1403 if ((ret == GNUTLS_E_WARNING_ALERT_RECEIVED) || (ret == GNUTLS_E_FATAL_ALERT_RECEIVED))
1404 ERR("Also received alert: %s", gnutls_alert_get_name(gnutls_alert_get(cl->session))); 1404 ERR("Also received alert: %s", gnutls_alert_get_name(gnutls_alert_get(cl->session)));
1405 if (cl->session && (cl->ssl_state != ECORE_CON_SSL_STATE_DONE)) 1405 if (cl->session && (cl->ssl_state != ECORE_CON_SSL_STATE_DONE))
@@ -1599,7 +1599,7 @@ error:
1599 ERR("openssl error: dh_params could not generate a safe prime!"); 1599 ERR("openssl error: dh_params could not generate a safe prime!");
1600 } 1600 }
1601 else 1601 else
1602 _openssl_print_errors(svr, ECORE_CON_EVENT_SERVER_ERROR); 1602 _openssl_print_errors(obj, ECORE_CON_EVENT_SERVER_ERROR);
1603 _ecore_con_ssl_server_shutdown_openssl(obj); 1603 _ecore_con_ssl_server_shutdown_openssl(obj);
1604 return ECORE_CON_SSL_ERROR_SERVER_INIT_FAILED; 1604 return ECORE_CON_SSL_ERROR_SERVER_INIT_FAILED;
1605} 1605}
@@ -1693,7 +1693,7 @@ _ecore_con_ssl_server_init_openssl(Ecore_Con_Server *obj)
1693 return ECORE_CON_SSL_ERROR_NONE; 1693 return ECORE_CON_SSL_ERROR_NONE;
1694 1694
1695error: 1695error:
1696 _openssl_print_errors(svr, ECORE_CON_EVENT_SERVER_ERROR); 1696 _openssl_print_errors(obj, ECORE_CON_EVENT_SERVER_ERROR);
1697 _ecore_con_ssl_server_shutdown_openssl(obj); 1697 _ecore_con_ssl_server_shutdown_openssl(obj);
1698 return ECORE_CON_SSL_ERROR_SERVER_INIT_FAILED; 1698 return ECORE_CON_SSL_ERROR_SERVER_INIT_FAILED;
1699} 1699}
@@ -1713,7 +1713,7 @@ _ecore_con_ssl_server_cafile_add_openssl(Ecore_Con_Server *obj,
1713 return EINA_TRUE; 1713 return EINA_TRUE;
1714 1714
1715error: 1715error:
1716 _openssl_print_errors(svr, ECORE_CON_EVENT_SERVER_ERROR); 1716 _openssl_print_errors(obj, ECORE_CON_EVENT_SERVER_ERROR);
1717 return EINA_FALSE; 1717 return EINA_FALSE;
1718} 1718}
1719 1719
@@ -1738,7 +1738,7 @@ _ecore_con_ssl_server_crl_add_openssl(Ecore_Con_Server *obj,
1738 return EINA_TRUE; 1738 return EINA_TRUE;
1739 1739
1740error: 1740error:
1741 _openssl_print_errors(svr, ECORE_CON_EVENT_SERVER_ERROR); 1741 _openssl_print_errors(obj, ECORE_CON_EVENT_SERVER_ERROR);
1742 return EINA_FALSE; 1742 return EINA_FALSE;
1743} 1743}
1744 1744
@@ -1765,7 +1765,7 @@ _ecore_con_ssl_server_privkey_add_openssl(Ecore_Con_Server *obj,
1765error: 1765error:
1766 if (fp) 1766 if (fp)
1767 fclose(fp); 1767 fclose(fp);
1768 _openssl_print_errors(svr, ECORE_CON_EVENT_SERVER_ERROR); 1768 _openssl_print_errors(obj, ECORE_CON_EVENT_SERVER_ERROR);
1769 return EINA_FALSE; 1769 return EINA_FALSE;
1770} 1770}
1771 1771
@@ -1791,7 +1791,7 @@ _ecore_con_ssl_server_cert_add_openssl(Ecore_Con_Server *obj,
1791error: 1791error:
1792 if (fp) 1792 if (fp)
1793 fclose(fp); 1793 fclose(fp);
1794 _openssl_print_errors(svr, ECORE_CON_EVENT_SERVER_ERROR); 1794 _openssl_print_errors(obj, ECORE_CON_EVENT_SERVER_ERROR);
1795 return EINA_FALSE; 1795 return EINA_FALSE;
1796} 1796}
1797 1797
@@ -1941,7 +1941,7 @@ _ecore_con_ssl_client_init_openssl(Ecore_Con_Client *obj)
1941 return ECORE_CON_SSL_ERROR_NONE; 1941 return ECORE_CON_SSL_ERROR_NONE;
1942 1942
1943error: 1943error:
1944 _openssl_print_errors(cl, ECORE_CON_EVENT_CLIENT_ERROR); 1944 _openssl_print_errors(obj, ECORE_CON_EVENT_CLIENT_ERROR);
1945 _ecore_con_ssl_client_shutdown_openssl(obj); 1945 _ecore_con_ssl_client_shutdown_openssl(obj);
1946 return ECORE_CON_SSL_ERROR_SERVER_INIT_FAILED; 1946 return ECORE_CON_SSL_ERROR_SERVER_INIT_FAILED;
1947} 1947}