]> granicus.if.org Git - p11-kit/log
p11-kit
11 years agotrust: Refactor to include concept of the index
Stef Walter [Tue, 12 Mar 2013 17:03:25 +0000 (18:03 +0100)]
trust: Refactor to include concept of the index

 * The index holds PKCS#11 objects whether for the token or for the session.
 * The index provides hook for a builder to expand or validate objects
   being added to the index.
 * In addition theres a change hook so that a builder can maintain state
   between objects, such as the compat NSS trust objects.

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

11 years agoattrs: New p11_attrs_merge() function
Stef Walter [Thu, 14 Mar 2013 10:23:47 +0000 (11:23 +0100)]
attrs: New p11_attrs_merge() function

This takes one set of attributes and merges them into
another, without copying memory needlessly.

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

11 years agoasn1: Implement a parsed ASN.1 tree cache
Stef Walter [Thu, 14 Mar 2013 10:14:52 +0000 (11:14 +0100)]
asn1: Implement a parsed ASN.1 tree cache

In order to unmarry the parser from the future builder, but still retain
efficiency, we need to be able to cache parsed ASN.1 trees. The ASN.1
cache provides this. In addition it carries around the loaded ASN.1
definitions.

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

11 years agoextract: Combine trust policy when extracting
Stef Walter [Fri, 15 Mar 2013 08:22:57 +0000 (09:22 +0100)]
extract: Combine trust policy when extracting

 * Collapse multiple identical certificates coming from different
   tokens. Note that if a certificate should not be placed multiple
   times on a token. We cannot know which one to respect.
 * Add a new extract filter: --trust-policy
   This extracts all anchor and blacklist information

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

11 years agoextract: --comment option adds comments to PEM bundles
Stef Walter [Fri, 15 Mar 2013 07:23:43 +0000 (08:23 +0100)]
extract: --comment option adds comments to PEM bundles

 * Placed before the certificate, simple one liner
 * No need to put comments in PEM files extracted into
   directories, as the file names are already descriptive.

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

11 years agoextract: Allow p11_save_write() to automatically calculate length
Stef Walter [Fri, 15 Mar 2013 07:18:42 +0000 (08:18 +0100)]
extract: Allow p11_save_write() to automatically calculate length

Also if automatically calculating length, then ignore input
that is NULL, as something that shouldn't be written out.

This allows easier chaining of optional output, such as comments.

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

11 years agop11-kit: New priority option and change trust-policy option
Stef Walter [Thu, 7 Mar 2013 17:53:50 +0000 (18:53 +0100)]
p11-kit: New priority option and change trust-policy option

 * Sort loaded modules appropriately using the 'priority' option. This
   allows us to have a predictable order for callers, when callers
   iterate through modules.
 * Modules default to having an 'priority' option of '0'.
 * If modules have the same order value, then sort by name.
 * The above assumes the role of ordering trust-policy sources.
 * Change the trust-policy option to a boolean
 * Some of this code will be rearranged when the managed branch
   is merged.

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

11 years agotrust: Make each configured path its own token
Stef Walter [Wed, 6 Mar 2013 18:16:09 +0000 (19:16 +0100)]
trust: Make each configured path its own token

 * Each source directory or file configured into the module or passed
   in as an initialization argument becomes its own token.
   Previously there was one token that contained certificates from
   all the configured paths.
 * These tokens are clearly labeled in the token info as
   to the directory or file that they represent.
 * Update PKCS#11 module logic to deal with multiple tokens, validate
   the slot ids and so on.
 * The order in which the paths are configured will become the
   order of trust priority. This is the same order in which they
   are listed through 'p11-kit list-modules' and C_GetSlotList.
 * Update the frob-token internal tool to only play with one path
 * Adjust tests where necessary to reflect the new state of things
   and add tests for modified trust module code

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

11 years agodict: Allow removal of current item in a p11_dict iteration
Stef Walter [Wed, 6 Mar 2013 18:12:28 +0000 (19:12 +0100)]
dict: Allow removal of current item in a p11_dict iteration

 * This was already possible to do safely before
 * Document and test this behavior

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

