Fixed some test canonifiers to read only from stdin

Fixed some test canonifier scripts to read from stdin instead of
from a filename specified as a cmd-line argument.  This is needed
in order to be able to reliably use them in a pipeline with other
test canonifiers.

Also removed some unused test canonifier scripts.
This commit is contained in:
Daniel Thayer 2015-09-18 17:27:30 -05:00
parent 09904aeb54
commit 6f1e07f6d5
6 changed files with 16 additions and 56 deletions

View file

@ -1,8 +1,9 @@
#! /usr/bin/awk -f
#! /usr/bin/env bash
#
# A diff canonifier that removes all X.509 Distinguished Name subject fields
# because that output can differ depending on installed OpenSSL version.
awk '
BEGIN { FS="\t"; OFS="\t"; s_col = -1; i_col = -1; is_col = -1; cs_col = -1; ci_col = -1; cert_subj_col = -1; cert_issuer_col = -1 }
/^#fields/ {
@ -27,46 +28,47 @@ BEGIN { FS="\t"; OFS="\t"; s_col = -1; i_col = -1; is_col = -1; cs_col = -1; ci_
s_col >= 0 {
if ( $s_col != "-" )
# Mark that it's set, but ignore content.
# Mark that it is set, but ignore content.
$s_col = "+";
}
i_col >= 0 {
if ( $i_col != "-" )
# Mark that it's set, but ignore content.
# Mark that it is set, but ignore content.
$i_col = "+";
}
is_col >= 0 {
if ( $is_col != "-" )
# Mark that it's set, but ignore content.
# Mark that it is set, but ignore content.
$is_col = "+";
}
cs_col >= 0 {
if ( $cs_col != "-" )
# Mark that it's set, but ignore content.
# Mark that it is set, but ignore content.
$cs_col = "+";
}
ci_col >= 0 {
if ( $ci_col != "-" )
# Mark that it's set, but ignore content.
# Mark that it is set, but ignore content.
$ci_col = "+";
}
cert_subj_col >= 0 {
if ( $cert_subj_col != "-" )
# Mark that it's set, but ignore content.
# Mark that it is set, but ignore content.
$cert_subj_col = "+";
}
cert_issuer_col >= 0 {
if ( $cert_issuer_col != "-" )
# Mark that it's set, but ignore content.
# Mark that it is set, but ignore content.
$cert_issuer_col = "+";
}
{
print;
}
'