Skip to content

Commit

Permalink
initial checkin of libp11.
Browse files Browse the repository at this point in the history
  • Loading branch information
tolonuga committed Aug 24, 2005
1 parent aec66e9 commit a0cbcae
Show file tree
Hide file tree
Showing 37 changed files with 6,709 additions and 0 deletions.
510 changes: 510 additions & 0 deletions COPYING

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Process this file with automake to create Makefile.in

SUBDIRS = aclocal doc libltdl src rsaref .

EXTRA_DIST = ANNOUNCE CodingStyle QUICKSTART README \
bootstrap Makefile.mak depcomp

MAINTAINERCLEANFILES = \
Makefile.in config.h.in configure \
install-sh ltmain.sh missing mkinstalldirs \
compile depcomp config.log config.status \
config.guess config.sub acinclude.m4 aclocal.m4

DEPCLEANFILES = config.log configure

AUTOMAKE_OPTIONS = foreign 1.5

maintainer-clean-local:
rm -rf libltdl
5 changes: 5 additions & 0 deletions aclocal/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Process this file with automake to create Makefile.in

MAINTAINERCLEANFILES = Makefile.in

EXTRA_DIST =
12 changes: 12 additions & 0 deletions bootstrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

set -e
set -x
if test -f Makefile; then
make distclean
fi
rm -rf *.cache *.m4 config.guess config.log \
config.status config.sub depcomp ltmain.sh libltdl
(cat aclocal/*.m4 > acinclude.m4 2> /dev/null)
libtoolize --ltdl --copy
autoreconf --verbose --install
61 changes: 61 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
dnl -*- mode: m4; -*-
dnl Process this file with autoconf to produce a configure script.

# Require autoconf 2.52
AC_PREREQ(2.52)

AC_INIT(libp11, 0.0)
AM_INIT_AUTOMAKE

AC_CONFIG_SRCDIR(src/libp11.h)

# LT Version numbers, remember to change them just *before* a release.
# (Code changed: REVISION++)
# (Interfaces added/removed/changed: CURRENT++, REVISION=0)
# (Interfaces added: AGE++)
# (Interfaces removed: AGE=0)
LIBP11_VERSION=0:1:0

AC_SUBST(LIBP11_VERSION)

AC_CANONICAL_HOST
AC_PROG_CC
AC_C_BIGENDIAN

dnl Options
AM_MAINTAINER_MODE

dnl Checks for programs.
AC_PROG_CPP
AC_PROG_INSTALL

dnl use ltdl
AC_LIBLTDL_INSTALLABLE
AC_SUBST(LTDLINCL)
AC_SUBST(LIBLTDL)
dnl and make sure libtool knows, too
AC_LIBTOOL_DLOPEN

dnl Add libtool support.
AM_PROG_LIBTOOL
dnl Automatically update the libtool script if it becomes out-of-date.
dnl AC_SUBST(LIBTOOL_DEPS)

dnl configure libltdl
AC_CONFIG_SUBDIRS(libltdl)

dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([errno.h fcntl.h malloc.h stdlib.h inttypes.h string.h strings.h sys/time.h unistd.h locale.h getopt.h dlfcn.h utmp.h])

PKG_CHECK_MODULES([OPENSSL], [openssl])

AC_OUTPUT([
Makefile
aclocal/Makefile
doc/Makefile
rsaref/Makefile
src/Makefile
src/libp11.pc
])
45 changes: 45 additions & 0 deletions doc/MailingLists.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>MailingLists - Library to make using PKCS#11 implementations easy - Trac</title><style type="text/css">
@import url(trac.css);
</style></head><body><div class="wikipage">
<div id="searchable"><h1>Mailing lists</h1>
<ul><li>opensc-annouce - Announcements of new releases, bugfixes and security warnings
</li><li>opensc-devel - Discussion of developement issues for OpenSC, OpenCT and SCB
</li><li>opensc-user - Discussion of end-user questions for OpenSC, OpenCT and SCB
</li><li>opensc-commits - commit notifications for all projects hosted at opensc.org
</li></ul><p>
To subscribe, unsubscribe or browse the archive, please visit
our <a class="ext-link" title="http://www.opensc.org/cgi-bin/mailman/listinfo" href="http://www.opensc.org/cgi-bin/mailman/listinfo" shape="rect">mailing list manager</a>.
</p>
<p>
Please:
</p>
<ul><li>Post to one of these mailing list.
</li><li>Do not post to several lists, one is enough, we read all of them.
</li><li>Do not send carbon copies to the developers. We read all postings on the mailing list.
</li><li>Do not mail developers directly, we read all the mailing lists and the bugs address.
</li></ul><p>
Direct email is more work for us. Also see
<a class="ext-link" title="http://www.eyrie.org/~eagle/faqs/questions.html" href="http://www.eyrie.org/~eagle/faqs/questions.html" shape="rect">this faq</a> for explanations why.
</p>
<p>
If you are subscribed to the mailing list, your posting will be distributed
immideatly. If you are not subscribed, it will be put on hold, till someone has
reviewed it so we can filter spam. We usualy review postings at least once a day,
so be patient. You can also cancel the posting, subscribe to the mailing list
and post again.
</p>
<h2>Bug reports</h2>
<p>
Please file bug reports using the <a class="ext-link" title="http://www.opensc.org/libp11/newticket" href="http://www.opensc.org/libp11/newticket" shape="rect">new ticket</a> link.
You can also send bug reports to bugs@opensc.org via email.
</p>
<h2>Greylisting</h2>
<p>
The opensc.org and lists.opensc.org mail servers are protected from spam by using a mechanism
called greylisting. Usualy this only causes a short delay for the first mail we receive from
you, and no trouble at all. Still if for whatever reason you cannot send mail to opensc.org,
please contact Andreas Jellinghaus at aj@dungeon.inka.de. Thanks.
</p>
</div>
</div><div class="footer"><hr></hr><p><a href="index.html">Back to Index</a></p></div></body></html>
8 changes: 8 additions & 0 deletions doc/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Process this file with automake to create Makefile.in

MAINTAINERCLEANFILES = Makefile.in

EXTRA_DIST = README export-wiki.sh export-wiki.xsl $(HTML)

HTML= MailingLists.html OperatingSystems.html QuickStart.html \
ResourcesLinks.html index.html trac.css
11 changes: 11 additions & 0 deletions doc/OperatingSystems.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>OperatingSystems - Library to make using PKCS#11 implementations easy - Trac</title><style type="text/css">
@import url(trac.css);
</style></head><body><div class="wikipage">
<div id="searchable"><h1>Operating Systems</h1>
<p>
Libp11 is still under development, once it works we will add each operating system here.
So far libp11 is not part of any linux distribution.
</p>
</div>
</div><div class="footer"><hr></hr><p><a href="index.html">Back to Index</a></p></div></body></html>
44 changes: 44 additions & 0 deletions doc/QuickStart.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>QuickStart - Library to make using PKCS#11 implementations easy - Trac</title><style type="text/css">
@import url(trac.css);
</style></head><body><div class="wikipage">
<div id="searchable"><h1>Installing libp11</h1>
<p>
Installation is quite easy:
</p>
<pre class="wiki" xml:space="preserve">wget http://www.opensc.org/files/libp11-0.1.tar.gz
tar xfvz libp11-0.1.tar.gz
cd libp11-0.1
./configure --prefix=/usr
make
make install
</pre><p>
is all you need. Libp11 depends on pkg-config and openssl.
If you don't have pkg-config installed, please do so and try again.
If pkg-config is not found, please change your PATH environment setting.
If openssl is not installed, please do so. If openssl is not found, please
change your PKG_CONFIG_PATH environment setting to include the directory
with "openssl.pc" file. Some linux distributions split openssl into a
runtime package and a development package, you need to install both.
</p>
<h1>Using libp11</h1>
<p>
To use libp11 in your application: in the source code add
</p>
<pre class="wiki" xml:space="preserve">#include &lt;libp11.h&gt;
</pre><p>
and in your Makefile add
</p>
<pre class="wiki" xml:space="preserve">CFLAGS=$(shell pkg-config --cflags libp11)
LDLFLAGS=$(shell pkg-config --libs libp11)
</pre><p>
or if you are using autoconf/automake, you can add this to configure.ac
</p>
<pre class="wiki" xml:space="preserve">PKG_CHECK_MODULES([LIBP11], [libp11])
</pre><p>
and edit your Makefile.am to include
</p>
<pre class="wiki" xml:space="preserve">myapplication_INCLUDES = @LIBP11_CFLAGS@
myapplication_LIBADD = @LIBP11_LIBS@
</pre></div>
</div><div class="footer"><hr></hr><p><a href="index.html">Back to Index</a></p></div></body></html>
10 changes: 10 additions & 0 deletions doc/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
This directory contains a snapshot of the LibP11 Wiki
=====================================================

The original wiki page is at http://www.opensc.org/libp11/
and includes a bug tracker and source browser.

The wiki was transformed to html using the export-wiki shell
script and xsl style sheet. The original version is at
http://www.twdata.org/trac-howto/

31 changes: 31 additions & 0 deletions doc/ResourcesLinks.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ResourcesLinks - Library to make using PKCS#11 implementations easy - Trac</title><style type="text/css">
@import url(trac.css);
</style></head><body><div class="wikipage">
<div id="searchable"><h1>Resources, Links</h1>
<p>
<a class="ext-link" title="http://www.rsasecurity.com/rsalabs/" href="http://www.rsasecurity.com/rsalabs/" shape="rect">RSA Labs</a> defined the Public Key Cryptography Standards (PKCS).
</p>
<p>
<a class="ext-link" title="http://www.rsasecurity.com/rsalabs/node.asp?id=2133" href="http://www.rsasecurity.com/rsalabs/node.asp?id=2133" shape="rect">PKCS#11</a> defines an API to use software modules
that give access to cryptographic token hardware.
</p>
<p>
We think PKCS#11 is not easy to use, libp11 has the goal to make it easier.
</p>
<p>
Libp11 is tested with <a class="ext-link" title="http://www.opensc.org/opensc/" href="http://www.opensc.org/opensc/" shape="rect">OpenSC</a>, but should work fine
with other implementations of PKCS#11, too.
</p>
<p>
Software using libp11:
</p>
<ul><li><a class="ext-link" title="http://www.opensc.org/pam_p11/" href="http://www.opensc.org/pam_p11/" shape="rect">Pam_p11</a> is a simple pam module that allows login via smart card.
To use pam_p11 you need to store the certificates allowed for login in a file, either in pem format
or the public keys in ssh format in your .ssh/authorized_keys file. Pam_p11 is very simple, it has
no config file, no options, does not know about certificate chains, certificate authorities, revocation
lists or OCSP. Perfect for the small installation with no frills.
</li><li><a class="ext-link" title="http://www.opensc.org/engine_pkcs11/" href="http://www.opensc.org/engine_pkcs11/" shape="rect">Engine_pkcs11</a> is an Engine for OpenSSL, a loadable module that
allows you to use openssl, but redirect crypto operations to your smart card hardware.
</li></ul></div>
</div><div class="footer"><hr></hr><p><a href="index.html">Back to Index</a></p></div></body></html>
34 changes: 34 additions & 0 deletions doc/export-wiki.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

set -e

export SERVER=http://www.opensc.org
export WIKI=libp11/wiki
export XSL=export-wiki.xsl

test -f `basename $0`

rm -rf *.html *.css

wget $SERVER/$WIKI/TitleIndex -O TitleIndex.tmp

grep "\"/$WIKI/[^\"]*\"" TitleIndex.tmp \
|sed -e "s#.*\"/$WIKI/\([^\"]*\)\".*#\1#g" \
> WikiWords.tmp
sed -e /^Trac/d -e /^Wiki/d -e /^TitleIndex/d -e /^RecentChanges/d \
-e /^CamelCase/d -e /^SandBox/d -i WikiWords.tmp

for A in WikiStart `cat WikiWords.tmp`
do
F=`echo $A|sed -e 's/\//_/g'`
wget $SERVER/$WIKI/$A -O $F.tmp
xsltproc --output $F.html $XSL $F.tmp
sed -e "s#<a href=\"/$WIKI/\([^\"]*\)\"#<a href=\"\1.html\"#g" \
-i $F.html
done

mv WikiStart.html index.html

wget http://www.opensc.org/trac/css/trac.css

rm *.tmp
58 changes: 58 additions & 0 deletions doc/export-wiki.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:html="http://www.w3.org/1999/xhtml">
<xsl:output method="html" indent="yes"/>

<xsl:template match="/">
<xsl:apply-templates />
</xsl:template>

<xsl:template match="/html:html">
<html>
<head>
<title><xsl:value-of select="/html:html/html:head/html:title" /></title>
<style type="text/css">
@import url(trac.css);
</style>
</head>
<body>
<xsl:apply-templates select="//html:div[@class='wikipage']" />
<div class="footer">
<hr />
<p><a href="index.html">Back to Index</a></p>
</div>
</body>
</html>
</xsl:template>

<xsl:template match="/pages">
<html>
<head>
<title>Wiki Index</title>
<style type="text/css">
@import url(trac.css);
</style>
</head>
<body>
<h1>Index of Wiki Pages</h1>
<ul>
<xsl:apply-templates select="page" />
</ul>
</body>
</html>
</xsl:template>

<xsl:template match="page">
<li><a href="{.}.html"><xsl:value-of select="." /></a></li>
</xsl:template>

<xsl:template match="node()|@*" priority="-1">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>

</xsl:stylesheet>

30 changes: 30 additions & 0 deletions doc/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Library to make using PKCS#11 implementations easy - Trac</title><style type="text/css">
@import url(trac.css);
</style></head><body><div class="wikipage">
<div id="searchable"><h1>Welcome to libp11</h1>
<p>
Libp11 is a library implementing a small layer on to of PKCS#11 API
to make using PKCS#11 implementations easier.
</p>
<p>
The official name for PKCS#11 is
"RSA Security Inc. PKCS <a class="missing" href="/libp11/ticket/11" shape="rect">#11</a> Cryptographic Token Interface (Cryptoki)".
Libp11 source code include the official header files (version 2.20) and
thus is "derived from the RSA Security Inc. PKCS <a class="missing" href="/libp11/ticket/11" shape="rect">#11</a>
Cryptographic Token Interface (Cryptoki)".
</p>
<p>
Libp11 is Open Source software licensed under the LGPL license.
</p>
<p>
Libp11 was written by Andreas Jellinghaus, Kevin Stefanik, Ludovic Rousseau,
Nils Larsch, Olaf Kirch and Stef Hoeben .
</p>
<h2>Starting Points</h2>
<ul><li><a href="OperatingSystems.html" shape="rect">OperatingSystems</a> -- Libp11 should work on Linux, BSD, Mac OS X and Windows. See here for details.
</li><li><a href="QuickStart.html" shape="rect">QuickStart</a> -- How to install libp11 and how to use it in your applications.
</li><li><a href="MailingLists.html" shape="rect">MailingLists</a> -- How to contact us.
</li><li><a href="ResourcesLinks.html" shape="rect">ResourcesLinks</a> -- Standards, Documents, etc.
</li></ul></div>
</div><div class="footer"><hr></hr><p><a href="index.html">Back to Index</a></p></div></body></html>
Loading

0 comments on commit a0cbcae

Please sign in to comment.