~ubuntu-branches/ubuntu/hardy/gnupg2/hardy-proposed

« back to all changes in this revision

Viewing changes to keyserver/gpg2keys_test.in

  • Committer: Bazaar Package Importer
  • Author(s): Michael Bienia
  • Date: 2007-05-15 13:54:55 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20070515135455-89qfyalmgjy6gcqw
Tags: 2.0.4-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Remove libpcsclite-dev, libopensc2-dev build dependencies (they are in
    universe).
  - Build-depend on libcurl3-gnutls-dev
  - g10/call-agent.c: set DBG_ASSUAN to 0 to suppress a debug message
  - Include /doc files as done with gnupg
  - debian/rules: add doc/com-certs.pem to the docs for gpgsm
  - debian/copyright: update download url
  - debian/README.Debian: remove note the gnupg2 isn't released yet.
  - debian/control: Change Maintainer/XSBC-Original-Maintainer field.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!@PERL@
 
2
 
 
3
# gpg2keys_test - keyserver code tester
 
4
# Copyright (C) 2001 Free Software Foundation, Inc.
 
5
#
 
6
# This file is part of GnuPG.
 
7
#
 
8
# GnuPG is free software; you can redistribute it and/or modify
 
9
# it under the terms of the GNU General Public License as published by
 
10
# the Free Software Foundation; either version 2 of the License, or
 
11
# (at your option) any later version.
 
12
#
 
13
# GnuPG is distributed in the hope that it will be useful,
 
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
# GNU General Public License for more details.
 
17
#
 
18
# You should have received a copy of the GNU General Public License
 
19
# along with this program; if not, write to the Free Software
 
20
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 
21
 
 
22
use Getopt::Std;
 
23
$Getopt::Std::STANDARD_HELP_VERSION=1;
 
24
 
 
25
$|=1;
 
26
 
 
27
sub VERSION_MESSAGE ()
 
28
{
 
29
    print STDOUT "gpg2keys_test (GnuPG) @VERSION@\n";
 
30
}
 
31
 
 
32
sub HELP_MESSAGE ()
 
33
{
 
34
    print STDOUT <<EOT
 
35
 
 
36
--help     Print this help
 
37
--version  Print the version
 
38
EOT
 
39
}
 
40
 
 
41
 
 
42
getopts('o:');
 
43
 
 
44
print STDERR "gpgkeys_test starting\n";
 
45
 
 
46
if(defined($opt_o))
 
47
{
 
48
    print STDERR "Using output file $opt_o\n";
 
49
    open(STDOUT,">$opt_o") || die "Can't open output file $opt_o\n";
 
50
}
 
51
 
 
52
if(@ARGV)
 
53
{
 
54
    print STDERR "Using input file $ARGV[0]\n";
 
55
    open(STDIN,$ARGV[0]) || die "Can't open input file $ARGV[0]\n";
 
56
}
 
57
 
 
58
# Get the command block
 
59
 
 
60
print STDERR "Command block:\n";
 
61
 
 
62
while(<STDIN>)
 
63
{
 
64
    last if($_ eq "\n");
 
65
    print STDERR "--command-> $_";
 
66
 
 
67
    if(/^COMMAND (\w+)/)
 
68
    {
 
69
        $command=$1;
 
70
    }
 
71
}
 
72
 
 
73
# Get the keylist block
 
74
 
 
75
print STDERR "Keylist block:\n";
 
76
 
 
77
while(<STDIN>)
 
78
{
 
79
    last if($_ eq "\n");
 
80
    print STDERR "--keylist-> $_";
 
81
}
 
82
 
 
83
# If it's a SEND, then get the key material
 
84
 
 
85
if($command eq "SEND")
 
86
{
 
87
    print STDERR "Key material to send:\n";
 
88
 
 
89
    while(<STDIN>)
 
90
    {
 
91
        print STDERR "$_";
 
92
    }
 
93
}
 
94
 
 
95
printf STDERR "gpgkeys_test finished\n";
 
96
 
 
97
# Local Variables: 
 
98
# mode:perl
 
99
# End: