]> granicus.if.org Git - p11-kit/log
p11-kit
11 years agoattrs: Allow NULL attribute to be passed to p11_attr_hash()
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

11 years agoenumerate: Use p11_enumerate_ready() from tests
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

11 years agoiter: Fix return value in rare memory allocation case
Stef Walter [Mon, 13 Jan 2014 17:07:29 +0000 (18:07 +0100)]
iter: Fix return value in rare memory allocation case

11 years agoiter: Add p11_kit_iter_get_attributes() function
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()

11 years agoRemove straggler file in the tools directory
Stef Walter [Wed, 8 Jan 2014 20:20:49 +0000 (21:20 +0100)]
Remove straggler file in the tools directory

11 years agoUpdate translations from transifex
Stef Walter [Wed, 8 Jan 2014 14:58:37 +0000 (15:58 +0100)]
Update translations from transifex

11 years agoFix typo in mock.c
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>
11 years agoCheck if pthread and nanosleep() are in libc before linking other libs
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>
11 years agoDrop unused libtasn1.h include
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

11 years agotrust: Check for race in BasicConstraints stapled extension
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

11 years agoDisable tests with setgid binaries when running in fakeroot
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.

11 years agoFix documentation build
Stef Walter [Sun, 8 Sep 2013 10:57:12 +0000 (12:57 +0200)]
Fix documentation build

11 years agoUpdate from transifex and string changes
Stef Walter [Mon, 9 Sep 2013 14:33:05 +0000 (16:33 +0200)]
Update from transifex and string changes

11 years agoRelease version 0.20.1 0.20.1
Stef Walter [Mon, 9 Sep 2013 12:12:24 +0000 (14:12 +0200)]
Release version 0.20.1

11 years agoRemove unused make variables
Stef Walter [Mon, 9 Sep 2013 12:10:30 +0000 (14:10 +0200)]
Remove unused make variables

11 years agoextract-compat: Skip extraction if running as non-root
Stef Walter [Thu, 5 Sep 2013 09:28:25 +0000 (11:28 +0200)]
extract-compat: Skip extraction if running as non-root

11 years agoanchor: Run extract-compat after we've changed something
Stef Walter [Thu, 5 Sep 2013 09:27:24 +0000 (11:27 +0200)]
anchor: Run extract-compat after we've changed something

When the 'trust anchor' tool changes something, run
'trust extract-compat' after that point

11 years agotrust: More appropriate rv when non-modifiable object deleted
Stef Walter [Thu, 5 Sep 2013 09:20:57 +0000 (11:20 +0200)]
trust: More appropriate rv when non-modifiable object deleted

This will change once the spec has a specific attribute and code
to signify deletability.

11 years agoanchor: Better failure messages when removing anchors
Stef Walter [Thu, 5 Sep 2013 09:22:13 +0000 (11:22 +0200)]
anchor: Better failure messages when removing anchors

11 years agomessages: Better message for CKR_FUNCTION_REJECTED
Stef Walter [Thu, 5 Sep 2013 09:20:28 +0000 (11:20 +0200)]
messages: Better message for CKR_FUNCTION_REJECTED

11 years agoRelease version 0.20.0 0.20.0
Stef Walter [Wed, 4 Sep 2013 11:41:18 +0000 (13:41 +0200)]
Release version 0.20.0

11 years agoDocumentation tweaks
Stef Walter [Wed, 4 Sep 2013 11:40:33 +0000 (13:40 +0200)]
Documentation tweaks

11 years agoRelease version 0.19.4
Stef Walter [Thu, 29 Aug 2013 10:18:03 +0000 (12:18 +0200)]
Release version 0.19.4

11 years agoRoute 'p11-kit extract-trust' over to trust tool
Stef Walter [Thu, 29 Aug 2013 10:12:46 +0000 (12:12 +0200)]
Route 'p11-kit extract-trust' over to trust tool

The actual command is 'trust extract-compat'. Make installed placeholder
script reflect this. We still support the old placeholder script
if it is present.

11 years agotrust: Document the new command line trust tool
Stef Walter [Thu, 29 Aug 2013 09:46:08 +0000 (11:46 +0200)]
trust: Document the new command line trust tool

