diff --git a/src/core/util.c b/src/core/util.c index 2e361e1..65f964a 100644 --- a/src/core/util.c +++ b/src/core/util.c @@ -40,6 +40,10 @@ #include #include +#if defined(HAVE_LIBSSL) + #include +#endif // HAVE_LIBSSL + #define my_isspace(c) isspace((unsigned char)c) /** @@ -367,7 +371,18 @@ LIB3270_EXPORT const char * lib3270_get_revision(void) LIB3270_EXPORT char * lib3270_get_version_info(void) { +#if defined(HAVE_LIBSSL) + return lib3270_strdup_printf( + "%s version %s-%s build %s (%s)", + PACKAGE_NAME, + PACKAGE_VERSION, + PACKAGE_RELEASE, + RPQ_TIMESTAMP_VALUE, + OPENSSL_VERSION_TEXT + ); +#else return lib3270_strdup_printf("%s version %s-%s build %s",PACKAGE_NAME,PACKAGE_VERSION,PACKAGE_RELEASE,RPQ_TIMESTAMP_VALUE); +#endif // HAVE_LIBSSL } void lib3270_popup_an_errno(H3270 *hSession, int errn, const char *fmt, ...) diff --git a/src/ssl/negotiate.c b/src/ssl/negotiate.c index a92e734..3f51435 100644 --- a/src/ssl/negotiate.c +++ b/src/ssl/negotiate.c @@ -200,14 +200,22 @@ static int background_ssl_negotiation(H3270 *hSession, void *message) if( (protocol = get_protocol_from_id(hSession->ssl.protocol.min_version)) != NULL ) { +#if (OPENSSL_VERSION_NUMBER >= 0x1010009fL) trace_ssl(hSession,"Minimum protocol version set to %s\n",protocol->description); SSL_set_min_proto_version(hSession->ssl.con,protocol->id); +#else + trace_ssl(hSession,"Can't set minimum protocol version to %s\n",protocol->description); +#endif // OPENSSL_VERSION_NUMBER } if( (protocol = get_protocol_from_id(hSession->ssl.protocol.max_version)) != NULL ) { +#if (OPENSSL_VERSION_NUMBER >= 0x1010009fL) trace_ssl(hSession,"Maximum protocol version set to %s\n",protocol->description); SSL_set_max_proto_version(hSession->ssl.con,protocol->id); +#else + trace_ssl(hSession,"Can't set maximum protocol version to %s\n",protocol->description); +#endif // OPENSSL_VERSION_NUMBER } if(SSL_set_fd(hSession->ssl.con, hSession->connection.sock) != 1) -- libgit2 0.21.2