summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* Avoid using the non-thread-safe strerror() functionStef Walter2013-07-181-0/+266
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=985481
* Reorganize various componentsStef Walter2013-06-2533-6863/+0
| | | | | | | * p11-kit library and tool in the p11-kit/ subdirectory * trust module and new trust tool in trust/ subdirectory * No more tools/ subdirectory * Lots less in the common/ subdirectory
* Merge branch 'stable'Stef Walter2013-06-173-32/+8
|\
| * trust: Move the extract-trust external placeholder command into trust/Stef Walter2013-06-172-30/+0
| |
| * trust: Print out usage when extract-trust run incorrectlyStef Walter2013-06-171-1/+6
| | | | | | | | Also sorta covers --help and -h usage
| * tools: Fix passing args to external commandsStef Walter2013-06-171-0/+4
| | | | | | | | | | There were various bugs passing arguments, with duplicates being passed, as well as certain arguments being skipped.t
| * tools: Only use our private path when looking for external commandsStef Walter2013-06-171-7/+4
| | | | | | | | | | | | | | | | | | Instead of looking for external commands in the path, just look for them in our private directory. We want to be conservative early on, and limit what sorta things we have to maintain later. We can later remove this restriction if a real use case presents itself.
* | pem: Write PEM data directly to a bufferStef Walter2013-05-272-24/+37
| |
* | Fix up Makefile.am files for automake 1.13 warningsStef Walter2013-05-212-2/+2
| |
* | Our own unit testing frameworkStef Walter2013-05-218-619/+420
| | | | | | | | | | | | | | | | * Support the TAP protocol * Much cleaner without having to carry around state * First class support for setup/teardown * Port the common tests * Wait on porting other tests until we've merged outstanding code
* | p11-kit: Managed PKCS#11 module loadingStef Walter2013-05-216-34/+31
|/ | | | | | | | | Support a new managed style module loading for PKCS#11 modules. This allows us to better coordinate between multiple callers of the same PKCS#11 modules and provide hooks into their behavior. This meant redoing the public facing API. The old methods are now deprecated, marked and documented as such.
* Put the external tools in $libdir/p11-kitStef Walter2013-04-042-3/+3
| | | | | These are possibly architecture specific binaries, so they should be in $libdir/p11-kit and not in $datadir/p11-kit
* More compatible path munging and handling codeStef Walter2013-04-035-5/+10
| | | | | | | | | | 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-0316-23/+18
| | | | | | | | | | | 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-205-6/+15
|
* Add a bit of infrastructure for running valgrindStef Walter2013-03-202-3/+4
| | | | | * 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.
* hash: Rename file and functions for hashesStef Walter2013-03-202-12/+12
| | | | | We're going to be adding other hashes. Also build as part of a different common library.
* extract: Make extracted output directories read-onlyStef Walter2013-03-193-32/+61
| | | | | | 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-184-23/+15
| | | | | | | | 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-154-40/+297
| | | | | | | | | | * 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-156-3/+98
| | | | | | | | * 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-155-4/+62
| | | | | | | | | 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
* p11-kit: New priority option and change trust-policy optionStef Walter2013-03-151-41/+6
| | | | | | | | | | | | | | * 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
* tools: Display per-command help appropriatelyStef Walter2013-03-111-7/+12
| | | | | | | | * 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
* tools: Initialize local debug code correctlyStef Walter2013-03-111-0/+3
| | | | | | | Unless initialized according to the environment all debug output is printed. https://bugs.freedesktop.org/show_bug.cgi?id=62152
* tools: Parse global options appropriately, even if after commandStef Walter2013-03-081-13/+18
|
* extract: Use bool instead of int where appropriateStef Walter2013-03-081-15/+15
|
* tools: Add a bit of debugging to the PEM extract handlerStef Walter2013-03-081-0/+3
|
* extract: Fix regression in --purpose optionStef Walter2013-03-082-2/+61
| | | | | | | | 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
* tools: Remove extra debugging statement when running external commandsStef Walter2013-03-071-1/+0
|
* extract-trust: Turn into a placeholder script that does nothingStef Walter2013-03-071-21/+15
| | | | | If the 'p11-kit extract-trust' command is to be used by distributions, make them customize it appropriately.
* Build with the libtasn1 CFLAGS properlyStef Walter2013-03-042-2/+6
| | | | | | 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-037-6/+101
| | | | | | | * 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.
* tools: Update comments for cacerts jks formatStef Walter2013-03-031-4/+4
|
* Fix various clang analyzer warningsStef Walter2013-02-063-4/+11
| | | | | * Add annotations to our precondition functions so that they don't make the analyzer complain
* Add a placeholder external 'extract-trust' commandStef Walter2013-02-052-0/+31
|
* Implement support for java JKS keystore formatStef Walter2013-02-053-2/+335
| | | | | * All aliases must be lower case in order to work with the default keystore implementation.
* Use the CN, OU or O of certificates to generate a labelStef Walter2013-02-056-702/+24
| | | | | * 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-0516-0/+2361
|
* Add support for extracting to pem-bundle and pem-directory formatsStef Walter2013-02-057-0/+531
|
* Implement basic extract supportStef Walter2013-02-0511-1/+1696
| | | | | | * 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-058-0/+1501
| | | | | | * Implement atomic writes of files * Writing with checks that not overwriting anything unless desired * Writing and overwriting of directory contents in a robust way
* Make the p11-kit tool have distinct commandsStef Walter2013-02-054-42/+459
| | | | | | * Change the -l argument into the list-modules command. * Add proper functions for printing usage * Support for external commands in the path or /usr/share/p11-kit
* Use the stdbool.h C99 bool typeStef Walter2013-01-231-5/+5
| | | | | | 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..