11 years agotrust: Add 'trust anchor --remove' command
Stef Walter [Wed, 28 Aug 2013 08:47:56 +0000 (10:47 +0200)]
trust: Add 'trust anchor --remove' command

Also prevent --store from storing an anchor multiple times

11 years agotrust: Add a list command to the trust tool
Stef Walter [Wed, 28 Aug 2013 08:45:06 +0000 (10:45 +0200)]
trust: Add a list command to the trust tool

Lists with PKCS#11 URI's and some basic fields.

11 years agotrust: Add support for removing trust token objects
Stef Walter [Wed, 28 Aug 2013 08:46:13 +0000 (10:46 +0200)]
trust: Add support for removing trust token objects

11 years agotrust: Refactor enumeration of certificates to extract
Stef Walter [Wed, 28 Aug 2013 08:37:44 +0000 (10:37 +0200)]
trust: Refactor enumeration of certificates to extract

Because we want to use this same logic for listing trust

11 years agotrust: Do reload object removals inside a loading block
Stef Walter [Tue, 27 Aug 2013 19:20:16 +0000 (21:20 +0200)]
trust: Do reload object removals inside a loading block

So that validation/storage logic doesn't kick in if a file was
removed outside of p11-kit trust module.

11 years agotrust: Add index callback for when an object is removed
Stef Walter [Wed, 28 Aug 2013 07:45:21 +0000 (09:45 +0200)]
trust: Add index callback for when an object is removed

This allows a token to remove the file if desired

11 years agotrust: Prefer parsing the persist format to PEM
Stef Walter [Tue, 27 Aug 2013 19:37:29 +0000 (21:37 +0200)]
trust: Prefer parsing the persist format to PEM

This is because the persist format contains PEM, and if the PEM
parser gets it first, then it'll ignore the other non PEM data.

11 years agotrust: Correctly rewrite other objects in a modifiable persist file
Stef Walter [Tue, 27 Aug 2013 19:24:34 +0000 (21:24 +0200)]
trust: Correctly rewrite other objects in a modifiable persist file

There was a bug where we were rewriting the modified object
multiple times.

11 years agoAdd p11-kit style typedefs for iter and uri
Stef Walter [Tue, 27 Aug 2013 19:16:50 +0000 (21:16 +0200)]
Add p11-kit style typedefs for iter and uri

In general we're slowly migrating towards the lower case style
for stuctures/objects.

11 years agoiter: Add a p11_kit_iter_destroy_object() function
Stef Walter [Tue, 27 Aug 2013 19:15:24 +0000 (21:15 +0200)]
iter: Add a p11_kit_iter_destroy_object() function

Handy function since this is a common need.

11 years agoiter: Add p11_kit_iter_set_uri() function
Stef Walter [Tue, 27 Aug 2013 19:14:35 +0000 (21:14 +0200)]
iter: Add p11_kit_iter_set_uri() function

This is so we can set a filtering uri on the iterator after construction

11 years agoiter: Add p11_kit_iter_get_token() call
Stef Walter [Tue, 27 Aug 2013 19:05:31 +0000 (21:05 +0200)]
iter: Add p11_kit_iter_get_token() call

To get the already loaded CK_TOKEN_INFO during iteration for the
token that the current object is on.

11 years agoiter: Add new P11_KIT_ITER_WANT_WRITABLE iterator behavior
Stef Walter [Tue, 27 Aug 2013 18:58:18 +0000 (20:58 +0200)]
iter: Add new P11_KIT_ITER_WANT_WRITABLE iterator behavior

This allows us to try to get a RW session, but if not fallback
to a read-only session.

11 years agotool: Only include debug lines marked 'tool' when --verbose
Stef Walter [Tue, 27 Aug 2013 18:54:09 +0000 (20:54 +0200)]
tool: Only include debug lines marked 'tool' when --verbose

Otherwise we get all sorts of overwhelming internal debugging
when someone specifies --verbose argument to a tool.

11 years agodebug: Allow debug lines longer than 512 characters
Stef Walter [Tue, 27 Aug 2013 18:52:35 +0000 (20:52 +0200)]
debug: Allow debug lines longer than 512 characters

