]> granicus.if.org Git - p11-kit/log
p11-kit
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

10 years agouri: Accept 'type' in additon to 'object-type' in PKCS#11 URIs
Stef Walter [Fri, 14 Nov 2014 05:13:10 +0000 (06:13 +0100)]
uri: Accept 'type' in additon to 'object-type' in PKCS#11 URIs

This was a later change to the PKCS#11 specification drafts

10 years agocompat: Add definition for setenv for Win32
Michael Cronenworth [Tue, 11 Nov 2014 17:18:17 +0000 (11:18 -0600)]
compat: Add definition for setenv for Win32

Signed-off-by: Michael Cronenworth <mike@cchtml.com>
10 years agoRelease version 0.22.1 0.22.1
Stef Walter [Thu, 9 Oct 2014 12:06:05 +0000 (14:06 +0200)]
Release version 0.22.1

10 years agotrust: Certificate CKA_ID is SubjectKeyIdentifier if possible
Stef Walter [Thu, 9 Oct 2014 06:15:29 +0000 (08:15 +0200)]
trust: Certificate CKA_ID is SubjectKeyIdentifier if possible

The PKCS#11 spec states that the CKA_ID should match the
SubjectKeyIdentifier if such an extension is present.

We delay the filling of CKA_ID until the builder phase of populating
attributes which allows us to have more control over how this works.

Note that we don't make CKA_ID reflect SubjectKeyIdentifier *attached*
extensions. The CKA_ID isn't supposed to change after object creation.
Making it dependent on attached extensions would be making promises
we cannot keep, since attached extensions can be added/removed at any
time.

This also means the CKA_ID of attached extensions and certificates
won't necessarily match up, but that was never promised, and not how
attached extensions should be matched to their certificate anyway.

Based on a patch and research done by David Woodhouse.

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

10 years agotrust: Allow 'BEGIN PUBLIC KEY' PEM blocks in .p11-kit files
Stef Walter [Fri, 12 Sep 2014 13:37:02 +0000 (15:37 +0200)]
trust: Allow 'BEGIN PUBLIC KEY' PEM blocks in .p11-kit files

These PEM blocks contribute a CKA_PUBLIC_KEY_INFO to the object
being read/written.

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

10 years agotrust: add missing libtasn1 cflags
Roman Bogorodskiy [Mon, 6 Oct 2014 15:45:29 +0000 (19:45 +0400)]
trust: add missing libtasn1 cflags

Add a number of missing LIBTASN1_CFLAGS where it's required

10 years agoBump libtool versioning for added APIs
Stef Walter [Mon, 6 Oct 2014 05:41:14 +0000 (07:41 +0200)]
Bump libtool versioning for added APIs

10 years agoUnbreak build on OpenBSD
Antoine Jacoutot [Sun, 5 Oct 2014 06:50:22 +0000 (08:50 +0200)]
Unbreak build on OpenBSD

Add missing header for strdup(3).
When EPROTO is not available, fallback to EIO.

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

10 years agomakefile: Rename DATADIR to not conflict with Win32 define
Michael Cronenworth [Sat, 4 Oct 2014 20:39:08 +0000 (15:39 -0500)]
makefile: Rename DATADIR to not conflict with Win32 define

Signed-off-by: Michael Cronenworth <mike@cchtml.com>
10 years agoRelease version 0.22.0 0.22.0
Stef Walter [Thu, 2 Oct 2014 06:29:06 +0000 (08:29 +0200)]
Release version 0.22.0

10 years agop11-kit: Use pthread_atfork() in a safe manner
Stef Walter [Fri, 3 Oct 2014 07:42:27 +0000 (09:42 +0200)]
p11-kit: Use pthread_atfork() in a safe manner

Instead of trying to perform actions in pthread_atfork() which
are not async-signal-safe, just increment a counter so we can
later tell if the process has forked.

Note this does not make it safe to mix threads and forking without
immediately execing. This is a far broader problem that p11-kit,
however we now do the right thing when fork+exec is used from a
thread.

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

10 years agoremote: Run separate executable binary for 'p11-kit remote'
Stef Walter [Wed, 1 Oct 2014 15:34:02 +0000 (17:34 +0200)]
remote: Run separate executable binary for 'p11-kit remote'

This allows security frameworks like SELinux or AppArmor to target
it specifically.

