[openssl] master update

Richard Levitte levitte at openssl.org
Tue Mar 5 08:26:20 UTC 2019


The branch master has been updated
       via  284d19c2ced0264bd46de61718aa4a60efa8d175 (commit)
       via  26a053d195d5cc8a5cd648da3f05d3ff0e47f776 (commit)
       via  ac4033d658e4dc210ed4552b88069b57532ba3d7 (commit)
      from  ff825807bc9bda996058df070f8ec23f7167e1a6 (commit)


- Log -----------------------------------------------------------------
commit 284d19c2ced0264bd46de61718aa4a60efa8d175
Author: Richard Levitte <levitte at openssl.org>
Date:   Fri Mar 1 11:54:07 2019 +0100

    Add advice on setting CXX at the same time as CC
    
    Reviewed-by: Paul Dale <paul.dale at oracle.com>
    (Merged from https://github.com/openssl/openssl/pull/8370)

commit 26a053d195d5cc8a5cd648da3f05d3ff0e47f776
Author: Richard Levitte <levitte at openssl.org>
Date:   Thu Feb 28 13:35:32 2019 +0100

    Travis: use enable-buildtest-c++
    
    Reviewed-by: Paul Dale <paul.dale at oracle.com>
    (Merged from https://github.com/openssl/openssl/pull/8370)

commit ac4033d658e4dc210ed4552b88069b57532ba3d7
Author: Richard Levitte <levitte at openssl.org>
Date:   Thu Feb 28 13:28:43 2019 +0100

    Configure: make C++ build tests optional and configurable
    
    Disabled by default
    
    Fixes #8360
    
    Reviewed-by: Paul Dale <paul.dale at oracle.com>
    (Merged from https://github.com/openssl/openssl/pull/8370)

-----------------------------------------------------------------------

Summary of changes:
 .travis.yml                         |  2 +-
 CHANGES                             |  8 ++++++++
 Configure                           |  6 ++++--
 INSTALL                             | 18 ++++++++++++++++++
 test/build.info                     |  2 +-
 test/certs/root-ed25519.privkey.pem |  3 +++
 test/certs/root-ed25519.pubkey.pem  |  3 +++
 7 files changed, 38 insertions(+), 4 deletions(-)
 create mode 100644 test/certs/root-ed25519.privkey.pem
 create mode 100644 test/certs/root-ed25519.pubkey.pem

diff --git a/.travis.yml b/.travis.yml
index 3184308..c79040d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -28,7 +28,7 @@ compiler:
 env:
     - CONFIG_OPTS="" DESTDIR="_install"
     - CONFIG_OPTS="no-asm -Werror --debug no-afalgeng no-shared enable-crypto-mdebug enable-rc5 enable-md2"
-    - CONFIG_OPTS="no-asm no-makedepend --strict-warnings -D_DEFAULT_SOURCE" BUILDONLY="yes" CHECKDOCS="yes" GENERATE="yes" CPPFLAGS="-ansi"
+    - CONFIG_OPTS="no-asm no-makedepend enable-buildtest-c++ --strict-warnings -D_DEFAULT_SOURCE" BUILDONLY="yes" CHECKDOCS="yes" GENERATE="yes" CPPFLAGS="-ansi"
 
 matrix:
     include:
diff --git a/CHANGES b/CHANGES
index 5fcf667..ff61ff4 100644
--- a/CHANGES
+++ b/CHANGES
@@ -9,6 +9,14 @@
 
  Changes between 1.1.1 and 3.0.0 [xx XXX xxxx]
 
+  *) Added build tests for C++.  These are generated files that only do one
+     thing, to include one public OpenSSL head file each.  This tests that
+     the public header files can be usefully included in a C++ application.
+
+     This test isn't enabled by default.  It can be enabled with the option
+     'enable-buildtest-c++'.
+     [Richard Levitte]
+
   *) Added property based algorithm implementation selection framework to
      the core.
      [Paul Dale]
diff --git a/Configure b/Configure
index 0c9037b..707e8b9 100755
--- a/Configure
+++ b/Configure
@@ -341,6 +341,7 @@ my @disablables = (
     "autoload-config",
     "bf",
     "blake2",
+    "buildtest-c++",
     "camellia",
     "capieng",
     "cast",
@@ -444,6 +445,7 @@ my %deprecated_disablables = (
 
 our %disabled = ( # "what"         => "comment"
 		  "asan"		=> "default",
+		  "buildtest-c++"	=> "default",
 		  "crypto-mdebug"       => "default",
 		  "crypto-mdebug-backtrace" => "default",
 		  "devcryptoeng"	=> "default",
@@ -1208,8 +1210,8 @@ foreach my $what (sort keys %disabled) {
 
     $config{options} .= " no-$what";
 
-    if (!grep { $what eq $_ } ( 'dso', 'threads', 'shared', 'pic',
-                                'dynamic-engine', 'makedepend',
+    if (!grep { $what eq $_ } ( 'buildtest-c++', 'dso', 'threads', 'shared',
+                                'pic', 'dynamic-engine', 'makedepend',
                                 'zlib-dynamic', 'zlib', 'sse2' )) {
         (my $WHAT = uc $what) =~ s|-|_|g;
         my $skipdir = $what;
diff --git a/INSTALL b/INSTALL
index be0ce9d..d8c5dc5 100644
--- a/INSTALL
+++ b/INSTALL
@@ -296,6 +296,19 @@
                    Typically OpenSSL will automatically load a system config
                    file which configures default ssl options.
 
+  enable-buildtest-c++
+                   While testing, generate C++ buildtest files that
+                   simply check that the public OpenSSL header files
+                   are usable standalone with C++.
+
+                   Enabling this option demands extra care.  For any
+                   compiler flag given directly as configuration
+                   option, you must ensure that it's valid for both
+                   the C and the C++ compiler.  If not, the C++ build
+                   test will most likely break.  As an alternative,
+                   you can use the language specific variables, CFLAGS
+                   and CXXFLAGS.
+
   no-capieng
                    Don't build the CAPI engine. This option will be forced if
                    on a platform that does not support CAPI.
@@ -676,6 +689,11 @@
                         CC=gcc CROSS_COMPILE=x86_64-w64-mingw32- \
                         ./config -DCOOKIE
 
+                   If CC is set, it is advisable to also set CXX to ensure
+                   both C and C++ compilers are in the same "family".  This
+                   becomes relevant with 'enable-external-tests' and
+                   'enable-buildtest-c++'.
+
   reconf
   reconfigure
                    Reconfigure from earlier data.  This fetches the previous
diff --git a/test/build.info b/test/build.info
index 372f9be..5bf6fd0 100644
--- a/test/build.info
+++ b/test/build.info
@@ -602,7 +602,7 @@ ENDIF
   INCLUDE[buildtest_c_$name]=../include
   DEPEND[buildtest_c_$name]=../libssl ../libcrypto
 _____
-       $OUT .= <<"_____" if $config{CXX};
+       $OUT .= <<"_____" if $config{CXX} && !$disabled{"buildtest-c++"};
 
   PROGRAMS{noinst}=buildtest_cc_$name
   SOURCE[buildtest_cc_$name]=buildtest_$name.cc
diff --git a/test/certs/root-ed25519.privkey.pem b/test/certs/root-ed25519.privkey.pem
new file mode 100644
index 0000000..e447080
--- /dev/null
+++ b/test/certs/root-ed25519.privkey.pem
@@ -0,0 +1,3 @@
+-----BEGIN PRIVATE KEY-----
+MC4CAQAwBQYDK2VwBCIEINTuctv5E1hK1bbY8fdp+K06/nwoy/HU++CXqI9EdVhC
+-----END PRIVATE KEY-----
diff --git a/test/certs/root-ed25519.pubkey.pem b/test/certs/root-ed25519.pubkey.pem
new file mode 100644
index 0000000..41b0218
--- /dev/null
+++ b/test/certs/root-ed25519.pubkey.pem
@@ -0,0 +1,3 @@
+-----BEGIN PUBLIC KEY-----
+MCowBQYDK2VwAyEAGb9ECWmEzf6FQbrBZ9w7lshQhqowtrbLDFw4rXAxZuE=
+-----END PUBLIC KEY-----


More information about the openssl-commits mailing list