summaryrefslogtreecommitdiff
path: root/tools/tests
Commit message (Collapse)AuthorAgeFilesLines
* More compatible path munging and handling codeStef Walter2013-04-034-4/+8
| | | | | | | | | | Centralize the path handling code, so we can remove unixy assumptions and have a chance of running on Windows. The current goal is to run all the tests on Windows. Includes some code from LRN <lrn1986@gmail.com> https://bugs.freedesktop.org/show_bug.cgi?id=63062
* Separate library init from message codeStef Walter2013-04-036-12/+8
| | | | | | | | | | | Put library init/uninit code its into their own statically linked library so that they don't get linked into the p11-kit executable. Refactor the message code so that the library initialization can plug in its per thread message buffer. https://bugs.freedesktop.org/show_bug.cgi?id=63046
* Fix build on Win32Stef Walter2013-04-031-1/+1
| | | | | | Don't reference an undefined macro https://bugs.freedesktop.org/show_bug.cgi?id=63046
* Fix build with automake 1.13Stef Walter2013-04-031-1/+1
| | | | Also remove some generated files from the po/ directory.
* Fix memory leaks reported by 'make leakcheck'Stef Walter2013-03-204-3/+15
|
* Add a bit of infrastructure for running valgrindStef Walter2013-03-201-2/+2
| | | | | * make memcheck: Runs basic memory checking * make leakcheck: Also runs leak checking
* hash: Add the murmur2 hash and start using itStef Walter2013-03-204-14/+13
| | | | | | | | | | | Add implementation of the murmur2 hash function, and start using it for our dictionaries. Our implementation is incremental like our other hash functions. Also remove p11_oid_hash() which wasn't being used. In addition fix several tests whose success was based on the way that the dictionary hashed. This was a hidden testing bug.
* extract: Make extracted output directories read-onlyStef Walter2013-03-192-16/+17
| | | | | | This is not a security feature or anything like that, but a hint that the files are managed by the extract tool and should not be modified manually.
* Refine looking up of attributes in arraysStef Walter2013-03-181-3/+4
| | | | | | | | There was a class of bugs for looking up invalid or empty attributes in the internal PKCS#11 attribute arrays. * Refine what p11_attrs_find_valid() treats as valid * Rename p11_attrs_is_empty() to p11_attrs_terminator() for clarity
* extract: Combine trust policy when extractingStef Walter2013-03-151-7/+164
| | | | | | | | | | * 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
* extract: --comment option adds comments to PEM bundlesStef Walter2013-03-151-0/+45
| | | | | | | | * 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
* extract: Allow p11_save_write() to automatically calculate lengthStef Walter2013-03-153-0/+51
| | | | | | | | | 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
* extract: Fix regression in --purpose optionStef Walter2013-03-081-0/+50
| | | | | | | | 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
* Build with the libtasn1 CFLAGS properlyStef Walter2013-03-041-1/+3
| | | | | | Tweaks by: Roman Bogorodskiy <bogorodskiy@gmail.com> https://bugs.freedesktop.org/show_bug.cgi?id=61739
* Initialize modules correctly in testsStef Walter2013-03-035-0/+10
| | | | This fixes hangs when running tests on windows
* Windows doesn't support symlinks, chmod, or atomic renamesStef Walter2013-03-034-3/+42
| | | | | | | * 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
* Open files in binary mode on windowsStef Walter2013-03-031-6/+5
| | | | So that the Windows' C library doesn't munge line endings
* Abstract mmap() into a compat APIStef Walter2013-03-031-0/+2
| | | | | The Win32 for mmap() is very different from Unix, so abstract this into our own p11_mmap_xxx() functions.
* Use the CN, OU or O of certificates to generate a labelStef Walter2013-02-053-266/+9
| | | | | * This is in cases where the certificate information does not already have a friendly name or alias.
* Add support for exporting OpenSSL's TRUSTED CERTIFICATE formatStef Walter2013-02-0511-0/+1288
|
* Add support for extracting to pem-bundle and pem-directory formatsStef Walter2013-02-054-0/+403
|
* Implement basic extract supportStef Walter2013-02-054-0/+625
| | | | | | * The only formats supported are x509-file and x509-directory Allow tool to build without extract
* Support for sane writing to files extractedStef Walter2013-02-055-0/+957
* Implement atomic writes of files * Writing with checks that not overwriting anything unless desired * Writing and overwriting of directory contents in a robust way