diff --git a/openssh-openssl-1_0_0-compatibility.patch b/openssh-openssl-1_0_0-compatibility.patch new file mode 100644 index 0000000..d715312 --- /dev/null +++ b/openssh-openssl-1_0_0-compatibility.patch @@ -0,0 +1,41 @@ +Index: openssh-7.9p1/openbsd-compat/openssl-compat.c +=================================================================== +--- openssh-7.9p1.orig/openbsd-compat/openssl-compat.c 2018-11-26 11:47:17.417925053 +0100 ++++ openssh-7.9p1/openbsd-compat/openssl-compat.c 2018-11-26 11:52:47.127727580 +0100 +@@ -76,7 +76,7 @@ ssh_OpenSSL_add_all_algorithms(void) + ENGINE_load_builtin_engines(); + ENGINE_register_all_complete(); + +-#if OPENSSL_VERSION_NUMBER < 0x10001000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + OPENSSL_config(NULL); + #else + OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | +Index: openssh-7.9p1/gss-genr.c +=================================================================== +--- openssh-7.9p1.orig/gss-genr.c 2018-11-26 11:47:17.417925053 +0100 ++++ openssh-7.9p1/gss-genr.c 2018-11-26 12:01:40.354642746 +0100 +@@ -114,7 +114,11 @@ ssh_gssapi_kex_mechs(gss_OID_set gss_sup + if ((buf = sshbuf_new()) == NULL) + fatal("%s: sshbuf_new failed", __func__); + ++#if OPENSSL_VERSION_NUMBER < 0x10100000L ++ md = EVP_MD_CTX_create(); ++#else + md = EVP_MD_CTX_new(); ++#endif + oidpos = 0; + for (i = 0; i < gss_supported->count; i++) { + if (gss_supported->elements[i].length < 128 && +@@ -156,7 +160,11 @@ ssh_gssapi_kex_mechs(gss_OID_set gss_sup + oidpos++; + } + } ++#if OPENSSL_VERSION_NUMBER < 0x10100000L ++ EVP_MD_CTX_destroy(md); ++#else + EVP_MD_CTX_free(md); ++#endif + gss_enc2oid[oidpos].oid = NULL; + gss_enc2oid[oidpos].encoded = NULL; + diff --git a/openssh.changes b/openssh.changes index 0363aaf..6fd31f7 100644 --- a/openssh.changes +++ b/openssh.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Nov 26 11:07:42 UTC 2018 - Vítězslav Čížek + +- Fix build with openssl < 1.1.0 + * add openssh-openssl-1_0_0-compatibility.patch + ------------------------------------------------------------------- Wed Oct 31 00:27:41 UTC 2018 - Cristian Rodríguez diff --git a/openssh.spec b/openssh.spec index 0af7c69..61701c9 100644 --- a/openssh.spec +++ b/openssh.spec @@ -97,6 +97,7 @@ Patch31: openssh-7.7p1-ldap.patch # https://bugzilla.mindrot.org/show_bug.cgi?id=2213 Patch32: openssh-7.7p1-IPv6_X_forwarding.patch Patch33: openssh-7.7p1-sftp_print_diagnostic_messages.patch +Patch34: openssh-openssl-1_0_0-compatibility.patch BuildRequires: audit-devel BuildRequires: autoconf BuildRequires: groff