10 years agop11-kit: P11_KIT_PRIVATEDIR env var overrides private binary dir
Stef Walter [Thu, 2 Oct 2014 06:23:18 +0000 (08:23 +0200)]
p11-kit: P11_KIT_PRIVATEDIR env var overrides private binary dir

External binaries are searched for in $(libdir)/p11-kit. The
P11_KIT_PRIVATEDIR can be used to override that, for example during
'make check'

10 years agocommon: Use secure_getenv() implementation when setuid
Stef Walter [Thu, 2 Oct 2014 06:21:28 +0000 (08:21 +0200)]
common: Use secure_getenv() implementation when setuid

In anything security sensitive, use secure_getenv() implementation
for retrieving environment variables.

10 years agocommon: In tests preserve parent environment for children
Stef Walter [Thu, 2 Oct 2014 06:22:39 +0000 (08:22 +0200)]
common: In tests preserve parent environment for children

10 years agop11-kit: Remove the 'isolated' option for now
Stef Walter [Wed, 1 Oct 2014 15:14:50 +0000 (17:14 +0200)]
p11-kit: Remove the 'isolated' option for now

This option was not completed in time, and as implemented suffers
from limitations that the module is not really completely isolated
as it still runs under the same user id as the calling process.

10 years agocommon: Move unistd include to define getopt and friends
Michael Cronenworth [Sat, 13 Sep 2014 01:48:39 +0000 (20:48 -0500)]
common: Move unistd include to define getopt and friends

Needed to fix MinGW builds.

Signed-off-by: Michael Cronenworth <mike@cchtml.com>
10 years agoRelease version 2.21.3 0.21.3
Stef Walter [Wed, 17 Sep 2014 11:42:23 +0000 (13:42 +0200)]
Release version 2.21.3

10 years agotrust: Use term 'attached extensions' instead of 'stapled'
Stef Walter [Wed, 10 Sep 2014 07:01:20 +0000 (09:01 +0200)]
trust: Use term 'attached extensions' instead of 'stapled'

The term 'stapled extensions' is confusing because it overloads
terminology used with OSCP stapling.

Suggested by Daniel Kahn Gillmor.

10 years agocommon: New public pkcs11x.h header containing extensions
Stef Walter [Thu, 4 Sep 2014 13:59:28 +0000 (15:59 +0200)]
common: New public pkcs11x.h header containing extensions

Move our internal stuff to pkcs11i.h, and install the pkcs11x.h
header containing extensions.

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

10 years agocommon: Change the CKA_X_PUBLIC_KEY_INFO constant to CKA_PUBLIC_KEY_INFO
Stef Walter [Thu, 4 Sep 2014 13:59:17 +0000 (15:59 +0200)]
common: Change the CKA_X_PUBLIC_KEY_INFO constant to CKA_PUBLIC_KEY_INFO

CKA_PUBLIC_KEY_INFO is defined in the PKCS#11 2.40 draft, so use that
rather than defining our own.

 * Fixed up by Nikos Mavrogiannopoulos <nmav@redhat.com>

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

10 years agocommon: Add support for multiple field names (ie: nicks) per constant
Stef Walter [Thu, 4 Sep 2014 13:56:02 +0000 (15:56 +0200)]
common: Add support for multiple field names (ie: nicks) per constant

This allows us to have old/new names for a given constant.

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

10 years agop11-kit: Fix tests when building with MinGW
Michael Cronenworth [Tue, 9 Sep 2014 14:19:34 +0000 (16:19 +0200)]
p11-kit: Fix tests when building with MinGW

Signed-off-by: Michael Cronenworth <mike@cchtml.com>
10 years agotrust: Fix token test when building with MinGW
Michael Cronenworth [Sun, 17 Aug 2014 21:26:56 +0000 (16:26 -0500)]
trust: Fix token test when building with MinGW

Signed-off-by: Michael Cronenworth <mike@cchtml.com>
10 years agoconfigure: Check for pthread_create() in pthread library
Roman Bogorodskiy [Tue, 9 Sep 2014 12:20:18 +0000 (14:20 +0200)]
configure: Check for pthread_create() in pthread library

Check for pthread_create() in pthread library instaed of
pthread_mutexattr_init(). This fixes a linking error on FreeBSD.

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

