Using p11-kit for PKCS#11 support

Stef Walter stefw at collabora.co.uk
Thu Jun 9 02:06:53 PDT 2011


On 06/07/2011 08:22 PM, Nikos Mavrogiannopoulos wrote:
> On 06/07/2011 07:36 PM, Stef Walter wrote:
>
>> The attached patch ports gnutls to p11-kit. It's actually a combined set
>> of patches, and these are available in branch form:
>
> Thank you Stef. I've just commited it. But could you try compiling with
> the --enable-gcc-warnings configure flag?
> I had some uninitialized variables in
> 1. pkcs11.c:311 and 312
> 2. pkcs11.c:875
>
> which I have quickly solved, but probably not in a correct way.

Attached is another patch which fixes them a bit differently. Also fixes 
other warnings that GCC 4.6.0 complains about.

That said, for some reason the file lib/pkcs11_spec.h is missing from 
master. At least for me. This prevents gnutls master from building. I've 
attached it too.

>> [2] http://p11-glue.freedesktop.org/doc/p11-kit/config.html
>
> I installed p11-kit from the git and it tries to open
> "${prefix}/etc/pkcs11/pkcs11.conf"
>
> When I explicitly used:
> ../configure --sysconfdir=/etc/
>
> it worked ok.

Good catch. I've fixed that in p11-kit master. It now defaults to 
/etc/pkcs11. The directory can be changed by packagers if necessary with 
a --with-pkcs11-dir configure argument.

> btw. There is a typo in
> http://p11-glue.freedesktop.org/doc/p11-kit/config-module.html
> It should be: "module: The absolute path to the PKCS#11 module to load."

Thanks. Fixed.

Cheers,

Stef


More information about the p11-glue mailing list