Since fprintf (stderr, ...) already doesn't print atomically, we don't
lose any atomicity here. If we want to print atomically this will need
some further reworking anyway.

11 years agodebug: Add missing 'tool' flag to debug flags
Stef Walter [Tue, 27 Aug 2013 18:51:42 +0000 (20:51 +0200)]
debug: Add missing 'tool' flag to debug flags

11 years agop11-kit: Rename list.c to lists.c to simplify debugging
Stef Walter [Tue, 27 Aug 2013 18:48:32 +0000 (20:48 +0200)]
p11-kit: Rename list.c to lists.c to simplify debugging

11 years agoAvoid multiple stat() calls for same file
Stef Walter [Mon, 26 Aug 2013 12:48:59 +0000 (14:48 +0200)]
Avoid multiple stat() calls for same file

As a side effect we can also not use the dirent.d_type field

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

11 years agocompat: Check return value of mmap() properly
Stef Walter [Mon, 26 Aug 2013 12:48:22 +0000 (14:48 +0200)]
compat: Check return value of mmap() properly

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

11 years agoAdd --with-module-config parameter to the configure script
Pascal Ernster [Fri, 16 Aug 2013 11:42:33 +0000 (13:42 +0200)]
Add --with-module-config parameter to the configure script

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

11 years agotrust: Add test tool for creating BasicConstraints
Stef Walter [Mon, 12 Aug 2013 10:09:27 +0000 (12:09 +0200)]
trust: Add test tool for creating BasicConstraints

11 years agotest-compat calls test_getauxval which is in a UNIX defined block
Michael Cronenworth [Tue, 30 Jul 2013 04:59:00 +0000 (04:59 +0000)]
test-compat calls test_getauxval which is in a UNIX defined block

MinGW builds fail due to this.

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

11 years agodo not assume dead code existence in autoconf checks
Alon Bar-Lev [Sat, 27 Jul 2013 20:22:00 +0000 (20:22 +0000)]
do not assume dead code existence in autoconf checks

when compiler optimize source, it removes dead code so a linkage error
in these cases are not visisble.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
https://bugs.freedesktop.org/show_bug.cgi?id=67413

11 years agoRelease version 0.19.3 0.19.3
Stef Walter [Tue, 23 Jul 2013 14:49:13 +0000 (16:49 +0200)]
Release version 0.19.3

11 years agoMake tests work on file systems with block size directories
Stef Walter [Tue, 23 Jul 2013 21:04:32 +0000 (23:04 +0200)]
Make tests work on file systems with block size directories

On certain file systems the size of the directory does not
change when adding a file. This caused the tests to fail. Make
the tests wait more than a second in certain tests to get the
mtime to change.

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

11 years agoFix uninitialized variables
Stef Walter [Tue, 23 Jul 2013 21:03:54 +0000 (23:03 +0200)]
Fix uninitialized variables

11 years agoDon't use _GNU_SOURCE and fix strerror_r usage
Stef Walter [Tue, 23 Jul 2013 21:02:52 +0000 (23:02 +0200)]
Don't use _GNU_SOURCE and fix strerror_r usage

glibc declares strerror_r completely different if in POSIX or GNU
mode. Nastiness. Stop using _GNU_SOURCE all together.

11 years agoFix various memory leaks exposed by 'make leakcheck'
Stef Walter [Tue, 23 Jul 2013 14:45:50 +0000 (16:45 +0200)]
Fix various memory leaks exposed by 'make leakcheck'

11 years agoUse simple serial automake test harness
Stef Walter [Tue, 23 Jul 2013 12:53:53 +0000 (14:53 +0200)]
Use simple serial automake test harness

* Add a testing sanity check to see if we're catching errors
* Fix a few other testing issues

11 years agoUse an automake aux directory for storing litter
Stef Walter [Tue, 23 Jul 2013 12:31:31 +0000 (14:31 +0200)]
Use an automake aux directory for storing litter

11 years agodoc: Add identifiers to doc sections so gtk-doc doesn't autogen them
Stef Walter [Thu, 18 Jul 2013 15:14:42 +0000 (17:14 +0200)]
doc: Add identifiers to doc sections so gtk-doc doesn't autogen them

