| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
|
|
|
|
| |
As we are now using poll(2) instead of select(2), we need the work-around from
76dc329e for poll() as well.
|
| |
|
|
|
|
|
|
|
| |
Instead of allocating MTU-sized buffers for each packet, read to a stack buffer
and copy to an allocation of the actual packet size. While it requires an
additional copy on non-Apple platforms, this should make allocation more
efficient for small packets.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
While RFC 5280 is not very specific about the matching rules of subjectAltNames,
it has some examples how to match email and FQDN constraints. We try to follow
these examples, and restrict DNS names to subdomain matching and email to
full email, host or domain matching.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of rejecting the certificate completely if a certificate has a policy
OID that is actually not allowed by the issuer CA, we accept it. However, the
certificate policy itself is still considered invalid, and is not returned
in the auth config resulting from trust chain operations.
A user must make sure to rely on the returned auth config certificate policies
instead of the policies contained in the certificate; even if the certificate
is valid, the policy OID itself in the certificate are not to be trusted
anymore.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
We explicitly avoided TryAcquireSRWLockExclusive() because of crashes. This
issue was caused by a MinGW-w64 bug (mingw-w64 fix 46f77afc). Using a newer
toolchain works fine.
While try_write_lock() obviously can fail, not supporting it is not really an
option, as some algorithms depend on occasionally successful calls. Certificate
caching in the certificate manager and the cred_set cache rely on successful
try_write_lock()ing.
|
| |
|
|
|
|
|
|
|
|
| |
Previously we got no reference to the cached issuer certificate
before releasing the lock of the cache line, this allowed other
threads, or even the same thread if it replaces a cache line, to
destroy that issuer certificate in cache() (or flush()) before
get_ref() for the issuer certificate is finally called.
|
|
|
|
|
|
|
| |
We actually need to do a byte-swap, which ntohs() only does on
little-endian systems.
Fixes #747.
|
|
|
|
|
|
|
| |
ntohs() might be defined as noop (#define ntohs(x) (x)) so we have
to manually shorten the negated value (gets promoted to an int).
Fixes #747.
|
| |
|
|
|
|
|
|
| |
This fixes some vici test cases on OS X, where the test thread tries to cancel
the watcher thread during cleanup, but fails as select() does not honor the
pre-issued cancellation request.
|
|
|
|
| |
On OS X, the /bin/sh built-in echo does not support -n.
|
|
|
|
|
| |
But use the (builtin) shell commands instead, as on OS X true/false are under
/usr/bin.
|
|
|
|
| |
Fixes OS X build.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
env var
|
|
|
|
|
|
|
|
|
| |
To use SSL in curl, we need to initialize the SSL library in a thread-safe
manner and provide the appropriate callbacks. As we already do that in our
crypto plugins using these libraries, we depend on these features.
This implies that we need the same plugin enabled (openssl, gcrypt) as the
curl backend is configured to use to fetch from HTTPS URIs.
|
| |
|
|
|
|
|
| |
This function is called by libcurl initialization with SSL, and uses
a static allocation of compression algorithms not freed.
|
|
|
|
| |
If initialization fails, we fall back to the old behavior.
|
|
|
|
|
| |
This allows a user to check if the watcher is actually running, and potentially
perform read operations directly instead of relying on watcher.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Since 4b670a20 we require an explicit strongswan.conf to re-load configurations.
However, the define was missing in the build, breaking SIGHUP based config
reloading.
Fixes #651.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
authentication rounds
Due to the issue described in c641974, purge() inadvertently destroyed
CA certificates that should have been kept (while the pointer to these
objects remained in the array). This lead to incorrect reference counts
and after a few reauthentications with multiple authentication rounds,
which cause calls to purge(TRUE), to crashes.
|
|
|
|
| |
For ARRAY_TAIL we most often want to call remove_tail() not remove_head().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because enumerate() for value based arrays returns a pointer directly to
the internal array elements and because array_remove_at() or rather the
called array_remove() may move elements over the element at the currently
enumerated position, the pointer passed to enumerate() will point to a
different array element after the array_remove_at() call. The caller
will thus operate on the wrong element if that pointer is accessed again
before calling enumerate().
For performance reasons we currently don't change the implementation to copy
each array element during enumeration to a private member of the enumerator and
return a pointer to that. Similarly, due to the danger of subtle bugs we don't
remember the pointer passed to enumerate() to later redirect it to a copy
created during the array_remove_at() call.
|
| |
|
| |
|