| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This reverts commit 8eed1e60b0921d05872e2f43eee9088cef038d7e, which
broke "trust anchor --remove".
|
|
|
|
|
| |
out_fd is not always 1 when p11_kit_remote_serve_module() is used for
writing a custom server.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Given that the remote proxy service shall be only used by NetworkManager
and not generally useful, revert commit
a4fb2bb587fb1a0146cf97f039b671d3258488f9 for now.
Once the necessary command that runs the proxy module is implemented in
p11-kit, maybe NetworkManager itself could install those files.
|
|
|
|
|
| |
The p11-kit-remote executable is now located under $libexecdir, but we
should use the p11-kit command to launch the subcommand.
|
| |
|
|
|
|
| |
Include signal.h for kill(2) and SIGKILL on FreeBSD.
|
|
|
|
|
|
| |
In common/unix-peer.c, we are checking if HAVE_GETPEEREID is defined,
however, we never actually check if getpeereid() is available, so
fix that by checking this function using AC_CHECK_FUNCS().
|
| |
|
|
|
|
|
|
|
|
| |
If an unknown attribute is present in the query part of the PKCS#11 URI,
the parser treated it as unrecognized and subsequent matches failed.
Instead, keep track of such attributes and provide a set of API to deal
with them.
|
|
|
|
|
| |
The connection failure here is not fatal. Use p11_debug() instead of
p11_message().
|
|
|
|
|
| |
This is unset on most systems, but might as well follow the Base
Directory spec properly.
|
|
|
|
|
|
|
|
|
| |
Previously, all objects read from p11-kit persist files are marked as
modifiable when parsing, regardless of the explicit "modifiable: false"
setting in the file.
Reported by Kai Engert in:
https://bugs.freedesktop.org/show_bug.cgi?id=99797
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds a PKCS#11 module that connects to the p11-kit server
exposed on the filesystem. The filename of the socket is determined in
the following order:
- $P11_KIT_SERVER_ADDRESS, if the envvar is available
- $XDG_RUNTIME_DIR/p11-kit/pkcs11, if the envvar is available
- /run/$(id -u)/p11-kit/pkcs11, if /run/$(id -u) exists
- /var/run/$(id -u)/p11-kit/pkcs11, if /var/run/$(id -u) exists
- ~/.cache/p11-kit/pkcs11.
Note that the program loading this module may have called setuid() and
secure_getenv() which we use for fetching envvars could return NULL.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This adds a new tool to the p11-kit command called 'server', which
allows us to access a PKCS#11 module over a Unix domain socket.
Internally, it is implemented as a wrapper around 'p11-kit remote'.
Upon connection it executes 'p11-kit remote' in a forked process.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This adds p11_path_{encode,decode}(), following the escaping rule
described in:
https://dbus.freedesktop.org/doc/dbus-specification.html#addresses
Although they are merely a wrapper around p11_url_{decode,encode}(),
having dedicated functions hides the implementation details.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Synchronize the fixture module to the non-Unix one and enable
"/modules/test_filename".
|
| |
|
| |
|
|
|
|
|
|
|
| |
On Windows, use _spawnv() to create a subprocess and two unidirectional
pipe created with _pipe() to communicate with it. If we can assume
WinSock, it might be simpler to use a socketpair() replacement from:
https://github.com/ncm/selectable-socketpair.
|
|
|
|
| |
Append EXEEXT or SHLEXT to the filename if needed.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Don't append the backslash character twice to the output. It is
interpolated a few lines below, if it is really required.
|
| |
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=99600
|
|
|
|
|
| |
See also NSS bug https://bugzilla.mozilla.org/show_bug.cgi?id=1334976
and p11-kit bug https://bugs.freedesktop.org/show_bug.cgi?id=99453
|
|
|
|
|
| |
Follow-up fix for commit 4d228aa0, which forgot to clear
p11_virtual_mutex on library finalization.
|
|
|
|
|
|
|
|
|
| |
We used to provide p11_virtual_fixed_{,un}init() to only initialize a
mutex used in virtual.c. That required all the tests calling virtual
functions to call p11_virtual_fixed_{,un}init() in main().
For simplicity, move the mutex variable initialization into
p11_library_init().
|
|
|
|
|
|
|
|
| |
Since commit f4384a40, due to a missing ex->flags setting, the 'trust
extract' command didn't retrieve correlation between related objects and
that was causing assertion failure when writing PEM files.
https://bugs.freedesktop.org/show_bug.cgi?id=99795
|
| |
|
|
|
|
|
|
|
|
|
| |
While PKCS#11 URI can identify slots/tokens/modules, P11KitIter is only
capable of iterating over objects.
This patch adds new behaviors to P11KitIter to support iterations over
slots/tokens/modules, using the C coroutine trick as described in:
http://www.chiark.greenend.org.uk/~sgtatham/coroutines.html
|
|
|
|
|
|
|
|
|
|
|
|
| |
While 'pin-source' and 'pin-value' are defined as query atttribute, they
were defined as path attribute in earlier drafts, and some
implementations still stick to it.
For backward compatibility, accept those in path attributes when
parsing (but not when formatting).
Reported by Andreas Metzler in:
https://lists.freedesktop.org/archives/p11-glue/2017-January/000637.html
|
|
|
|
|
|
|
|
|
|
|
| |
This dumps all the PKCS#11 objects in the internal .p11-kit
persistence format.
This is part of the trust command and tooling, even though
at some point it could go in the p11-kit command. The reason
for this is that the code related to the internal .p11-kit
objects is in the trust code, and consumed solely by the
trust related modules.
|
|
|
|
|
| |
These should not be encoded by default for readability in
strings.
|
| |
|
|
|
|
|
| |
This is so that the code can be shared by the upcoming 'trust dump'
command where correlation between related objects is not desired.
|
|
|
|
|
| |
We load all known attributes for each object we're enumerating
over in the 'trust list' and 'trust extract' commands.
|
|
|
|
|
| |
Add proper inclusion guard to virtual-fixed.h and move the declarations
of the (un)initialization functions there.
|
|
|
|
|
| |
To prevent leaks of fixed closures, p11_kit_module_release() needs to be
called on the mock module itself.
|
| |
|