11 years agotrust: Rework input path treatment
Stef Walter [Thu, 14 Mar 2013 09:05:17 +0000 (10:05 +0100)]
trust: Rework input path treatment

 * Accept a single --with-trust-paths argument to ./configure
   which cotnains all the input paths.
 * The --with-system-anchors and --with-system-certificates
   ./configure arguments are no longer supported. Since they were
   only present briefly, no provision is made for backwards
   compatibility.
 * Each input file is treated as containing anchors by default
   unless an input certificate contains detailed trust information.
 * The files in each input directory are not automatically treated
   as anchors unless a certificate contains detailed trust information.
 * The files in anchors/ subdirectory of each input directory are
   automatically marked as anchors.
 * The files in the blacklist/ subdirectory of each input directory
   are automatically marked as blacklisted.
 * Update tests and move around test certificates so we can
   test these changes.

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

11 years agopem: Fix a bug decoding some PEM files
Stef Walter [Fri, 15 Mar 2013 16:07:56 +0000 (17:07 +0100)]
pem: Fix a bug decoding some PEM files

When bringing over the BSD base64 code, there was a regression.
In addition add some tests for the base64 stuff.

11 years agoDon't overwrite the build directory when uploading documentation
Stef Walter [Sun, 10 Mar 2013 19:59:36 +0000 (20:59 +0100)]
Don't overwrite the build directory when uploading documentation

11 years agoFix up the system anchors/certificates configure arguments
Stef Walter [Sun, 10 Mar 2013 20:42:49 +0000 (21:42 +0100)]
Fix up the system anchors/certificates configure arguments

Double check various combinations, and make sure we don't fail
needlessly when --disable-trust-module. Also check that actual
paths are passed into the arguments.

11 years agodoc: Move manual into doc/manual subdirectory
Stef Walter [Mon, 11 Mar 2013 09:56:07 +0000 (10:56 +0100)]
doc: Move manual into doc/manual subdirectory

11 years agoRelease version 0.16.4 0.16.4
Stef Walter [Tue, 12 Mar 2013 08:05:47 +0000 (09:05 +0100)]
Release version 0.16.4

11 years agotools: Display per-command help appropriately
Stef Walter [Mon, 11 Mar 2013 08:50:38 +0000 (09:50 +0100)]
tools: Display per-command help appropriately

 * Fixes a regression
 * In addition allows --help to be specified before the command. If
   a command is present, command help will be shown

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

11 years agotools: Initialize local debug code correctly
Stef Walter [Mon, 11 Mar 2013 08:38:49 +0000 (09:38 +0100)]
tools: Initialize local debug code correctly

Unless initialized according to the environment all debug output
is printed.

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

11 years agoRelease version 0.16.3 0.16.3
Stef Walter [Fri, 8 Mar 2013 22:25:02 +0000 (23:25 +0100)]
Release version 0.16.3

11 years agoiter: Don't skip tokens that don't have CKF_TOKEN_INITIALIZED
Stef Walter [Fri, 8 Mar 2013 21:50:43 +0000 (22:50 +0100)]
iter: Don't skip tokens that don't have CKF_TOKEN_INITIALIZED

This flag is not required to be set unless C_InitToken has been
called. Many modules, like libnssckbi.so, do not set this flag.

11 years agotrust: add a simple frob-nss-token tool to dump distrust
Stef Walter [Fri, 8 Mar 2013 21:52:24 +0000 (22:52 +0100)]
trust: add a simple frob-nss-token tool to dump distrust

Add a simple tool to dump NSS style distrust attributes from
a module.

11 years agotrust: Use the new NSS PKCS#11 extension codes
Stef Walter [Fri, 8 Mar 2013 21:50:06 +0000 (22:50 +0100)]
trust: Use the new NSS PKCS#11 extension codes

NSS had subtly changed the values of the distrust CK_TRUST codes
so update them to stay in sync.

11 years agoHard code distrust temporarily.
Stef Walter [Fri, 8 Mar 2013 20:30:35 +0000 (21:30 +0100)]
Hard code distrust temporarily.

