my $context = shift;
if ($context eq '--help') {
printf STDERR "Usage: msva-query-agent CONTEXT PEER PKC_TYPE [PEER_TYPE] <PKC_DATA\n";
+ printf STDERR " msva-query-agent CONTEXT PEER PKC_TYPE PEER_TYPE PKC_DATA\n";
exit 0;
}
my $peer = shift;
my $pkctype = shift;
my $peertype = shift;
-
-# load raw pkc data from stdin
-my $pkcdata = do {
- local $/; # slurp!
- <STDIN>;
-};
+my $pkcdata = shift;
+
+if (!defined $pkcdata) {
+ # load raw pkc data from stdin
+ $pkcdata = do {
+ local $/; # slurp!
+ <STDIN>;
+ };
+}
my $client = Crypt::Monkeysphere::MSVA::Client->new(
socket => $ENV{MONKEYSPHERE_VALIDATION_AGENT_SOCKET},
msva-query-agent CONTEXT PEER PKC_TYPE [PEER_TYPE] < /path/to/public_key_carrier
+msva-query-agent CONTEXT PEER PKC_TYPE PEER_TYPE PKC_DATA
+
=head1 ABSTRACT
msva-query-agent validates certificates for a given use by querying a
=item PKC_TYPE
The format of public key carrier data provided on standard input
-(e.g. 'x509der', 'x509pem', 'opensshpubkey', 'rfc4716')
+(e.g. 'x509der', 'x509pem', 'opensshpubkey', 'rfc4716', 'openpgp4fpr')
=back
The type of peer we are inquiring about (e.g. 'client', 'server')
+If 5 arguments are given, the 5th argument is interpreted to be the
+PKC_DATA itself. This is likely only useful for supplying an OpenPGP
+fingerprint with the 'openpgp4fpr' type.
+
=back
=head1 RETURN CODE