11 years agoAdd appropriate const qualifiers
Stef Walter [Thu, 18 Jul 2013 14:12:30 +0000 (16:12 +0200)]
Add appropriate const qualifiers

11 years agoRelease version 0.19.2 0.19.2
Stef Walter [Thu, 18 Jul 2013 10:26:07 +0000 (12:26 +0200)]
Release version 0.19.2

11 years agoFix extract example in documentation
Stef Walter [Thu, 18 Jul 2013 11:07:14 +0000 (13:07 +0200)]
Fix extract example in documentation

11 years agoUse $XDG_CONFIG_HOME/pkcs11 as default user config directory
Stef Walter [Thu, 18 Jul 2013 10:50:34 +0000 (12:50 +0200)]
Use $XDG_CONFIG_HOME/pkcs11 as default user config directory

By default this evaluates to ~/.config/pkcs11. This is a somewhat
backwards incompatible change. However so far only advanced users
have been exposed to the user p11-kit configuration.

Distributors are able to revert this if necessary with a
--with-user-config='~/.pkcs11' ./configure option.

11 years agoUse getpwuid_r() instead of the non-thread-sofe getpwuid()
Stef Walter [Thu, 18 Jul 2013 08:09:45 +0000 (10:09 +0200)]
Use getpwuid_r() instead of the non-thread-sofe getpwuid()

11 years agoFix p11_kit_space_strlen() result when empty string
Stef Walter [Thu, 18 Jul 2013 04:48:14 +0000 (06:48 +0200)]
Fix p11_kit_space_strlen() result when empty string

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

11 years agoAlways pass size_t varargs to p11_hash_xxx() functions
Stef Walter [Wed, 17 Jul 2013 18:42:03 +0000 (20:42 +0200)]
Always pass size_t varargs to p11_hash_xxx() functions

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

11 years agoDon't call memdup with zero length or NULL pointer
Stef Walter [Wed, 17 Jul 2013 16:55:38 +0000 (18:55 +0200)]
Don't call memdup with zero length or NULL pointer

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

11 years agoattrs: Check printf formatting in buffer_append_printf()
Stef Walter [Wed, 17 Jul 2013 16:26:31 +0000 (18:26 +0200)]
attrs: Check printf formatting in buffer_append_printf()

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

11 years agoAvoid using the non-thread-safe strerror() function
Stef Walter [Wed, 17 Jul 2013 16:08:11 +0000 (18:08 +0200)]
Avoid using the non-thread-safe strerror() function

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

11 years agoDeclare static variables const where it makes sense
Stef Walter [Wed, 17 Jul 2013 10:55:57 +0000 (12:55 +0200)]
Declare static variables const where it makes sense

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

11 years agoSupport expanding $XDG_CONFIG_HOME in user config paths
Stef Walter [Wed, 17 Jul 2013 09:58:05 +0000 (11:58 +0200)]
Support expanding $XDG_CONFIG_HOME in user config paths

If ~/.config is specified as a prefix to a configured path,
then it is expanded to the $XDG_CONFIG_HOME if that exists

Add --with-user-config ./configure option to configure a
different user config directory.

Interpolate the right directories into documentation.

11 years agoDon't load configs from user directory when setuid
Stef Walter [Wed, 17 Jul 2013 09:57:02 +0000 (11:57 +0200)]
Don't load configs from user directory when setuid

When running as setuid() or setgid() don't access the user's home
directory, or use $HOME environment variables.

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

11 years agotools: Use $TMPDIR instead of $TEMP
Stef Walter [Wed, 17 Jul 2013 07:51:32 +0000 (09:51 +0200)]
tools: Use $TMPDIR instead of $TEMP

TMPDIR is a more standard environment variable for locating the
temp directory on Unix. In addition since this is only used in
tests, remove the code from the generic p11_path_expand() func.

In general remove the possibility for forks to put $HOME or $TEMP
environment variables in configured paths. This was possible
due to code in p11_path_expand() but not something we supported.

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

11 years agoFix various issues highlighted by coverity scanner
Stef Walter [Wed, 17 Jul 2013 06:03:38 +0000 (08:03 +0200)]
Fix various issues highlighted by coverity scanner

Among others fix possible usage of large stack allocation.

