]> granicus.if.org Git - p11-kit/log
p11-kit
8 years agovirtual: Make virtual-fixed internal API cleaner
Daiki Ueno [Wed, 25 Jan 2017 10:23:57 +0000 (11:23 +0100)]
virtual: Make virtual-fixed internal API cleaner

Add proper inclusion guard to virtual-fixed.h and move the declarations
of the (un)initialization functions there.

8 years agotest: Release transport mock module
Daiki Ueno [Wed, 25 Jan 2017 10:16:07 +0000 (11:16 +0100)]
test: Release transport mock module

To prevent leaks of fixed closures, p11_kit_module_release() needs to be
called on the mock module itself.

8 years agotest: Check exhaustion of fixed closures
Nikos Mavrogiannopoulos [Wed, 30 Nov 2016 14:20:24 +0000 (15:20 +0100)]
test: Check exhaustion of fixed closures

8 years agobuild: Make libffi closure optional
Daiki Ueno [Fri, 26 Aug 2016 15:20:06 +0000 (17:20 +0200)]
build: Make libffi closure optional

libffi's closure support is not available on all platforms and may fail
at run time if running under a stricter SELinux policy.  Fallback to
pre-compiled closures if it is not usable.

https://bugs.freedesktop.org/show_bug.cgi?id=97611

8 years agomaint: Add .dir-locals.el file for Emacs
Daiki Ueno [Mon, 23 Jan 2017 11:42:51 +0000 (12:42 +0100)]
maint: Add .dir-locals.el file for Emacs

8 years agotravis: Enable strict code compilation
Daiki Ueno [Mon, 23 Jan 2017 11:48:23 +0000 (12:48 +0100)]
travis: Enable strict code compilation

8 years agoFix compiler warnings on FreeBSD
Roman Bogorodskiy [Sat, 21 Jan 2017 17:49:42 +0000 (21:49 +0400)]
Fix compiler warnings on FreeBSD

 * common/compat.c: Fix "implicit declaration of function 'issetugid'"
   warning. On FreeBSD, it's required to define __BSD_VISIBLE to make
   issetugid(2) visible
 * common/test-message.c: Fix "implicit declaration of function
   'asprintf'" by including <stdio.h>
 * p11-kit/test-iter.c: Fix "format '%lu' expects argument of
   type 'long unsigned int', but argument 3 has type 'int'" by
   changing format string to "%d"

8 years agosystemd: add per-user remoting socket
Lubomir Rintel [Thu, 8 Dec 2016 17:20:37 +0000 (18:20 +0100)]
systemd: add per-user remoting socket

This allows daemons outside user's session to use per-user PKCS#11
modules. Useful for letting VPN daemons or wpa_supplicant use
certificates stored in user's GNOME keyring, etc.

8 years agocommon: use recursive pthread mutex for library lock
Lubomir Rintel [Tue, 3 Nov 2015 07:11:39 +0000 (08:11 +0100)]
common: use recursive pthread mutex for library lock

This allows us to do nested locking within one thread avoiding a lockup
when remoting the p11-kit-proxy.so module:

  #0  0x00007f190f35838d in __lll_lock_wait () from /lib64/libpthread.so.0
  #1  0x00007f190f351e4d in pthread_mutex_lock () from /lib64/libpthread.so.0
  #2  0x00007f190f98657f in C_GetFunctionList (list=0x7ffe7ec3f798) at p11-kit/proxy.c:2355
  #3  0x00007f190f993cc9 in dlopen_and_get_function_list (funcs=0x7ffe7ec3f798, path=0x7ffe7ec40926 "/usr/local/lib/p11-kit-proxy.so", mod=0x249e3d0) at p11-kit/modules.c:337
  #4  load_module_from_file_inlock (name=name@entry=0x0, path=path@entry=0x7ffe7ec40926 "/usr/local/lib/p11-kit-proxy.so", result=result@entry=0x7ffe7ec3f7e8) at p11-kit/modules.c:382
  #5  0x00007f190f99587f in p11_kit_module_load (module_path=module_path@entry=0x7ffe7ec40926 "/usr/local/lib/p11-kit-proxy.so", flags=flags@entry=0) at p11-kit/modules.c:2427
  #6  0x0000000000401c4b in serve_module_from_file (file=0x7ffe7ec40926 "/usr/local/lib/p11-kit-proxy.so") at p11-kit/remote.c:105
  #7  main (argc=1, argv=<optimized out>) at p11-kit/remote.c:169

The Windows NT mutex is aready recursive by default.

