mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
This commit was manufactured by cvs2svn to create branch
'GNUPG-1-9-BRANCH'.
This commit is contained in:
parent
8d76177f10
commit
82a17c9fb3
563 changed files with 0 additions and 267875 deletions
|
@ -1,291 +0,0 @@
|
|||
2002-10-14 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_hkp.c (write_quoted): Use %-encoding instead of
|
||||
\-encoding.
|
||||
(parse_hkp_index): Use new keyserver key listing format, and add
|
||||
support for disabled keys via include-disabled.
|
||||
|
||||
* gpgkeys_ldap.c (get_key): Don't print keysize unless it's >0.
|
||||
(printquoted): Use %-encoding instead of \-encoding.
|
||||
(search_key): Use new keyserver key listing format.
|
||||
|
||||
2002-10-08 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_ldap.c (search_key, main): Make sure LDAP values are
|
||||
freed in case of error.
|
||||
|
||||
* gpgkeys_ldap.c (fail_all): New function to unwind a keylist and
|
||||
error each item.
|
||||
(main): Call fail_all from here, as needed. Also add a NO_MEMORY
|
||||
error in an appropriate place and fix error return code.
|
||||
(ldap_err_to_gpg_err): Add KEYSERVER_UNREACHABLE.
|
||||
|
||||
* gpgkeys_hkp.c (fail_all): New function to unwind a keylist and
|
||||
error each item.
|
||||
(main): Call fail_all from here. Also add a NO_MEMORY error in an
|
||||
appropriate place.
|
||||
(get_key): Use new UNREACHABLE error for network errors.
|
||||
|
||||
2002-09-26 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* gpgkeys_ldap.c (send_key): Removed non-constant initializers.
|
||||
|
||||
2002-09-24 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_ldap.c (ldap_err_to_gpg_err, ldap_to_gpg_err, send_key,
|
||||
get_key, search_key, main): Some minor error reporting
|
||||
enhancements for use with GPA (show reasons for KEY FAILED).
|
||||
|
||||
* gpgkeys_hkp.c (send_key, get_key, search_key, main): Some minor
|
||||
error reporting enhancements for use with GPA (show reasons for
|
||||
KEY FAILED).
|
||||
|
||||
2002-09-20 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* gpgkeys_hkp.c (handle_old_hkp_index): s/input/inp/ to avoid
|
||||
shadowing warning.
|
||||
|
||||
2002-09-19 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_hkp.c (get_key, handle_old_hkp_index, search_key):
|
||||
Properly handle line truncation.
|
||||
|
||||
2002-09-16 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_mailto.in: Add quasi-RFC-2368 mailto:email@addr?from=
|
||||
syntax so people can set their own email address to respond to.
|
||||
|
||||
* gpgkeys_hkp.c (get_key): Properly respond with KEY FAILED (to
|
||||
gpg) and "key not found" (to user) on failure.
|
||||
|
||||
2002-09-13 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_hkp.c: (search_key, handle_old_hkp_index): Try and
|
||||
request a machine-readable key index. If the server supports
|
||||
this, pass it through. If the server does not support it, parse
|
||||
the "index" page.
|
||||
|
||||
2002-09-12 Stefan Bellon <sbellon@sbellon.de>
|
||||
|
||||
* gpgkeys_hkp.c: Tidied up RISC OS initializations.
|
||||
|
||||
2002-09-12 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_hkp.c (main): Remove warning - this is no longer
|
||||
experimental code.
|
||||
|
||||
2002-09-09 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* gpgkeys_hkp.c (send_key, get_key, search_key): Check return
|
||||
value of malloc.
|
||||
(dehtmlize): Use ascii_tolower to protect against weird locales.
|
||||
Cast the argument for isspace for the sake of broken HP/UXes.
|
||||
(search_key): Check return value of realloc.
|
||||
|
||||
2002-09-09 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_ldap.c (get_key): Some compilers (RISC OS, HPUX c89)
|
||||
don't like using variables as array initializers.
|
||||
|
||||
* gpgkeys_hkp.c (send_key): Use CRLF in headers.
|
||||
|
||||
2002-08-28 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_hkp.c (parse_hkp_index): Use same types on all
|
||||
platforms. This was probably leftover from earlier code where the
|
||||
typing mattered.
|
||||
|
||||
* gpgkeys_hkp.c: Overall cleanup from iobuf conversion. Be
|
||||
consistent in m_alloc and malloc usage. Remove include-disabled
|
||||
(meaningless on HKP). RISC OS tweak.
|
||||
|
||||
2002-08-27 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_hkp.c, Makefile.am: Convert over to using iobufs.
|
||||
|
||||
* gpgkeys_hkp.c (http_get, http_post): Use CRLF for line endings.
|
||||
|
||||
* gpgkeys_hkp.c: Include util.h on RISC OS as per Stefan. Include
|
||||
a replacement for hstrerror() for those platforms (such as RISC
|
||||
OS) that don't have it.
|
||||
|
||||
2002-08-26 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* Makefile.am: May as well include gpgkeys_hkp.c in the
|
||||
distribution now. It works well enough without proxies, and isn't
|
||||
built by default. It would be good to get some test experience
|
||||
with it.
|
||||
|
||||
* gpgkeys_hkp.c (main): Don't warn about include-subkeys - it
|
||||
isn't unsupported, it's actually non-meaningful in the context of
|
||||
HKP (yet).
|
||||
|
||||
* gpgkeys_hkp.c (parse_hkp_index, dehtmlize): Move HTML
|
||||
functionality into new "dehtmlize" function. Remove HTML before
|
||||
trying to parse each line from the keyserver. If the keyserver
|
||||
provides key type information in the listing, use it. (Copy over
|
||||
from g10/hkp.c).
|
||||
|
||||
2002-08-19 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_hkp.c (get_key, parse_hkp_index): Bring over latest code
|
||||
from g10/hkp.c.
|
||||
|
||||
* gpgkeys_ldap.c (get_key): Fix cosmetic URL display problem
|
||||
(extra ":" at the end).
|
||||
|
||||
2002-08-03 Stefan Bellon <sbellon@sbellon.de>
|
||||
|
||||
* gpgkeys_ldap.c: Tidied up RISC OS initializations.
|
||||
|
||||
2002-07-25 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_hkp.c: "Warning" -> "WARNING"
|
||||
|
||||
2002-07-24 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* Makefile.am: Install keyserver helpers in @GNUPG_LIBEXECDIR@
|
||||
|
||||
2002-07-15 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_ldap.c (send_key, get_key, main): Consult the server
|
||||
version string to determine whether to use pgpKey or pgpKeyV2.
|
||||
|
||||
2002-07-09 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_mailto.in: Use new OPAQUE tag for non net-path URIs.
|
||||
Fail more elegantly if there is no email address to send to. Show
|
||||
the GnuPG version in the message body.
|
||||
|
||||
2002-07-04 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_ldap.c (get_key), gpgkeys_hkp.c (get_key): Display
|
||||
keyserver URI as a URI, but only if verbose.
|
||||
|
||||
2002-07-01 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_hkp.c (parse_hkp_index): Error if the keyserver returns
|
||||
an unparseable HKP response.
|
||||
|
||||
* gpgkeys_hkp.c (main): Warn on honor-http-proxy,
|
||||
broken-http-proxy, and include-subkeys (not supported yet).
|
||||
|
||||
* gpgkeys_ldap.c (main), gpgkeys_hkp.c (http_connect, main): Fix
|
||||
some shadowing warnings.
|
||||
|
||||
2002-06-11 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* Makefile.am: Don't hard-code the LDAP libraries - get them from
|
||||
LDAPLIBS via configure. Also, gpgkeys_hkp is a program, not a
|
||||
script.
|
||||
|
||||
2002-06-10 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_ldap.c (include_subkeys): Default "include-subkeys" to
|
||||
off, since GnuPG now defaults it to on.
|
||||
|
||||
2002-06-06 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_hkp.c (parse_hkp_index): Type tweaks.
|
||||
|
||||
* gpgkeys_hkp.c (main): Add experimental code warning.
|
||||
|
||||
2002-06-05 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* Makefile.am, gpgkeys_hkp.c (new): Experimental HKP keyserver
|
||||
interface.
|
||||
|
||||
2002-05-08 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_ldap.c: Include <lber.h> if we absolutely must. This
|
||||
helps when compiling against a very old OpenLDAP.
|
||||
|
||||
2002-04-29 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_mailto.in: Properly handle key requests in full
|
||||
fingerprint form.
|
||||
|
||||
2002-03-29 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_ldap.c (printquoted): Quote backslashes within keyserver
|
||||
search responses.
|
||||
|
||||
2002-02-25 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_ldap (get_key): LDAP keyservers do not support v3
|
||||
fingerprints, so error out if someone tries. Actually, they don't
|
||||
support any fingerprints, but at least we can calculate a keyid
|
||||
from a v4 fingerprint.
|
||||
|
||||
2002-02-23 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_ldap: Clarify the notion of a partial failure. This is
|
||||
possible if more than one key is being handled in a batch, and one
|
||||
fails while the other succeeds. Note that a search that comes up
|
||||
with no results is not a failure - that is a valid response of "no
|
||||
answer".
|
||||
|
||||
* gpgkeys_ldap.c (get_key): Allow GnuPG to send us full v4
|
||||
fingerprints, long key ids, or short key ids while fetching.
|
||||
Since the LDAP server doesn't actually handle fingerprints, chop
|
||||
them down to long key ids for actual use.
|
||||
|
||||
* gpgkeys_ldap.c (main, get_key): When searching for a keyid,
|
||||
search for subkeys as well as primary keys. This is mostly
|
||||
significant when automatically fetching the key based on the id in
|
||||
a header (i.e. "signature made by...."). "no-include-subkeys"
|
||||
disables.
|
||||
|
||||
2002-02-14 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_ldap.c: Fix compiler warning.
|
||||
|
||||
* gpgkeys_ldap.c: Be much more robust with mangled input files.
|
||||
|
||||
2001-12-28 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_mailto.in: Use the new OUTOFBAND indicator so gpg knows
|
||||
not to try and import anything. Also turn on perl -w for
|
||||
warnings.
|
||||
|
||||
* gpgkeys_ldap.c (main): If we're using temp files (rather than
|
||||
stdin/stdout), make sure the file is closed when we're done.
|
||||
|
||||
2001-12-20 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* Properly free the LDAP response when we're done with it.
|
||||
|
||||
* Now that we handle multiple keys, we must remove duplicates as
|
||||
the LDAP keyserver returns keys with multiple user IDs multiple
|
||||
times.
|
||||
|
||||
* Properly handle multiple keys with the same key ID (it's really
|
||||
rare, so fetch "0xDEADBEEF" to test this).
|
||||
|
||||
2001-12-17 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_ldap.c, gpgkeys_mailto.in: Fix GNU capitalization
|
||||
issues. Prefix log messages with "gpgkeys" to clarify which
|
||||
program is generating them.
|
||||
|
||||
2001-12-14 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_ldap.c (search_key): Use unsigned int rather than uint
|
||||
for portability.
|
||||
|
||||
2001-12-04 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* Initial version of gpgkeys_ldap (LDAP keyserver helper) and
|
||||
gpgkeys_mailto (email keyserver helper)
|
||||
|
||||
|
||||
Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This file is free software; as a special exception the author gives
|
||||
unlimited permission to copy and/or distribute it, with or without
|
||||
modifications, as long as this notice is preserved.
|
||||
|
||||
This file is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is part of GnuPG.
|
||||
#
|
||||
# GnuPG is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GnuPG is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/include
|
||||
EXTRA_PROGRAMS = gpgkeys_ldap gpgkeys_hkp
|
||||
EXTRA_SCRIPTS = gpgkeys_mailto
|
||||
libexecdir = @GNUPG_LIBEXECDIR@
|
||||
|
||||
# We don't need the libs the regular GPG binaries do
|
||||
LIBS=
|
||||
|
||||
libexec_PROGRAMS = @GPGKEYS_LDAP@ @GPGKEYS_HKP@
|
||||
libexec_SCRIPTS = @GPGKEYS_MAILTO@
|
||||
noinst_SCRIPTS = gpgkeys_test
|
||||
|
||||
gpgkeys_ldap_LDADD = @LDAPLIBS@ @NETLIBS@
|
||||
gpgkeys_hkp_LDADD = ../util/libutil.a @NETLIBS@
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,202 +0,0 @@
|
|||
#!@PERL@ -w
|
||||
|
||||
# gpgkeys_mailto - talk to a email keyserver
|
||||
# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is part of GnuPG.
|
||||
#
|
||||
# GnuPG is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GnuPG is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
|
||||
use Getopt::Std;
|
||||
$sendmail="@SENDMAIL@ -t";
|
||||
|
||||
###
|
||||
|
||||
getopts('o:');
|
||||
|
||||
if(defined($opt_o))
|
||||
{
|
||||
open(STDOUT,">$opt_o") || die "Can't open output file $opt_o\n";
|
||||
}
|
||||
|
||||
if(@ARGV)
|
||||
{
|
||||
open(STDIN,$ARGV[0]) || die "Can't open input file $ARGV[0]\n";
|
||||
}
|
||||
|
||||
($login,$name)=(getpwuid($<))[0,6];
|
||||
|
||||
$from="$name <$login>";
|
||||
|
||||
while(<STDIN>)
|
||||
{
|
||||
last if($_ eq "\n");
|
||||
|
||||
if(/^COMMAND (\w+)/)
|
||||
{
|
||||
$command=$1;
|
||||
}
|
||||
|
||||
if(/^OPAQUE (\S+)/)
|
||||
{
|
||||
$address=$1;
|
||||
}
|
||||
|
||||
if(/^PROGRAM (\S+)/)
|
||||
{
|
||||
$program=$1;
|
||||
}
|
||||
|
||||
if(/^OPTION (\w+)/)
|
||||
{
|
||||
if($1=~/^verbose$/i)
|
||||
{
|
||||
$verbose++;
|
||||
}
|
||||
elsif($1=~/^no-verbose$/i)
|
||||
{
|
||||
$verbose--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$program="(unknown)" if(!defined($program));
|
||||
|
||||
if(!defined($address))
|
||||
{
|
||||
print STDERR "gpgkeys: no address provided\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
# decode $address
|
||||
|
||||
($address,$args)=split(/\?/,$address);
|
||||
|
||||
if(defined($args))
|
||||
{
|
||||
@pairs = split(/&/, $args);
|
||||
foreach $pair (@pairs)
|
||||
{
|
||||
($hdr, $val) = split(/=/, $pair);
|
||||
$hdr =~ tr/+/ /;
|
||||
$hdr =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
|
||||
$val =~ tr/+/ /;
|
||||
$val =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
|
||||
# we only handle "from" right now
|
||||
if($hdr=~/^from$/i)
|
||||
{
|
||||
$from=$val;
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
while(<STDIN>)
|
||||
{
|
||||
last if($_ eq "\n");
|
||||
|
||||
chomp;
|
||||
|
||||
push(@keys,$_);
|
||||
}
|
||||
|
||||
# Send response
|
||||
|
||||
print "VERSION 0\n";
|
||||
print "OPTION OUTOFBAND\n\n";
|
||||
|
||||
# Email keyservers get and search the same way
|
||||
|
||||
if($command=~/get/i || $command=~/search/i)
|
||||
{
|
||||
if($command=~/search/i)
|
||||
{
|
||||
print "COUNT 0\n";
|
||||
}
|
||||
|
||||
foreach $key (@keys)
|
||||
{
|
||||
open(MAIL,"|$sendmail") || die "ERROR: Can't open $sendmail\n";
|
||||
print MAIL "From: $from\n";
|
||||
print MAIL "To: $address\n";
|
||||
if($command=~/get/i)
|
||||
{
|
||||
# mail keyservers don't like long-form keyids
|
||||
|
||||
if(substr($key,0,2) eq "0x")
|
||||
{
|
||||
$key=substr($key,2);
|
||||
}
|
||||
|
||||
if(length($key)>8)
|
||||
{
|
||||
$key=substr($key,-8);
|
||||
}
|
||||
|
||||
print MAIL "Subject: GET 0x$key\n\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print MAIL "Subject: GET $key\n\n";
|
||||
}
|
||||
print MAIL "GnuPG $program email keyserver request\n";
|
||||
close(MAIL);
|
||||
|
||||
# Tell GnuPG not to expect a key
|
||||
print "KEY $key OUTOFBAND\n";
|
||||
|
||||
if($verbose)
|
||||
{
|
||||
print STDERR "gpgkeys: key $key requested from $address\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($command=~/send/i)
|
||||
{
|
||||
while(!eof(STDIN))
|
||||
{
|
||||
open(MAIL,"|$sendmail") || die "ERROR: Can't open $sendmail\n";
|
||||
print MAIL "From: $name <$login>\n";
|
||||
print MAIL "To: $address\n";
|
||||
print MAIL "Subject: ADD\n\n";
|
||||
|
||||
while(<STDIN>)
|
||||
{
|
||||
if(/^KEY (\w+) BEGIN$/)
|
||||
{
|
||||
$key=$1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
while(<STDIN>)
|
||||
{
|
||||
if(/^KEY \w+ END$/)
|
||||
{
|
||||
last;
|
||||
}
|
||||
|
||||
print MAIL;
|
||||
}
|
||||
|
||||
close(MAIL);
|
||||
|
||||
if($verbose)
|
||||
{
|
||||
print STDERR "gpgkeys: key $key sent to $address\n";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,79 +0,0 @@
|
|||
#!@PERL@
|
||||
|
||||
# gpgkeys_test - keyserver code tester
|
||||
# Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is part of GnuPG.
|
||||
#
|
||||
# GnuPG is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GnuPG is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
|
||||
use Getopt::Std;
|
||||
|
||||
$|=1;
|
||||
|
||||
print STDERR "gpgkeys_test starting\n";
|
||||
|
||||
getopts('o:');
|
||||
|
||||
if(defined($opt_o))
|
||||
{
|
||||
print STDERR "Using output file $opt_o\n";
|
||||
open(STDOUT,">$opt_o") || die "Can't open output file $opt_o\n";
|
||||
}
|
||||
|
||||
if(@ARGV)
|
||||
{
|
||||
print STDERR "Using input file $ARGV[0]\n";
|
||||
open(STDIN,$ARGV[0]) || die "Can't open input file $ARGV[0]\n";
|
||||
}
|
||||
|
||||
# Get the command block
|
||||
|
||||
print STDERR "Command block:\n";
|
||||
|
||||
while(<STDIN>)
|
||||
{
|
||||
last if($_ eq "\n");
|
||||
print STDERR "--command-> $_";
|
||||
|
||||
if(/^COMMAND (\w+)/)
|
||||
{
|
||||
$command=$1;
|
||||
}
|
||||
}
|
||||
|
||||
# Get the keylist block
|
||||
|
||||
print STDERR "Keylist block:\n";
|
||||
|
||||
while(<STDIN>)
|
||||
{
|
||||
last if($_ eq "\n");
|
||||
print STDERR "--keylist-> $_";
|
||||
}
|
||||
|
||||
# If it's a SEND, then get the key material
|
||||
|
||||
if($command eq "SEND")
|
||||
{
|
||||
print STDERR "Key material to send:\n";
|
||||
|
||||
while(<STDIN>)
|
||||
{
|
||||
print STDERR "$_";
|
||||
}
|
||||
}
|
||||
|
||||
printf STDERR "gpgkeys_test finished\n";
|
Loading…
Add table
Add a link
Reference in a new issue