Add checking of a wire-formatted control message.
This commit is contained in:
parent
6891e0e77b
commit
531d853730
1 changed files with 20 additions and 0 deletions
|
@ -127,6 +127,26 @@ if (pgpverify ('../sample.control', 'news.announce.newgroups')) {
|
|||
}
|
||||
$tests++;
|
||||
|
||||
# Convert sample.control to wire format and then check its signature.
|
||||
open (SAMPLE, '../sample.control')
|
||||
or die "Can't open ../sample.control: $!\n";
|
||||
open (WIRE, '> signed') or die "Can't create signed: $!\n";
|
||||
while (<SAMPLE>) {
|
||||
s/\n\z/\r\n/;
|
||||
s/^\./../;
|
||||
print WIRE;
|
||||
}
|
||||
print WIRE ".\r\n";
|
||||
close SAMPLE;
|
||||
close WIRE;
|
||||
if (pgpverify ('signed', 'news.announce.newgroups')) {
|
||||
print "PASS: pgpverify-wire\n";
|
||||
} else {
|
||||
print "FAIL: pgpverify-wire\n";
|
||||
$failed++;
|
||||
}
|
||||
$tests++;
|
||||
|
||||
# Sign a message with signcontrol.
|
||||
fix_signcontrol ($pgp);
|
||||
my $status = system ('./signcontrol < ./messages/newgroup > signed');
|
||||
|
|
Loading…
Reference in a new issue