summaryrefslogtreecommitdiff
path: root/src/lib/ecore_con
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ecore_con')
-rw-r--r--src/lib/ecore_con/ecore_con_url.c6
-rw-r--r--src/lib/ecore_con/efl_net_dialer_websocket.c10
-rw-r--r--src/lib/ecore_con/efl_net_ssl_context.c2
3 files changed, 16 insertions, 2 deletions
diff --git a/src/lib/ecore_con/ecore_con_url.c b/src/lib/ecore_con/ecore_con_url.c
index 4df3e71079..428b5d3e55 100644
--- a/src/lib/ecore_con/ecore_con_url.c
+++ b/src/lib/ecore_con/ecore_con_url.c
@@ -47,16 +47,20 @@ ecore_con_url_init(void)
if (++_init_count > 1) return _init_count;
if (!ecore_init()) goto ecore_init_failed;
if (!ecore_con_init()) goto ecore_con_init_failed;
+#ifndef EMILE_HEADER_ONLY
if (!emile_init()) goto emile_init_failed;
if (!emile_cipher_init()) goto emile_cipher_init_failed;
+#endif
ECORE_CON_EVENT_URL_DATA = ecore_event_type_new();
ECORE_CON_EVENT_URL_COMPLETE = ecore_event_type_new();
ECORE_CON_EVENT_URL_PROGRESS = ecore_event_type_new();
return _init_count;
+#ifndef EMILE_HEADER_ONLY
emile_cipher_init_failed:
emile_shutdown();
emile_init_failed:
+#endif
ecore_con_shutdown();
ecore_con_init_failed:
ecore_shutdown();
@@ -78,7 +82,9 @@ ecore_con_url_shutdown(void)
ECORE_CON_EVENT_URL_COMPLETE,
ECORE_CON_EVENT_URL_PROGRESS);
+#ifndef EMILE_HEADER_ONLY
emile_shutdown(); /* no emile_cipher_shutdown(), handled here */
+#endif
ecore_con_shutdown();
ecore_shutdown();
return 0;
diff --git a/src/lib/ecore_con/efl_net_dialer_websocket.c b/src/lib/ecore_con/efl_net_dialer_websocket.c
index a16579cfc6..caf1da56da 100644
--- a/src/lib/ecore_con/efl_net_dialer_websocket.c
+++ b/src/lib/ecore_con/efl_net_dialer_websocket.c
@@ -1024,13 +1024,13 @@ static void
_efl_net_dialer_websocket_key_add(Efl_Net_Dialer_Websocket_Data *pd)
{
Eina_Binbuf *binbuf_key;
- Eina_Strbuf *strbuf_key_base64;
+ Eina_Strbuf *strbuf_key_base64 = NULL;
uint8_t key[16];
const Eina_Slice guid_slice = EINA_SLICE_STR_LITERAL("258EAFA5-E914-47DA-95CA-C5AB0DC85B11");
Eina_Slice ro_slice;
Eina_Rw_Slice rw_slice;
uint8_t sha1hash[20];
- Eina_Bool ret;
+ Eina_Bool ret = EINA_FALSE;
size_t i;
for (i = 0; i < sizeof(key); i++)
@@ -1039,7 +1039,9 @@ _efl_net_dialer_websocket_key_add(Efl_Net_Dialer_Websocket_Data *pd)
binbuf_key = eina_binbuf_manage_new(key, sizeof(key), EINA_TRUE);
EINA_SAFETY_ON_NULL_RETURN(binbuf_key);
+#ifndef EMILE_HEADER_ONLY
strbuf_key_base64 = emile_base64_encode(binbuf_key);
+#endif
eina_binbuf_free(binbuf_key);
EINA_SAFETY_ON_NULL_RETURN(strbuf_key_base64);
@@ -1055,7 +1057,9 @@ _efl_net_dialer_websocket_key_add(Efl_Net_Dialer_Websocket_Data *pd)
binbuf_key = eina_binbuf_manage_new(ro_slice.mem, ro_slice.len, EINA_TRUE);
EINA_SAFETY_ON_NULL_GOTO(binbuf_key, free_strbuf);
/* 2) sha1(base64(random(16)) + guid) */
+#ifndef EMILE_HEADER_ONLY
ret = emile_binbuf_sha1(binbuf_key, sha1hash);
+#endif
eina_binbuf_free(binbuf_key);
eina_strbuf_free(strbuf_key_base64);
@@ -1065,7 +1069,9 @@ _efl_net_dialer_websocket_key_add(Efl_Net_Dialer_Websocket_Data *pd)
binbuf_key = eina_binbuf_manage_new(sha1hash, sizeof(sha1hash), EINA_TRUE);
EINA_SAFETY_ON_NULL_RETURN(binbuf_key);
+#ifndef EMILE_HEADER_ONLY
strbuf_key_base64 = emile_base64_encode(binbuf_key);
+#endif
eina_binbuf_free(binbuf_key);
EINA_SAFETY_ON_NULL_RETURN(strbuf_key_base64);
diff --git a/src/lib/ecore_con/efl_net_ssl_context.c b/src/lib/ecore_con/efl_net_ssl_context.c
index a625fe81ee..401a741b20 100644
--- a/src/lib/ecore_con/efl_net_ssl_context.c
+++ b/src/lib/ecore_con/efl_net_ssl_context.c
@@ -273,11 +273,13 @@ _efl_net_ssl_context_efl_object_finalize(Eo *o, Efl_Net_Ssl_Context_Data *pd)
o = efl_finalize(efl_super(o, MY_CLASS));
if (!o) return NULL;
+#ifndef EMILE_HEADER_ONLY
if (!emile_cipher_init())
{
ERR("could not initialize cipher subsystem.");
return NULL;
}
+#endif
if (pd->is_dialer)
{