These new API functions allow the user to retrieve the
type and the length of the private key.
An helper function to convert the type to a human readable
string is also provided.
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
Users may want to print already parsed key material.
Extend the SSLAPI to accommodate methods for extracting
CA, CRL, CERT, KEY and DH data.
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
Allow source files that require JSON library functionality
to include a single file (openvpn/common/jsonlib.hpp) which
will then draw in the appropriate JSON library header based
on configuration #defines.
Code can #ifdef on HAVE_JSON to test whether or not JSON
functionality is available (previously, HAVE_JSONCPP
was used).
Currently supports JsonCpp and an OpenVPN-internal JSON
implementation.
This model assumes that alternative JSON implementations
are API-compatible with JsonCpp.
Signed-off-by: James Yonan <james@openvpn.net>
logdatetime.hpp is a drop-in replacement for logsimple.hpp, which
implements the OPENVPN_LOG() macro and variants using trivial
output to std::cout. This version will prepend the date/time
to each log line.
Signed-off-by: James Yonan <james@openvpn.net>
CoarseTime objects that track an AsioTimer must always be
reset when the AsioTimer is cancelled. Not doing so can
cause a bug if the AsioTimer is reused after cancellation.
Signed-off-by: James Yonan <james@openvpn.net>
Change the OPENVPN_EXIT_IN compile-time flag to be
a run-time option instead, controllable via the
EXIT_IN env var. Set EXIT_IN to the number of
seconds to run before exiting.
Signed-off-by: James Yonan <james@openvpn.net>
and use it in ProtoContext::promote_secondary_to_primary()
since it more accurately reflects the underlying
implementation.
Note that this only affects DCO (data channel offload)
implementations.
Signed-off-by: James Yonan <james@openvpn.net>
Travis-ci is used only for static analysis, therefore
when building the testing protocol we should avoid
non-deterministic behaviour which could lead to failures.
Tell the testing binary to work with lossless links.
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
The md setup function has been substituted with a new one,
but the exception message was not updated.
Update it now to report the correct function name.
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
the compiler is not smart enough to understand that under
the expected conditions http(s)_port will always be initialized.
Initialize variables upon declaration to avoid warning.
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
By default tls-crypt is now enabled instead of tls-auth.
It can be easily changed by editing the define at the top
of test/ssl/proto.hpp
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
Not really important, but worth fixing to avoid polluting
any memchecker output with unreleased (leaked) resources.
Release process resources before exiting the main function.
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
Add support for AES-256-CTR (used by tls-crypt) in the crypto
layer and make sure that each SSL library plugin is aware of it.
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>