X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/357eb3f6b1aaa11b81a7973da4fc84116098faa7..3ab1e9323e964d5377952a2b666ce91bab39c45a:/sbr/netsec.c diff --git a/sbr/netsec.c b/sbr/netsec.c index c07371ac..43d63679 100644 --- a/sbr/netsec.c +++ b/sbr/netsec.c @@ -1422,8 +1422,8 @@ netsec_set_oauth_service(netsec_context *nsc, const char *service) int netsec_set_tls(netsec_context *nsc, int tls, char **errstr) { - if (tls) { #ifdef TLS_SUPPORT + if (tls) { SSL *ssl; BIO *rbio, *wbio, *ssl_bio;; @@ -1529,13 +1529,16 @@ netsec_set_tls(netsec_context *nsc, int tls, char **errstr) BIO_free_all(nsc->ssl_io); nsc->ssl_io = NULL; - return OK; #else /* TLS_SUPPORT */ - netsec_err(errstr, "TLS is not supported"); + NMH_UNUSED(nsc); + if (tls) { + netsec_err(errstr, "TLS is not supported"); return NOTOK; } #endif /* TLS_SUPPORT */ + + return OK; } /* @@ -1575,6 +1578,7 @@ netsec_negotiate_tls(netsec_context *nsc, char **errstr) return OK; #else /* TLS_SUPPORT */ + NMH_UNUSED(nsc); netsec_err(errstr, "TLS not supported"); return NOTOK;