summaryrefslogtreecommitdiff
path: root/p11-kit
Commit message (Collapse)AuthorAgeFilesLines
* Fix documentation warnings.Stef Walter2013-01-071-3/+6
| | | | | | * P11_KIT_URI_NO_MEMORY is an unexpected state, that will probably never actually be returned. But kept for API compatibility. * make distcheck doc fix
* Guarantee that the key is freed when replacedStef Walter2013-01-072-2/+11
| | | | | | | | | * When setting a key in a map that already exists, then free the old key and replace with the new one. * Fix related bug where key was not properly allocated * Add tests for this https://bugs.freedesktop.org/show_bug.cgi?id=59087
* Don't complain if we cannot access ~/.pkcs11/pkcs11.confStef Walter2012-11-142-9/+34
| | | | | | | * If a process is running under selinux it may not be able to access the home directory of the uid that it is running as. https://bugs.freedesktop.org/show_bug.cgi?id=57115
* Refuse to load the p11-kit-proxy.so as a registered moduleStef Walter2012-09-183-9/+13
| | | | | | | | | | * Since p11-kit-proxy.so is a symlink to the libp11-kit.so library we check that we are not calling into our known CK_FUNCTION_LIST for the proxy code. * Although such a configuration is invalid, detecting this directly prevents strange initialization loop issues that are hard to debug. https://bugs.freedesktop.org/show_bug.cgi?id=55052
* Don't fail initialization if last initialized module failsStef Walter2012-09-181-4/+6
| | | | | | | | | | * We weren't resetting the result code after a failure, so even though failures for critical modules didn't interrupt the initialization loop, the result still leaked to callers. * Also print an error message clearly indicating that a module failed to initialize, regardless of whether critical or not. https://bugs.freedesktop.org/show_bug.cgi?id=55051
* Change the default of 'user-config' to merge.Stef Walter2012-09-062-3/+3
| | | | | | | * This allows user configured PKCS#11 modules by default. * Admins can change this to 'none' in /etc/pkcs11/pkcs11.conf to go back to the previous behavior. * Posted to the mailing list.
* Always encode the "id" attribute in URIsDan Winship2012-07-281-10/+14
| | | | | | Per recommendation of the spec. https://bugs.freedesktop.org/show_bug.cgi?id=52606
* Use Windows thread ids instead of handles for comparisonsStef Walter2012-07-262-6/+11
| | | | | | | | | | * It seems that the HANDLE's returned from GetCurrentThread are often equal for two threads. GetCurrentThreadID doesn't have this problem. * Separate our cross platform thread_t and thread_id_t types even though on unix they're the same thing. https://bugzilla.gnome.org/show_bug.cgi?id=44740
* Use correct shared library extension on windowsStef Walter2012-07-261-0/+14
| | | | | | | | * The windows shared libraries have the .dll extension * This means we also need separate directories for the test module configs on win32 https://bugzilla.gnome.org/show_bug.cgi?id=44740
* Use '.module' extension on module configsStef Walter2012-07-241-4/+52
| | | | | | | | | | | | | * And want alphanumeric/_.- filenames * Currently this is just a warning, soon it will be enforced * The name of a module does not include the extension Andreas Metzler and Ubuntu both worked on this patch, and I've made some more changes. See https://bugs.launchpad.net/ubuntu/+source/p11-kit/+bug/911436 https://bugs.freedesktop.org/show_bug.cgi?id=52158
* Fix compiler warning about uninitialized variableStef Walter2012-07-241-1/+1
|
* Use EFBIG as the error code when pin file is too largeStef Walter2012-07-171-1/+1
| | | | * The previous EOVERFLOW was not supported on mingw
* Don't allow reading of pin files larger than 4096 bytesStef Walter2012-06-291-7/+12
| | | | * p11_kit_pin_file_callback() only returns pins up to 4096 bytes now
* Win32 build fixesStef Walter2012-06-291-26/+0
| | | | | | * Remove unused functions * Use getprogname() instead of calc_progname() which no longer exists * Fix up exporting of functions in the mock module
* If a module is not marked 'critical' then ignore failureStef Walter2012-06-271-3/+11
| | | | | * Ignore failure when initializing registered modules when 'critical' is not set on a module.
* Fix the flags in pin.hStef Walter2012-06-081-6/+6
| | | | | | | | | * Due to a brain fart the P11_KIT_PIN_* flags were not bit flags but decimal numbers. * This necessarily breaks API/ABI for users of the P11_KIT_PIN_FLAGS_RETRY, P11_KIT_PIN_FLAGS_MANY_TRIES and P11_KIT_PIN_FLAGS_FINAL_TRY flags. But those wouldn't have worked anyway.
* Preconditions to check for input probs and out of memoryStef Walter2012-05-1310-260/+242
| | | | | | * We don't try to guarantee completely robust and problem free behavior in cases where the caller or process isn't behaving. We consider these to be outside of our control.
* Use gcc extensions to check varargs during compileStef Walter2012-05-134-7/+19
| | | | | * Add macros GNUC_PRINTF and GNUC_NULL_TERMINATED to check correct printf and NULL terminated style varargs
* Fix test modules linking errorsStef Walter2012-05-012-0/+3
| | | | * And display warning messages in the debug output
* Provide compat getprogname() implementations on other OS'sStef Walter2012-05-012-37/+8
| | | | * And use them in our replacement err() and p11_kit_set_progname()
* Move the compat.[ch] headers into common directory/Stef Walter2012-04-308-268/+180
| | | | | * And the compat stuff in the p11-kit directory merged into util.c and util.h
* Doc tweaks for PIN functionalityStef Walter2012-04-161-19/+28
|
* Add tests for enable-in and disable-inStef Walter2012-04-022-6/+6
|
* Build some test modules for testing main p11-kit functionalityStef Walter2012-04-021-7/+22
| | | | * And put together a test for duplicate modules
* Add more p11-kit cleanup to fix valgrind leak reportsStef Walter2012-04-021-0/+11
| | | | | * per-thread memory isn't actually a real memory leak, but was still reachable after exit, so clean this up.
* Fix crasher when a duplicate module is presentStef Walter2012-04-011-6/+7
|
* Add enable-in and disable-in options to module configStef Walter2012-04-014-3/+193
| | | | | | | | * These can be used to load certain modules in certain programs, or prevent loading in others. * Useful for a key manager like seahorse, so we can load extra modules (think NSS) that other modules shouldn't load.
* Fix broken hashmap behaviorStef Walter2012-03-271-7/+5
| | | | | | | * We were relying on undefined gcc behavior related to the & operator. * This would show up as a test failure when running with -O2 on certain GCC versions, as well as failure on clang 3.1
* Remove automatic reinitialization of PKCS#11 after forkStef Walter2012-01-231-9/+2
| | | | | | | | | | | | | | * First of all one should only call async-signal-safe functions from the callbacks of pthread_atfork(), and so we cannot reinitialize directly. * Some modules use pthread_atfork() to detect forking and setup their internal state. If we call into them in our pthread_atfork() callback then this is inherently racy. * There was danger of endless loops and deadlocks which are caused by handlers which fork in their C_Initialize * Many processes do fork/exec, reinitializing PKCS#11 for these forks is quite resourc intensive when the child process won't use PKCS#11 at all.
* Fix build warning on mingw64Stef Walter2012-01-021-1/+1
|
* Build fix for MinGW w64Michael Cronenworth2011-11-251-1/+7
|
* Fix problems crashing when freeing TLS on windowsStef Walter2011-10-291-0/+2
|
* Add debug output to windows init and uninit of libraryStef Walter2011-10-291-1/+8
|
* Fix broken build on cygwin and mingwDr. Volker Zell2011-10-251-0/+2
| | | | * Add correct linking options for libintl
* Fix broken build on windowsMichael Cronenworth2011-10-251-1/+1
| | | | | * The debug_init() call needed a rename to _p11_debug_init() to match the non-Win32 code.
* More fixes for non-static function namesStef Walter2011-10-246-56/+53
| | | | | * See previous commit * Initialize library before debug statements
* Rename non-static functions to have a _p11_xxx prefix.Stef Walter2011-10-2416-230/+252
| | | | | | | * Work around issues with brain-dead linkers not respecting the libtool -export-symbol-regex argument https://bugs.freedesktop.org/show_bug.cgi?id=42020
* Initial port to win32Stef Walter2011-10-1710-131/+563
| | | | | | | | * Tests do not all yet pass, at least not on wine * Added abstraction of some non-portable functions in compat.h/c * Build with an argument like this for win32 support: ./autogen.sh --host=i586-mingw32msvc * This win32 port needs more work from interested parties
* Only call C_Initialize and C_Finalize once per moduleStef Walter2011-10-101-55/+62
| | | | | | | | * Do not concurretnly call C_Initialize or C_Finalize in a module * The PKCS#11 spec indicates that mone thread should call those functions. * It's reasonable for a module to expect to only be initialized or finalized in one thread. * In particular NSS does not lock its C_Initialize or C_Finalize.
* Don't allow recursive calling of C_Initialize on a given module.Stef Walter2011-10-101-1/+8
|
* Don't use PATH_MAX unless its definedPino Toscano2011-09-301-1/+6
| | | | | | * Fixes build on GNU/Hurd https://bugs.freedesktop.org/show_bug.cgi?id=41303
* Fix quoting of build variablesAndreas Metzler2011-09-261-2/+2
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=40985
* Expand the libdir path correctlyStef Walter2011-09-191-1/+8
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=40985
* Add #include <limits.h> for PATH_MAX to fix compilation on FreeBSD.Roman Bogorodskiy2011-09-161-1/+2
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=40923
* When a module has a relative path, load it from $libdir/pkcs11Kalev Lember2011-09-142-3/+59
| | | | | | | So far we have only supported full paths to the pkcs11 modules in config files. This change adds relative path support, so that for modules installed under the standard $libdir/pkcs11, the config file won't have to spell out the full path.
* Rename pkgconfig configuration directory variablesKalev Lember2011-09-144-8/+11
| | | | | | | | | | | | Renamed them to reduce ambiguity and to pave the way for exposing some additional parameters. p11_system_modules -> p11_system_config_modules p11_user_modules -> p11_user_config_modules configure --with-pkcs11-dir => configure --with-system-config
* Don't crash if p11_kit_registered_modules() called after failed initStef Walter2011-08-301-2/+3
|
* Remove useless typedefStef Walter2011-08-301-2/+0
|
* Add 'critical' setting for modulesStef Walter2011-08-303-1/+27
| | | | | | * When a module has critical set to 'yes', and that module fails to init then it aborts the entire init process. * Defaults to 'no'
* Fix bugs in the p11-kit proxy module.Stef Walter2011-08-243-15/+31
| | | | | | * Initialize the mappings properly * Lookup session handles correctly * Debug initialization and finalization