trust: Produce a proper message for an invalid stapled extension

Previously we would output a line like this:

p11-kit: 'node != NULL' not true at lookup_extension
Release version 0.21.2
trust: Show public-key-info in 'trust list --details'

Since the public-key-info is an important part of the way we
represent trust, show it in 'trust list' if --details is present.
Fix build without debug

When building without debug build fails with:

  CCLD     p11-kit/p11-kit
./.libs/libp11-kit.so: undefined reference to `P11_RPC_CHECK_CALLS'
cc: error: linker command failed with exit code 1 (use -v to see
invocation)
gmake[2]: *** [p11-kit/p11-kit] Error 1

This happens because P11_RPC_CHECK_CALLS is not defined when
debugging is enabled, so provide a noop macro for that case.
p11-kit: Make proxy module respect critical = no

The p11-kit-proxy.so module would not respect the critical = no setting
in module configuration, and fail if any module failed to initialize.

https://bugs.freedesktop.org/show_bug.cgi?id=83651
p11-kit: Compilation fixes for previous commit

Pushed the wrong version
configure: Check for pthread_create() in pthread library

Check for pthread_create() in pthread library instaed of
pthread_mutexattr_init(). This fixes a linking error on FreeBSD.

https://bugs.freedesktop.org/show_bug.cgi?id=75674
trust: Fix token test when building with MinGW

Signed-off-by: Michael Cronenworth <mike@cchtml.com>
p11-kit: Fix tests when building with MinGW

Signed-off-by: Michael Cronenworth <mike@cchtml.com>
common: Add support for multiple field names (ie: nicks) per constant

This allows us to have old/new names for a given constant.

https://bugs.freedesktop.org/show_bug.cgi?id=83495
common: Change the CKA_X_PUBLIC_KEY_INFO constant to CKA_PUBLIC_KEY_INFO

CKA_PUBLIC_KEY_INFO is defined in the PKCS#11 2.40 draft, so use that
rather than defining our own.

 * Fixed up by Nikos Mavrogiannopoulos <nmav@redhat.com>

https://bugs.freedesktop.org/show_bug.cgi?id=83495
common: New public pkcs11x.h header containing extensions

Move our internal stuff to pkcs11i.h, and install the pkcs11x.h
header containing extensions.

https://bugs.freedesktop.org/show_bug.cgi?id=83495
trust: Use term 'attached extensions' instead of 'stapled'

The term 'stapled extensions' is confusing because it overloads
terminology used with OSCP stapling.

Suggested by Daniel Kahn Gillmor.
Release version 2.21.3
common: Move unistd include to define getopt and friends

Needed to fix MinGW builds.

Signed-off-by: Michael Cronenworth <mike@cchtml.com>
p11-kit: Remove the 'isolated' option for now

This option was not completed in time, and as implemented suffers
from limitations that the module is not really completely isolated
as it still runs under the same user id as the calling process.
common: In tests preserve parent environment for children
common: Use secure_getenv() implementation when setuid

In anything security sensitive, use secure_getenv() implementation
for retrieving environment variables.
p11-kit: P11_KIT_PRIVATEDIR env var overrides private binary dir

External binaries are searched for in $(libdir)/p11-kit. The
P11_KIT_PRIVATEDIR can be used to override that, for example during
'make check'
remote: Run separate executable binary for 'p11-kit remote'

This allows security frameworks like SELinux or AppArmor to target
it specifically.