summaryrefslogtreecommitdiff
path: root/vchat-connection.c
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2022-05-25 00:24:56 +0200
committerDirk Engling <erdgeist@erdgeist.org>2022-05-25 00:24:56 +0200
commit74cd15a70612c9972b68fe8fbfb4c0b9959955f2 (patch)
treedd06d22d2cbafe2fa3859e9e3c317cd8237e711d /vchat-connection.c
parent6e9a63961b0d19f8c701d527cf49f0be5a64fd8f (diff)
Diffstat (limited to 'vchat-connection.c')
-rw-r--r--vchat-connection.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/vchat-connection.c b/vchat-connection.c
index 4680b6e..dea69d0 100644
--- a/vchat-connection.c
+++ b/vchat-connection.c
@@ -119,12 +119,14 @@ int vc_connect(const char *server, const char *port) {
119 } 119 }
120 120
121 if (want_openssl && _engine == TLS_ENGINE_MBEDTLS) 121 if (want_openssl && _engine == TLS_ENGINE_MBEDTLS)
122 writecf(FS_SERV, "Warning: tls engine openssl requested but openssl engine not compiled in. Using mbedtls"); 122 writecf(FS_SERV, "Warning: tls engine openssl requested but openssl engine "
123 "not compiled in. Using mbedtls");
123 124
124 if (!want_openssl && _engine == TLS_ENGINE_OPENSSL) 125 if (!want_openssl && _engine == TLS_ENGINE_OPENSSL)
125 writecf(FS_SERV, "Warning: tls engine mbedtls requested but mbedts engine not compiled in. Using openssl"); 126 writecf(FS_SERV, "Warning: tls engine mbedtls requested but mbedts engine "
127 "not compiled in. Using openssl");
126 128
127 /* If SSL is requested, get our ssl-BIO running */ 129 /* If SSL is requested, get our ssl-BIO running */
128#ifdef TLS_LIB_OPENSSL 130#ifdef TLS_LIB_OPENSSL
129 if (_engine == TLS_ENGINE_OPENSSL) 131 if (_engine == TLS_ENGINE_OPENSSL)
130 vc_openssl_init_x509store(&vc_store); 132 vc_openssl_init_x509store(&vc_store);
@@ -260,7 +262,7 @@ void vc_sendmessage(const char *msg) {
260 262
261/* get data from servers connection */ 263/* get data from servers connection */
262int vc_receive(void) { 264int vc_receive(void) {
263/* offset in buffer (for linebreaks at packet borders) */ 265 /* offset in buffer (for linebreaks at packet borders) */
264 static char buf[RECEIVEBUF_SIZE]; 266 static char buf[RECEIVEBUF_SIZE];
265 static size_t buf_fill; 267 static size_t buf_fill;
266 char *endmsg; 268 char *endmsg;
@@ -337,7 +339,10 @@ const char *vchat_tls_version_external() {
337 char *mbedtls_version = strdup("not installed"); 339 char *mbedtls_version = strdup("not installed");
338#endif 340#endif
339 341
340 snprintf(tmpstr, TMPSTRSIZE, "Module plain v0.1\nModule openssl version: %s\nModule mbedtls version: %s", openssl_version, mbedtls_version); 342 snprintf(tmpstr, TMPSTRSIZE,
343 "Module plain v0.1\nModule openssl version: %s\nModule mbedtls "
344 "version: %s",
345 openssl_version, mbedtls_version);
341 346
342 free(openssl_version); 347 free(openssl_version);
343 free(mbedtls_version); 348 free(mbedtls_version);