From 10b279096b41c9ee2e90b8b9fa2bd3a76ee7a08c Mon Sep 17 00:00:00 2001
From: Rainer Jung <rjung@apache.org>
Date: Thu, 15 Mar 2018 23:05:58 +0000
Subject: [PATCH] Merge 1710403 from trunk:

htpasswd/htdigest: Disable support for bcrypt on EBCDIC platforms.
apr-util's bcrypt implementation doesn't tolerate EBCDIC.

Submitted by: rjung
Reviewed by: rjung, covener, ylavic


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1826892 13f79535-47bb-0310-9956-ffa450edef68
---
 CHANGES                 | 7 +++++--
 STATUS                  | 9 ---------
 support/passwd_common.h | 5 +++++
 3 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/CHANGES b/CHANGES
index 8275ca0540..da634c676f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -9,6 +9,11 @@ Changes with Apache 2.4.33
   *) ab: Use only one connection to determine working destination socket
      address.  [Jan Kaluza]
 
+  *) ab: LibreSSL doesn't have or require Windows applink.c.  [Gregg L. Smith]
+
+  *) htpasswd/htdigest: Disable support for bcrypt on EBCDIC platforms. 
+     apr-util's bcrypt implementation doesn't tolerate EBCDIC.  [Eric Covener]
+
   *) htpasswd/htdbm: report the right limit when get_password() overflows.
      [Yann Ylavic]
 
@@ -19,8 +24,6 @@ Changes with Apache 2.4.33
      to make static analysers happy.  PR 60634.
      [Yann Ylavic, reported by shqking and Zhenwei Zou]
 
-  *) ab: LibreSSL doesn't have or require Windows applink.c.  [Gregg L. Smith]
-
 Changes with Apache 2.4.32
 
   *) mod_access_compat: Fail if a comment is found in an Allow or Deny
diff --git a/STATUS b/STATUS
index badfb746cb..c8ed5ffd72 100644
--- a/STATUS
+++ b/STATUS
@@ -140,15 +140,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
      2.4.x patch: svn merge -c 1666415,1780308 ^/httpd/httpd/trunk .
      +1: rjung, covener, ylavic
 
-  *) htpasswd/htdigest: Disable support for bcrypt on EBCDIC platforms.
-     apr-util's bcrypt implementation doesn't tolerate EBCDIC.
-     This brings 2.4.x passwd_common.h in sync with trunk.
-     trunk patch: http://svn.apache.org/r1710403
-     2.4.x patch: svn merge -c 1710403 ^/httpd/httpd/trunk .
-                  minus second unrelated CHANGES entry
-     +1: rjung, covener, ylavic
-
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
 
diff --git a/support/passwd_common.h b/support/passwd_common.h
index 01d5652024..660081e908 100644
--- a/support/passwd_common.h
+++ b/support/passwd_common.h
@@ -66,6 +66,11 @@
 #define BCRYPT_ALGO_SUPPORTED 0
 #endif
 
+#if APR_CHARSET_EBCDIC
+#undef BCRYPT_ALGO_SUPPORTED
+#define BCRYPT_ALGO_SUPPORTED 0
+#endif
+
 /*
  * Must be initialized with apr_file_open_stderr() before using any of the
  * below functions.
-- 
2.40.0