11 years agoopen files with O_CLOEXEC when possible
Stef Walter [Tue, 16 Jul 2013 20:43:37 +0000 (22:43 +0200)]
open files with O_CLOEXEC when possible

This helps prevent leaked file descriptors when the library is
used in a process which exec's.

opendir() already uses O_CLOEXEC on platforms that support O_CLOEXEC
so we don't need to make changes there.

In addition read config files using p11_mmap_open() so that we get
the simple benefits of O_CLOEXEC with the open() call there.

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

11 years agobuffer: Check for unlikely integer overflow
Stef Walter [Tue, 16 Jul 2013 19:20:44 +0000 (21:20 +0200)]
buffer: Check for unlikely integer overflow

If we see an integer overflow here something has gone horribly wrong
(or malicious code is present). So treat this as unrecoverable, and
fail if we're going to overflow.

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

11 years agoMake preconditions abort unconditionally when scanning with coverity
Stef Walter [Tue, 16 Jul 2013 16:38:24 +0000 (18:38 +0200)]
Make preconditions abort unconditionally when scanning with coverity

This reflects that preconditions are invalid/unreachable on a
functioning system and with valid input. We do not try to recover
from such conditions.

In addition teach coverity about how our test suite fails

See http://p11-glue.freedesktop.org/doc/p11-kit/devel-building-style.html

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

11 years agoiter: Document guarantees for filter matches argumet
Stef Walter [Tue, 16 Jul 2013 15:18:02 +0000 (17:18 +0200)]
iter: Document guarantees for filter matches argumet

The matches argument is always initialized to CK_TRUE when a filter
is called, and it's up to filters to set it to CK_FALSE. Filters
don't need to set to CK_TRUE.

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

11 years agoFixes for some recent win32 regressions
Stef Walter [Wed, 17 Jul 2013 13:53:33 +0000 (15:53 +0200)]
Fixes for some recent win32 regressions

11 years agoRemove erroneous comments about readdir() and thread-safety
Stef Walter [Tue, 16 Jul 2013 15:14:56 +0000 (17:14 +0200)]
Remove erroneous comments about readdir() and thread-safety

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

11 years agoBuild with -fno-common to catch definition problems
Stef Walter [Wed, 10 Jul 2013 13:22:00 +0000 (15:22 +0200)]
Build with -fno-common to catch definition problems

Fix some global variables not declared as extern

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

11 years agoVarious documentation tweaks and fixes for warnings
Stef Walter [Wed, 10 Jul 2013 13:14:06 +0000 (15:14 +0200)]
Various documentation tweaks and fixes for warnings

11 years agoAdd support for using freebl3 for SHA1 and MD5 hashing
Stef Walter [Wed, 10 Jul 2013 12:28:15 +0000 (14:28 +0200)]
Add support for using freebl3 for SHA1 and MD5 hashing

Since we don't want to link freebl3 to libp11-kit.so where it isn't
needed, move the SHA-1 and MD5 digest functionality to the trust/
directory.

11 years agotrust: Fix the 'p11-kit extract' command
Stef Walter [Tue, 9 Jul 2013 10:24:40 +0000 (12:24 +0200)]
trust: Fix the 'p11-kit extract' command

This is supposed to call over to 'trust extract' and wasn't
working correctly.

11 years agotrust: Fix bug with load validation failures
Stef Walter [Mon, 8 Jul 2013 17:01:24 +0000 (19:01 +0200)]
trust: Fix bug with load validation failures

11 years agotrust: Add a basic 'anchor' command to store a new anchor
Stef Walter [Mon, 8 Jul 2013 16:41:33 +0000 (18:41 +0200)]
trust: Add a basic 'anchor' command to store a new anchor

11 years agotrust: Fix various issues writing objects in trust token
Stef Walter [Mon, 8 Jul 2013 16:38:38 +0000 (18:38 +0200)]
trust: Fix various issues writing objects in trust token

 * Create directory before trying to write files to it
 * Handle write failures appropriately

Refactor how we build and store objects in the index to handle
the above cases properly.

11 years agotrust: Mark CKA_X_DISTRUSTED as a boolean attribute
Stef Walter [Mon, 8 Jul 2013 16:31:47 +0000 (18:31 +0200)]
trust: Mark CKA_X_DISTRUSTED as a boolean attribute