This is because we have no way to load this data into the trust module.
Working on a real solution.

11 years agotools: Parse global options appropriately, even if after command
Stef Walter [Fri, 8 Mar 2013 07:36:27 +0000 (08:36 +0100)]
tools: Parse global options appropriately, even if after command

11 years agotrust: Refactor how we load builtin objects
Stef Walter [Fri, 8 Mar 2013 18:09:46 +0000 (19:09 +0100)]
trust: Refactor how we load builtin objects

11 years agoDon't shove messages into debug output if they're already displayed
Stef Walter [Fri, 8 Mar 2013 18:01:44 +0000 (19:01 +0100)]
Don't shove messages into debug output if they're already displayed

11 years agoRelease 0.16.2 0.16.2
Stef Walter [Fri, 8 Mar 2013 13:18:53 +0000 (14:18 +0100)]
Release 0.16.2

11 years agoextract: Use bool instead of int where appropriate
Stef Walter [Fri, 8 Mar 2013 07:36:11 +0000 (08:36 +0100)]
extract: Use bool instead of int where appropriate

11 years agotools: Add a bit of debugging to the PEM extract handler
Stef Walter [Fri, 8 Mar 2013 07:35:28 +0000 (08:35 +0100)]
tools: Add a bit of debugging to the PEM extract handler

11 years agoextract: Fix regression in --purpose option
Stef Walter [Fri, 8 Mar 2013 07:32:50 +0000 (08:32 +0100)]
extract: Fix regression in --purpose option

The --purpose option would only match certificates that had no
purposes marked on them. Fix it so that it correctly matches
certificates with the given purpose.

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

11 years agoDocument and put code coverage online
Stef Walter [Fri, 8 Mar 2013 09:04:11 +0000 (10:04 +0100)]
Document and put code coverage online

 * Document our testing practices
 * Put lcov code coverage output online

11 years agoProperly detect the stdbool.h header
Stef Walter [Fri, 8 Mar 2013 07:48:38 +0000 (08:48 +0100)]
Properly detect the stdbool.h header

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

11 years agoRelease version 0.16.1 0.16.1
Stef Walter [Thu, 7 Mar 2013 21:54:12 +0000 (22:54 +0100)]
Release version 0.16.1

11 years agodoc: Fix external URLs in documentation
Stef Walter [Thu, 7 Mar 2013 17:19:40 +0000 (18:19 +0100)]
doc: Fix external URLs in documentation

11 years agodoc: Add P11_KIT_STRICT=yes debugging tip
Stef Walter [Thu, 7 Mar 2013 17:13:23 +0000 (18:13 +0100)]
doc: Add P11_KIT_STRICT=yes debugging tip

11 years agox509: Don't break when cA field of BasicConstraints is missing
Stef Walter [Thu, 7 Mar 2013 17:05:32 +0000 (18:05 +0100)]
x509: Don't break when cA field of BasicConstraints is missing

The field defaults to FALSE. It sucks that libtasn1 doesn't
fill this in for us.

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

11 years agotools: Remove extra debugging statement when running external commands
Stef Walter [Thu, 7 Mar 2013 15:34:40 +0000 (16:34 +0100)]
tools: Remove extra debugging statement when running external commands

11 years agoextract-trust: Turn into a placeholder script that does nothing
Stef Walter [Thu, 7 Mar 2013 15:33:25 +0000 (16:33 +0100)]
extract-trust: Turn into a placeholder script that does nothing

If the 'p11-kit extract-trust' command is to be used by
distributions, make them customize it appropriately.

11 years agodoc: Don't wrap the options in the pkcs11.conf manual page
Stef Walter [Thu, 7 Mar 2013 15:28:25 +0000 (16:28 +0100)]
doc: Don't wrap the options in the pkcs11.conf manual page

11 years agoRelease version 0.16.0 0.16.0
Stef Walter [Mon, 4 Mar 2013 18:04:40 +0000 (19:04 +0100)]
Release version 0.16.0

11 years agoBuild with the libtasn1 CFLAGS properly
Stef Walter [Mon, 4 Mar 2013 16:34:00 +0000 (16:34 +0000)]
Build with the libtasn1 CFLAGS properly

