diff --git a/lib3270.cbp b/lib3270.cbp
index bd88ba5..e405eb9 100644
--- a/lib3270.cbp
+++ b/lib3270.cbp
@@ -57,7 +57,6 @@
-
diff --git a/src/include/lib3270.h b/src/include/lib3270.h
index 4a8db9e..1371f47 100644
--- a/src/include/lib3270.h
+++ b/src/include/lib3270.h
@@ -484,6 +484,13 @@
LIB3270_EXPORT void lib3270_set_hostname(H3270 *h, const char *hostname);
+ /**
+ * @brief Get SSL host option.
+ *
+ * @return Non zero if the host URL has SSL scheme.
+ *
+ */
+ LIB3270_EXPORT int lib3270_get_secure_host(H3270 *hSession);
/**
* @brief Get service or port for the connect/reconnect operations.
diff --git a/src/lib3270/properties.c b/src/lib3270/properties.c
index 726f06a..0840c25 100644
--- a/src/lib3270/properties.c
+++ b/src/lib3270/properties.c
@@ -584,3 +584,22 @@ int lib3270_set_string_property(H3270 *hSession, const char *name, const char *
return -1;
}
+
+/**
+ * @brief Get SSL host option.
+ *
+ * @return Non zero if the host URL has SSL scheme.
+ *
+ */
+LIB3270_EXPORT int lib3270_get_secure_host(H3270 *hSession)
+{
+ CHECK_SESSION_HANDLE(hSession);
+
+#ifdef HAVE_LIBSSL
+ return hSession->ssl.enabled ? 1 : 0;
+#else
+ return 0;
+#endif // HAVE_LIBSSL
+
+}
+
diff --git a/src/lib3270/testprogram/testprogram.c b/src/lib3270/testprogram/testprogram.c
index 8f892b9..0180775 100644
--- a/src/lib3270/testprogram/testprogram.c
+++ b/src/lib3270/testprogram/testprogram.c
@@ -5,6 +5,7 @@
#include
#include
+#include
#define MAX_ARGS 10
--
libgit2 0.21.2