summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* 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..
* Build common code into noinst librariesStef Walter2013-01-091-4/+8
| | | | | | * This is cleaner than building the same source files all over the place over and over. * Works better with code coverage.
* tools: Don't barf when p11-kit -hStef Walter2012-06-271-1/+1
|
* Provide compat getprogname() implementations on other OS'sStef Walter2012-05-012-1/+2
| | | | * And use them in our replacement err() and p11_kit_set_progname()
* Move the compat.[ch] headers into common directory/Stef Walter2012-04-304-294/+4
| | | | | * And the compat stuff in the p11-kit directory merged into util.c and util.h
* Initial port to win32Stef Walter2011-10-174-2/+298
| | | | | | | | * 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
* Print more information in 'p11-kit -l'Stef Walter2011-09-281-0/+92
|
* Fix building with NLS enabled.Roman Bogorodskiy2011-07-291-1/+2
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=39622
* List labels of all tokens in 'p11-kit -l'Stef Walter2011-07-061-2/+32
|
* Add p11_kit_space_strdup() function, and rename p11_kit_space_strlen()Stef Walter2011-06-071-1/+27
| | | | * Print out module info in p11-kit tool.
* Fix more memory errors and leaks in module code.Stef Walter2011-06-071-0/+3
|
* Remove unstable API markers.Stef Walter2011-06-071-2/+1
|