Libp11 was orginaly written as part of OpenSC and later spun off as standalone project.
wrote libp11 or helped improving it.
Libp11 is released as Open Source software under the LGPL license and thus can be used in your software, too.
Libp11 uses the PKCS#11 header file, not the official one under an non-free license, but an open source rewrite from scute project.
/* pkcs11.h Copyright 2006, 2007 g10 Code GmbH Copyright 2006 Andreas Jellinghaus This file is free software; as a special exception the author gives unlimited permission to copy and/or distribute it, with or without modifications, as long as this notice is preserved. This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, to the extent permitted by law; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */
Authors of GPL software please note that libp11 uses OpenSSL library and those header files, and depending on the interpretation of the general public license it is necessary to grant exemptions to the GPL.
Only few implementations of PKCS#11 API are open source software (for example OpenSC, MuscleCard?, gpkcs11). Most other implementations are shipped binary only with proprietory licenses by the smart card / solution vendors. To allow any PKCS#11 API implementation to be used with your license you need an exemption as well.
Here is an example that would cover all of this:
In addition to the terms set out under the GPL, permission is granted to link the software against the openssl and libp11 libraries and use any plugin implementing PKCS!#11 API under any license.
Libp11 includes svn2cl by
Copyright (C) 2004, 2005 Arthur de Jong. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.