Tweaks by: Roman Bogorodskiy <bogorodskiy@gmail.com>

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

11 years agoRedo mock.h header in order to relicense
Stef Walter [Mon, 4 Mar 2013 17:52:07 +0000 (18:52 +0100)]
Redo mock.h header in order to relicense

Rewrite the mock.h header to relicense it. It is based on the BSD
licensed mock.c file, so this isn't a big issue.

11 years agoRemove duplicate typedef
Stef Walter [Mon, 4 Mar 2013 17:39:37 +0000 (18:39 +0100)]
Remove duplicate typedef

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

11 years agoFix missing bracket in trust module check
Roman Bogorodskiy [Sun, 3 Mar 2013 15:51:00 +0000 (15:51 +0000)]
Fix missing bracket in trust module check

This fixes building --without-libtasn1

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

11 years agoInitialize modules correctly in tests
Stef Walter [Sun, 3 Mar 2013 09:05:03 +0000 (10:05 +0100)]
Initialize modules correctly in tests

This fixes hangs when running tests on windows

11 years agoWindows doesn't support symlinks, chmod, or atomic renames
Stef Walter [Sun, 3 Mar 2013 09:03:40 +0000 (10:03 +0100)]
Windows doesn't support symlinks, chmod, or atomic renames

 * Don't create symlinks on windows
 * No atomic renames, so delete and then rename
 * Make sure to close files before unlinking on windows
 * No chmod permissions on windows

11 years agoUse mingw compatible coverage flags
Stef Walter [Sun, 3 Mar 2013 09:02:06 +0000 (10:02 +0100)]
Use mingw compatible coverage flags

The way that coverage is built and linked is different with mingw
so just use the --coverage flag to represent the correct behavior
when cross compiling.

11 years agoDon't use wchar_t for storing unicode characters
Stef Walter [Sun, 3 Mar 2013 09:01:21 +0000 (10:01 +0100)]
Don't use wchar_t for storing unicode characters

On Win32 wchar_t is only 2 bytes, which breaks our UTF-8 conversion
functions.

11 years agoFix syntax errors in OS_WIN32 ifdefs
Stef Walter [Sun, 3 Mar 2013 09:00:23 +0000 (10:00 +0100)]
Fix syntax errors in OS_WIN32 ifdefs

11 years agoOpen files in binary mode on windows
Stef Walter [Sun, 3 Mar 2013 08:58:49 +0000 (09:58 +0100)]
Open files in binary mode on windows

So that the Windows' C library doesn't munge line endings

11 years agoAdd compat gmtime_r() and timegm() functions
Stef Walter [Sun, 3 Mar 2013 08:57:24 +0000 (09:57 +0100)]
Add compat gmtime_r() and timegm() functions

Not available on Win32 or ancient unixes

11 years agoAdd compat mkstemp() and mkdtemp() functions
Stef Walter [Sun, 3 Mar 2013 08:56:22 +0000 (09:56 +0100)]
Add compat mkstemp() and mkdtemp() functions

Not available on Win32 or ancient unixes

11 years agoAdd compat vasprintf() and asprintf() functions
Stef Walter [Sun, 3 Mar 2013 08:54:59 +0000 (09:54 +0100)]
Add compat vasprintf() and asprintf() functions

These are not available on Win32 and ancient unixes

11 years agoAdd compat strndup() function
Stef Walter [Sun, 3 Mar 2013 08:52:21 +0000 (09:52 +0100)]
Add compat strndup() function

Not available on Win32 and ancient unixes

11 years agoAbstract mmap() into a compat API
Stef Walter [Sun, 3 Mar 2013 08:50:44 +0000 (09:50 +0100)]
Abstract mmap() into a compat API

The Win32 for mmap() is very different from Unix, so abstract
this into our own p11_mmap_xxx() functions.

11 years agoUse putenv() instead of setenv()
Stef Walter [Sun, 3 Mar 2013 08:47:29 +0000 (09:47 +0100)]
Use putenv() instead of setenv()