10 years agop11-kit: Compilation fixes for previous commit
Stef Walter [Tue, 9 Sep 2014 12:15:31 +0000 (14:15 +0200)]
p11-kit: Compilation fixes for previous commit

Pushed the wrong version

10 years agop11-kit: Make proxy module respect critical = no
Stef Walter [Tue, 9 Sep 2014 07:23:07 +0000 (09:23 +0200)]
p11-kit: Make proxy module respect critical = no

The p11-kit-proxy.so module would not respect the critical = no setting
in module configuration, and fail if any module failed to initialize.

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

10 years agoFix build without debug
Roman Bogorodskiy [Mon, 18 Aug 2014 19:22:19 +0000 (23:22 +0400)]
Fix build without debug

When building without debug build fails with:

  CCLD     p11-kit/p11-kit
./.libs/libp11-kit.so: undefined reference to `P11_RPC_CHECK_CALLS'
cc: error: linker command failed with exit code 1 (use -v to see
invocation)
gmake[2]: *** [p11-kit/p11-kit] Error 1

This happens because P11_RPC_CHECK_CALLS is not defined when
debugging is enabled, so provide a noop macro for that case.

10 years agotrust: Show public-key-info in 'trust list --details'
Stef Walter [Fri, 5 Sep 2014 13:46:51 +0000 (15:46 +0200)]
trust: Show public-key-info in 'trust list --details'

Since the public-key-info is an important part of the way we
represent trust, show it in 'trust list' if --details is present.

10 years agoRelease version 0.21.2 0.21.2
Stef Walter [Fri, 5 Sep 2014 10:10:40 +0000 (12:10 +0200)]
Release version 0.21.2

10 years agotrust: Produce a proper message for an invalid stapled extension
Stef Walter [Fri, 5 Sep 2014 09:29:05 +0000 (11:29 +0200)]
trust: Produce a proper message for an invalid stapled extension

Previously we would output a line like this:

p11-kit: 'node != NULL' not true at lookup_extension

10 years agoMove to non-recursive Makefile for building bins and libs
Stef Walter [Fri, 15 Aug 2014 06:41:43 +0000 (08:41 +0200)]
Move to non-recursive Makefile for building bins and libs

Still use recursive for documentation and translation.

10 years agocommon: Fix regression introduced by last commit
Stef Walter [Fri, 15 Aug 2014 08:25:23 +0000 (10:25 +0200)]
common: Fix regression introduced by last commit

The last commit caused dirfd() to become undefined.

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

10 years agoFix build against older pthreads implementations
Baruch Siach [Mon, 5 May 2014 06:32:23 +0000 (09:32 +0300)]
Fix build against older pthreads implementations

Older pthreads implementations like glibc NPTL prior to version 2.12, and
uClibc linuxthreads (both), need _XOPEN_SOURCE to expose
pthread_mutexattr_settype() and THREAD_MUTEX_DEFAULT. The value 600 (SuSv3,
POSIX.1-2001) is equivalent to _POSIX_C_SOURCE 200112L.

Fixes the following build error:

  CC       compat.lo
compat.c: In function 'p11_mutex_init':
compat.c:164:2: warning: implicit declaration of function 'pthread_mutexattr_settype' [-Wimplicit-function-declaration]
compat.c:164:2: warning: nested extern declaration of 'pthread_mutexattr_settype' [-Wnested-externs]
compat.c:164:36: error: 'PTHREAD_MUTEX_DEFAULT' undeclared (first use in this function)

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

10 years agoFix 'make upload-release' target
Stef Walter [Thu, 14 Aug 2014 15:35:42 +0000 (17:35 +0200)]
Fix 'make upload-release' target

10 years agodoc: Fix missing tag in p11-kit-sharing.xml
Stef Walter [Mon, 11 Aug 2014 08:19:18 +0000 (10:19 +0200)]
doc: Fix missing tag in p11-kit-sharing.xml

10 years agop11-kit: Fix various noise/issues highlighted by clang
Stef Walter [Mon, 11 Aug 2014 08:17:30 +0000 (10:17 +0200)]
p11-kit: Fix various noise/issues highlighted by clang

10 years agoIgnore clang scanner litter
Stef Walter [Fri, 8 Aug 2014 15:43:37 +0000 (17:43 +0200)]
Ignore clang scanner litter

10 years agotrust: Don't use invalid public keys for looking up stapled extensions
Stef Walter [Fri, 8 Aug 2014 06:47:54 +0000 (08:47 +0200)]
trust: Don't use invalid public keys for looking up stapled extensions

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

10 years agotrust: Print label of certificate when complaining about basic constraints
Stef Walter [Fri, 8 Aug 2014 06:47:23 +0000 (08:47 +0200)]
trust: Print label of certificate when complaining about basic constraints

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

10 years agotrust: Double check that index bucket is valid before access
Stef Walter [Fri, 8 Aug 2014 15:40:57 +0000 (17:40 +0200)]
trust: Double check that index bucket is valid before access

10 years agop11-kit: Remove use after free in debug output code path
Stef Walter [Fri, 8 Aug 2014 15:40:40 +0000 (17:40 +0200)]
p11-kit: Remove use after free in debug output code path

10 years agoQuiten down scanner warnings about unused variables
Stef Walter [Fri, 8 Aug 2014 15:40:21 +0000 (17:40 +0200)]
Quiten down scanner warnings about unused variables

10 years agocommon: Quiet down clang scanner with assertions
Stef Walter [Fri, 8 Aug 2014 15:39:40 +0000 (17:39 +0200)]
common: Quiet down clang scanner with assertions

Quieten down the clang scanner by telling it to expect
that our test assertions fail

10 years agoFix mostly erroneous scanner warnings in tests
Stef Walter [Fri, 8 Aug 2014 15:18:10 +0000 (17:18 +0200)]
Fix mostly erroneous scanner warnings in tests

10 years agotrust: Fix leak in token loading error path
Stef Walter [Fri, 8 Aug 2014 15:20:57 +0000 (17:20 +0200)]
trust: Fix leak in token loading error path

10 years agotrust: Fix unlikely use of uninitialized memory in token loading
Stef Walter [Fri, 8 Aug 2014 15:20:30 +0000 (17:20 +0200)]
trust: Fix unlikely use of uninitialized memory in token loading

10 years agotrust: Fix leak in trust list command
Stef Walter [Fri, 8 Aug 2014 15:20:08 +0000 (17:20 +0200)]
trust: Fix leak in trust list command

10 years agotrust: Fix use after free and double free in extract command
Stef Walter [Fri, 8 Aug 2014 15:19:50 +0000 (17:19 +0200)]
trust: Fix use after free and double free in extract command

10 years agotrust: Remove dead while condition in anchor commond
Stef Walter [Fri, 8 Aug 2014 15:19:28 +0000 (17:19 +0200)]
trust: Remove dead while condition in anchor commond

10 years agop11-kit: Fix integer overflow in memset() argument
Stef Walter [Fri, 8 Aug 2014 15:19:12 +0000 (17:19 +0200)]
p11-kit: Fix integer overflow in memset() argument

10 years agop11-kit: Fix bad check of asprintf() return value
Stef Walter [Fri, 8 Aug 2014 15:18:56 +0000 (17:18 +0200)]
p11-kit: Fix bad check of asprintf() return value

10 years agoconfigure.ac: Add subdir-objects to satisfy newer automakes
Stef Walter [Fri, 8 Aug 2014 15:18:37 +0000 (17:18 +0200)]
configure.ac: Add subdir-objects to satisfy newer automakes

10 years agotrust: Fix use of invalid memory in PEM parser
Stef Walter [Fri, 8 Aug 2014 07:40:44 +0000 (09:40 +0200)]
trust: Fix use of invalid memory in PEM parser

10 years agotrust: Parse TRUSTED CERTIFICATE openssl format even without CertAux
Stef Walter [Fri, 8 Aug 2014 07:24:47 +0000 (09:24 +0200)]
trust: Parse TRUSTED CERTIFICATE openssl format even without CertAux

openssl sometimes outputs TRUSTED CERTIFICATE PEM files without the
additional CertAux (ie: trust fields) information. It simply leaves
that block out. This happens with a command like:

$ openssl x509 -in my-cert.pem -out output -trustout

10 years agocommon: Allow specifying which tests to run on command line
Stef Walter [Fri, 8 Aug 2014 07:11:52 +0000 (09:11 +0200)]
common: Allow specifying which tests to run on command line

This modifies our common unit test code so we can specify full
test paths on the command line, and restrict the run tests to
the ones specified. Order is not respected at this time.

10 years agoRelease version 0.21.1 0.21.1
Stef Walter [Thu, 7 Aug 2014 11:28:16 +0000 (13:28 +0200)]
Release version 0.21.1

10 years agopo: Add new translations: oc
Stef Walter [Thu, 7 Aug 2014 11:31:44 +0000 (13:31 +0200)]
po: Add new translations: oc

10 years agocommon: Don't do repeated linear reallocation of array memory
Stef Walter [Thu, 7 Aug 2014 06:38:46 +0000 (08:38 +0200)]
common: Don't do repeated linear reallocation of array memory

Some mallocs (notably on Windows) have really poor behavior when
called repeatedly with a linearly growing buffer.

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

10 years agop11-kit: Tweak last commit, handle the not-forked case
Stef Walter [Thu, 7 Aug 2014 06:37:50 +0000 (08:37 +0200)]
p11-kit: Tweak last commit, handle the not-forked case

When we hadn't forked, but were just not initialized, still return
CKR_CRYPTOKI_NOT_INITIALIZED from managed modules.

10 years agop11-kit: Don't complain about C_Finalize called in wrong process
Stef Walter [Thu, 7 Aug 2014 05:47:00 +0000 (07:47 +0200)]
p11-kit: Don't complain about C_Finalize called in wrong process

When C_Finalize is called in the wrong process, it's often because
of a caller unaware of forking. This is a painful area of PKCS#11,
but at least for C_Finalize, lets not complain loudly about it.

10 years agop11-kit: Add a new 'isolate' pkcs11 config option
Stef Walter [Tue, 24 Jun 2014 12:20:01 +0000 (14:20 +0200)]
p11-kit: Add a new 'isolate' pkcs11 config option

This sets 'remote' appropriately to run the module in a separate
process.

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

10 years agop11-kit: Cleanup and add documentation for 'remote' option
Stef Walter [Tue, 24 Jun 2014 11:34:20 +0000 (13:34 +0200)]
p11-kit: Cleanup and add documentation for 'remote' option

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

10 years agop11-kit: Add 'p11-kit remote' command for isolating modules
Stef Walter [Tue, 24 Jun 2014 11:24:47 +0000 (13:24 +0200)]
p11-kit: Add 'p11-kit remote' command for isolating modules

This adds a new tool to the p11-kit command called 'remote'. This
is the server side of remoting a PKCS#11 module.

10 years agorpc: Implement execution of another tool to transport PKCS#11 RPC
Stef Walter [Wed, 20 Feb 2013 11:24:03 +0000 (12:24 +0100)]
rpc: Implement execution of another tool to transport PKCS#11 RPC

10 years agomock: Minor testing tweaks to mock testing
Stef Walter [Wed, 9 Oct 2013 21:25:03 +0000 (23:25 +0200)]
mock: Minor testing tweaks to mock testing

10 years agomodules: Make config file and module configs overridable by tests
Stef Walter [Wed, 9 Oct 2013 19:40:24 +0000 (21:40 +0200)]
modules: Make config file and module configs overridable by tests

10 years agotest: Move some file and directory code into general test stuff
Stef Walter [Wed, 9 Oct 2013 19:39:42 +0000 (21:39 +0200)]
test: Move some file and directory code into general test stuff

10 years agoAdd compatibility fdwalk() function
Stef Walter [Wed, 20 Feb 2013 10:50:25 +0000 (11:50 +0100)]
Add compatibility fdwalk() function

This is used when execing another process to close all open
file descriptors that we don't wish to be inherited.

10 years agorpc: Implement PKCS#11 messages/client/server code
Stef Walter [Thu, 23 Aug 2012 13:34:04 +0000 (15:34 +0200)]
rpc: Implement PKCS#11 messages/client/server code

 * This enables passing around bytes which represent PKCS#11 RPC calls.
 * Caller is responsible for connecting/disconnecting and so on.
 * Client side caller gets a mixin from p11_rpc_client_init() to call
   into, which generates callbacks with byte arrays to be transported.
 * Server side calls p11_rpc_server_handle() with a CK_FUNCTION_LIST_PTR
   on which relevant methods get called.
 * Doesn't yet implement the actual daemon or clients etc...

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