xref: /netbsd-src/crypto/external/bsd/netpgp/dist/src/hkpclient/hkpc.1 (revision cdcd95784de72332cf79fe6a43f9e9ed5caf89d3)
1.\" $NetBSD: hkpc.1,v 1.3 2014/02/17 07:23:18 agc 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 February 16, 2014
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 convenient client in
90.Xr hkpd 1 .
91.Pp
92The information is sent to the server in the form of
93an HTTP
94.Dv GET
95command, and is returned as a JSON-encoded
96HKP packet.
97.Xr libmj 3
98is used to decode the JSON in the returned HKP packet.
99.Sh EXIT STATUS
100The
101.Nm
102utility will return 0 for success,
103or 1 for failure.
104Output will be printed on stdout.
105.Sh SEE ALSO
106.Xr hkpd 1 ,
107.Xr netpgpkeys 1 ,
108.Xr ssh 1 ,
109.\" .Xr libbz2 3 ,
110.Xr libmj 3 ,
111.Xr libnetpgp 3
112.Sh STANDARDS
113.Rs
114.%A J. Callas
115.%A L. Donnerhacke
116.%A H. Finney
117.%A D. Shaw
118.%A R. Thayer
119.%D November 2007
120.%R RFC 4880
121.%T OpenPGP Message Format
122.Re
123.Sh HISTORY
124The
125.Nm
126command first appeared in
127.Nx 6.0 .
128.Sh AUTHORS
129.An Alistair Crooks Aq Mt agc@NetBSD.org .
130