8 years agouri: Support query attributes to specify module
Daiki Ueno [Wed, 18 Jan 2017 09:18:23 +0000 (10:18 +0100)]
uri: Support query attributes to specify module

Accept and produce 'module-name' and 'module-path' query attributes
defined in RFC 7512.

8 years agouri: Avoid typecasting confusion on s390x
Daiki Ueno [Mon, 16 Jan 2017 13:06:30 +0000 (14:06 +0100)]
uri: Avoid typecasting confusion on s390x

Like memcpy(), the 'void *' argument of p11_buffer_add() points to the
memory area ordered in host's endianness.  Add typecast of int->char to
avoid the confusion.

Reported by Andreas Metzler in:
https://lists.freedesktop.org/archives/p11-glue/2017-January/000633.html

8 years agouri: fix producing the query attributes
Lubomir Rintel [Wed, 28 Dec 2016 15:28:34 +0000 (16:28 +0100)]
uri: fix producing the query attributes

Put the pin-* attributes where they belong: to the query part.

8 years agouri: fix the query attribute parsing
Lubomir Rintel [Wed, 28 Dec 2016 15:11:21 +0000 (16:11 +0100)]
uri: fix the query attribute parsing

The pin-* attributes belong to the query part. We should not parse them
until we see a '?' and they're separated with a '&'.

This might be an important thing -- some of the query attributes may
have security implications reaching outside scope of the token itself, to the
host system itself. E.g. a pin-source may cause the consumer to access a file
or module-path (unimplemented) execute code. The user may want to just chop the
attribute part off if they want the consumer access the token and not take the
security considerations into account.

