Commit 4deefd65 authored by Richard Levitte's avatar Richard Levitte
Browse files

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: default avatarMatt Caswell <matt@openssl.org>
parent b3a231db
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) {
+2 −1
Original line number Diff line number Diff line
@@ -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
+7 −4
Original line number Diff line number Diff line
@@ -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));
    my $sig = "";
    if (defined $sig_len) {
	$ptr += 2;
    my $sig = substr($self->data, $ptr, $sig_len);
	$sig = substr($self->data, $ptr, $sig_len);
	$ptr += $sig_len;
    }

    $self->p($p);
    $self->g($g);