vishalmishra434 / rpms / openssh

Forked from rpms/openssh a month ago
Clone
Jakub Jelen 322896
From 631165f6c43d230df9174423aeb19fcf09a67ef4 Mon Sep 17 00:00:00 2001
Jakub Jelen 322896
From: Damien Miller <djm@mindrot.org>
Jakub Jelen 322896
Date: Mon, 22 Oct 2018 11:22:50 +1100
Jakub Jelen 322896
Subject: [PATCH 1/7] fix compile for openssl 1.0.x w/ --with-ssl-engine
Jakub Jelen 322896
Jakub Jelen 322896
bz#2921, patch from cotequeiroz
Jakub Jelen 322896
---
Jakub Jelen 322896
 openbsd-compat/openssl-compat.c | 2 +-
Jakub Jelen 322896
 1 file changed, 1 insertion(+), 1 deletion(-)
Jakub Jelen 322896
Jakub Jelen 322896
diff --git a/openbsd-compat/openssl-compat.c b/openbsd-compat/openssl-compat.c
Jakub Jelen 322896
index 8b4a3627..590b66d1 100644
Jakub Jelen 322896
--- a/openbsd-compat/openssl-compat.c
Jakub Jelen 322896
+++ b/openbsd-compat/openssl-compat.c
Jakub Jelen 322896
@@ -76,7 +76,7 @@ ssh_OpenSSL_add_all_algorithms(void)
Jakub Jelen 322896
 	ENGINE_load_builtin_engines();
Jakub Jelen 322896
 	ENGINE_register_all_complete();
Jakub Jelen 322896
 
Jakub Jelen 322896
-#if OPENSSL_VERSION_NUMBER < 0x10001000L
Jakub Jelen 322896
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
Jakub Jelen 322896
 	OPENSSL_config(NULL);
Jakub Jelen 322896
 #else
Jakub Jelen 322896
 	OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS |
Jakub Jelen 322896
-- 
Jakub Jelen 322896
2.20.1
Jakub Jelen 322896
Jakub Jelen 322896
Jakub Jelen 322896
From 55d7cdda4dc4e8284ccd276f73440be400250a1e Mon Sep 17 00:00:00 2001
Jakub Jelen 322896
From: Darren Tucker <dtucker@dtucker.net>
Jakub Jelen 322896
Date: Mon, 22 Oct 2018 20:05:18 +1100
Jakub Jelen 322896
Subject: [PATCH 2/7] Include openssl compatibility.
Jakub Jelen 322896
Jakub Jelen 322896
Patch from rosenp at gmail.com via openssh-unix-dev.
Jakub Jelen 322896
---
Jakub Jelen 322896
 ssh-keysign.c | 1 +
Jakub Jelen 322896
 ssh_api.c     | 2 ++
Jakub Jelen 322896
 2 files changed, 3 insertions(+)
Jakub Jelen 322896
Jakub Jelen 322896
diff --git a/ssh-keysign.c b/ssh-keysign.c
Jakub Jelen 322896
index 744ecb4f..bcd1508c 100644
Jakub Jelen 322896
--- a/ssh-keysign.c
Jakub Jelen 322896
+++ b/ssh-keysign.c
Jakub Jelen 322896
@@ -40,6 +40,7 @@
Jakub Jelen 322896
 #include <openssl/evp.h>
Jakub Jelen 322896
 #include <openssl/rand.h>
Jakub Jelen 322896
 #include <openssl/rsa.h>
Jakub Jelen 322896
+#include "openbsd-compat/openssl-compat.h"
Jakub Jelen 322896
 #endif
Jakub Jelen 322896
 
Jakub Jelen 322896
 #include "xmalloc.h"
Jakub Jelen 322896
diff --git a/ssh_api.c b/ssh_api.c
Jakub Jelen 322896
index c84b4e71..e727c0d6 100644
Jakub Jelen 322896
--- a/ssh_api.c
Jakub Jelen 322896
+++ b/ssh_api.c
Jakub Jelen 322896
@@ -29,6 +29,8 @@
Jakub Jelen 322896
 #include "ssherr.h"
Jakub Jelen 322896
 #include "sshbuf.h"
Jakub Jelen 322896
 
Jakub Jelen 322896
+#include "openbsd-compat/openssl-compat.h"
Jakub Jelen 322896
+
Jakub Jelen 322896
 #include <string.h>
Jakub Jelen 322896
 
Jakub Jelen 322896
 int	_ssh_exchange_banner(struct ssh *);
