.\" $NetBSD: hkpd.1,v 1.3 2014/03/18 18:20:35 riastradh Exp $
.\"
.\" Copyright (c) 2009,2010 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This manual page is derived from software contributed to
.\" The NetBSD Foundation by Alistair Crooks (agc@NetBSD.org).
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd September 1, 2010
.Dt HKPD 1
.Os
.Sh NAME
.Nm hkpd
.Nd HTTP key protocol daemon
.Sh SYNOPSIS
.Nm
.Op Fl DV
.Op Fl f families
.Op Fl H homedir
.Op Fl h hostname
.Op Fl p port
.Op Fl S keyfilename
.Op Fl v filename
.Sh DESCRIPTION
The
.Nm
daemon is used to provide public key information on
a socket to client programs.
The client can request the information in two separate ways,
.Dq human
and
.Dq machine readable .
.Pp
The following options can be used to modify the behaviour
of the daemon:
.Bl -tag -width protocol-families
.It Fl D
Do not detach the daemon from the controlling tty, and keep the
.Nm
process running in the foreground.
.It Fl f Ar protocol-families
allows the address families for sockets to be selected.
The argument is the string concatenating the families,
with
.Dq 4
representing
.Dv INET4 ,
and
.Dq 6
representing
.Dv INET6 .
The default value for this parameter is
.Dq 46
which means that both INET4 and INET6 protocol
families are used when setting up the sockets.
.It Fl H Ar homedir
Use the setting of
.Dv homedir
as the directory for the public key keyrings.
.It Fl h Ar hostname
Set the hostname (for use in binding sockets).
.It Fl p Ar port
Set the port number (for use in binding sockets).
The default port number is the
.Dq hkp
service, defined as port
.Dv 11371 .
.It Fl S Ar sshkeyfile
Serve the ssh public keys found in the key file.
The default file for the ssh key is
.Pa $HOME/.ssh/id_rsa.pub .
.It Fl V
Display the version number of the daemon and exit.
.It Fl v Ar filename
Produce extra debugging output from the internal file named
.Dv filename .
.El
.Pp
The
.Nm
daemon is built on
.Xr libnetpgp 3
and returns public key information as held in the
public keyring of the user running the
.Nm
daemon utility by default.
.Pp
The information returned to the HKP client is encoded
in JSON using the
.Xr libmj 3
library.
.Sh EXIT STATUS
In normal operation, the
.Nm
daemon will not return.
.Sh SEE ALSO
.Xr hkpc 1 ,
.Xr netpgpkeys 1 ,
.Xr ssh 1 ,
.Xr libmj 3
.Xr libnetpgp 3
.Sh HISTORY
The
.Nm
command first appeared in
.Nx 6.0 .
.Sh AUTHORS
.An Alistair Crooks Aq Mt agc@NetBSD.org .