diff --git a/legacy/ecore/ChangeLog b/legacy/ecore/ChangeLog index 3ab9361663..4a24452038 100644 --- a/legacy/ecore/ChangeLog +++ b/legacy/ecore/ChangeLog @@ -702,3 +702,7 @@ 2012-05-30 Leif Middelschulte (T_UNIX) * Add ECORE_X_RANDR_OUTPUT_POLICY_ASK + +2012-06-04 Mike Blumenkrantz + + * ECORE_{CON,IPC}_NO_PROXY now available for disabling proxying on certain connections diff --git a/legacy/ecore/NEWS b/legacy/ecore/NEWS index e0caaa29b7..5e638f49cd 100644 --- a/legacy/ecore/NEWS +++ b/legacy/ecore/NEWS @@ -8,6 +8,10 @@ Additions: - Add transparency support on Windows (GDI engine only) * ecore_x: - Add Ecore_X_Error_Code enumeration + * ecore_x: + - ECORE_X_RANDR_OUTPUT_POLICY_ASK + * ecore_con: + - ECORE_{CON,IPC}_NO_PROXY now available for disabling proxying on certain connections Fixes: * ecore @@ -18,10 +22,6 @@ Fixes: - Force cancel of all running Ecore_Thread on shutdown. - Make Ecore_Thread work reliably when called without a running main loop. -Additions: - - * ecore_x: - - ECORE_X_RANDR_OUTPUT_POLICY_ASK Ecore 1.2.0 diff --git a/legacy/ecore/src/lib/ecore_con/Ecore_Con.h b/legacy/ecore/src/lib/ecore_con/Ecore_Con.h index 7fe84951f9..e706df303f 100644 --- a/legacy/ecore/src/lib/ecore_con/Ecore_Con.h +++ b/legacy/ecore/src/lib/ecore_con/Ecore_Con.h @@ -653,7 +653,12 @@ typedef enum _Ecore_Con_Type /** Use both TLS and SSL3 */ ECORE_CON_USE_MIXED = ECORE_CON_USE_SSL3 | ECORE_CON_USE_TLS, /** Attempt to use the loaded certificate */ - ECORE_CON_LOAD_CERT = (1 << 7) + ECORE_CON_LOAD_CERT = (1 << 7), + /** Disable all types of proxy on the server + * @note Only functional for clients + * @since 1.2 + */ + ECORE_CON_NO_PROXY = (1 << 8) } Ecore_Con_Type; /** diff --git a/legacy/ecore/src/lib/ecore_con/ecore_con.c b/legacy/ecore/src/lib/ecore_con/ecore_con.c index 5ba6624b44..c327873f1e 100644 --- a/legacy/ecore/src/lib/ecore_con/ecore_con.c +++ b/legacy/ecore/src/lib/ecore_con/ecore_con.c @@ -448,13 +448,14 @@ ecore_con_server_connect(Ecore_Con_Type compl_type, svr->data = (void *)data; svr->created = EINA_FALSE; svr->use_cert = (compl_type & ECORE_CON_SSL & ECORE_CON_LOAD_CERT) == ECORE_CON_LOAD_CERT; + svr->disable_proxy = (compl_type & ECORE_CON_SSL & ECORE_CON_NO_PROXY) == ECORE_CON_NO_PROXY; svr->reject_excess_clients = EINA_FALSE; svr->clients = NULL; svr->client_limit = -1; type = compl_type & ECORE_CON_TYPE; - if (type > ECORE_CON_LOCAL_ABSTRACT) + if ((!svr->disable_proxy) && (type > ECORE_CON_LOCAL_ABSTRACT)) { /* never use proxies on local connections */ if (_ecore_con_proxy_once) diff --git a/legacy/ecore/src/lib/ecore_con/ecore_con_private.h b/legacy/ecore/src/lib/ecore_con/ecore_con_private.h index e3b9adb830..4f8fd36521 100644 --- a/legacy/ecore/src/lib/ecore_con/ecore_con_private.h +++ b/legacy/ecore/src/lib/ecore_con/ecore_con_private.h @@ -9,7 +9,7 @@ #define ECORE_MAGIC_CON_URL 0x77074255 #define ECORE_CON_TYPE 0x0f -#define ECORE_CON_SSL 0xf0 +#define ECORE_CON_SSL 0xf00 #if USE_GNUTLS # include @@ -179,6 +179,7 @@ struct _Ecore_Con_Server Eina_Bool connecting : 1; /* @c EINA_FALSE if just initialized or connected */ Eina_Bool handshaking : 1; /* @c EINA_TRUE if server is ssl handshaking */ Eina_Bool upgrade : 1; /* STARTTLS queued */ + Eina_Bool disable_proxy : 1; /* proxy should never be used with this connection */ Eina_Bool ssl_prepared : 1; Eina_Bool use_cert : 1; /* @c EINA_TRUE if using certificate auth */ Ecore_Con_Ssl_State ssl_state; /* current state of ssl handshake on the server */ diff --git a/legacy/ecore/src/lib/ecore_ipc/Ecore_Ipc.h b/legacy/ecore/src/lib/ecore_ipc/Ecore_Ipc.h index 999340328f..f77870f84d 100644 --- a/legacy/ecore/src/lib/ecore_ipc/Ecore_Ipc.h +++ b/legacy/ecore/src/lib/ecore_ipc/Ecore_Ipc.h @@ -222,7 +222,8 @@ typedef enum _Ecore_Ipc_Type ECORE_IPC_LOCAL_USER, ECORE_IPC_LOCAL_SYSTEM, ECORE_IPC_REMOTE_SYSTEM, - ECORE_IPC_USE_SSL = 16 + ECORE_IPC_USE_SSL = (1 << 4), + ECORE_IPC_NO_PROXY = (1 << 5) } Ecore_Ipc_Type; typedef struct _Ecore_Ipc_Event_Client_Add Ecore_Ipc_Event_Client_Add; diff --git a/legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c b/legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c index 54ee3ad053..339ca5a218 100644 --- a/legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c +++ b/legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c @@ -412,12 +412,16 @@ ecore_ipc_server_connect(Ecore_Ipc_Type compl_type, char *name, int port, const Ecore_Ipc_Server *svr; Ecore_Ipc_Type type; Ecore_Con_Type extra = 0; + int features; svr = calloc(1, sizeof(Ecore_Ipc_Server)); if (!svr) return NULL; - type = compl_type; - type &= ~ECORE_IPC_USE_SSL; - if (compl_type & ECORE_IPC_USE_SSL) extra = ECORE_CON_USE_SSL; + type = compl_type & ECORE_IPC_TYPE; + features = compl_type & ECORE_IPC_SSL; + if ((features & ECORE_IPC_USE_SSL) == ECORE_IPC_USE_SSL) + extra |= ECORE_CON_USE_SSL; + if ((features & ECORE_IPC_NO_PROXY) == ECORE_IPC_NO_PROXY) + extra |= ECORE_CON_NO_PROXY; switch (type) { case ECORE_IPC_LOCAL_USER: diff --git a/legacy/ecore/src/lib/ecore_ipc/ecore_ipc_private.h b/legacy/ecore/src/lib/ecore_ipc/ecore_ipc_private.h index 57f784976d..d8c663c95d 100644 --- a/legacy/ecore/src/lib/ecore_ipc/ecore_ipc_private.h +++ b/legacy/ecore/src/lib/ecore_ipc/ecore_ipc_private.h @@ -38,7 +38,8 @@ extern int _ecore_ipc_log_dom; #define ECORE_MAGIC_IPC_CLIENT 0x78875665 typedef struct _Ecore_Ipc_Msg_Head Ecore_Ipc_Msg_Head; - +#define ECORE_IPC_TYPE 0x0f +#define ECORE_IPC_SSL 0xf0 #if defined (_MSC_VER) || (defined (__SUNPRO_C) && __SUNPRO_C < 0x5100) # pragma pack(1)