summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Move debug and library code into the common/ subdirectoryStef Walter2013-01-0940-5684/+0
| | | | | | | | | | | 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.
* Guarantee that the key is freed when replacedStef Walter2013-01-071-33/+91
| | | | | | | | | * 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
* Always encode the "id" attribute in URIsDan Winship2012-07-281-1/+1
| | | | | | Per recommendation of the spec. https://bugs.freedesktop.org/show_bug.cgi?id=52606
* Initialize mutexes correctly in mock moduleStef Walter2012-07-262-1/+6
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=44740
* Fix warning on windowsStef Walter2012-07-261-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=44740
* Don't rely on loading order for duplicate modulesStef Walter2012-07-265-6/+15
| | | | | | | | * We had relied on module 'two' loading before 'two-duplicate' in the conf tests. However this isn't always the case, and the name of the module can end up as 'two-duplicate' https://bugzilla.gnome.org/show_bug.cgi?id=44740
* Use correct shared library extension on windowsStef Walter2012-07-266-1/+19
| | | | | | | | * 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-248-14/+25
| | | | | | | | | | | | | * 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
* 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 define duplicate symbolsStef Walter2012-07-171-1/+1
| | | | * clang was giving a build failure here.
* Don't allow reading of pin files larger than 4096 bytesStef Walter2012-06-292-0/+79
| | | | * p11_kit_pin_file_callback() only returns pins up to 4096 bytes now
* Win32 build fixesStef Walter2012-06-291-0/+1
| | | | | | * Remove unused functions * Use getprogname() instead of calc_progname() which no longer exists * Fix up exporting of functions in the mock module
* Preconditions to check for input probs and out of memoryStef Walter2012-05-133-4/+79
| | | | | | * 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-131-0/+1
| | | | | * Add macros GNUC_PRINTF and GNUC_NULL_TERMINATED to check correct printf and NULL terminated style varargs
* Move the compat.[ch] headers into common directory/Stef Walter2012-04-302-2/+2
| | | | | * And the compat stuff in the p11-kit directory merged into util.c and util.h
* Add tests for enable-in and disable-inStef Walter2012-04-026-22/+165
|
* Build some test modules for testing main p11-kit functionalityStef Walter2012-04-028-15/+203
| | | | * And put together a test for duplicate modules
* Add enable-in and disable-in options to module configStef Walter2012-04-012-0/+112
| | | | | | | | * 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-2/+0
| | | | | | | * 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
* Compile CuTest.c separately.Andreas Metzler2011-12-237-13/+9
| | | | | Use regular compile and link instead of having #include "CuTest.c" in every test. Works around gcc optimization issue.
* Reorganize tests, work around optimization bugStef Walter2011-12-201-23/+22
| | | | | | | | * Encountered a gcc optimization bug in gcc 4.6.1 which seems to be reordering related function calls eroneously. This bug seems to be fixed in 4.6.2. * Reorganize test code to get around this bug building on mingw, and ubuntu 11.10, both of which use gcc 4.6.1
* Run tests correctly in automakeAndreas Metzler2011-12-091-4/+1
| | | | * This allows failing tests to stop the build
* Fix build with clangStef Walter2011-10-272-15/+0
| | | | * Just removed some unused functions that used GNUC extensions
* Rename non-static functions to have a _p11_xxx prefix.Stef Walter2011-10-246-229/+232
| | | | | | | * 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-176-38/+60
| | | | | | | | * 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-102-3/+106
| | | | | | | | * 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.
* Combine initialization testsStef Walter2011-10-103-110/+36
|
* Don't allow recursive calling of C_Initialize on a given module.Stef Walter2011-10-102-2/+106
|
* Rename p11-kit testStef Walter2011-10-102-3/+3
|
* Add test tool to print out error messagesStef Walter2011-09-262-1/+139
| | | | * Allows checking of translations
* Ignore spaces in PKCS#11 URIsStef Walter2011-08-191-0/+24
| | | | | | * These should be able to occur anywhere and should be ignored according to RFC 3986. This is documented in the PKCS#11 URI specification.
* Fix endless loop if module forks during initialization.Stef Walter2011-08-144-20/+1346
| | | | | | | * If a module forks during its C_Initialize, previously our fork handler would try to initialize it again, ad nauseum. Reported by Nikos on the mailing list.
* Update PKCS#11 URI code for new draft of specStef Walter2011-08-052-49/+49
| | | | | | | | | * pinfile attribute was renamed to pin-source * objecttype attribute was renamed to object-type * secretkey value was renamed to secret-key We continue to support parsing the old attribute names and values but generate URIs with the new ones.
* Fix building with NLS enabled.Roman Bogorodskiy2011-07-291-6/+11
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=39622
* Reimplement and remove apache licensed bits of code.Stef Walter2011-07-272-111/+111
| | | | | | | | | | * Reimplement the various bits of the hash table that were still based on the apache apr code. Use different algorithms for hashing, lookup and other stuff. * Use this as an opportunity to cleanup that code and make it more legible. https://bugzilla.redhat.com/show_bug.cgi?id=725905
* Add documentation for PIN callbacks.Stef Walter2011-07-061-9/+9
|
* Add P11KitPin structure, which encapsulates a returned pin.Stef Walter2011-07-062-51/+111
| | | | | * Lets us use variable size buffers. * Helps minimize copying.
* Rename p11_kit_pin_read_pinfile to p11_kit_pin_retrieveStef Walter2011-07-061-19/+19
| | | | * Fix up duplicate register logic as well.
* Implement support for registering and calling pinfile callbacksStef Walter2011-07-063-1/+507
| | | | | | * These are callbacks that hanlde the pinfile part of a PKCS#11 URI. * One library can register a callback that another can then call in a thread-safe and simple fashion.
* Complete testing of global config files and directories.Stef Walter2011-06-0912-0/+309
|
* Store last failure message per thread.Stef Walter2011-06-092-8/+8
| | | | * Add p11_kit_message() function to get last message.
* Refactor configurationStef Walter2011-06-081-9/+31
| | | | | * Move configuration loading into conf.c * Have user modules with same name merge/override modules in system.
* Free string output of conf-testStef Walter2011-06-071-0/+1
|
* Fix URI parsing memory leaks.Stef Walter2011-06-071-0/+1
|
* Fix some hash leaks and bugs.Stef Walter2011-06-071-2/+37
|
* Fix compiler warnings.Stef Walter2011-06-071-0/+1
|
* Remove unstable API markers.Stef Walter2011-06-071-2/+1
|
* Cleanup URI typesStef Walter2011-05-301-42/+42
| | | | | * Support with/without library version. * Make names of types clearer.
* Fix problems with 'make distcheck'Stef Walter2011-05-271-2/+6
|
* Change around installation of headers, pkg-config, and file namesStef Walter2011-05-271-1/+1
| | | | | | | | * Install headers to ${prefix}/include/p11-kit-1/p11-kit/ * This solves problems with other projects that have their own pkcs11.h files. * Change the pkg-config file name to p11-kit-1.pc * Change the source file names.