]>
granicus.if.org Git - p11-kit/log
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
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
Stef Walter [Mon, 6 Oct 2014 05:41:14 +0000 (07:41 +0200)]
Bump libtool versioning for added APIs
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
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>
Stef Walter [Thu, 2 Oct 2014 06:29:06 +0000 (08:29 +0200)]
Release version 0.22.0
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
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.
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'
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.
Stef Walter [Thu, 2 Oct 2014 06:22:39 +0000 (08:22 +0200)]
common: In tests preserve parent environment for children
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.
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>
Stef Walter [Wed, 17 Sep 2014 11:42:23 +0000 (13:42 +0200)]
Release version 2.21.3
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.
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
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
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
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>
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>
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
Stef Walter [Tue, 9 Sep 2014 12:15:31 +0000 (14:15 +0200)]
p11-kit: Compilation fixes for previous commit
Pushed the wrong version
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
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.
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.
Stef Walter [Fri, 5 Sep 2014 10:10:40 +0000 (12:10 +0200)]
Release version 0.21.2
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
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.
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
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
Stef Walter [Thu, 14 Aug 2014 15:35:42 +0000 (17:35 +0200)]
Fix 'make upload-release' target
Stef Walter [Mon, 11 Aug 2014 08:19:18 +0000 (10:19 +0200)]
doc: Fix missing tag in p11-kit-sharing.xml
Stef Walter [Mon, 11 Aug 2014 08:17:30 +0000 (10:17 +0200)]
p11-kit: Fix various noise/issues highlighted by clang
Stef Walter [Fri, 8 Aug 2014 15:43:37 +0000 (17:43 +0200)]
Ignore clang scanner litter
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
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
Stef Walter [Fri, 8 Aug 2014 15:40:57 +0000 (17:40 +0200)]
trust: Double check that index bucket is valid before access
Stef Walter [Fri, 8 Aug 2014 15:40:40 +0000 (17:40 +0200)]
p11-kit: Remove use after free in debug output code path
Stef Walter [Fri, 8 Aug 2014 15:40:21 +0000 (17:40 +0200)]
Quiten down scanner warnings about unused variables
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
Stef Walter [Fri, 8 Aug 2014 15:18:10 +0000 (17:18 +0200)]
Fix mostly erroneous scanner warnings in tests
Stef Walter [Fri, 8 Aug 2014 15:20:57 +0000 (17:20 +0200)]
trust: Fix leak in token loading error path
Stef Walter [Fri, 8 Aug 2014 15:20:30 +0000 (17:20 +0200)]
trust: Fix unlikely use of uninitialized memory in token loading
Stef Walter [Fri, 8 Aug 2014 15:20:08 +0000 (17:20 +0200)]
trust: Fix leak in trust list 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
Stef Walter [Fri, 8 Aug 2014 15:19:28 +0000 (17:19 +0200)]
trust: Remove dead while condition in anchor commond
Stef Walter [Fri, 8 Aug 2014 15:19:12 +0000 (17:19 +0200)]
p11-kit: Fix integer overflow in memset() argument
Stef Walter [Fri, 8 Aug 2014 15:18:56 +0000 (17:18 +0200)]
p11-kit: Fix bad check of asprintf() return value
Stef Walter [Fri, 8 Aug 2014 15:18:37 +0000 (17:18 +0200)]
configure.ac: Add subdir-objects to satisfy newer automakes
Stef Walter [Fri, 8 Aug 2014 07:40:44 +0000 (09:40 +0200)]
trust: Fix use of invalid memory in PEM parser
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
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.
Stef Walter [Thu, 7 Aug 2014 11:28:16 +0000 (13:28 +0200)]
Release version 0.21.1
Stef Walter [Thu, 7 Aug 2014 11:31:44 +0000 (13:31 +0200)]
po: Add new translations: oc
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
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.
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.
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
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
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.
Stef Walter [Wed, 20 Feb 2013 11:24:03 +0000 (12:24 +0100)]
rpc: Implement execution of another tool to transport PKCS#11 RPC
Stef Walter [Wed, 9 Oct 2013 21:25:03 +0000 (23:25 +0200)]
mock: Minor testing tweaks to mock testing
Stef Walter [Wed, 9 Oct 2013 19:40:24 +0000 (21:40 +0200)]
modules: Make config file and module configs overridable by tests
Stef Walter [Wed, 9 Oct 2013 19:39:42 +0000 (21:39 +0200)]
test: Move some file and directory code into general test stuff
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.
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
Andreas Metzler [Sun, 19 Jan 2014 13:14:24 +0000 (14:14 +0100)]
Fix typo: supress - > suppress
Stef Walter [Fri, 4 Jul 2014 13:57:52 +0000 (15:57 +0200)]
Release version 0.20.3
Nikos Mavrogiannopoulos [Fri, 4 Jul 2014 13:40:58 +0000 (15:40 +0200)]
Added test for non-null values in empty ID and label URI parts
Stef Walter [Fri, 4 Jul 2014 12:50:44 +0000 (14:50 +0200)]
p11-kit: Mark p11_kit_be_quiet() and p11_kit_be_loud() stable
These are useful functions for callers who want to supress all output
from p11-kit library.
Stef Walter [Thu, 3 Jul 2014 08:26:16 +0000 (10:26 +0200)]
p11-kit: Handle managed modules correctly when forking
Correctly allow reinitialization when a process forks.
We don't yet implement checks on all entry points of a managed
module, but this allows callers to call C_Initialize again
after forking, as outlined by the PKCS#11 v2 spec.
Pavel A [Tue, 1 Jul 2014 06:00:11 +0000 (08:00 +0200)]
common: Fixed implementation of strerror_r for WinXP
ie: when streror_s is missing in msvcrt.dll
https://bugs.freedesktop.org/show_bug.cgi?id=76594
Stef Walter [Wed, 25 Jun 2014 08:55:10 +0000 (10:55 +0200)]
p11-kit: Fix corrupted list when initialization of modules fail
This fixes the function call p11_kit_module_initialize() to
correctly rearrange the modules array when initializing a module
fails.
Also fixes p11_kit_modules_load_and_initialize()
Milan Crha [Fri, 20 Jun 2014 12:04:42 +0000 (14:04 +0200)]
Don't try to symlink p11-proxy.so on windows
https://bugs.freedesktop.org/show_bug.cgi?id=76594
Stef Walter [Fri, 20 Jun 2014 11:50:08 +0000 (13:50 +0200)]
configure: Require automake 1.12 or later
We can't use automake 1.10 as serial-tests is not supported
there.
Pavel A [Fri, 20 Jun 2014 11:42:14 +0000 (13:42 +0200)]
Proposed fix for compiler warnings in common/compat.c
when buliding for Windows (mingw).
This issue has been reported in bug #76594
a. Moved vasprintf before asprintf
b. Added prototypes for each of them
Thanks,
pa
Signed-off-by: Pavel A <pavel.aronsky@daynix.com>
Stef Walter [Thu, 13 Feb 2014 08:52:34 +0000 (09:52 +0100)]
proxy: Fix cases where modules are unloaded while in use
The proxy module would unload the PKCS#11 modules it was proxying
when C_Finalize() was called. However if a caller in another thread
was inside of a PKCS#11 function at the time, this would cause
a crash.
Change things around so that underlying modules are finalized during
the proxy C_Finalize() but not released/unloaded until the proxy
module itself is unloaded.
https://bugs.freedesktop.org/show_bug.cgi?id=74919
Stef Walter [Thu, 13 Feb 2014 08:57:53 +0000 (09:57 +0100)]
proxy: Remove assertions when module is not initialized
We should return CKR_CRYPTOKI_NOT_INITIALIZED rather than
assert() when proxy PKCS#11 functions are called before the
module is initialized.
https://bugs.freedesktop.org/show_bug.cgi?id=74919
Pascal Terjan [Sun, 9 Feb 2014 23:39:20 +0000 (23:39 +0000)]
Fix handling of mmap failure and mapping empty files
Check the return value of mmap() correctly.
Empty files cannot be mmap'd so we implement some
work around code for that.
https://bugs.freedesktop.org/show_bug.cgi?id=74773
Signed-off-by: Stef Walter <stef@thewalter.net>
Stef Walter [Wed, 29 Jan 2014 09:21:45 +0000 (18:21 +0900)]
Support running autogen.sh from srcdir != builddir
Stef Walter [Wed, 29 Jan 2014 09:17:02 +0000 (18:17 +0900)]
Don't use 'aux' directory name
Because Windows is really properly screwed up.
https://bugs.freedesktop.org/show_bug.cgi?id=74149
Stef Walter [Tue, 14 Jan 2014 14:21:05 +0000 (15:21 +0100)]
Release version 0.20.2
Stef Walter [Tue, 14 Jan 2014 14:37:18 +0000 (15:37 +0100)]
distcheck: Build with optimizations so we get proper warnings
Stef Walter [Tue, 14 Jan 2014 14:31:49 +0000 (15:31 +0100)]
test-iter: Fix use of uninitialized variable
Stef Walter [Tue, 14 Jan 2014 10:20:57 +0000 (11:20 +0100)]
trust: Add installcheck target for testing extract
This is an integration test that the extract and blacklist
functionality basics work.
More integration tests should follow, at which point we should
place the various generic testing bits into their own file.
Stef Walter [Tue, 14 Jan 2014 09:00:36 +0000 (10:00 +0100)]
Build in srcdir != builddir fashion by default
Naturally this doesn't apply to tarballs
Stef Walter [Tue, 14 Jan 2014 08:43:01 +0000 (09:43 +0100)]
Move gtk-doc.make into build directory
Stef Walter [Mon, 13 Jan 2014 17:09:20 +0000 (18:09 +0100)]
enumerate: Preload and respect blacklist across all tokens
This fixes an issue where a blacklist in one token wasn't properly
skipping anchors being extracted with extract-compat
https://bugs.freedesktop.org/show_bug.cgi?id=73558
Stef Walter [Mon, 13 Jan 2014 16:58:20 +0000 (17:58 +0100)]
attrs: Allow NULL attribute to be passed to p11_attr_hash()
This allows simpler lookups.
https://bugs.freedesktop.org/show_bug.cgi?id=73558
Stef Walter [Mon, 13 Jan 2014 17:08:42 +0000 (18:08 +0100)]
enumerate: Use p11_enumerate_ready() from tests
This gives a little broader testing of the enumerator
https://bugs.freedesktop.org/show_bug.cgi?id=73558
Stef Walter [Mon, 13 Jan 2014 17:07:29 +0000 (18:07 +0100)]
iter: Fix return value in rare memory allocation case
Stef Walter [Mon, 13 Jan 2014 17:02:44 +0000 (18:02 +0100)]
iter: Add p11_kit_iter_get_attributes() function
A simple wrapper for C_GetAttributeValue()
Stef Walter [Wed, 8 Jan 2014 20:20:49 +0000 (21:20 +0100)]
Remove straggler file in the tools directory
Stef Walter [Wed, 8 Jan 2014 14:58:37 +0000 (15:58 +0100)]
Update translations from transifex
Stef Walter [Wed, 8 Jan 2014 14:04:57 +0000 (15:04 +0100)]
Fix typo in mock.c
Reported-by: Tijl Coosemans <tijl@FreeBSD.org>
Nikos Mavrogiannopoulos [Tue, 26 Nov 2013 16:23:52 +0000 (17:23 +0100)]
Check if pthread and nanosleep() are in libc before linking other libs
In recent versions of glibc this is true and prevents linking with
pthreads when it is not necessary.
Tweaked by Stef Walter
Signed-off-by: Stef Walter <stef@thewalter.net>
Roman Bogorodskiy [Fri, 8 Nov 2013 07:35:00 +0000 (07:35 +0000)]
Drop unused libtasn1.h include
It's not only unsed, but also causes build fail because CFLAGS
for tests does not contain LIBTASN1_CFLAGS.
Signed-off-by: Stef Walter <stef@thewalter.net>
https://bugs.freedesktop.org/show_bug.cgi?id=71379
Stef Walter [Fri, 13 Sep 2013 10:24:35 +0000 (12:24 +0200)]
trust: Check for race in BasicConstraints stapled extension
Related to the following bug:
https://bugs.freedesktop.org/show_bug.cgi?id=69314
Andreas Metzler [Tue, 1 Oct 2013 05:22:29 +0000 (07:22 +0200)]
Disable tests with setgid binaries when running in fakeroot
We use the FAKED_MODE environment variable as a way to detect
fakeroot.
Stef Walter [Sun, 8 Sep 2013 10:57:12 +0000 (12:57 +0200)]
Fix documentation build