1.\" $NetBSD: hkpc.1,v 1.2 2013/07/20 21:39:55 wiz Exp $
2.\"
3.\" Copyright (c) 2010 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This manual page is derived from software contributed to
7.\" The NetBSD Foundation by Alistair Crooks (agc@NetBSD.org).
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd September 1, 2010
31.Dt HKPC 1
32.Os
33.Sh NAME
34.Nm hkpc
35.Nd retrieve public key information via HKP
36.Sh SYNOPSIS
37.Nm
38.Op Fl f address-family
39.Op Fl h hostname
40.Op Fl p port
41.Cm [get|index|vindex]
42userid...
43.Sh DESCRIPTION
44The
45.Nm
46command retrieves public key information from the key server daemon
47using the HKP protocol.
48The
49.Xr hkpd 8
50is normally used to retrieve public key information.
51.Pp
52Three types of information can be retrieved from the server:
53.Bl -tag -width vindex
54.It get
55The public key, base64-encoded, corresponding to the given userid
56is returned.
57The userid can be a numeric value, a unique part of the human
58identifier, or left blank.
59The first matching key will be returned, in a format suitable for
60importing to a keyring via the
61.Xr netpgpkeys 1
62command.
63.It index
64the information returned from this command is the same as
65provided by the
66.Xr netpgpkeys 1
67command, using the
68.Dv --list-keys
69modifier.
70.It vindex
71the information returned from this command is the same as
72provided by the
73.Xr netpgpkeys 1
74command, using the
75.Dv --list-sigs
76modifier.
77.El
78.Pp
79For this utility to provide the correct results, an hkpd
80server must be listening using the correct protocol family,
81on the provided port on the appropriate server.
82The default port for the HKP server is
83.Dv 11371 ,
84whilst the hostname defaults to
85.Dv localhost .
86.Pp
87The
88.Dv netpgp
89suite of libraries and commands provides a copnvenient client
90in
91.Xr hkpd 1 .
92.Pp
93The information is sent to the server in the form of
94an HTTP
95.Dv GET
96command, and is returned as a JSON-encoded
97HKP packet.
98.Xr libmj 3
99is used to decode the JSON in the returned HKP packet.
100.Sh EXIT STATUS
101The
102.Nm
103utility will return 0 for success,
104or 1 for failure.
105Output will be printed on stdout.
106.Sh SEE ALSO
107.Xr hkpd 1 ,
108.Xr netpgpkeys 1 ,
109.Xr ssh 1 ,
110.\" .Xr libbz2 3 ,
111.Xr libmj 3 ,
112.Xr libnetpgp 3
113.Sh STANDARDS
114The
115.Nm
116utility is designed to conform to IETF RFC 4880.
117.Sh HISTORY
118The
119.Nm
120command first appeared in
121.Nx 6.0 .
122.Sh AUTHORS
123.An Alistair Crooks Aq Mt agc@NetBSD.org .
124