Since older operating systems don't support setenv()

11 years agoAdd compat implementation of basename()
Stef Walter [Sun, 3 Mar 2013 08:44:42 +0000 (09:44 +0100)]
Add compat implementation of basename()

For Win32 and older unixes

11 years agotools: Update comments for cacerts jks format
Stef Walter [Sun, 24 Feb 2013 16:27:50 +0000 (17:27 +0100)]
tools: Update comments for cacerts jks format

11 years agoRename p11_module_xxx() compat functions to p11_dl_xxx()
Stef Walter [Wed, 20 Feb 2013 09:08:34 +0000 (10:08 +0100)]
Rename p11_module_xxx() compat functions to p11_dl_xxx()

For clarity. In addition, make p11_dl_close() able to be used
as a destroyer callback.

Also make p11_dl_error() return an allocated string

11 years agoUpdate the pkcs11.h header for missing mechanisms
Stef Walter [Fri, 15 Feb 2013 20:38:09 +0000 (21:38 +0100)]
Update the pkcs11.h header for missing mechanisms

11 years agoOnly do shared object and DLL initialization in libraries
Stef Walter [Wed, 6 Feb 2013 21:16:42 +0000 (22:16 +0100)]
Only do shared object and DLL initialization in libraries

Don't do library initialization on shared object load when not running
in a library. We'll want to plug into this and do different things
per library in the future.

11 years agoMove pkcs11.conf and module documentation to a manual page
Stef Walter [Fri, 15 Feb 2013 19:56:11 +0000 (20:56 +0100)]
Move pkcs11.conf and module documentation to a manual page

11 years agoPull translations from transifex
Stef Walter [Wed, 13 Feb 2013 17:32:06 +0000 (18:32 +0100)]
Pull translations from transifex

 * Build a script to help with this

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

11 years agoRelicense the buffer code appropriate for inclusion in p11-kit
Stef Walter [Tue, 12 Feb 2013 18:13:41 +0000 (19:13 +0100)]
Relicense the buffer code appropriate for inclusion in p11-kit

 * All original lines in this file upon arrival in the p11-kit
   project were written by me, and copyright held by me.

11 years agoRelease version 0.15.2 0.15.2
Stef Walter [Tue, 12 Feb 2013 15:23:07 +0000 (16:23 +0100)]
Release version 0.15.2

 * This is an unstable release

11 years agoAdd finish translation
Timo Jyrinki [Tue, 12 Feb 2013 15:08:53 +0000 (16:08 +0100)]
Add finish translation

11 years agoAdd and enable German gettext translation
Andreas Metzler [Sat, 24 Sep 2011 14:10:34 +0000 (16:10 +0200)]
Add and enable German gettext translation

Enable installation of gettext translations and add German translation
by Chris Leick.

11 years agoRespect destdir when creating package module config directory
Andreas Metzler [Tue, 12 Feb 2013 14:55:04 +0000 (15:55 +0100)]
Respect destdir when creating package module config directory

11 years agoFix dereference of varargs in p11_attrs_build()
Stef Walter [Mon, 11 Feb 2013 19:50:55 +0000 (20:50 +0100)]
Fix dereference of varargs in p11_attrs_build()

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

11 years agoRemove unnecessary code to be more compatible with various libtasn1 versions
Stef Walter [Mon, 11 Feb 2013 19:29:02 +0000 (20:29 +0100)]
Remove unnecessary code to be more compatible with various libtasn1 versions

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

12 years agoDon't require explictly disabling trust module if --without-libtasn1
Andreas Metzler [Thu, 7 Feb 2013 20:32:58 +0000 (21:32 +0100)]
Don't require explictly disabling trust module if --without-libtasn1

And provide more intelligent error messages about why to build
with libtasn1

Tweaked by Stef Walter

12 years agoFix various clang analyzer warnings
Stef Walter [Wed, 6 Feb 2013 13:54:53 +0000 (14:54 +0100)]
Fix various clang analyzer warnings

 * Add annotations to our precondition functions so that they
   don't make the analyzer complain