8 years agobuild: improve p11-kit-proxy symlink handling
Roman Bogorodskiy [Fri, 6 Jan 2017 20:06:34 +0000 (00:06 +0400)]
build: improve p11-kit-proxy symlink handling

 - Current command for creation of the p11-kit-proxy symlink
   uses shell brace expansion that isn't supported by all
   the shells (e.g. FreeBSD's /bin/sh does not support that).
   Replace it with the old-fashioned 'for' loop
 - Match extension of the source and the target, i.e. so links
   to so, dylib links to dylib (previously dylib linked to so)
 - Add an uninstall-local target to clean up the symlink

8 years agoRelease version 0.23.3 0.23.3
Daiki Ueno [Tue, 13 Dec 2016 09:17:51 +0000 (10:17 +0100)]
Release version 0.23.3

8 years agodoc: More tweaks for gtk-doc
Daiki Ueno [Mon, 19 Dec 2016 15:10:15 +0000 (16:10 +0100)]
doc: More tweaks for gtk-doc

8 years agodoc: Mention new API functions
Daiki Ueno [Mon, 19 Dec 2016 09:46:56 +0000 (10:46 +0100)]
doc: Mention new API functions

8 years agorpc: Fix typo flagged by lintian
Andreas Metzler [Thu, 15 Dec 2016 08:00:45 +0000 (09:00 +0100)]
rpc: Fix typo flagged by lintian

8 years agotest: Remove setgid()ed copy of frob-getenv
Daiki Ueno [Tue, 13 Dec 2016 09:35:49 +0000 (10:35 +0100)]
test: Remove setgid()ed copy of frob-getenv

Otherwise the file is left in builddir, after make distclean.

8 years agotest: Fix privatedir substitution in test-extract
Daiki Ueno [Tue, 13 Dec 2016 09:34:07 +0000 (10:34 +0100)]
test: Fix privatedir substitution in test-extract

Since $privatedir expands to "${libexecdir}/p11-kit", $libexecdir must
be substituted in the script beforehand.

8 years agopkcs11: Update CRYPTOKI_VERSION to 2.40
Daiki Ueno [Tue, 6 Dec 2016 10:47:07 +0000 (11:47 +0100)]
pkcs11: Update CRYPTOKI_VERSION to 2.40

8 years agopkcs11: Add CK_RSA_PKCS_OAEP_PARAMS definition
Daiki Ueno [Tue, 6 Dec 2016 10:38:04 +0000 (11:38 +0100)]
pkcs11: Add CK_RSA_PKCS_OAEP_PARAMS definition

https://bugzilla.redhat.com/show_bug.cgi?id=1191209

8 years agopkcs11: Add CKA_COPYABLE definition
Daiki Ueno [Tue, 6 Dec 2016 10:04:28 +0000 (11:04 +0100)]
pkcs11: Add CKA_COPYABLE definition

https://bugzilla.redhat.com/show_bug.cgi?id=1191231

8 years agopkcs11: Add AES key wrap mechanisms
Daiki Ueno [Tue, 6 Dec 2016 10:02:48 +0000 (11:02 +0100)]
pkcs11: Add AES key wrap mechanisms

https://bugzilla.redhat.com/show_bug.cgi?id=1191231

8 years agoproxy: Remove redundant NULL check
Pankaj [Tue, 20 Sep 2016 16:09:49 +0000 (18:09 +0200)]
proxy: Remove redundant NULL check

https://bugs.freedesktop.org/show_bug.cgi?id=93589

8 years agomodules: Remove redundant NULL check
Pankaj [Tue, 20 Sep 2016 16:07:59 +0000 (18:07 +0200)]
modules: Remove redundant NULL check

https://bugs.freedesktop.org/show_bug.cgi?id=93588

8 years agoproxy: Check return value of calloc()
Pankaj [Tue, 20 Sep 2016 16:06:17 +0000 (18:06 +0200)]
proxy: Check return value of calloc()

https://bugs.freedesktop.org/show_bug.cgi?id=92815

8 years agomock: Check return value of calloc()
Pankaj [Tue, 20 Sep 2016 16:05:05 +0000 (18:05 +0200)]
mock: Check return value of calloc()

https://bugs.freedesktop.org/show_bug.cgi?id=92813

8 years agodoc: State 'p11-kit trust' is a deprecated form
Daiki Ueno [Tue, 6 Dec 2016 09:56:06 +0000 (10:56 +0100)]
doc: State 'p11-kit trust' is a deprecated form

https://bugzilla.redhat.com/show_bug.cgi?id=1160783

8 years agotrust: Don't add CKA_TRUSTED to extension object
Daiki Ueno [Fri, 23 Sep 2016 09:10:21 +0000 (11:10 +0200)]
trust: Don't add CKA_TRUSTED to extension object

While 'trust anchor' command tries to add CKA_TRUSTED attribute to any
object, it is only valid for a certificate object.

https://bugzilla.redhat.com/show_bug.cgi?id=1158926

8 years agocommon, trust: Avoid integer overflow
Daiki Ueno [Thu, 22 Sep 2016 12:47:18 +0000 (14:47 +0200)]
common, trust: Avoid integer overflow

This fixes issues pointed in:
https://bugzilla.redhat.com/show_bug.cgi?id=985445
except for p11-kit/conf.c:read_config_file(), which was rewritten using
mmap() and thus length calculation is no longer needed.

8 years agomove privatedir from libdir to libexecdir
Stanislav Brabec [Tue, 22 Nov 2016 13:44:21 +0000 (14:44 +0100)]
move privatedir from libdir to libexecdir

According to the GNU Coding Standards[1], private executables should be
installed to libexecdir, not libdir.

Move privatedir to libexecdir.

[1] https://www.gnu.org/prep/standards/

https://bugs.freedesktop.org/show_bug.cgi?id=98817

8 years agotrust: Avoid confusion in DER/PEM decoding
Daiki Ueno [Tue, 27 Sep 2016 09:30:23 +0000 (11:30 +0200)]
trust: Avoid confusion in DER/PEM decoding

Previously p11-kit-trust.so tried to interpret certificate as PEM format
first.  This could cause potential conflict if the certificate were
actually in DER format and contained a PEM marker strings.

https://bugs.freedesktop.org/show_bug.cgi?id=92063

8 years agodoc: Update documentation to point towards GitHub
Stef Walter [Tue, 29 Nov 2016 12:40:32 +0000 (13:40 +0100)]
doc: Update documentation to point towards GitHub

The p11-kit code has moved to GitHub. The documentation needs
an update.

8 years agotest-conf: don't create the setuid copy in /tmp
Lubomir Rintel [Mon, 28 Nov 2016 15:33:04 +0000 (16:33 +0100)]
test-conf: don't create the setuid copy in /tmp

The temporary directory is often mounted with nosuid, thus whatever runs
from there doesn't get AT_SECURE in auxv.

8 years agotrust: Clarify the error message of 'extract'
Daiki Ueno [Tue, 27 Sep 2016 13:30:09 +0000 (15:30 +0200)]
trust: Clarify the error message of 'extract'

https://bugzilla.redhat.com/show_bug.cgi?id=1154693

8 years agotrust: Mention anchor --remove option in help
Daiki Ueno [Fri, 23 Sep 2016 09:15:16 +0000 (11:15 +0200)]
trust: Mention anchor --remove option in help

https://bugzilla.redhat.com/show_bug.cgi?id=1158467

8 years agotrust: Reject invalid UTF-8 input
Daiki Ueno [Thu, 22 Sep 2016 12:11:16 +0000 (14:11 +0200)]
trust: Reject invalid UTF-8 input

Merge changes from utf8.c in FreeBSD's libc:
https://svnweb.freebsd.org/base/head/lib/libc/locale/utf8.c?revision=290494&view=markup#l196

https://bugzilla.redhat.com/show_bug.cgi?id=985449

8 years agopkg-config: Expose p11_trust_paths variable
Daiki Ueno [Thu, 22 Sep 2016 14:39:45 +0000 (16:39 +0200)]
pkg-config: Expose p11_trust_paths variable

The variable is mentioned in the manual but wasn't exposed from the
pkg-config.

8 years agobuild: Remove *.in files from EXTRA_DIST
Daiki Ueno [Thu, 22 Sep 2016 14:38:39 +0000 (16:38 +0200)]
build: Remove *.in files from EXTRA_DIST

The files created with AC_CONFIG_FILES are automatically added to the
distribution.

8 years agobuild: Don't update po files on every make run
Daiki Ueno [Fri, 21 Oct 2016 15:23:35 +0000 (17:23 +0200)]
build: Don't update po files on every make run

Update po/Makevars to the latest template and take advantage of
PO_DEPENDS_ON_POT = no.

8 years agotravis: Enable GCC sanitizers
Daiki Ueno [Mon, 31 Oct 2016 08:57:21 +0000 (09:57 +0100)]
travis: Enable GCC sanitizers

8 years agotravis: Disable silent rules
Daiki Ueno [Mon, 31 Oct 2016 09:09:01 +0000 (10:09 +0100)]
travis: Disable silent rules

8 years agotest: Remove /proxy/deinit-after-fork test
Daiki Ueno [Wed, 21 Sep 2016 12:50:38 +0000 (14:50 +0200)]
test: Remove /proxy/deinit-after-fork test

This test hasn't been working since the removal of the pthread_atfork()
deinit code.  To properly clean up, the child process needs to call
C_Initialize() and C_Finalize(), and it is already tested by
/proxy/initialize-child.

8 years agotest: Fix memleak in test-token cleanup
Daiki Ueno [Tue, 20 Sep 2016 14:48:16 +0000 (16:48 +0200)]
test: Fix memleak in test-token cleanup

GCC's asan spotted this:
  Direct leak of 338 byte(s) in 13 object(s) allocated from:
      #0 0x7f54f03fee20 in malloc (/lib64/libasan.so.3+0xc6e20)
      #1 0x445e8c in p11_path_build ../common/path.c:222
      #2 0x4385bd in expand_tempdir ../common/test.c:334
      #3 0x43869c in p11_test_directory ../common/test.c:361
      #4 0x4033e3 in setup_temp ../trust/test-token.c:79

8 years agomodules: Reset the init count on fork()
Daiki Ueno [Thu, 22 Sep 2016 07:16:48 +0000 (09:16 +0200)]
modules: Reset the init count on fork()

Reset mod->init_count when forkid has changed.  Otherwise C_Finalize
does not get called.

GCC's asan spotted this:
  Direct leak of 48 byte(s) in 1 object(s) allocated from:
      #0 0x7f89bc7bfe20 in malloc (/lib64/libasan.so.3+0xc6e20)
      #1 0x7f89bc47a1f1 in p11_dict_new ../common/dict.c:278
      #2 0x7f89bc42143d in managed_C_Initialize ../p11-kit/modules.c:1477
      #3 0x7f89bc464c72 in binding_C_Initialize ../p11-kit/virtual.c:121
      #4 0x7f89bc1b0a51 in ffi_closure_unix64_inner (/lib64/libffi.so.6+0x5a51)
      #5 0x7f89bc1b0dbf in ffi_closure_unix64 (/lib64/libffi.so.6+0x5dbf)
      #6 0x7f89bc44f9e8 in rpc_C_Initialize ../p11-kit/rpc-server.c:691

8 years agomodules: Fix memleak when loading remote module
Daiki Ueno [Wed, 21 Sep 2016 13:30:55 +0000 (15:30 +0200)]
modules: Fix memleak when loading remote module

Make sure to call p11_virtual_uninit() on managed module.  Otherwise the
associated lower_module will not be released.

GCC's asan spotted this:
  Direct leak of 56 byte(s) in 1 object(s) allocated from:
      #0 0x7f6c5368dfe0 in calloc (/lib64/libasan.so.3+0xc6fe0)
      #1 0x4436ba in p11_rpc_client_init ../p11-kit/rpc-client.c:2082
      #2 0x42c147 in p11_rpc_transport_new ../p11-kit/rpc-transport.c:850
      #3 0x415d95 in setup_module_for_remote_inlock ../p11-kit/modules.c:411

8 years agorpc: Fix memleak in rpc_socket cleanup
Daiki Ueno [Wed, 21 Sep 2016 13:06:41 +0000 (15:06 +0200)]
rpc: Fix memleak in rpc_socket cleanup

GCC's asan spotted this:
  Direct leak of 120 byte(s) in 1 object(s) allocated from:
      #0 0x7f8d4f221fe0 in calloc (/lib64/libasan.so.3+0xc6fe0)
      #1 0x427f55 in rpc_socket_new ../p11-kit/rpc-transport.c:100
      #2 0x42bc1b in rpc_exec_connect ../p11-kit/rpc-transport.c:767

8 years agouri: Port to PKCS#11 GNU calling convention
Daiki Ueno [Fri, 23 Sep 2016 11:27:18 +0000 (13:27 +0200)]
uri: Port to PKCS#11 GNU calling convention

https://bugs.freedesktop.org/show_bug.cgi?id=97245

8 years agouri: Fix buffer overflow in memcmp()
Daiki Ueno [Tue, 20 Sep 2016 10:15:07 +0000 (12:15 +0200)]
uri: Fix buffer overflow in memcmp()

The commit 63644dc introduced several memcmp() calls without checking
the length of the first argument.

https://bugs.freedesktop.org/show_bug.cgi?id=97245

8 years agotravis: Enable build on the CI
Daiki Ueno [Thu, 6 Oct 2016 14:09:29 +0000 (16:09 +0200)]
travis: Enable build on the CI

8 years agorpc: Send x-init-reserved to remote module
Daiki Ueno [Mon, 19 Sep 2016 14:36:19 +0000 (16:36 +0200)]
rpc: Send x-init-reserved to remote module

Signed-off-by: Stef Walter <stefw@redhat.com>
 * Fixed up indentation

https://bugs.freedesktop.org/show_bug.cgi?id=80519

8 years agotest: Fix p11_virtual_init() usage
Daiki Ueno [Tue, 20 Sep 2016 13:01:04 +0000 (15:01 +0200)]
test: Fix p11_virtual_init() usage

p11_virtual_init() should take a CK_FUNCTION_LIST as the 3rd argument,
if the 2nd argument is &p11_virtual_base.

https://bugs.freedesktop.org/show_bug.cgi?id=87192

8 years agoFix link of p11-kit-proxy.dylib on Mac OS X
Leonardo Brondani Schenkel [Mon, 3 Oct 2016 08:47:42 +0000 (10:47 +0200)]
Fix link of p11-kit-proxy.dylib on Mac OS X

However, on Mac OS X the library is named libp11-kit.dylib so
in the above command the source of the link resolves to nothing,
the destination becomes the source and the link to a non-existent
file is created in the working directory.

https://bugs.freedesktop.org/show_bug.cgi?id=98022

8 years agotest: Make test-module work --without-trust-module
Daiki Ueno [Fri, 12 Aug 2016 12:27:46 +0000 (14:27 +0200)]
test: Make test-module work --without-trust-module

The test-module program currently depends on TRUST_PATHS, which is
determined by the configure script and normally points to a resource
outside of the build tree.  To make the test system-independent, use
a crafted path for testing.

https://bugs.freedesktop.org/show_bug.cgi?id=89027

8 years agoiter: Utilize 'slot-id' URI path attribute
Daiki Ueno [Wed, 10 Aug 2016 15:15:25 +0000 (17:15 +0200)]
iter: Utilize 'slot-id' URI path attribute

https://bugs.freedesktop.org/show_bug.cgi?id=97245

8 years agoiter: Utilize slot info URI path attributes
Daiki Ueno [Wed, 10 Aug 2016 14:09:31 +0000 (16:09 +0200)]
iter: Utilize slot info URI path attributes

https://bugs.freedesktop.org/show_bug.cgi?id=97245

8 years agouri: Support 'slot-id' path attribute
Daiki Ueno [Mon, 8 Aug 2016 12:13:31 +0000 (14:13 +0200)]
uri: Support 'slot-id' path attribute

Accept 'slot-id' path attribute defined in RFC 7512.

https://bugs.freedesktop.org/show_bug.cgi?id=97245

8 years agouri: Support slot info path attributes
Daiki Ueno [Mon, 8 Aug 2016 11:33:14 +0000 (13:33 +0200)]
uri: Support slot info path attributes

Accept 'slot-description' and 'slot-manifacturer' path attributes
defined in RFC 7512.

https://bugs.freedesktop.org/show_bug.cgi?id=97245

8 years agouri: Remove whitespace early when parsing
Daiki Ueno [Mon, 8 Aug 2016 08:31:19 +0000 (10:31 +0200)]
uri: Remove whitespace early when parsing

For every path/query component, p11_kit_uri_parse() allocates a small
buffer to strip whitespace out.  This patch removes any whitespace in
the URI at the entry of the function to simplify the code.

Note that RFC 7512 actually suggests to ignore whitespace at the
extracting phase rather than the parsing phase.

https://bugs.freedesktop.org/show_bug.cgi?id=97245

8 years agoFix leak when C_Initialize() is called from child
Daiki Ueno [Fri, 12 Aug 2016 14:16:38 +0000 (16:16 +0200)]
Fix leak when C_Initialize() is called from child

The test case added for bug 90289 (commit c73edd00) revealed that some
of the C_Initialize() implementations do not consider the case where it
is called from the parent process and then from the child process,
without calling C_Finalize() in between.

8 years agoconfigure: Remove redundant AM_GNU_GETTEXT
Daiki Ueno [Thu, 18 Aug 2016 07:27:42 +0000 (09:27 +0200)]
configure: Remove redundant AM_GNU_GETTEXT

There is the same line a few lines below.

8 years agoFix typos flagged by codespell
Daiki Ueno [Fri, 12 Aug 2016 15:21:19 +0000 (17:21 +0200)]
Fix typos flagged by codespell

8 years agoFix typo in pkcs11.conf
Stef Walter [Tue, 9 Aug 2016 14:56:40 +0000 (16:56 +0200)]
Fix typo in pkcs11.conf

Pointed out by David Woodhouse

8 years agodoc: Fix interpolation of p11-kit configuration paths in documentation
Stef Walter [Tue, 9 Aug 2016 14:46:49 +0000 (16:46 +0200)]
doc: Fix interpolation of p11-kit configuration paths in documentation

Previously these were expanded based on the home directory of the
one building the documentation (me).

8 years agoDoc: p11_kit_module_load accepts a filename arg.
Andreas Metzler [Tue, 23 Feb 2016 18:12:40 +0000 (19:12 +0100)]
Doc: p11_kit_module_load accepts a filename arg.

p11_kit_module_load() hands on the module_path argument to
load_module_from_file_inlock() which accepts relative paths, prepending
P11_MODULE_PATH. Update API documentation accordingly.

https://lists.freedesktop.org/archives/p11-glue/2016-February/000587.html

9 years agoAvoiding redundant check
Pankaj [Tue, 5 Jan 2016 09:52:00 +0000 (09:52 +0000)]
Avoiding redundant check

https://bugs.freedesktop.org/show_bug.cgi?id=93587

9 years agoFix distcheck by removing some linguas that don't build 0.23.2
Stef Walter [Mon, 7 Dec 2015 13:51:43 +0000 (14:51 +0100)]
Fix distcheck by removing some linguas that don't build

9 years agoBump version number
Stef Walter [Mon, 7 Dec 2015 13:51:43 +0000 (14:51 +0100)]
Bump version number

9 years agorpc-transport.c: include sys/select.h for fd_set
Gustavo Zacarias [Wed, 2 Dec 2015 10:15:43 +0000 (07:15 -0300)]
rpc-transport.c: include sys/select.h for fd_set

fd_set and friends, according to POSIX.1-2001, needs sys/select.h, so
include it otherwise the build fails for uClibc:

p11-kit/rpc-transport.c: In function ‘rpc_socket_read’:
p11-kit/rpc-transport.c:350:2: error: unknown type name ‘fd_set’
p11-kit/rpc-transport.c:416:4: warning: implicit declaration of function
‘FD_ZERO’ [-Wimplicit-function-declaration]

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
https://bugs.freedesktop.org/show_bug.cgi?id=93211

9 years agop11-kit: Fix redundant check for 'signature' is always 'true'
Pankaj [Wed, 4 Nov 2015 05:03:00 +0000 (05:03 +0000)]
p11-kit: Fix redundant check for 'signature' is always 'true'

https://bugs.freedesktop.org/show_bug.cgi?id=92807

9 years agocommon: Fix warning about dereferencing NULL pointer
Pankaj [Fri, 6 Nov 2015 05:48:00 +0000 (05:48 +0000)]
common: Fix warning about dereferencing NULL pointer

https://bugs.freedesktop.org/show_bug.cgi?id=92842

9 years agocommon: Fix in test-code for file descriptor validity check
Pankaj [Fri, 6 Nov 2015 06:13:00 +0000 (06:13 +0000)]
common: Fix in test-code for file descriptor validity check

https://bugs.freedesktop.org/show_bug.cgi?id=92843

9 years agotrust: Fix always false comparison of EAGAIN and EINTR
Stef Walter [Mon, 9 Nov 2015 07:36:36 +0000 (08:36 +0100)]
trust: Fix always false comparison of EAGAIN and EINTR

https://bugs.freedesktop.org/show_bug.cgi?id=92864

9 years agop11-kit: Remove unused pointer
Pankaj [Wed, 21 Oct 2015 03:20:00 +0000 (03:20 +0000)]
p11-kit: Remove unused pointer

https://bugs.freedesktop.org/show_bug.cgi?id=92532

9 years agopo: Update translations from transifex
Stef Walter [Tue, 20 Oct 2015 19:03:25 +0000 (21:03 +0200)]
po: Update translations from transifex

9 years agoAdd estonian translation from Transifex
Stef Walter [Tue, 20 Oct 2015 18:56:51 +0000 (20:56 +0200)]
Add estonian translation from Transifex

9 years agop11-kit: Fix warnings related to use dangling pointer
Pankaj [Tue, 20 Oct 2015 11:05:00 +0000 (11:05 +0000)]
p11-kit: Fix warnings related to use dangling pointer

https://bugs.freedesktop.org/show_bug.cgi?id=92551

9 years agocommon: Remove compat timegm() implementation
Stef Walter [Mon, 19 Oct 2015 09:33:19 +0000 (11:33 +0200)]
common: Remove compat timegm() implementation

We no longer use timegm()

9 years agop11-kit: 'int' comparison with 'unsigned int' in for() for the array index
Pankaj [Mon, 19 Oct 2015 09:19:33 +0000 (11:19 +0200)]
p11-kit: 'int' comparison with 'unsigned int' in for() for the array index

https://bugs.freedesktop.org/show_bug.cgi?id=92443

9 years agop11-kit: 'int' comparison with 'unsigned int' in for() for array index
Pankaj [Mon, 19 Oct 2015 09:17:28 +0000 (11:17 +0200)]
p11-kit: 'int' comparison with 'unsigned int' in for() for array index

9 years agop11-kit: 'int' comparison with 'unsigned int' in for() for array index
Pankaj [Mon, 19 Oct 2015 09:08:14 +0000 (11:08 +0200)]
p11-kit: 'int' comparison with 'unsigned int' in for() for array index

https://bugs.freedesktop.org/show_bug.cgi?id=92445

9 years agomanual: Fix typos in documentation
Ludovic Rousseau [Mon, 19 Oct 2015 08:26:23 +0000 (10:26 +0200)]
manual: Fix typos in documentation

https://bugs.freedesktop.org/show_bug.cgi?id=92520

9 years agop11-kit: Fix expression 'call_id < 0' is always false
Pankaj [Mon, 12 Oct 2015 05:18:36 +0000 (07:18 +0200)]
p11-kit: Fix expression 'call_id < 0' is always false

https://bugs.freedesktop.org/show_bug.cgi?id=92434

9 years agoFix trust command segfaults in expand_homedir() when no matching password record...
Robert Milasan [Thu, 30 Jul 2015 09:27:13 +0000 (11:27 +0200)]
Fix trust command segfaults in expand_homedir() when no matching password record was found

Hello, it looks like under some conditions, command trust segfaults in
expand_homedir() due to no matching password record was found:

Signed-off-by: Robert Milasan <rmilasan@suse.com>
Signed-off-by: Stef Walter <stefw@redhat.com>
 * Updated path so message is printed and errno is not overwritten

https://bugs.freedesktop.org/show_bug.cgi?id=91506

9 years agoFix build on Mingw due to missing EWOULDBLOCK
Lew Palm [Tue, 14 Jul 2015 19:50:25 +0000 (21:50 +0200)]
Fix build on Mingw due to missing EWOULDBLOCK

https://bugs.freedesktop.org/show_bug.cgi?id=89081

9 years agoAdded p11_kit_module_get_filename()
Nikos Mavrogiannopoulos [Fri, 10 Jul 2015 12:31:57 +0000 (14:31 +0200)]
Added p11_kit_module_get_filename()

That function allows to obtain the filename used by the PKCS #11
module. That is the filename used by dlopen().

Note that we don't provide p11_kit_module_for_filename() because
it would have to deal with filename equivalences.

Signed-off-by: Stef Walter <stefw@redhat.com>
 * Fixed up whitespace

9 years agoIn proxy module don't call C_Finalize on a forked process.
Nikos Mavrogiannopoulos [Wed, 24 Jun 2015 07:43:57 +0000 (09:43 +0200)]
In proxy module don't call C_Finalize on a forked process.

This corrects a deadlock on the forked process. The deadlock
happened because the proxy called C_Finalize prior to a C_Initialize
which is wrong according to PKCS #11 (2.40). This patch eliminates
the C_Finalize call in that case.

This resolves #90289
https://bugs.freedesktop.org/show_bug.cgi?id=90289

Reviewed-by: Stef Walter <stefw@redhat.com>
9 years agoAdd test case for bug 90289 (deadlock on C_Initialize() in child after fork)
David Woodhouse [Wed, 3 Jun 2015 14:00:57 +0000 (15:00 +0100)]
Add test case for bug 90289 (deadlock on C_Initialize() in child after fork)

Reviewed-by: Stef Walter <stefw@redhat.com>
9 years agoDo not deinitialize libffi's wrapper functions
Nikos Mavrogiannopoulos [Wed, 24 Jun 2015 14:08:42 +0000 (16:08 +0200)]
Do not deinitialize libffi's wrapper functions

Libffi uses shared memory to store them, and a deallocation
in a child will cause issues for the parent or vice versa.

Signed-off-by: Stef Walter <stefw@redhat.com>
 * Use #if to comment out code, avoid compiler warnings

9 years agoAdded test case for crash after a fork in proxy module
Nikos Mavrogiannopoulos [Tue, 23 Jun 2015 14:46:43 +0000 (16:46 +0200)]
Added test case for crash after a fork in proxy module

Reviewed-by: Stef Walter <stefw@redhat.com>
9 years agop11-kit: Missing unlock in function rpc_socket_read()
Pankaj [Wed, 3 Jun 2015 09:18:26 +0000 (11:18 +0200)]
p11-kit: Missing unlock in function rpc_socket_read()

https://bugs.freedesktop.org/show_bug.cgi?id=90827

9 years agotrust: Fix double close()
Pankaj [Mon, 1 Jun 2015 20:04:22 +0000 (22:04 +0200)]
trust: Fix double close()

9 years agoFix some compiler warnings from GCC 5.x
Stef Walter [Fri, 17 Apr 2015 09:54:40 +0000 (11:54 +0200)]
Fix some compiler warnings from GCC 5.x

9 years agoRelease version 0.23.1 0.23.1
Stef Walter [Fri, 20 Feb 2015 20:28:38 +0000 (21:28 +0100)]
Release version 0.23.1

9 years agoGenerate URIs compliant to the PKCS#11 URI draft in LC
Nikos Mavrogiannopoulos [Tue, 23 Dec 2014 07:12:49 +0000 (09:12 +0200)]
Generate URIs compliant to the PKCS#11 URI draft in LC

We continue to accept both the older style 'object-type' field
in addition to the new 'type' field. However we start generating
URIs in the new form.

In other words we have backwards compatibility, but not forwards
compatibility. Given the fact that PKCS#11 URIs are now standardizing
this is an acceptable compromise.

https://bugs.freedesktop.org/show_bug.cgi?id=86474

9 years agoAdded test for pin-value
Nikos Mavrogiannopoulos [Tue, 23 Dec 2014 07:09:17 +0000 (09:09 +0200)]
Added test for pin-value

https://bugs.freedesktop.org/show_bug.cgi?id=87582

Signed-off-by: Stef Walter <stefw@redhat.com>
 * Added test for bad encoded pin-value in uri

9 years agoAdded support for pin-value PKCS#11 URI element
Nikos Mavrogiannopoulos [Tue, 23 Dec 2014 07:04:18 +0000 (09:04 +0200)]
Added support for pin-value PKCS#11 URI element

https://bugs.freedesktop.org/show_bug.cgi?id=87582

9 years agop11-kit: Remove duplicate WHITESPACE define
Stef Walter [Fri, 20 Feb 2015 20:17:07 +0000 (21:17 +0100)]
p11-kit: Remove duplicate WHITESPACE define

10 years agotrust: Add pem-directory-hash extract format
Adam Williamson [Wed, 14 Jan 2015 04:52:20 +0000 (20:52 -0800)]
trust: Add pem-directory-hash extract format

This allows extraction of a directory of standard PEM files
with the OpenSSL hash symlinks; this is a format used by
some popular platforms (Debian's /etc/ssl/certs is in this
form, and OpenSUSE provides it for compatibility).

Initially by: Ludwig Nussel <ludwig.nussel@suse.de>

Signed-off-by: Stef Walter <stefw@redhat.com>
 * Added header, fixed compiler warnings