summaryrefslogtreecommitdiffstats
path: root/common/ssl_calls.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/ssl_calls.h')
-rw-r--r--common/ssl_calls.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/common/ssl_calls.h b/common/ssl_calls.h
index 40acfb5b..6cfe73a3 100644
--- a/common/ssl_calls.h
+++ b/common/ssl_calls.h
@@ -2,6 +2,7 @@
* xrdp: A Remote Desktop Protocol server.
*
* Copyright (C) Jay Sorg 2004-2014
+ * Copyright (C) Idan Freiberg 2013-2014
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -80,4 +81,31 @@ int APP_CC
ssl_gen_key_xrdp1(int key_size_in_bits, char* exp, int exp_len,
char* mod, int mod_len, char* pri, int pri_len);
+/* ssl_tls */
+struct ssl_tls
+{
+ void *ssl; /* SSL * */
+ void *ctx; /* SSL_CTX * */
+ char *cert;
+ char *key;
+ struct trans *trans;
+ tintptr rwo; /* wait obj */
+};
+
+/* xrdp_tls.c */
+struct ssl_tls *APP_CC
+ssl_tls_create(struct trans *trans, const char *key, const char *cert);
+int APP_CC
+ssl_tls_accept(struct ssl_tls *self);
+int APP_CC
+ssl_tls_disconnect(struct ssl_tls *self);
+void APP_CC
+ssl_tls_delete(struct ssl_tls *self);
+int APP_CC
+ssl_tls_read(struct ssl_tls *tls, char *data, int length);
+int APP_CC
+ssl_tls_write(struct ssl_tls *tls, const char *data, int length);
+int APP_CC
+ssl_tls_can_recv(struct ssl_tls *tls, int sck, int millis);
+
#endif