| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
|
|
|
|
|
|
|
| |
During shutdown, waiting for callbacks might never complete, as queued
callbacks might not get executed under certain conditions. Not the clean fix,
but works good enough for now.
Seen on Windows in vici tests.
|
|
|
|
|
|
|
|
|
| |
While we don't add FDs with an active callback to the watched FDSET, we still
can get notifications for callbacks active due the asynchronous processing
of the same.
To avoid queue multiple callbacks, we check for queued callbacks before
activating new ones.
|
|
|
|
|
| |
During shutdown, cancel queued jobs earlier to avoid having cleanup functions
accessing infrastructure not available anymore, for example watcher.
|
|
|
|
|
|
| |
Using the same mechanism as the METHOD macro, the CALLBACK macro defines
a hybrid function signature. It strictly uses a weak void* for the first
function parameter, in contrast to the dynamic METHOD object "this" type.
|
|
|
|
|
|
|
|
|
|
|
| |
This solves a problem with GNAT when compiling charon-tkm as __atomic*
built-ins are only provided in GCC 4.7 and newer.
Currently GNAT 4.6 and GCC 4.7.2 is shipped with Debian wheezy (stable),
as used in the testing environment. So while the configure script correctly
detected the __atomic* built-ins, and defined HAVE_GCC_ATOMIC_OPERATIONS,
this define turned out to be incorrect when charon-tkm was later built
with GNAT.
|
| |
|
| |
|
|
|
|
|
|
|
| |
tests.load and tests.plugindir to allow the specification of the plugins
to be loaded and the directory to load them from.
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
|
|
|
|
|
|
|
|
| |
By setting the environment variable TESTS_STRONGSWAN_CONF, the unit tests can
be asked to load a configuration file, thus enabling the tester to make use of
the usual configuration settings.
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
|
| |
|
| |
|
|
|
|
|
| |
By marking the string/blob arguments as transient, SQLite will copy and
free them automatically.
|
|
|
|
|
| |
System.loadLibrary() searches in system directories first (at least in
recent releases), that is, our own build wouldn't actually get used.
|
|
|
|
|
|
|
|
| |
FreeBSD 10 deprecated the SIOCSIFADDR etc. commands, so we use this
newer command to set the address and netmask. A destination address
is now also required.
Fixes #566.
|
|
|
|
|
|
|
|
| |
These are available since GCC 4.7 and will eventually replace the __sync
operations. They support the memory model defined by C++11. For instance,
by using __ATOMIC_RELAXED for some operations on the reference counters we
can avoid memory barriers, which are required by __sync operations (whose
memory model essentially is __ATOMIC_SEQ_CST).
|
|
|
|
|
|
|
|
|
|
| |
On many architectures it is safe to read the value directly (those
using cache coherency protocols, and with atomic loads for 32-bit
values) but it is not if that's not the case or if we ever decide to
make refcount_t 64-bit (load not atomic on x86).
So make sure the operation is actually atomic and that users do not
have to care about the size of refcount_t.
|
|
|
|
|
| |
As the comment indicates this was the intention in
d7be2906433a7dcfefc1fd732587865688dbfe1b all along.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
If lib->leak_detective is non-null some code parts (e.g. the plugin
loader) assume LD is actually used.
|
|
|
|
|
| |
This reduces the chances of arbitrary test failures if the memory area
already got overwritten.
|
|
|
|
|
|
| |
The test runner deinit function often cancels all threads from the pool. This
operation might hang on error conditions, hence we should include that hook in
the test timeout to fail properly.
|
|
|
|
|
|
| |
A worker raises SIGUSR1 to inform the main thread that the test fails. The main
thread then starts cancelling workers, but the offending thread should be
terminated immediately to prevent it from test continuation.
|
|
|
|
|
|
|
| |
The addresses can actually change as plugins are loaded/unloaded for
each test case.
Fixes #551.
|
|
|
|
|
| |
In some situations we expect strongswan.conf to not exist, for instance,
when running the unit tests before installation.
|
|
|
|
| |
Also adds several missing ones.
|
|
|
|
|
|
|
|
|
| |
The salt, or often called implicit nonce, varies between AEAD algorithms and
their use in protocols. For IKE and ESP, GCM uses 4 bytes, while CCM uses
3 bytes. With TLS, however, AEAD mode uses 4 bytes for both GCM and CCM.
Our GCM backends currently support 4 bytes and CCM 3 bytes only. This is fine
until we go for CCM mode support in TLS, which requires 4 byte nonces.
|
|
|
|
| |
Fixes evaluation of ikev2/ocsp-untrusted-cert.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To avoid considering each cached OCSP response and evaluating its trustchain,
we limit the certificates considered for OCSP signing to:
- The issuing CA of the checked certificate
- A directly delegated signer by the same CA, having the OCSP signer constraint
- Any locally installed (trusted) certificate having the OCSP signer constraint
The first two options cover the requirements from RFC 6960 2.6. For
compatibility with non-conforming CAs, we allow the third option as exception,
but require the installation of such certificates locally.
|
|
|
|
|
|
|
|
|
|
| |
This behavior was introduced with 6840a6fb to avoid key/signature strength
checking for the revocation trustchain as we do it for end entity certificates.
Unfortunately this breaks CA constraint checking under certain conditions, as
we merge additional intermediate/CA certificates to the auth config.
As key/signature strength checking of the revocation trustchain is a rather
exotic requirement we drop support for that to properly enforce CA constraints.
|
|
|
|
|
| |
This allows using const strings etc. for lookups without cast. And keys
are not modifiable anyway.
|
|
|
|
|
| |
Simply using the pointer is not optimal for our hash table
implementation, which simply masks the key to determine the bucket.
|
|
|
|
|
| |
More specific decoders might still be needed, but the x509
plugin should not care which ones.
|
| |
|
| |
|
|
|
|
|
|
| |
This validator checks for any attribute certificate it can find for validated
end entity certificates and tries to extract group membership information
used for connection authorization rules.
|
|
|
|
|
| |
This allows us to find attribute certificates for a subject certificate in
credential sets.
|
|
|
|
|
|
|
| |
While there is no widely used PEM header for attribute certificates, at least
IAIK-JCE uses BEGIN ATTRIBUTE CERTIFICATE:
http://javadoc.iaik.tugraz.at/iaik_jce/current/iaik/utils/Util.html#toPemString(iaik.x509.attr.AttributeCertificate)
|
| |
|
|
|
|
|
| |
The ietf_attributes_t class is used for attribute certificates only these days,
and integrating them to x509_ac_t simplifies things significantly.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
In case of sizeof(void*) == 8 and sizeof(int) == 4 on big-endian hosts
the tests failed as the actual integer value got cut off.
|