11 years agotrust: Support token directory paths in user's home directory
Stef Walter [Mon, 8 Jul 2013 16:30:16 +0000 (18:30 +0200)]
trust: Support token directory paths in user's home directory

11 years agotrust: Explicitly specify which formats parser should parse
Stef Walter [Mon, 8 Jul 2013 14:56:40 +0000 (16:56 +0200)]
trust: Explicitly specify which formats parser should parse

11 years agotrust: Support using the parser without an asn1_cache
Stef Walter [Mon, 8 Jul 2013 14:36:50 +0000 (16:36 +0200)]
trust: Support using the parser without an asn1_cache

11 years agoasn1: In p11_asn1_read() allocate an extra null terminator
Stef Walter [Mon, 8 Jul 2013 14:30:52 +0000 (16:30 +0200)]
asn1: In p11_asn1_read() allocate an extra null terminator

As a courtesy for callers.

11 years agocommon: Fix typo, and don't escape '6' in URL encoding
Stef Walter [Mon, 8 Jul 2013 14:28:48 +0000 (16:28 +0200)]
common: Fix typo, and don't escape '6' in URL encoding

11 years agop11-kit: Add P11_KIT_MODULE_TRUSTED flag
Stef Walter [Thu, 4 Jul 2013 19:49:57 +0000 (21:49 +0200)]
p11-kit: Add P11_KIT_MODULE_TRUSTED flag

A new flag to pass to p11_kit_modules_load() and related functions
which limits loaded modules to ones with "trust-policy: yes".

11 years agotrust: Port to use CKA_PUBLIC_KEY_INFO and updated trust store spec
Stef Walter [Thu, 4 Jul 2013 13:48:38 +0000 (15:48 +0200)]
trust: Port to use CKA_PUBLIC_KEY_INFO and updated trust store spec

 * Use the concepts and PKCS#11 objects described in the
   recently updated (still work in progress) storing trust spec.
 * Define our own CKA_X_PUBLIC_KEY_INFO define for now, since the
   the CKA_PUBLIC_KEY_INFO isn't defined yet.
 * Most notably, the association between certificates and stapled
   extensions is by public key.
 * Rework some of the tests to take into account the above.

11 years agotrust: Add p11_oid_hash() and various oid strings
Stef Walter [Thu, 4 Jul 2013 13:43:26 +0000 (15:43 +0200)]
trust: Add p11_oid_hash() and various oid strings

11 years agotrust: Add p11_asn1_read() and p11_asn1_free() functions
Stef Walter [Thu, 4 Jul 2013 13:37:34 +0000 (15:37 +0200)]
trust: Add p11_asn1_read() and p11_asn1_free() functions

Some helpers for commonly used ASN.1 related stuff.

11 years agotrust: Initial support for writing out token objects
Stef Walter [Wed, 3 Jul 2013 10:47:14 +0000 (12:47 +0200)]
trust: Initial support for writing out token objects

 * The objects are written out in the p11-kit persist format
 * Parser marks files in p11-kit persist format as modifiable

11 years agotrust: If token path is a file, don't try loading subdirectories
Stef Walter [Wed, 3 Jul 2013 10:46:41 +0000 (12:46 +0200)]
trust: If token path is a file, don't try loading subdirectories

11 years agotrust: Correctly handle persisting OIDs with zero length
Stef Walter [Wed, 3 Jul 2013 10:45:11 +0000 (12:45 +0200)]
trust: Correctly handle persisting OIDs with zero length

11 years agotrust: Don't write out internal attributes when persisting
Stef Walter [Wed, 3 Jul 2013 10:44:23 +0000 (12:44 +0200)]
trust: Don't write out internal attributes when persisting

11 years agotrust: Add support for saving files with unique file names
Stef Walter [Wed, 3 Jul 2013 08:45:50 +0000 (10:45 +0200)]
trust: Add support for saving files with unique file names

11 years agopath: Add p11_path_canon() function
Stef Walter [Wed, 3 Jul 2013 08:38:19 +0000 (10:38 +0200)]
path: Add p11_path_canon() function

Cleans up a filename with readable characters.