Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
C Shell

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
trunk
AUTHORS
COPYING
Makefile.am
NEWS
README
configure.ac
libcurl.m4
libykclient.c
libykclient.h
selftest.c
simple.mk
ykclient.c

README

#summary Introduction to Yubikey client C library
#labels Featured,Phase-Deploy

= Introduction =

This is a library written in C to validate a Yubikey OTP against the
Yubico online server.  Description of included files:

* AUTHORS, COPYING, NEWS, README: meta-information about the project.

* libykclient.h, libykclient.c: Implementation of the library.

* ykclient.c: Command line tool to validate an OTP.

* selftest.c: Self tests of the library.

* simple.mk: Simple makefile to build the above parts.

* configure.ac, Makefile.am: Autoconf/Automake files.

= Building =

The simple way to build the package is by running 'make -f simple.mk
check'.  It will build each component, and also test them.  See below
for sample session.

{{{
$ make -f simple.mk check
cc -I. -Wall -g -DPACKAGE=\"yubikey-client\" -DPACKAGE_VERSION=\"0\"   -c -o libykclient.o libykclient.c
libykclient.c: In function ‘yubikey_client_request’:
libykclient.c:210: warning: implicit declaration of function ‘asprintf’
cc -I. -Wall -g -DPACKAGE=\"yubikey-client\" -DPACKAGE_VERSION=\"0\"  -lcurl  ykclient.c libykclient.o   -o ykclient
cc -I. -Wall -g -DPACKAGE=\"yubikey-client\" -DPACKAGE_VERSION=\"0\"  -lcurl  selftest.c libykclient.o   -o selftest
./selftest
return code (2): REPLAYED_OTP
strerror(0): Success
strerror(BAD_OTP): BAD_OTP

All tests successful
$ 
}}}

To build using the Autoconf, automake and libtool infrastructure,
which is recommend for more advanced purposes especially
cross-compilation, build it as follows.

{{{
$ autoreconf -fvi
$ ./configure
$ make check
}}}

= Command-line tools =

There is one command line tool, ykclient, to validate a particular
OTP.  It needs a client id, which you can allocate for yourself on
Yubico's web site.

Example session below.

{{{
jas@mocca:~/src/yubico-c-client$ ./ykclient 16 dteffujehknhfjbrjnlnldnhcujvddbikngjrtgh
Input:
  client id: 16
  token: dteffujehknhfjbrjnlnldnhcujvddbikngjrtgh
Verification output (2): REPLAYED_OTP
jas@mocca:~/src/yubico-c-client$ 
}}}

= Questions? =

Talk to <simon@yubico.com>.
Something went wrong with that request. Please try again.