summaryrefslogtreecommitdiffstats
path: root/test
AgeCommit message (Collapse)Author
2016-03-30Since OpenSSL::Test redirects stderr to /dev/null, don't do so in 80-test_ca.tRichard Levitte
Since OpenSSL::Test only redirects stderr to /dev/null when being run through non-verbose test harness, this change allows the stderr output to be displayed when verbosity is requested. Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-03-30Add the option 'interpreter_args' to perlapps() and perltest()Richard Levitte
The intention with that option is to allow extra flags to the perl interpreter itself. Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-03-29Require intermediate CAs to have basicConstraints CA:true.Viktor Dukhovni
Previously, it was sufficient to have certSign in keyUsage when the basicConstraints extension was missing. That is still accepted in a trust anchor, but is no longer accepted in an intermediate CA. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-27Add session reuse tests.Kurt Roeckx
Reviewed-by: Viktor Dukhovni <viktor@openssl.org> MR: #2452
2016-03-27Math::BigInt does floored divs, BN_div does truncated div, compensateRichard Levitte
According to documentation, perl's Math::BigInt does floored division, i.e. the bdiv function does 1 / -4 = -1. OpenSSL's BN_div, as well as bc, do truncated division, i.e. 1 / -4 = 0. We need to compensate for that difference in test/recipes/bc.pl to make sure to verify the bntest results under its own conditions, by dividing the absolute values of the given numbers and fixup the result's negativity afterwards. Closes RT#4485 Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-03-21Fix no-sockMatt Caswell
Misc fixes for no-sock Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-21Fix no-scryptMatt Caswell
Fix the evp tests when no-scrypt is used. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-21Skip the CMS tests if CMS is disabledMatt Caswell
This fixes the no-cms compile time option. Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-03-21Fix no-dsaMatt Caswell
Misc fixes for no-dsa. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-21Remove the remainder of util/mk1mf.pl and companion scriptsRichard Levitte
This removes all scripts that deal with MINFO as well, since that's only used by mk1mf. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-20Fix ALPN - more fixesTodd Short
* Clear proposed, along with selected, before looking at ClientHello * Add test case for above * Clear NPN seen after selecting ALPN on server * Minor documentation updates Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-19Don't perform tsa tests if configured "no-ts"Richard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-18Fix no-desMatt Caswell
Numerous fixes for no-des. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-18Fix no-cmacMatt Caswell
There were a couple of CMAC references without OPENSSL_NO_CMAC guards. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-18Add a test to see that signals are caught as failuresRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-03-18Make OpenSSL::Test::run() sensitive to signalsRichard Levitte
$? in perl gets the status value from wait(2), which is a word with the exit code in the upper half and the number of a raised signal in the lower half. OpenSSL::Test::run() ignored the signal half up until now. With this change, we recalculate an exit code the same way the Unix shells do, using this formula: ($? & 0x7f) ? ($? & 0x7f)|0x80 : ($? >> 8); Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-03-18Fix no-rc2 in the CMS testMatt Caswell
The CMS test uses some RC2 keys which should be skipped if the RC2 is disabled. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-17Remove Netware and OS/2Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-17Don't define OPENSSL_ENGINES in test recipes, do it in Makefiles insteadRichard Levitte
In most builds, we can assume that engines live in the build tree subdirectory "engines". This was hard coded into the tests that use the engine ossltest. However, that hard coding is tedious, it would need to be done in every test recipe, and it's an incorrect assumption in some cases. This change has us play it safe and let the build files tell the testing framework where the engines are. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-03-16Sort cipher-list at runtime.Rich Salz
Reduces #ifdef complexity. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-03-16Some platforms provide getcontext() but it does not workMatt Caswell
Some platforms claim to be POSIX but their getcontext() implementation does not work. Therefore we update the ASYNC_is_capable() function to test for this. RT#4366 Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-15Fix a TLSProxy race conditionMatt Caswell
TLSProxy starts s_server and specifies the number of client connects it should expect. After that s_server is supposed to close down automatically. However, if another test is then run then TLSProxy will start a new instance of s_server. If the previous instance hasn't closed down yet then the new instance can fail to bind to the socket. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-15General verify options to openssl tsfbroda
This commit adds the general verify options of ocsp, verify, cms, etc. to the openssl timestamping app as suggested by Stephen N. Henson in [openssl.org #4287]. The conflicting "-policy" option of "openssl ts" has been renamed to "-tspolicy". Documentation and tests have been updated. CAVE: This will break code, which currently uses the "-policy" option. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-14Disable afalg when engine is disabled.Emilia Kasper
Also make it possible to disable afalg separately. we still need to update config again Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-11Fix build break; add function declarationRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-12When creating directory specs, use srctop_dir rather than srctop_file.Richard Levitte
While insignificant on Unix like systems, this is significant on systems like VMS. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-03-12Because bn_expand2 is declared non-static, it must not be staticRichard Levitte
That doesn't change even to make a dummy to hide its unavailability. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-11Review commentsKurt Roeckx
Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-11Add blake2 support.Bill Cox
Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-11Surround ctx_set_ctlog_list_file() with #ifndef OPENSSL_NO_CTRob Percival
Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-11Suppress CT warnings in test_sslMatt Caswell
Running test_ssl with HARNESS_VERBOSE results in lots of spurious warnings about an inability to load the CT config file. This fixes it. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-11Avoid getting unresolved referense to bn_expand2 in test/bntest.cRichard Levitte
Issue identified on Solaris by Erik Forsberg <erik@efca.com> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-10check reviewer --reviewer=emiliaRob Percival
Remove 'log' field from SCT and related accessors In order to still have access to an SCT's CTLOG when calling SCT_print, SSL_CTX_get0_ctlog_store has been added. Improved documentation for some CT functions in openssl/ssl.h. Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-10No need to call EVP_CIPHER_CTX_init after EVP_CIPHER_CTX_newMatt Caswell
The afalgtest was unnecessarily initing an EVP_CIPHER_CTX. It is not needed and is deprecated. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-09Use version flexible method instead of fixed versionKurt Roeckx
Reviewed-by: Viktor Dukhovni <viktor@openssl.org> MR: #1824
2016-03-09Use minimum and maximum protocol version instead of version fixed methodsKurt Roeckx
Reviewed-by: Viktor Dukhovni <viktor@openssl.org> MR: #1824
2016-03-09Fix usage of OPENSSL_NO_*_METHODKurt Roeckx
Reviewed-by: Viktor Dukhovni <viktor@openssl.org> MR: #1824
2016-03-09Make ct_dir and certs_dir static in test/ct_test.cRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-09Fix ct_test to not assume it's in the source directoryRichard Levitte
ct_test assumed it's run in the source directory and failed when built elsewhere. It still defaults to that, but can be told another story with the environment variables CT_DIR and CERTS_DIR. Test recipe updated to match. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-09Make SCT literals into const variables in ct_test.cRob Percival
Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-09Removes SCT_LIST_set_source and SCT_LIST_set0_logsRob Percival
Both of these functions can easily be implemented by callers instead. Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-09Remove unnecessary call to SCT_set1_extensions(sct, "", 0) in ct_test.cRob Percival
Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-09Use SCT_VERSION_V1 in place of literal 0 in ct_test.cRob Percival
Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-09Extensive application of __owur to CT functions that return a booleanRob Percival
Also improves some documentation of those functions. Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-09CT test can't run without EC, so skip it on that algo as wellRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-09Fix ct_test to not assume it's in the source directoryRichard Levitte
ct_test assumed it's run in the source directory and failed when built elsewhere. It still defaults to that, but can be told another story with the environment variables CT_DIR and CERTS_DIR. Test recipe updated to match. Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-09Remove the old threading APIMatt Caswell
All OpenSSL code has now been transferred to use the new threading API, so the old one is no longer used and can be removed. We provide some compat macros for removed functions which are all no-ops. There is now no longer a need to set locking callbacks!! Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-09Don't run the TLSProxy based tests in native WindowsRichard Levitte
There are issues binding listening ports. This may be analyzed more thoroughly later on. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-09Ensure CRYPTO_mem_leaks is the last thing we doMatt Caswell
CRYPTO_mem_leaks de-inits the library, so we must not do anything interesting after we've used it! Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-09Fix memory leak in ssltestMatt Caswell
The new Rand usage of Thread API exposed a bug in ssltest. ssltest "cheats" and uses internal headers to directly call functions that normally you wouldn't be able to do. This means that auto-init doesn't happen, and therefore auto-deinit doesn't happen either, meaning that the new rand locks don't get cleaned up properly. Reviewed-by: Rich Salz <rsalz@openssl.org>