12 years agoOur minimum version of libtasn1 is 2.14
Stef Walter [Tue, 5 Feb 2013 15:55:23 +0000 (16:55 +0100)]
Our minimum version of libtasn1 is 2.14

12 years agoRelease version 0.15.1 0.15.1
Stef Walter [Tue, 5 Feb 2013 14:05:12 +0000 (15:05 +0100)]
Release version 0.15.1

 * This is an unstable release

12 years agoAdd a placeholder external 'extract-trust' command
Stef Walter [Sun, 3 Feb 2013 12:05:26 +0000 (13:05 +0100)]
Add a placeholder external 'extract-trust' command

12 years agoImplement support for java JKS keystore format
Stef Walter [Fri, 1 Feb 2013 11:02:16 +0000 (12:02 +0100)]
Implement support for java JKS keystore format

 * All aliases must be lower case in order to work with the
   default keystore implementation.

12 years agoUse the CN, OU or O of certificates to generate a label
Stef Walter [Sun, 3 Feb 2013 22:26:10 +0000 (23:26 +0100)]
Use the CN, OU or O of certificates to generate a label

 * This is in cases where the certificate information does not
   already have a friendly name or alias.

12 years agoAdd support for exporting OpenSSL's TRUSTED CERTIFICATE format
Stef Walter [Wed, 30 Jan 2013 14:50:02 +0000 (15:50 +0100)]
Add support for exporting OpenSSL's TRUSTED CERTIFICATE format

12 years agoAdd support for extracting to pem-bundle and pem-directory formats
Stef Walter [Wed, 30 Jan 2013 14:39:28 +0000 (15:39 +0100)]
Add support for extracting to pem-bundle and pem-directory formats

12 years agoImplement code for writing PEM
Stef Walter [Wed, 23 Jan 2013 11:15:27 +0000 (12:15 +0100)]
Implement code for writing PEM

 * Based on the gcr code
 * Bring in base64 output code from BSD
 * Make sure to output base64 lines of 64 character length since
   this is what OpenSSL expects

12 years agoImplement basic extract support
Stef Walter [Wed, 30 Jan 2013 14:30:52 +0000 (15:30 +0100)]
Implement basic extract support

 * The only formats supported are x509-file and x509-directory

Allow tool to build without extract

12 years agoSupport for sane writing to files extracted
Stef Walter [Wed, 23 Jan 2013 16:35:58 +0000 (17:35 +0100)]
Support for sane writing to files extracted

 * Implement atomic writes of files
 * Writing with checks that not overwriting anything unless desired
 * Writing and overwriting of directory contents in a robust way

12 years agoAdd public iterator API to p11-kit
Stef Walter [Mon, 21 Jan 2013 10:06:41 +0000 (11:06 +0100)]
Add public iterator API to p11-kit

12 years agoAllow internal use of token and module info matching
Stef Walter [Mon, 21 Jan 2013 10:04:06 +0000 (11:04 +0100)]
Allow internal use of token and module info matching

12 years agoMove the X.509 extension parsing code in common/
Stef Walter [Mon, 21 Jan 2013 09:51:04 +0000 (10:51 +0100)]
Move the X.509 extension parsing code in common/

 * So it can be used by other code, in addition to the trust stuff

12 years agoAdd p11_array_clear() function
Stef Walter [Fri, 18 Jan 2013 15:11:06 +0000 (16:11 +0100)]
Add p11_array_clear() function

 * Clears an array without freeing the array itself

12 years agoImplement trust assertion PKCS#11 objects
Stef Walter [Fri, 4 Jan 2013 12:57:28 +0000 (13:57 +0100)]
Implement trust assertion PKCS#11 objects

 * Implement trust assertions for anchored and distrusted certs
 * Pinned certificate trust assertions are not implemented yet
 * Add an internal tool for pulling apart bits of certificates

12 years agoRefactor how parsing of ASN.1 data and certificate extensions work
Stef Walter [Fri, 4 Jan 2013 14:50:13 +0000 (15:50 +0100)]
Refactor how parsing of ASN.1 data and certificate extensions work

