Identify and move OpenSSL internal header files
authorRichard Levitte <levitte@openssl.org>
Thu, 14 May 2015 12:54:49 +0000 (14:54 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 14 May 2015 13:13:49 +0000 (15:13 +0200)
There are header files in crypto/ that are used by the rest of
OpenSSL.  Move those to include/internal and adapt the affected source
code, Makefiles and scripts.

The header files that got moved are:

crypto/constant_time_locl.h
crypto/o_dir.h
crypto/o_str.h

Reviewed-by: Matt Caswell <matt@openssl.org>
17 files changed:
crypto/Makefile
crypto/o_dir.c
crypto/o_dir_test.c
crypto/o_str.c
crypto/rsa/rsa_oaep.c
crypto/rsa/rsa_pk1.c
e_os.h
include/internal/constant_time_locl.h [moved from crypto/constant_time_locl.h with 100% similarity]
include/internal/o_dir.h [moved from crypto/o_dir.h with 100% similarity]
include/internal/o_str.h [moved from crypto/o_str.h with 100% similarity]
ssl/Makefile
ssl/record/ssl3_record.c
ssl/s3_cbc.c
ssl/s3_srvr.c
ssl/ssl_cert.c
test/constant_time_test.c
util/mkdef.pl

index 5270d75e1956d4d3ca52e92b6d6380afebd51d87..de74a0fe2505f201131e374177c420b4acf3f02d 100644 (file)
@@ -43,8 +43,7 @@ LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o cpt_err.o \
 
 SRC= $(LIBSRC)
 
-HEADER=        cryptlib.h buildinf.h md32_common.h o_str.h o_dir.h \
-       constant_time_locl.h
+HEADER=        cryptlib.h buildinf.h md32_common.h
 
 ALL=   $(GENERAL) $(SRC) $(HEADER)
 
index 26242444c885009faa918458584ef2886f619492..7bff74e0ec9c19ba3656f1ff5a8490e36a4287f2 100644 (file)
@@ -70,7 +70,7 @@
 #define LP_find_file OPENSSL_DIR_read
 #define LP_find_file_end OPENSSL_DIR_end
 
-#include "o_dir.h"
+#include "internal/o_dir.h"
 
 #define LPDIR_H
 #if defined OPENSSL_SYS_UNIX || defined DJGPP
index 7cdbbbc403e72d408337017f0e6bb76ebaa1af16..733ffecf3a309d84ce5badfd3bd56982657584a5 100644 (file)
@@ -36,7 +36,7 @@
 #include <stdio.h>
 #include <errno.h>
 #include "e_os2.h"
-#include "o_dir.h"
+#include "internal/o_dir.h"
 
 #if defined OPENSSL_SYS_UNIX || defined OPENSSL_SYS_WIN32 || defined OPENSSL_SYS_WINCE
 # define CURRDIR "."
index 16fd4e42315022dcd5a145266d82669e5f1a6f94..f2f9404db0107026818074066288387dfc59f187 100644 (file)
@@ -59,7 +59,7 @@
 
 #include <ctype.h>
 #include <e_os.h>
-#include "o_str.h"
+#include "internal/o_str.h"
 
 #if !defined(OPENSSL_IMPLEMENTS_strncasecmp) && \
     !defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_SYS_WINCE) && \
index d988d6c217716d72ee9cd03a2817350d4a03b46e..6edfb4145d84a354aebcc5c95094ae15bad2df43 100644 (file)
@@ -17,7 +17,7 @@
  * one-wayness.  For the RSA function, this is an equivalent notion.
  */
 
-#include "constant_time_locl.h"
+#include "internal/constant_time_locl.h"
 
 #include <stdio.h>
 #include "cryptlib.h"
index 1bda998ca4abe37597cce38cf05785f9cbb75456..e32a1d5f8f1e7b0148566acf889da0b3d497df04 100644 (file)
@@ -56,7 +56,7 @@
  * [including the GNU Public Licence.]
  */
 
-#include "constant_time_locl.h"
+#include "internal/constant_time_locl.h"
 
 #include <stdio.h>
 #include "cryptlib.h"
