[openssl] master update

dev at ddvo.net dev at ddvo.net
Wed Jul 22 05:28:37 UTC 2020


The branch master has been updated
       via  bf19b64aaeeddd5463d911823f9e2c3c40091005 (commit)
       via  4f8fbf372efedb34e5f8172fa4673a19549cf025 (commit)
       via  f91624d38053d57276a321cd541f95f41d2fd0cc (commit)
      from  90409da6a520812b0266fcb1303175406dea81fe (commit)


- Log -----------------------------------------------------------------
commit bf19b64aaeeddd5463d911823f9e2c3c40091005
Author: Dr. David von Oheimb <David.von.Oheimb at siemens.com>
Date:   Sat Jul 18 16:09:19 2020 +0200

    Fix UI method setup, which should be independent of (deprecated) engine use
    
    Reviewed-by: Paul Dale <paul.dale at oracle.com>
    (Merged from https://github.com/openssl/openssl/pull/12422)

commit 4f8fbf372efedb34e5f8172fa4673a19549cf025
Author: Dr. David von Oheimb <David.von.Oheimb at siemens.com>
Date:   Tue Jul 14 10:38:06 2020 +0200

    81-test_cmp_cli.t: Avoid using 'tail', 'awk', and the '-s' option of 'lsof'
    
    Reviewed-by: Paul Dale <paul.dale at oracle.com>
    (Merged from https://github.com/openssl/openssl/pull/12422)

commit f91624d38053d57276a321cd541f95f41d2fd0cc
Author: Dr. David von Oheimb <David.von.Oheimb at siemens.com>
Date:   Sat Jul 11 13:20:39 2020 +0200

    Skip test_cmp_cli if 'lsof' or 'kill' command is not available
    
    Fixes #12324
    partly fixes #12378
    
    Reviewed-by: Paul Dale <paul.dale at oracle.com>
    (Merged from https://github.com/openssl/openssl/pull/12422)

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

Summary of changes:
 apps/cmp.c                     |  8 +++-----
 test/recipes/81-test_cmp_cli.t | 15 ++++++++++-----
 2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/apps/cmp.c b/apps/cmp.c
index 87daa37dfa..17b5bed6ff 100644
--- a/apps/cmp.c
+++ b/apps/cmp.c
@@ -2924,15 +2924,13 @@ int cmp_main(int argc, char **argv)
     ret = 0;
 
     if (opt_batch) {
-#ifndef OPENSSL_NO_ENGINE
         UI_METHOD *ui_fallback_method;
-# ifndef OPENSSL_NO_UI_CONSOLE
+#ifndef OPENSSL_NO_UI_CONSOLE
         ui_fallback_method = UI_OpenSSL();
-# else
+#else
         ui_fallback_method = (UI_METHOD *)UI_null();
-# endif
-        UI_method_set_reader(ui_fallback_method, NULL);
 #endif
+        UI_method_set_reader(ui_fallback_method, NULL);
     }
 
     if (opt_engine != NULL)
diff --git a/test/recipes/81-test_cmp_cli.t b/test/recipes/81-test_cmp_cli.t
index 32239ef35b..009cdcc4d8 100644
--- a/test/recipes/81-test_cmp_cli.t
+++ b/test/recipes/81-test_cmp_cli.t
@@ -24,15 +24,20 @@ BEGIN {
 use lib srctop_dir('Configurations');
 use lib bldtop_dir('.');
 use platform;
+plan skip_all => "These tests are not supported in a fuzz build"
+    if config('options') =~ /-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION/;
 
 plan skip_all => "These tests are not supported in a no-cmp build"
     if disabled("cmp");
 plan skip_all => "These tests are not supported in a no-ec build"
     if disabled("ec");
-plan skip_all => "These tests are not supported in a fuzz build"
-    if config('options') =~ /-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION/;
-plan skip_all => "Tests involving server not available on Windows or VMS"
+
+plan skip_all => "Tests involving CMP server not available on Windows or VMS"
     if $^O =~ /^(VMS|MSWin32)$/;
+plan skip_all => "Tests involving CMP server require 'kill' command"
+    unless `which kill`;
+plan skip_all => "Tests involving CMP server require 'lsof' command"
+    unless `which lsof`; # this typically excludes Solaris
 
 sub chop_dblquot { # chop any leading & trailing '"' (needed for Windows)
     my $str = shift;
@@ -214,7 +219,7 @@ indir data_dir() => sub {
         if ($server_name eq "Mock") {
             indir "Mock" => sub {
                 $pid = start_mock_server("");
-                die "Cannot start CMP mock server" unless $pid;
+                die "Cannot start or find the started CMP mock server" unless $pid;
             }
         }
         foreach my $aspect (@all_aspects) {
@@ -289,7 +294,7 @@ sub load_tests {
 }
 
 sub mock_server_pid {
-    return `lsof -iTCP:$server_port -sTCP:LISTEN | tail -n 1 | awk '{ print \$2 }'`;
+    return `lsof -iTCP:$server_port` =~ m/\n\S+\s+(\d+)\s+[^\n]+LISTEN/s ? $1 : 0;
 }
 
 sub start_mock_server {


More information about the openssl-commits mailing list