GUACAMOLE-337: Move SSL socket into libguac.

This commit is contained in:
Michael Jumper 2017-06-12 14:06:47 -07:00
parent 78dbf64416
commit f311c23ffa
5 changed files with 12 additions and 13 deletions

View File

@ -36,7 +36,7 @@
#ifdef ENABLE_SSL
#include <openssl/ssl.h>
#include "libguacd/socket-ssl.h"
#include <guacamole/socket-ssl.h>
#endif
#include <errno.h>

View File

@ -99,6 +99,11 @@ libguac_la_SOURCES += encode-webp.c
noinst_HEADERS += encode-webp.h
endif
# SSL support
if ENABLE_SSL
libguac_la_SOURCES += socket-ssl.c
libguacinc_HEADERS += guacamole/socket-ssl.h
endif
libguac_la_CFLAGS = \
-Werror -Wall -pedantic -Iguacamole
@ -109,6 +114,7 @@ libguac_la_LDFLAGS = \
@JPEG_LIBS@ \
@PNG_LIBS@ \
@PTHREAD_LIBS@ \
@SSL_LIBS@ \
@UUID_LIBS@ \
@VORBIS_LIBS@ \
@WEBP_LIBS@

View File

@ -19,13 +19,13 @@
#include "config.h"
#include "libguacd/socket-ssl.h"
#include "error.h"
#include "socket-ssl.h"
#include "socket.h"
#include <poll.h>
#include <stdlib.h>
#include <guacamole/error.h>
#include <guacamole/socket.h>
#include <openssl/ssl.h>
static ssize_t __guac_socket_ssl_read_handler(guac_socket* socket,
@ -93,7 +93,7 @@ static int __guac_socket_ssl_select_handler(guac_socket* socket, int usec_timeou
guac_error_message = "Error while waiting for data on secure socket";
}
if (retval == 0) {
else if (retval == 0) {
guac_error = GUAC_STATUS_TIMEOUT;
guac_error_message = "Timeout while waiting for data on secure socket";
}

View File

@ -43,12 +43,5 @@ libguacd_la_LIBADD = \
libguacd_la_LDFLAGS = \
-version-info 0:0:0 \
-no-undefined \
@PTHREAD_LIBS@ \
@SSL_LIBS@
# SSL support
if ENABLE_SSL
libguacdinc_HEADERS += libguacd/socket-ssl.h
libguacd_la_SOURCES += socket-ssl.c
endif
@PTHREAD_LIBS@