* Added tests/basic, as a simple test of a few functions (closes MS #2537)
* fixed double-prompting on sites that have more than one User ID
(closes MS #2567)
+ * report server implementation name and version with every query (closes
+ MS # 2564)
-- Daniel Kahn Gillmor <dkg@fifthhorseman.net> Thu, 28 Oct 2010 17:14:35 -0400
# we need the version of GnuPG::Interface that knows about pubkey_data, etc:
use GnuPG::Interface 0.42.02;
- my $version = '0.1';
+ my $VERSION = '0.6';
my $gnupg = GnuPG::Interface->new();
$gnupg->options->quiet(1);
my $cgi = shift;
return '200 OK', { available => JSON::true,
protoversion => 1,
- server => "MSVA-Perl ".$version };
+ };
}
# returns an empty list if bad key found.
};
my ($status, $object) = $handler->{handler}($data, $clientinfo);
+ if (ref($object) eq 'HASH' &&
+ ! defined $object->{server}) {
+ $object->{server} = sprintf("MSVA-Perl %s", $VERSION);
+ }
+
my $ret = to_json($object);
msvalog('info', "returning: %s\n", $ret);
printf("HTTP/1.0 %s\r\nDate: %s\r\nContent-Type: application/json\r\n\r\n%s",
if (defined $ret) {
$client->log('info', "valid: %s\n", $ret->{valid});
$client->log('fatal', "message: %s\n", $ret->{message});
+ $client->log('info', "server: %s\n", $ret->{server});
exit 0
if ($ret->{valid});
}