summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViktor Dukhovni <openssl-users@dukhovni.org>2016-01-13 12:12:17 -0500
committerViktor Dukhovni <openssl-users@dukhovni.org>2016-01-13 12:37:48 -0500
commitbdb1d0c24b3df3e2253cd8289cd619093524464e (patch)
tree9da7b37ea9e80383832a491de306356381a1a8ec
parentdbc8541b86aee7b6e13e2208545fe625fc13cd7b (diff)
Fix DES_LONG breakage
For some strange reason opensslconf.h was only defining DES_LONG when included via des.h, but that's exceedingly fragile (as a result of include guards the include via des.h might not actually process the content again). Ripped out the nesting constraint, now always define OSSL_DES_LONG if not already defined. Note, this could just be DES_LONG, but trying to avoid exposing DES_LONG in places where it has never been seen before, so it is up to des.h to actually define DES_LONG as OSSL_DES_LONG. Reviewed-by: Rich Salz <rsalz@openssl.org>
-rwxr-xr-xConfigure4
-rw-r--r--crypto/des/rpc_des.h5
-rw-r--r--crypto/opensslconf.h.in6
-rw-r--r--include/openssl/des.h2
-rw-r--r--include/openssl/e_os2.h2
-rwxr-xr-xmakevms.com8
6 files changed, 12 insertions, 15 deletions
diff --git a/Configure b/Configure
index ee60a39bd8..4867475b65 100755
--- a/Configure
+++ b/Configure
@@ -2089,8 +2089,8 @@ while (<IN>)
{ printf OUT "#%s EIGHT_BIT\n",($b8)?"define":"undef"; }
elsif (/^#((define)|(undef))\s+BN_LLONG\s*$/)
{ printf OUT "#%s BN_LLONG\n",($bn_ll)?"define":"undef"; }
- elsif (/^\#define\s+DES_LONG\s+.*/)
- { printf OUT "#define DES_LONG unsigned %s\n",
+ elsif (/^\#define\s+OSSL_DES_LONG\s+.*/)
+ { printf OUT "#define OSSL_DES_LONG unsigned %s\n",
($des_int)?'int':'long'; }
elsif (/^\#(define|undef)\s+DES_PTR/)
{ printf OUT "#%s DES_PTR\n",($des_ptr)?'define':'undef'; }
diff --git a/crypto/des/rpc_des.h b/crypto/des/rpc_des.h
index 4db9062d97..986ac55348 100644
--- a/crypto/des/rpc_des.h
+++ b/crypto/des/rpc_des.h
@@ -94,11 +94,6 @@
#define DES_MAXLEN 65536 /* maximum # of bytes to encrypt */
#define DES_QUICKLEN 16 /* maximum # of bytes to encrypt quickly */
-#ifdef HEADER_DES_H
-# undef ENCRYPT
-# undef DECRYPT
-#endif
-
enum desdir { ENCRYPT, DECRYPT };
enum desmode { CBC, ECB };
diff --git a/crypto/opensslconf.h.in b/crypto/opensslconf.h.in
index 20a420fa7b..27c725fc6e 100644
--- a/crypto/opensslconf.h.in
+++ b/crypto/opensslconf.h.in
@@ -89,11 +89,11 @@
#endif
#endif
-#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG)
+#ifndef OSSL_DES_LONG
/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
* %20 speed up (longs are 8 bytes, int's are 4). */
-#ifndef DES_LONG
-#define DES_LONG unsigned long
+#ifndef OSSL_DES_LONG
+#define OSSL_DES_LONG unsigned long
#endif
#endif
diff --git a/include/openssl/des.h b/include/openssl/des.h
index 6bb037d9b4..9bb2e777a2 100644
--- a/include/openssl/des.h
+++ b/include/openssl/des.h
@@ -66,6 +66,8 @@
# error DES is disabled.
# endif
+# define DES_LONG OSSL_DES_LONG
+
# ifdef OPENSSL_BUILD_SHLIBCRYPTO
# undef OPENSSL_EXTERN
# define OPENSSL_EXTERN OPENSSL_EXPORT
diff --git a/include/openssl/e_os2.h b/include/openssl/e_os2.h
index fb022b13bd..ceecbfaccc 100644
--- a/include/openssl/e_os2.h
+++ b/include/openssl/e_os2.h
@@ -285,7 +285,7 @@ extern "C" {
# endif
/* Standard integer types */
-# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L || \
+# if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
defined(__osf__) || defined(__sgi) || defined(__hpux) || \
defined(OPENSSL_SYS_VMS)
# include <inttypes.h>
diff --git a/makevms.com b/makevms.com
index b26804b25e..ed0ac04860 100755
--- a/makevms.com
+++ b/makevms.com
@@ -585,8 +585,8 @@ $ WRITE H_FILE "#define RC4_CHUNK unsigned long long"
$ WRITE H_FILE "#endif"
$!
$ WRITE H_FILE "#if defined(HEADER_DES_LOCL_H)"
-$ WRITE H_FILE "#undef DES_LONG"
-$ WRITE H_FILE "#define DES_LONG unsigned int"
+$ WRITE H_FILE "#undef OSSL_DES_LONG"
+$ WRITE H_FILE "#define OSSL_DES_LONG unsigned int"
$ WRITE H_FILE "#undef DES_PTR"
$ WRITE H_FILE "#define DES_PTR"
$ WRITE H_FILE "#undef DES_RISC1"
@@ -622,8 +622,8 @@ $ WRITE H_FILE "#define RC4_CHUNK unsigned long"
$ WRITE H_FILE "#endif"
$!
$ WRITE H_FILE "#if defined(HEADER_DES_LOCL_H)"
-$ WRITE H_FILE "#undef DES_LONG"
-$ WRITE H_FILE "#define DES_LONG unsigned long"
+$ WRITE H_FILE "#undef OSSL_DES_LONG"
+$ WRITE H_FILE "#define OSSL_DES_LONG unsigned long"
$ WRITE H_FILE "#undef DES_PTR"
$ WRITE H_FILE "#define DES_PTR"
$ WRITE H_FILE "#undef DES_RISC1"