common: move tls calls to ssl_calls
This commit is contained in:
+10
-9
@@ -22,6 +22,7 @@
|
||||
#include "trans.h"
|
||||
#include "arch.h"
|
||||
#include "parse.h"
|
||||
#include "ssl_calls.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
int APP_CC
|
||||
@@ -31,7 +32,7 @@ trans_tls_recv(struct trans *self, void *ptr, int len)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return xrdp_tls_read(self->tls, ptr, len);
|
||||
return ssl_tls_read(self->tls, ptr, len);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
@@ -42,7 +43,7 @@ trans_tls_send(struct trans *self, const void *data, int len)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return xrdp_tls_write(self->tls, data, len);
|
||||
return ssl_tls_write(self->tls, data, len);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
@@ -53,7 +54,7 @@ trans_tls_can_recv(struct trans *self, int sck, int millis)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return xrdp_tls_can_recv(self->tls, sck, millis);
|
||||
return ssl_tls_can_recv(self->tls, sck, millis);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
@@ -130,7 +131,7 @@ trans_delete(struct trans *self)
|
||||
|
||||
if (self->tls != 0)
|
||||
{
|
||||
xrdp_tls_delete(self->tls);
|
||||
ssl_tls_delete(self->tls);
|
||||
}
|
||||
|
||||
g_free(self);
|
||||
@@ -721,16 +722,16 @@ trans_get_out_s(struct trans *self, int size)
|
||||
int APP_CC
|
||||
trans_set_tls_mode(struct trans *self, const char *key, const char *cert)
|
||||
{
|
||||
self->tls = xrdp_tls_create(self, key, cert);
|
||||
self->tls = ssl_tls_create(self, key, cert);
|
||||
if (self->tls == NULL)
|
||||
{
|
||||
g_writeln("trans_set_tls_mode: xrdp_tls_create malloc error");
|
||||
g_writeln("trans_set_tls_mode: ssl_tls_create malloc error");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (xrdp_tls_accept(self->tls) != 0)
|
||||
if (ssl_tls_accept(self->tls) != 0)
|
||||
{
|
||||
g_writeln("trans_set_tls_mode: xrdp_tls_accept failed");
|
||||
g_writeln("trans_set_tls_mode: ssl_tls_accept failed");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -748,7 +749,7 @@ trans_shutdown_tls_mode(struct trans *self)
|
||||
{
|
||||
if (self->tls != NULL)
|
||||
{
|
||||
return xrdp_tls_disconnect(self->tls);
|
||||
return ssl_tls_disconnect(self->tls);
|
||||
}
|
||||
|
||||
/* assign callback back to tcp cal */
|
||||
|
||||
Reference in New Issue
Block a user