git: ae91d937e2cb - stable/13 - ssh: use upstream SSH_OPENSSL_VERSION macro

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Sun, 01 May 2022 19:37:07 UTC
The branch stable/13 has been updated by emaste:

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

commit ae91d937e2cb94e34a5d3d78f0e740eca9f3a634
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:36:59 +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)
---
 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