Jakub Jelen 322896
-- 
Jakub Jelen 322896
2.20.1
Jakub Jelen 322896
Jakub Jelen 322896
Jakub Jelen 322896
From 22092e375125dc602227afb8b2d3b285203e77c1 Mon Sep 17 00:00:00 2001
Jakub Jelen 322896
From: Darren Tucker <dtucker@dtucker.net>
Jakub Jelen 322896
Date: Mon, 5 Nov 2018 17:31:24 +1100
Jakub Jelen 322896
Subject: [PATCH 3/7] Fix pasto for HAVE_EVP_CIPHER_CTX_SET_IV.
Jakub Jelen 322896
Jakub Jelen 322896
Prevents unnecessary redefinition.  Patch from mforney at mforney.org.
Jakub Jelen 322896
---
Jakub Jelen 322896
 configure.ac | 2 +-
Jakub Jelen 322896
 1 file changed, 1 insertion(+), 1 deletion(-)
Jakub Jelen 322896
Jakub Jelen 322896
diff --git a/configure.ac b/configure.ac
Jakub Jelen 322896
index 7379ab35..1041bf25 100644
Jakub Jelen 322896
--- a/configure.ac
Jakub Jelen 322896
+++ b/configure.ac
Jakub Jelen 322896
@@ -2850,7 +2850,7 @@ if test "x$openssl" = "xyes" ; then
Jakub Jelen 322896
 		[AC_DEFINE([HAVE_EVP_CIPHER_CTX_GET_IV], [1],
Jakub Jelen 322896
 		    [Define if libcrypto has EVP_CIPHER_CTX_get_iv])])
