1. in ticket_lifetime() calculate the remaining lifetime
of the ticket rather than the requested lifetime.
2. in renew_func(), attempt to renew if the tickets are
renewable rather than only if --renewable is specified.
3. fix the call to renew_validate() in renew_func() to
specify renewable tickets if the original tickets are
renewable rather than only if --renewable is specified.
4. stop printing constant warnings to the terminal about
how tickets cannot be obtained if they expire, cannot
be renewed and we can't non-interactively obtain fresh
ones. We limit it to a single warning.
5. after the tickets expire, we backoff the requests to
obtain fresh tickets exponentially.
__sync_add_and_fetch is treated as a built in function by the compiler if the return value is not used (as in the autoconf test), but it is treated as a regular function when the return value is used
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
When building with OpenSSL at a custom prefix, some test cases will fail
to compile due to missing include path compiler options. This patch adds
them, as well as defining CPPFLAGS and LDADD for test_expr.
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
To stop the errors when building concurrently, we make a number of
changes:
1. stop including generated files in *_SOURCES,
2. make *-protos.h and *-private.h depend on the *_SOURCES,
3. make all objects depend on *-{protos,private}.h,
4. in a few places change dir/header.h to $(srcdir)/dir/header.h,
This appears to work for me with make -j16 on a 4-way box.
OpenSSL_add_all_algorithms() should only be run once per application
or it will cause data structures to expand. It's not a classic
memory leak as all of the memory will be free(3)d when EVP_cleanup()
is called but as we are a library we cannot call this. We provide
a short term fix here which is using heim_base_once_f() to ensure
that we only call it once.
But the long term fix should be to stop using OpenSSL_add_all_algorithms()
entirely because it both has side effects outside our library and
the caller may destroy our OpenSSL global variables by calling
EVP_cleanup() on his own. It is suboptimal to have potential
interactions between our library and other code in this way.