File: README

package info (click to toggle)
ykclient 2.6-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 1,460 kB
  • sloc: sh: 10,391; ansic: 2,675; makefile: 60
file content (108 lines) | stat: -rw-r--r-- 2,964 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
Introduction to Yubikey client C library
========================================

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.

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

* tool.c: Source for command line tool "ykclient" 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 from Git
-----------------

Skip to the next section if you are using an official packaged
version.

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

-----------
  $ git clone git://github.com/Yubico/yubico-c-client.git
-----------

This will create a directory 'yubico-c-client'.  Enter the directory:

-----------
  $ cd yubico-c-client
-----------

Autoconf, automake and libtool must be installed.

Generate the build system using:

-----------
  $ autoreconf --install
-----------


Building
--------

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

-----------
  $ ./configure
  $ make check install
-----------

Another way to build the package is by running 'make -f simple.mk
check'.  It will build each component, and also test it.  See below
for sample session.  This is useful if you want to target a platform
that doesn't support Autoconf/automake/libtool well.

-----------
jas@mocca:~/src/yubico-c-client$ make -f simple.mk  check
cc -I. -Wall -g -DPACKAGE=\"ykclient\" -DPACKAGE_VERSION=\"0\"   -c -o ykclient.o ykclient.c
cc -lcurl  ykclient.o tool.c   -o ykclient
cc -I. -Wall -g -DPACKAGE=\"ykclient\" -DPACKAGE_VERSION=\"0\"  -lcurl  selftest.c ykclient.o   -o selftest
./selftest
ykclient_init (0): Success
ykclient_request (2): Yubikey OTP was replayed (REPLAYED_OTP)
yubikey_request (2): Yubikey OTP was replayed (REPLAYED_OTP)
strerror(0): Success
strerror(BAD_OTP): Yubikey OTP was bad (BAD_OTP)
jas@mocca:~/src/yubico-c-client$ 
-----------


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 
Usage: ./ykclient <client_id> <yubikey_otp>
 CLIENT_ID: your client id integer
 YUBIKEY_OTP: One-time password generated by yubikey
jas@mocca:~/src/yubico-c-client$ ./ykclient 16 dteffujehknhfjbrjnlnldnhcujvddbikngjrtgh
Input:
  client id: 16
  token: dteffujehknhfjbrjnlnldnhcujvddbikngjrtgh
Verification output (2): Yubikey OTP was replayed (REPLAYED_OTP)
jas@mocca:~/src/yubico-c-client$ 
-----------


Questions?
----------

Talk to <simon@yubico.com>.