Jakub Jelen 322896
 	AC_SEARCH_LIBS([EVP_CIPHER_CTX_set_iv], [crypto],
Jakub Jelen 322896
-		[AC_DEFINE([HAVE_EVP_CIPHER_CTX_GET_IV], [1],
Jakub Jelen 322896
+		[AC_DEFINE([HAVE_EVP_CIPHER_CTX_SET_IV], [1],
Jakub Jelen 322896
 		    [Define if libcrypto has EVP_CIPHER_CTX_set_iv])])
Jakub Jelen 322896
 
Jakub Jelen 322896
 	AC_SEARCH_LIBS([RSA_get0_crt_params], [crypto],
Jakub Jelen 322896
-- 
Jakub Jelen 322896
2.20.1
Jakub Jelen 322896
Jakub Jelen 322896
Jakub Jelen 322896
From 904d478f07deabb401f741f88c67ab2e07f742bd Mon Sep 17 00:00:00 2001
Jakub Jelen 322896
From: Darren Tucker <dtucker@dtucker.net>
Jakub Jelen 322896
Date: Sun, 11 Nov 2018 15:54:54 +1100
Jakub Jelen 322896
Subject: [PATCH 4/7] Remove hardcoded service name in cygwin setup.
Jakub Jelen 322896
Jakub Jelen 322896
bz#2922, patch from Christian.Lupien at USherbrooke.ca, sanity check
Jakub Jelen 322896
by vinschen at redhat.com.
Jakub Jelen 322896
---
Jakub Jelen 322896
 contrib/cygwin/ssh-host-config | 2 +-
Jakub Jelen 322896
 1 file changed, 1 insertion(+), 1 deletion(-)
Jakub Jelen 322896
Jakub Jelen 322896
diff --git a/contrib/cygwin/ssh-host-config b/contrib/cygwin/ssh-host-config
Jakub Jelen 322896
index 261020af..e9f038db 100644
Jakub Jelen 322896
--- a/contrib/cygwin/ssh-host-config
Jakub Jelen 322896
+++ b/contrib/cygwin/ssh-host-config
Jakub Jelen 322896
@@ -307,7 +307,7 @@ check_service_files_ownership() {
Jakub Jelen 322896
 
Jakub Jelen 322896
   if [ -z "${run_service_as}" ]
Jakub Jelen 322896
   then
Jakub Jelen 322896
-    accnt_name=$(/usr/bin/cygrunsrv -VQ sshd |
Jakub Jelen 322896
+    accnt_name=$(/usr/bin/cygrunsrv -VQ "${service_name}" |
Jakub Jelen 322896
     		 /usr/bin/sed -ne 's/^Account *: *//gp')
Jakub Jelen 322896
     if [ "${accnt_name}" = "LocalSystem" ]
Jakub Jelen 322896
     then
Jakub Jelen 322896
-- 
Jakub Jelen 322896
2.20.1
Jakub Jelen 322896
Jakub Jelen 322896
Jakub Jelen 322896
From 4608a60cb4893a25490fd88ffdaaae6256381ae3 Mon Sep 17 00:00:00 2001
Jakub Jelen 322896
From: Damien Miller <djm@mindrot.org>
Jakub Jelen 322896
Date: Fri, 23 Nov 2018 10:45:20 +1100
Jakub Jelen 322896
Subject: [PATCH 6/7] fix configure test for OpenSSL version
Jakub Jelen 322896
Jakub Jelen 322896
square brackets in case statements may be eaten by autoconf.
Jakub Jelen 322896
Jakub Jelen 322896
Report and fix from Filipp Gunbin; tweaked by naddy@
Jakub Jelen 322896
---
Jakub Jelen 322896
 configure.ac | 2 +-
Jakub Jelen 322896
 1 file changed, 1 insertion(+), 1 deletion(-)
Jakub Jelen 322896
Jakub Jelen 322896
diff --git a/configure.ac b/configure.ac
Jakub Jelen 322896
index 1041bf25..9920ede5 100644
Jakub Jelen 322896
--- a/configure.ac
Jakub Jelen 322896
+++ b/configure.ac
Jakub Jelen 322896
@@ -2616,7 +2616,7 @@ if test "x$openssl" = "xyes" ; then
Jakub Jelen 322896
 				AC_MSG_ERROR([OpenSSL >= 1.0.1 required (have "$ssl_library_ver")])
Jakub Jelen 322896
 		                ;;
Jakub Jelen 322896
 			100*)   ;; # 1.0.x
Jakub Jelen 322896
-			101000[0123456]*)
Jakub Jelen 322896
+			101000[[0123456]]*)
Jakub Jelen 322896
 				# https://github.com/openssl/openssl/pull/4613
Jakub Jelen 322896
 				AC_MSG_ERROR([OpenSSL 1.1.x versions prior to 1.1.0g have a bug that breaks their use with OpenSSH (have "$ssl_library_ver")])
Jakub Jelen 322896
 				;;
Jakub Jelen 322896
-- 
Jakub Jelen 322896
2.20.1
Jakub Jelen 322896
Jakub Jelen 322896
Jakub Jelen 322896
From f429c1b2ef631f2855e51a790cf71761d752bbca Mon Sep 17 00:00:00 2001
Jakub Jelen 322896
From: "djm@openbsd.org" <djm@openbsd.org>
Jakub Jelen 322896
Date: Thu, 27 Dec 2018 23:02:11 +0000
Jakub Jelen 322896
Subject: [PATCH 7/7] upstream: Request RSA-SHA2 signatures for
Jakub Jelen 322896
Jakub Jelen 322896
rsa-sha2-{256|512}-cert-v01@openssh.com cert algorithms; ok markus@
Jakub Jelen 322896
Jakub Jelen 322896
OpenBSD-Commit-ID: afc6f7ca216ccd821656d1c911d2a3deed685033
Jakub Jelen 322896
---
Jakub Jelen 322896
 authfd.c | 8 +++++---
Jakub Jelen 322896
 1 file changed, 5 insertions(+), 3 deletions(-)
Jakub Jelen 322896
Jakub Jelen 322896
diff --git a/authfd.c b/authfd.c
Jakub Jelen 322896
index ecdd869a..62cbf8c1 100644
Jakub Jelen 322896
--- a/authfd.c
Jakub Jelen 322896
+++ b/authfd.c
Jakub Jelen 322896
@@ -327,10 +327,12 @@ ssh_free_identitylist(struct ssh_identitylist *idl)
Jakub Jelen 322896
 static u_int
Jakub Jelen 322896
 agent_encode_alg(const struct sshkey *key, const char *alg)
Jakub Jelen 322896
 {
Jakub Jelen 322896
-	if (alg != NULL && key->type == KEY_RSA) {
Jakub Jelen 322896
-		if (strcmp(alg, "rsa-sha2-256") == 0)
Jakub Jelen 322896
+	if (alg != NULL && sshkey_type_plain(key->type) == KEY_RSA) {
Jakub Jelen 322896
+		if (strcmp(alg, "rsa-sha2-256") == 0 ||
Jakub Jelen 322896
+		    strcmp(alg, "rsa-sha2-256-cert-v01@openssh.com") == 0)
Jakub Jelen 322896
 			return SSH_AGENT_RSA_SHA2_256;
Jakub Jelen 322896
-		else if (strcmp(alg, "rsa-sha2-512") == 0)
Jakub Jelen 322896
+		if (strcmp(alg, "rsa-sha2-512") == 0 ||
Jakub Jelen 322896
+		    strcmp(alg, "rsa-sha2-512-cert-v01@openssh.com") == 0)
Jakub Jelen 322896
 			return SSH_AGENT_RSA_SHA2_512;
Jakub Jelen 322896
 	}
Jakub Jelen 322896
 	return 0;
Jakub Jelen 322896
-- 
Jakub Jelen 322896
2.20.1
Jakub Jelen 322896