Commit | Line | Data |
c9d0c046 |
1 | #!/usr/bin/perl |
2 | |
3 | use strict; |
4 | print "1..1\n"; |
5 | |
6 | if (!$ENV{TEST_SIGNATURE}) { |
7 | print "ok 1 # skip set the environment variable TEST_SIGNATURE to enable this test\n"; |
8 | } |
9 | elsif (!-s 'SIGNATURE') { |
10 | print "ok 1 # skip No signature file found\n"; |
11 | } |
12 | elsif (!eval { require Module::Signature; 1 }) { |
13 | print "ok 1 # skip ", |
14 | "Next time around, consider install Module::Signature, ", |
15 | "so you can verify the integrity of this distribution.\n"; |
16 | } |
17 | elsif (!eval { require Socket; Socket::inet_aton('pgp.mit.edu') }) { |
18 | print "ok 1 # skip ", |
19 | "Cannot connect to the keyserver\n"; |
20 | } |
21 | else { |
22 | (Module::Signature::verify() == Module::Signature::SIGNATURE_OK()) |
23 | or print "not "; |
24 | print "ok 1 # Valid signature\n"; |
25 | } |
26 | |
27 | __END__ |