12 years agoFill in certificate authority and trust data correctly
Stef Walter [Thu, 3 Jan 2013 10:07:47 +0000 (11:07 +0100)]
Fill in certificate authority and trust data correctly

 * Fill in CKA_CERTIFICATE_CATEGORY properly for authorities
   based on the presence of BasicConstraints and/or v1 certificates
 * Fill in CKA_TRUSTED and CKA_X_DISTRUSTED based on whether the
   parser is running for anchors or blacklist
 * In addition support the concept of blacklisted certificates mixed
   in with the anchors (without any purposes) since that's what exists
   in the real world.
 * We do this after the various hooks have had a chance to mess
   with the certificate extensions and such.

12 years agoImplement stapled certificate extensions internally
Stef Walter [Wed, 2 Jan 2013 15:06:19 +0000 (16:06 +0100)]
Implement stapled certificate extensions internally

 * Use stapled certificate extensions to represent loaded trust policy
 * Build NSS trust objects from stapled certificate extensions
 * Add further attribute debugging for NSS trust objects
 * Use a custom certificate extension for the OpenSSL reject purpose data
 * Use SubjectKeyIdentifier for OpenSSL keyid data
 * Use ExtendedKeyUsage for OpenSSL trust purpose data
 * Implement simple way to handle binary DER OIDs, using the DER TLV
   length. DER OIDs are used in the CKA_OBJECT_ID value, and elsewhere.
 * Split out the building of NSS trust objects from the main parser

12 years agoBetter debugging and checks for attribute values
Stef Walter [Wed, 2 Jan 2013 15:52:59 +0000 (16:52 +0100)]
Better debugging and checks for attribute values

12 years agoAdd tool for testing how fast the token loads
Stef Walter [Wed, 19 Dec 2012 14:08:18 +0000 (15:08 +0100)]
Add tool for testing how fast the token loads

12 years agoSome debug info about which files are being loaded
Stef Walter [Mon, 17 Dec 2012 21:38:11 +0000 (22:38 +0100)]
Some debug info about which files are being loaded

12 years agoTest a TRUSTED CERTIFICATE without any trust OIDs
Stef Walter [Mon, 17 Dec 2012 20:41:44 +0000 (21:41 +0100)]
Test a TRUSTED CERTIFICATE without any trust OIDs

12 years agoAdd the builtin roots NSS specific object
Stef Walter [Mon, 17 Dec 2012 15:05:36 +0000 (16:05 +0100)]
Add the builtin roots NSS specific object

This tells NSS that this is a source of anchors.

12 years agoAdd support for openssl TRUSTED CERTIFICATE PEM files
Stef Walter [Mon, 17 Dec 2012 11:51:53 +0000 (12:51 +0100)]
Add support for openssl TRUSTED CERTIFICATE PEM files

12 years agoAdd support for parsing PEM files
Stef Walter [Mon, 17 Dec 2012 10:04:42 +0000 (11:04 +0100)]
Add support for parsing PEM files

12 years agoAdd basic trust module
Stef Walter [Thu, 24 Jan 2013 10:34:47 +0000 (11:34 +0100)]
Add basic trust module

This is based off the roots-store from gnome-keyring and loads
certificates from a root directory and exposes them as PKCS#11
objects.

12 years agoAdd basic checksum algorithms
Stef Walter [Thu, 24 Jan 2013 10:28:47 +0000 (11:28 +0100)]
Add basic checksum algorithms

The SHA-1 and MD5 digests here are used for checksums in legacy
protocols. We don't use them in cryptographic contexts at all.
These particular algorithms would be poor choices for that.

12 years agoRemove the unused err() function and friends
Stef Walter [Tue, 5 Feb 2013 13:15:12 +0000 (14:15 +0100)]
Remove the unused err() function and friends

We want to use p11_message in our commands anyway, since that
allows us control with --verbose and --quiet.

12 years agoTweak style of the manual
Stef Walter [Tue, 5 Feb 2013 10:52:07 +0000 (11:52 +0100)]
Tweak style of the manual

 * Unindent the main headings
 * Don't wrap options
 * Better spacing in table of contents
 * Don't have line numbers on code examples