diff options
Diffstat (limited to 'src/lib/emile/Emile.h')
-rw-r--r-- | src/lib/emile/Emile.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/lib/emile/Emile.h b/src/lib/emile/Emile.h index b97c30eafe..47a9186d3b 100644 --- a/src/lib/emile/Emile.h +++ b/src/lib/emile/Emile.h | |||
@@ -106,7 +106,24 @@ EAPI int emile_shutdown(void); | |||
106 | * @} | 106 | * @} |
107 | */ | 107 | */ |
108 | 108 | ||
109 | typedef struct _Emile_SSL Emile_SSL; | ||
110 | |||
111 | typedef enum | ||
112 | { | ||
113 | EMILE_SSLv23, | ||
114 | EMILE_SSLv3, | ||
115 | EMILE_TLSv1 | ||
116 | } Emile_Cipher_Type; | ||
117 | |||
118 | typedef enum | ||
119 | { | ||
120 | EMILE_WANT_NOTHING = 0, | ||
121 | EMILE_WANT_READ = 1, | ||
122 | EMILE_WANT_WRITE = 3 | ||
123 | } Emile_Want_Type; | ||
124 | |||
109 | EAPI Eina_Bool emile_cipher_init(void); | 125 | EAPI Eina_Bool emile_cipher_init(void); |
126 | EAPI const char *emile_cipher_module_get(void); | ||
110 | 127 | ||
111 | EAPI Eina_Binbuf *emile_binbuf_cipher(const Eina_Binbuf *in, | 128 | EAPI Eina_Binbuf *emile_binbuf_cipher(const Eina_Binbuf *in, |
112 | const char *key, unsigned int length); | 129 | const char *key, unsigned int length); |
@@ -114,6 +131,25 @@ EAPI Eina_Binbuf *emile_binbuf_cipher(const Eina_Binbuf *in, | |||
114 | EAPI Eina_Binbuf *emile_binbuf_decipher(const Eina_Binbuf *in, | 131 | EAPI Eina_Binbuf *emile_binbuf_decipher(const Eina_Binbuf *in, |
115 | const char *key, unsigned int length); | 132 | const char *key, unsigned int length); |
116 | 133 | ||
134 | EAPI Emile_SSL *emile_cipher_server_listen(Emile_Cipher_Type t); | ||
135 | EAPI Emile_SSL *emile_cipher_client_connect(Emile_SSL *server, int fd); | ||
136 | EAPI Emile_SSL *emile_cipher_server_connect(Emile_Cipher_Type t); | ||
137 | EAPI Eina_Bool emile_cipher_free(Emile_SSL *emile); | ||
138 | |||
139 | EAPI Eina_Bool emile_cipher_cafile_add(Emile_SSL *emile, const char *file); | ||
140 | EAPI Eina_Bool emile_cipher_cert_add(Emile_SSL *emile, const char *file); | ||
141 | EAPI Eina_Bool emile_cipher_privkey_add(Emile_SSL *emile, const char *file); | ||
142 | EAPI Eina_Bool emile_cipher_crl_add(Emile_SSL *emile, const char *file); | ||
143 | EAPI int emile_cipher_read(Emile_SSL *emile, Eina_Binbuf *buffer); | ||
144 | EAPI int emile_cipher_write(Emile_SSL *emile, const Eina_Binbuf *buffer); | ||
145 | EAPI const char *emile_cipher_error_get(const Emile_SSL *emile); | ||
146 | EAPI Eina_Bool emile_cipher_verify_name_set(Emile_SSL *emile, const char *name); | ||
147 | EAPI const char *emile_cipher_verify_name_get(const Emile_SSL *emile); | ||
148 | EAPI void emile_cipher_verify_set(Emile_SSL *emile, Eina_Bool verify); | ||
149 | EAPI void emile_cipher_verify_basic_set(Emile_SSL *emile, Eina_Bool verify_basic); | ||
150 | EAPI Eina_Bool emile_cipher_verify_get(const Emile_SSL *emile); | ||
151 | EAPI Eina_Bool emile_cipher_verify_basic_get(const Emile_SSL *emile); | ||
152 | |||
117 | typedef enum | 153 | typedef enum |
118 | { | 154 | { |
119 | EMILE_ZLIB, | 155 | EMILE_ZLIB, |