summaryrefslogtreecommitdiffstats
path: root/src/ssl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ssl.c')
-rw-r--r--src/ssl.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/ssl.c b/src/ssl.c
index ce38814..c77d57a 100644
--- a/src/ssl.c
+++ b/src/ssl.c
@@ -108,9 +108,10 @@ int client_init_secure(void)
SSL_load_error_strings();
cctx = SSL_CTX_new (meth);
- if (!cctx) {
- fprintf(stderr, "Failed to create a client ssl context!\n");
- }
+ if (!cctx)
+ debugmsg("Failed to create a client ssl context!");
+ else
+ debugmsg("Client SSL Context Initialized");
return 0;
}
@@ -346,10 +347,12 @@ int ast_connect(struct mansession *a) {
sec_channel[s].ssl = ssl;
SSL_set_fd(ssl, fd); /* and attach the real fd */
err = SSL_connect(ssl); /* now try and connect */
- }
+ } else
+ debugmsg("couldn't create ssl client context");
fd = -(s+2); /* offset by two and negate */
/* this tells us it is a ssl fd */
- }
+ } else
+ debugmsg("couldn't get SSL slot!");
if (err==-1) {
close_sock(fd); /* that frees the ssl too */
@@ -370,8 +373,8 @@ int connect_nonb(struct mansession *a)
s = get_real_fd(a->fd);
- flags = fcntl(s, F_GETFL, 0);
- fcntl(s, F_SETFL, flags | O_NONBLOCK);
+/* flags = fcntl(s, F_GETFL, 0);
+ fcntl(s, F_SETFL, flags | O_NONBLOCK); */
if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&one, sizeof(one))==-1) {
(void)close(s);