summaryrefslogtreecommitdiff
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* Refactor how parsing of ASN.1 data and certificate extensions workStef Walter2013-02-059-3/+1135
|
* Fill in certificate authority and trust data correctlyStef Walter2013-02-051-5/+4
| | | | | | | | | | | | * 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.
* Implement stapled certificate extensions internallyStef Walter2013-02-059-21/+556
| | | | | | | | | | | | * 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
* Add support for openssl TRUSTED CERTIFICATE PEM filesStef Walter2013-02-053-0/+58
|
* Add support for parsing PEM filesStef Walter2013-02-057-5/+801
|
* Add basic trust moduleStef Walter2013-02-0511-8/+1519
| | | | | | This is based off the roots-store from gnome-keyring and loads certificates from a root directory and exposes them as PKCS#11 objects.
* Add basic checksum algorithmsStef Walter2013-02-055-0/+764
| | | | | | 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.
* Remove the unused err() function and friendsStef Walter2013-02-052-187/+0
| | | | | We want to use p11_message in our commands anyway, since that allows us control with --verbose and --quiet.
* Add internal function for turning on messagesStef Walter2013-02-052-0/+10
| | | | To be used from tests
* Add more mock-module implementationStef Walter2013-02-043-0/+3818
| | | | | * Move mock code into the common/ directory to be used by multiple components of p11-kit
* Further tweaks and cleanup for functions dealing with PKCS#11 attributesStef Walter2013-02-043-70/+910
| | | | | | | | * Check that the size is correct when looking for a boolean or a ulong. * Make sure that the length is not the invalid negative ulong. * Functions for dumping out attribute contents * Make it possible to use attributes in hash tables
* Add generic buffer codeStef Walter2013-02-045-0/+478
| | | | Represents a block of memory that can be added to, parsed and so on
* Use the stdbool.h C99 bool typeStef Walter2013-01-2310-104/+119
| | | | | | It was getting really wild knowing whether a function returning an int would return -1 on failure or 0 or whether the int return value was actually a number etc..
* Only initialize p11-kit libraries onceStef Walter2013-01-092-6/+14
| | | | * Make the gcc constructor call p11_library_init_once()
* Set strict debug preconditions during testingStef Walter2013-01-091-0/+4
|
* Add common functions for manipulating CK_ATTRIBUTE arraysStef Walter2013-01-095-0/+916
|
* Move the pkcs11.h header files into common directoryStef Walter2013-01-093-0/+1535
| | | | | | | * Allows use of them across the whole project * Put a stub file in the p11-kit/ directory, so we can still refer to the headers using that path, which is what it will be at when in the installed includes directory.
* Build common code into noinst librariesStef Walter2013-01-092-11/+15
| | | | | | * This is cleaner than building the same source files all over the place over and over. * Works better with code coverage.
* Move debug and library code into the common/ subdirectoryStef Walter2013-01-0914-0/+2320
| | | | | | | | | | | Start using p11_ as our internal prefix rather than _p11_. We explicitly export p11_kit_ so this is fine as far as visibility. Move the threading, mutex, and module compat, dict, and array code into the common directory too. Take this opportunity to clean up a bit of internal API as well, since so many lines are being touched internally.
* Fix build on solarisRob McMahon2012-07-311-0/+4
| | | | | | | * Conditional inclusion of the errno.h header * Link librt when appropriate for nanosleep https://bugs.freedesktop.org/show_bug.cgi?id=52261
* Fix getprogname() running under wineStef Walter2012-07-171-2/+5
| | | | * Wine uses normal slashes instead of backslashes on windows
* Win32 build fixesStef Walter2012-06-291-4/+7
| | | | | | * Remove unused functions * Use getprogname() instead of calc_progname() which no longer exists * Fix up exporting of functions in the mock module
* Use gcc extensions to check varargs during compileStef Walter2012-05-131-6/+18
| | | | | * Add macros GNUC_PRINTF and GNUC_NULL_TERMINATED to check correct printf and NULL terminated style varargs
* Provide compat getprogname() implementations on other OS'sStef Walter2012-05-012-26/+71
| | | | * And use them in our replacement err() and p11_kit_set_progname()
* Move the compat.[ch] headers into common directory/Stef Walter2012-04-302-0/+291
* And the compat stuff in the p11-kit directory merged into util.c and util.h