Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 May 2022 19:37:16 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: eb845555fd0a - stable/12 - ssh: use upstream SSH_OPENSSL_VERSION macro
Message-ID:  <202205011937.241JbGTJ039489@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=eb845555fd0a678cc0916ce392444fe2f2a2ec10

commit eb845555fd0a678cc0916ce392444fe2f2a2ec10
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2022-04-23 19:52:03 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2022-05-01 19:37:10 +0000

    ssh: use upstream SSH_OPENSSL_VERSION macro
    
    With the upgrade to OpenSSH 6.7p1 in commit a0ee8cc636cd we replaced
    WITH_OPENSSL ifdefs with an OPENSSL_VERSION macro, later changing it
    to OPENSSL_VERSION_STRING.
    
    A few years later OpenSSH made an equivalent change (with a different
    macro name), in commit 4d94b031ff88.  Switch to the macro name they
    chose.
    
    MFC after:      1 week
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit 6e24fe61287b02600be19042a6f6ce939aabfaa6)
    (cherry picked from commit 41406f9251c0e186fe820f70e9da0606bff71dae)
---
 crypto/openssh/ssh.c     | 6 +++---
 crypto/openssh/sshd.c    | 4 ++--
 crypto/openssh/version.h | 6 ------
 3 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/crypto/openssh/ssh.c b/crypto/openssh/ssh.c
index f01cb75e0237..99c532040558 100644
--- a/crypto/openssh/ssh.c
+++ b/crypto/openssh/ssh.c
@@ -877,10 +877,10 @@ main(int ac, char **av)
 			    *options.version_addendum != '\0')
 				fprintf(stderr, "%s %s, %s\n", SSH_RELEASE,
 				    options.version_addendum,
-				    OPENSSL_VERSION_STRING);
+				    SSH_OPENSSL_VERSION);
 			else
 				fprintf(stderr, "%s, %s\n", SSH_RELEASE,
-				    OPENSSL_VERSION_STRING);
+				    SSH_OPENSSL_VERSION);
 			if (opt == 'V')
 				exit(0);
 			break;
@@ -1148,7 +1148,7 @@ main(int ac, char **av)
 
 	if (debug_flag)
 		/* version_addendum is always NULL at this point */
-		logit("%s, %s", SSH_RELEASE, OPENSSL_VERSION_STRING);
+		logit("%s, %s", SSH_RELEASE, SSH_OPENSSL_VERSION);
 
 	/* Parse the configuration files */
 	process_config_files(host_arg, pw, 0, &want_final_pass);
diff --git a/crypto/openssh/sshd.c b/crypto/openssh/sshd.c
index f2fa2c56625b..c4544137d5d7 100644
--- a/crypto/openssh/sshd.c
+++ b/crypto/openssh/sshd.c
@@ -928,10 +928,10 @@ usage(void)
 	    *options.version_addendum != '\0')
 		fprintf(stderr, "%s %s, %s\n",
 		    SSH_RELEASE,
-		    options.version_addendum, OPENSSL_VERSION_STRING);
+		    options.version_addendum, SSH_OPENSSL_VERSION);
 	else
 		fprintf(stderr, "%s, %s\n",
-		    SSH_RELEASE, OPENSSL_VERSION_STRING);
+		    SSH_RELEASE, SSH_OPENSSL_VERSION);
 	fprintf(stderr,
 "usage: sshd [-46DdeiqTt] [-C connection_spec] [-c host_cert_file]\n"
 "            [-E log_file] [-f config_file] [-g login_grace_time]\n"
diff --git a/crypto/openssh/version.h b/crypto/openssh/version.h
index ddbdbf778fe0..22ee862ab552 100644
--- a/crypto/openssh/version.h
+++ b/crypto/openssh/version.h
@@ -7,9 +7,3 @@
 #define SSH_RELEASE	SSH_VERSION SSH_PORTABLE
 
 #define SSH_VERSION_FREEBSD	"FreeBSD-20211221"
-
-#ifdef WITH_OPENSSL
-#define OPENSSL_VERSION_STRING	OpenSSL_version(OPENSSL_VERSION)
-#else
-#define OPENSSL_VERSION_STRING	"without OpenSSL"
-#endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202205011937.241JbGTJ039489>