The secure channel, in discovery mode, wants to enable TCP connections
by default only if SSL has not been configured. This function allows
it to do that.
#ifndef VCONN_SSL_H
#define VCONN_SSL_H 1
+#include <stdbool.h>
+
#ifdef HAVE_OPENSSL
+bool vconn_ssl_is_configured(void);
void vconn_ssl_set_private_key_file(const char *file_name);
void vconn_ssl_set_certificate_file(const char *file_name);
void vconn_ssl_set_ca_cert_file(const char *file_name);
vconn_ssl_set_ca_cert_file(optarg); \
break;
#else /* !HAVE_OPENSSL */
+static inline bool vconn_ssl_is_configured(void)
+{
+ return false;
+}
#define VCONN_SSL_LONG_OPTIONS
#define VCONN_SSL_OPTION_HANDLERS
#endif /* !HAVE_OPENSSL */
return NULL;
}
+/* Returns true if SSL is at least partially configured. */
+bool
+vconn_ssl_is_configured(void)
+{
+ return has_private_key || has_certificate || has_ca_cert;
+}
+
void
vconn_ssl_set_private_key_file(const char *file_name)
{