bug fix to anticipate OpenSSL HMAC output that spans multiple lines (as in SHA512)
authorMichael Rash <mbr@cipherdyne.org>
Sun, 10 Mar 2013 20:37:34 +0000 (16:37 -0400)
committerMichael Rash <mbr@cipherdyne.org>
Sun, 10 Mar 2013 20:37:34 +0000 (16:37 -0400)
test/test-fwknop.pl

index 08a419c..6891199 100755 (executable)
@@ -3669,9 +3669,13 @@ sub openssl_hmac_verification() {
         return 0;
     }
 
+    ### for HMAC SHA512 this output will span two lines
+    my $openssl_hmac_line = '';
     open F, "< $cmd_out_tmp" or die $!;
-    my $openssl_hmac_line = <F>;
-    chomp $openssl_hmac_line;
+    while (<F>) {
+        $openssl_hmac_line .= $_;
+        chomp $openssl_hmac_line;
+    }
     close F;
 
     if ($base64_path) {