Introduction

Libu2f-host provides a C library and command-line tool that implements
the host-side of the U2F protocol. There are APIs to talk to a U2F
device and perform the U2F Register and U2F Authenticate operations.

License

The library and command-line tool is licensed under the LGPLv2+ license.
Some other files are licensed under the GPLv3+ license. The license for
each file should be clear from the comments at the top of it. See the
files COPYING (for GPLv3) and COPYING.LGPLv2 for complete license texts.
If you have a desire to use this package under another license, please
contact us to discuss the reason. For any copyright year range specified
as YYYY-ZZZZ in this package note that the range specifies every single
year in that closed interval.

Usage

The library usage is documented in the API manual, see gtk-doc/html/
after you built with ./configure --enable-gtk-doc.

There is a command-line utility that is useful for debugging or
testing. We describe how you could use it here.

Register

First get a register challenge JSON blob somehow. You could use the
Yubico U2F demo server interactively in a browser (with the U2F
extension disabled). Alternatively,
use the WSAPI. For example:

Instructions

This project uses autoconf, automake and libtool to achieve
portability and ease of use. If you downloaded a tarball, build it as
follows:

./configure --enable-gtk-doc
make check && sudo make install

Building from Git

You may check out the sources using Git with the following command:

git clone https://github.com/Yubico/libu2f-host.git

This will create a directory libu2f-host. Enter the directory:

cd libu2f-host

Autoconf, automake and libtool must be installed. Help2man is used to
generate the manpages. GTK-DOC is used to generated API
documentation. Gengetopt is needed for command line parameter
handling. HIDAPI developer files are also required.
All of the above can be installed in Debian via:

apt-get install gtk-doc-tools gengetopt help2man

Generate the build system using:

make

See cfg.mk for some settings.

Portability

The main development platform is Debian GNU/Linux and it should be
well supported. Windows and Mac OS X are important platforms and we
support them fully as well.

Building Mac binaries can be done using macosx.mk. The resulting
binaries have been tested successfully on Mac OS X 10.7 and 10.9.

make -f macosx.mk VERSION=X.Y.Z

Windows binaries can be cross-compiled using windows.mk. For this to
work the packages wine, mingw-w64 and mingw-w64-dev are required. The
resulting binaries have been tested successfully on Windows 7 Pro 32-bit.

make -f windows.mk VERSION=X.Y.Z

Both of these require that a release tarball of the project exists in the
current directory. The value of the VERSION variable must match the version
on that tarball.