diff --git a/e_os.h b/e_os.h
index 7f94bfcae678cf8e8ac8f8f72d0da2ac0bf0a8fe..4c1b4aa1de9804ae0326c34ab0342593a609a863 100644 (file)
--- a/e_os.h
+++ b/e_os.h
@@ -605,7 +605,7 @@ extern int sys_nerr;
 #  define strerror(errnum) \
         (((errnum)<0 || (errnum)>=sys_nerr) ? NULL : sys_errlist[errnum])
   /* Being signed SunOS 4.x memcpy breaks ASN1_OBJECT table lookup */
-#  include "crypto/o_str.h"
+#  include "internal/o_str.h"
 #  define memcmp OPENSSL_memcmp
 # endif
 
@@ -624,7 +624,7 @@ extern int sys_nerr;
 #  define strncasecmp _strnicmp
 # elif defined(OPENSSL_SYS_VMS)
 /* VMS below version 7.0 doesn't have strcasecmp() */
-#  include "o_str.h"
+#  include "internal/o_str.h"
 #  define strcasecmp OPENSSL_strcasecmp
 #  define strncasecmp OPENSSL_strncasecmp
 #  define OPENSSL_IMPLEMENTS_strncasecmp
similarity index 100%
rename from crypto/o_dir.h
rename to include/internal/o_dir.h
similarity index 100%
rename from crypto/o_str.h
rename to include/internal/o_str.h
index 18b17d27b5c38e282dd4e6ea6a5720af2e095b36..7dc2e02897d60fa787cce2cab5cce22020bc3df3 100644 (file)
@@ -5,7 +5,7 @@
 DIR=   ssl
 TOP=   ..
 CC=    cc
-INCLUDES= -I../crypto -I$(TOP) -I../include
+INCLUDES= -I$(TOP) -I../include
 CFLAG=-g
 MAKEFILE=      Makefile
 AR=            ar r
index db6d4e792b95597f197a73ec461678867c95c21f..032812772f04b17403a556798d20c7786d0c32bc 100644 (file)
  */
 
 #include "../ssl_locl.h"
-#include "../../crypto/constant_time_locl.h"
+#include "internal/constant_time_locl.h"
 #include <openssl/rand.h>
 #include "record_locl.h"
 
index ac0c5f3ab8459a935df109fb3bb6b23dc6f298c7..f7997eaae326ac486332b07815eafda83496cc38 100644 (file)
@@ -53,7 +53,7 @@
  *
  */
 
-#include "../crypto/constant_time_locl.h"
+#include "internal/constant_time_locl.h"
 #include "ssl_locl.h"
 
 #include <openssl/md5.h>
index 04dbb7a735c4290fee1903f2358e38b94a344293..4ee45eb57f6071992bd84859ddfd2450ce27316e 100644 (file)
 
 #include <stdio.h>
 #include "ssl_locl.h"
-#include "../crypto/constant_time_locl.h"
+#include "internal/constant_time_locl.h"
 #include <openssl/buffer.h>
 #include <openssl/rand.h>
 #include <openssl/objects.h>
index 38e7b822e5e4c94b720db1b70fc4acefff3b661a..d8b47e62099109d5016cc1d0a7333b1a22e1ef75 100644 (file)
 # include <sys/types.h>
 #endif
 
-#include "o_dir.h"
+#include "internal/o_dir.h"
 #include <openssl/objects.h>
 #include <openssl/bio.h>
 #include <openssl/pem.h>
index bdb270209e4a7c93877b4e5efa1a77a563a24de6..ed3d7eaac4d88a59d64c618f7c242621ca9253ad 100644 (file)
@@ -44,7 +44,7 @@
  * [including the GNU Public Licence.]
  */
 
-#include "../crypto/constant_time_locl.h"
+#include "internal/constant_time_locl.h"
 
 #include <limits.h>
 #include <stdio.h>
index 6c4ce3fa3acf4e18eff4ce7af160c5f4fd493b0e..18bc1ab305650a751647bac81b37fc1d1b81efd6 100755 (executable)
@@ -262,8 +262,8 @@ $ssl.=" include/openssl/srtp.h";
 
 my $crypto ="include/openssl/crypto.h";
 $crypto.=" crypto/cryptlib.h";
-$crypto.=" crypto/o_dir.h";
-$crypto.=" crypto/o_str.h";
+$crypto.=" include/internal/o_dir.h";
+$crypto.=" include/internal/o_str.h";
 $crypto.=" include/openssl/des.h" ; # unless $no_des;
 $crypto.=" include/openssl/idea.h" ; # unless $no_idea;
 $crypto.=" include/openssl/rc4.h" ; # unless $no_rc4;