|
Packit |
6b81fa |
Libp11 example code
|
|
Packit |
6b81fa |
===================
|
|
Packit |
6b81fa |
|
|
Packit |
6b81fa |
This directory contains some example code how to use libp11.
|
|
Packit |
6b81fa |
Feel free to use this code in any way, it is public domain,
|
|
Packit |
6b81fa |
not copyrighted.
|
|
Packit |
6b81fa |
|
|
Packit |
6b81fa |
auth.c Example for authentication, i.e. get the first
|
|
Packit |
6b81fa |
token, get the first certificate, ask for pin,
|
|
Packit |
6b81fa |
login, sign some random data, and verify the
|
|
Packit |
6b81fa |
signature using the certificate/public key.
|
|
Packit |
6b81fa |
|
|
Packit |
6b81fa |
For easy building see the Makefile in this directory. If you
|
|
Packit |
6b81fa |
are using autoconf/automake/libtool, you might want to add
|
|
Packit |
6b81fa |
to your configure.ac file:
|
|
Packit |
6b81fa |
|
|
Packit |
6b81fa |
PKG_CHECK_MODULES([LIBP11], [libp11])
|
|
Packit |
6b81fa |
|
|
Packit |
6b81fa |
and to your Makefile.am:
|
|
Packit |
6b81fa |
|
|
Packit |
6b81fa |
bin_PROGRAMS = myapp
|
|
Packit |
6b81fa |
|
|
Packit |
6b81fa |
myapp_CFLAGS = @LIBP11_CFLAGS@
|
|
Packit |
6b81fa |
myapp_LIBADD = @LIBP11_LIBS@
|
|
Packit |
6b81fa |
myapp_SOURCES = myapp.c
|