[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Thu Aug 13 20:06:37 UTC 2015


The branch master has been updated
       via  00bf5001f72144062fe3f7973b968be534ac1246 (commit)
       via  4deefd6567cce43ef6c6b910693c093e9598f556 (commit)
       via  b3a231db49f864a40f999bf5b3843bebec5e3730 (commit)
      from  f25825c218efb71c13ef7c60c1acbe13cfdfe78b (commit)


- Log -----------------------------------------------------------------
commit 00bf5001f72144062fe3f7973b968be534ac1246
Author: Richard Levitte <levitte at openssl.org>
Date:   Thu Aug 13 19:15:45 2015 +0200

    for test_sslvertol, add a value to display SSL version < 3 in debug
    
    Reviewed-by: Matt Caswell <matt at openssl.org>

commit 4deefd6567cce43ef6c6b910693c093e9598f556
Author: Richard Levitte <levitte at openssl.org>
Date:   Thu Aug 13 19:14:34 2015 +0200

    Fixups in libssl test harness
    
    - select an actual file handle for devnull
    - do not declare $msgdata twice
    - SKE records sometimes seem to come without sig
    - in SKE parsing, use and use $pub_key_len when parsing $pub_key
    
    Reviewed-by: Matt Caswell <matt at openssl.org>

commit b3a231db49f864a40f999bf5b3843bebec5e3730
Author: Richard Levitte <levitte at openssl.org>
Date:   Thu Aug 13 19:13:16 2015 +0200

    Use -I to add to @INC, and use -w to produce warnings
    
    Reviewed-by: Matt Caswell <matt at openssl.org>

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

Summary of changes:
 test/Makefile                      |  6 +++---
 util/TLSProxy/Message.pm           |  2 +-
 util/TLSProxy/Proxy.pm             |  3 ++-
 util/TLSProxy/Record.pm            |  6 ++++--
 util/TLSProxy/ServerKeyExchange.pm | 11 +++++++----
 5 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/test/Makefile b/test/Makefile
index 31b3796..b59613c 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -424,17 +424,17 @@ test_packet: $(PACKETTEST)$(EXE_EXT)
 #OPENSSL_ia32cap=... in ssl tests below ensures AES-NI is switched off (AES-NI does not go through the testmode engine)
 test_sslvertol: ../apps/openssl$(EXE_EXT)
 	@echo $(START) $@
-	[ -z "$(SHARED_LIBS)" ] || PERL5LIB=$$PERL5LIB:../util OPENSSL_ENGINES=../engines ../util/shlib_wrap.sh ./$(SSLVERTOLTEST) "OPENSSL_ia32cap='~0x200000200000000' ../apps/openssl$(EXE_EXT)" ../apps/server.pem
+	[ -z "$(SHARED_LIBS)" ] || OPENSSL_ENGINES=../engines ../util/shlib_wrap.sh $(PERL) -I../util -w ./$(SSLVERTOLTEST) "OPENSSL_ia32cap='~0x200000200000000' ../apps/openssl$(EXE_EXT)" ../apps/server.pem
 	@[ -n "$(SHARED_LIBS)" ] || echo test_sslvertol can only be performed with OpenSSL configured shared
 
 test_sslextension: ../apps/openssl$(EXE_EXT)
 	@echo $(START) $@
-	[ -z "$(SHARED_LIBS)" ] || PERL5LIB=$$PERL5LIB:../util OPENSSL_ENGINES=../engines ../util/shlib_wrap.sh ./$(SSLEXTENSIONTEST) "OPENSSL_ia32cap='~0x200000200000000' ../apps/openssl$(EXE_EXT)" ../apps/server.pem
+	[ -z "$(SHARED_LIBS)" ] || OPENSSL_ENGINES=../engines ../util/shlib_wrap.sh $(PERL) -I../util -w ./$(SSLEXTENSIONTEST) "OPENSSL_ia32cap='~0x200000200000000' ../apps/openssl$(EXE_EXT)" ../apps/server.pem
 	@[ -n "$(SHARED_LIBS)" ] || echo test_sslextension can only be performed with OpenSSL configured shared
 
 test_sslskewith0p: ../apps/openssl$(EXE_EXT)
 	@echo $(START) $@
-	[ -z "$(SHARED_LIBS)" ] || PERL5LIB=$$PERL5LIB:../util OPENSSL_ENGINES=../engines ../util/shlib_wrap.sh ./$(SSLSKEWITH0PTEST) "OPENSSL_ia32cap='~0x200000200000000' ../apps/openssl$(EXE_EXT)" ../apps/server.pem
+	[ -z "$(SHARED_LIBS)" ] || OPENSSL_ENGINES=../engines ../util/shlib_wrap.sh $(PERL) -I../util -w ./$(SSLSKEWITH0PTEST) "OPENSSL_ia32cap='~0x200000200000000' ../apps/openssl$(EXE_EXT)" ../apps/server.pem
 	@[ -n "$(SHARED_LIBS)" ] || echo test_sslskewith0p can only be performed with OpenSSL configured shared
 
 update: local_depend
diff --git a/util/TLSProxy/Message.pm b/util/TLSProxy/Message.pm
index 66a4a7b..028322b 100644
--- a/util/TLSProxy/Message.pm
+++ b/util/TLSProxy/Message.pm
@@ -350,7 +350,7 @@ sub repack
 
     $lenlo = length($self->data) & 0xff;
     $lenhi = length($self->data) >> 8;
-    my $msgdata = pack('CnC', $self->mt, $lenhi, $lenlo).$self->data;
+    $msgdata = pack('CnC', $self->mt, $lenhi, $lenlo).$self->data;
 
 
     if ($numrecs == 0) {
diff --git a/util/TLSProxy/Proxy.pm b/util/TLSProxy/Proxy.pm
index c033c29..571ab10 100644
--- a/util/TLSProxy/Proxy.pm
+++ b/util/TLSProxy/Proxy.pm
@@ -142,7 +142,8 @@ sub start
     my $oldstdout;
 
     if(!$self->debug) {
-        $oldstdout = select(File::Spec->devnull());
+        open DEVNULL, ">", File::Spec->devnull();
+        $oldstdout = select(DEVNULL);
     }
 
     # Create the Proxy socket
diff --git a/util/TLSProxy/Record.pm b/util/TLSProxy/Record.pm
index 1d10508..124f924 100644
--- a/util/TLSProxy/Record.pm
+++ b/util/TLSProxy/Record.pm
@@ -83,7 +83,8 @@ use constant {
     VERS_TLS_1_2 => 771,
     VERS_TLS_1_1 => 770,
     VERS_TLS_1_0 => 769,
-    VERS_SSL_3_0 => 768
+    VERS_SSL_3_0 => 768,
+    VERS_SSL_LT_3_0 => 767
 };
 
 my %tls_version = (
@@ -91,7 +92,8 @@ my %tls_version = (
     VERS_TLS_1_2, "TLS1.2",
     VERS_TLS_1_1, "TLS1.1",
     VERS_TLS_1_0, "TLS1.0",
-    VERS_SSL_3_0, "SSL3"
+    VERS_SSL_3_0, "SSL3",
+    VERS_SSL_LT_3_0, "SSL<3"
 );
 
 #Class method to extract records from a packet of data
diff --git a/util/TLSProxy/ServerKeyExchange.pm b/util/TLSProxy/ServerKeyExchange.pm
index 3a91d17..b85b8ad 100644
--- a/util/TLSProxy/ServerKeyExchange.pm
+++ b/util/TLSProxy/ServerKeyExchange.pm
@@ -104,13 +104,16 @@ sub parse
     my $pub_key_len = unpack('n', substr($self->data, $ptr));
     $ptr += 2;
     my $pub_key = substr($self->data, $ptr, $pub_key_len);
-    $ptr += $g_len;
+    $ptr += $pub_key_len;
 
     #We assume its signed
     my $sig_len = unpack('n', substr($self->data, $ptr));
-    $ptr += 2;
-    my $sig = substr($self->data, $ptr, $sig_len);
-    $ptr += $sig_len;
+    my $sig = "";
+    if (defined $sig_len) {
+	$ptr += 2;
+	$sig = substr($self->data, $ptr, $sig_len);
+	$ptr += $sig_len;
+    }
 
     $self->p($p);
     $self->g($g);


More information about the openssl-commits mailing list