summaryrefslogtreecommitdiffstats
path: root/test
AgeCommit message (Collapse)Author
2017-04-25Add SCTP testing to 16-dtls-certstatus.confMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3286)
2017-04-25Add support to test_ssl_new for testing with DTLS over SCTPMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3286)
2017-04-24Avoid using BIO streams in bioprinttest.cRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3243)
2017-04-24Adapt all test programsRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3243)
2017-04-24VMS: Make sure to include MAIN from static libraries if neededRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3243)
2017-04-24Refactor the test framework testutilRichard Levitte
It's now built as a static library, and greatly simplified for test programs, which no longer need to include test_main_custom.h or test_main.h and link with the corresponding object files. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3243)
2017-04-24Converted the bio_enc tests to use new test framework.Jon Spillett
This includes reworked reworked tests to do both encrypt and decrypt, and a few more ciphers added. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3197)
2017-04-20Small primes are primes too.Adam Langley
Previously, BN_is_prime_fasttest_ex, when doing trial-division, would check whether the candidate is a multiple of a number of small primes and, if so, reject it. However, three is a multiple of three yet is still a prime number. This change accepts small primes as prime when doing trial-division. Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3264)
2017-04-20Ignore dups in X509_STORE_add_*Rich Salz
X509_STORE_add_cert and X509_STORE_add_crl are changed to return success if the object to be added was already found in the store, rather than returning an error. Raise errors if empty or malformed files are read when loading certificates and CRLs. Remove NULL checks and allow a segv to occur. Add error handing for all calls to X509_STORE_add_c{ert|tl} Refactor these two routines into one. Bring the unit test for duplicate certificates up to date using the test framework. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2830)
2017-04-20Convert hmactest to new test frameworkRich Salz
Updated after code review, and fix indenting Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3175)
2017-04-20fix dh_test.Rich Salz
The issues were introduced by commit 93d0298. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3263)
2017-04-20Fix test/recipes/95-test_external_krb5.tRichard Levitte
"skip() needs to know $how_many tests are in the block" Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3261)
2017-04-20VMS: remove name mangling guards around inclusion of internalsRichard Levitte
Note that these guards are still needed around local header files that declare linkable symbols. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3259)
2017-04-19Fix minor compiler issues.Todd Short
Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3220)
2017-04-18Convert dhtest, dsatest, cipherbytes_testRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3209)
2017-04-18VMS: Fix internals test programsRichard Levitte
The internals test programs access header files that aren't guarded by the public __DECC_INCLUDE_PROLOGUE.H and __DECC_INCLUDE_EPILOGUE.H files, and therefore have no idea what the naming convention is. Therefore, we need to specify that explicitely in the internals test programs, since they aren't built with the same naming convention as the library they belong with. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3247)
2017-04-18Convert more testsRich Salz
ct_test,evp_extra_test,wpackettest,packettest Add strncmp TEST wrappers And make some style/consistency fixes to ct_test Silence travis; gcc bug? Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3234)
2017-04-18Update more testsRich Salz
modes_internal_test, sslcorrupttest, v3nametest Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3238)
2017-04-18Convert more tests to frameworkRich Salz
randtest, cipher_overhead_test, bioprintest, constant_time_test Move test_bioprint to 04 group Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3228)
2017-04-18Convert more testsRich Salz
recordlentest, srptest, ecdsatest, enginetest, pbelutest Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3237)
2017-04-18Fix formatting of PYCA external test instructionsRobbie Harwood
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2022)
2017-04-18Update external test README for running krb5Robbie Harwood
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2022)
2017-04-18Add external krb5 test supportRobbie Harwood
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2022)
2017-04-16[squash]Build works with/out NO_ENGINE and NO_AFALGRich Salz
Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3229)
2017-04-16Convert afalgtestRich Salz
Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3229)
2017-04-16Catch EC_R_UNKNOWN_GROUP in check_unsupported()Rich Salz
If EC support is enabled we should catch also EC_R_UNKNOWN_GROUP as an hint to an unsupported algorithm/curve (e.g. if binary EC support is disabled). Before this commit the issue arise for example if binary EC keys are added in evptests.txt, and the test is run when EC is enabled but EC2m is disabled. E.g. adding these lines to evptests.txt would reproduce the issue: ~~~ PrivateKey=KAS-ECC-CDH_K-163_C0 -----BEGIN PRIVATE KEY----- MGMCAQAwEAYHKoZIzj0CAQYFK4EEAAEETDBKAgEBBBUAZlO2B3OY+tx79eYBWBcB SMPcRSehLgMsAAQHH4sod9YCfZwa3kJE8t6hJpLvI9UFwV7ndiIccrhLNHzjg/OA Z7icPpo= -----END PRIVATE KEY----- PublicKey=KAS-ECC-CDH_K-163_C0-PUBLIC -----BEGIN PUBLIC KEY----- MEAwEAYHKoZIzj0CAQYFK4EEAAEDLAAEBx+LKHfWAn2cGt5CRPLeoSaS7yPVBcFe 53YiHHK4SzR844PzgGe4nD6a -----END PUBLIC KEY----- PublicKey=KAS-ECC-CDH_K-163_C0-Peer-PUBLIC -----BEGIN PUBLIC KEY----- MEAwEAYHKoZIzj0CAQYFK4EEAAEDLAAEBXQjbxQoxDITCUZ4Ols6q7bCfqXWB5CM JRuNoCHLrCgfEj969PrFs9u4 -----END PUBLIC KEY----- Derive=KAS-ECC-CDH_K-163_C0 PeerKey=KAS-ECC-CDH_K-163_C0-Peer-PUBLIC Ctrl=ecdh_cofactor_mode:1 SharedSecret=04325bff38f1b0c83c27f554a6c972a80f14bc23bc ~~~ Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3226)
2017-04-14Reformat evptests.txtNicola Tuveri
When compiling without EC support the test fails abruptly reading some keys. Some keys merged in commit db04055 start with ------BEGIN EC PRIVATE KEY----- this format is not supported without EC support. This commit reformat those keys with the generic format. After this change the test simply skips the unsupported EC keys when EC is disabled, without parsing errors. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3223)
2017-04-14Remove ecdhtest.cNicola Tuveri
All tests from ecdhtest.c have been ported to evptests.txt Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3219)
2017-04-14ecdhtest.c: move co-factor ECDH KATs to evptestsNicola Tuveri
move NIST SP800-56A co-factor ECDH KATs from ecdhtest.c to evptests.txt Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3219)
2017-04-14WIP: Convert ui,v3ext,verify_extra_testRich Salz
verify_extra_test still failing :( Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3194)
2017-04-14Fix unit tests when no-bf configuredTodd Short
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3206)
2017-04-14testlib/OpenSSL/Test.pm: keep default input private.Andy Polyakov
If $_ is not private, it can wipe caller's one, which proved to be problematic... Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2017-04-13Guarantee single argument evaluation for test macros.Pauli
Add test case that checks some of them. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3208)
2017-04-13Update the internal siphash tests to use the framework's output.Pauli
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3212)
2017-04-13Split the CAST tests up.Pauli
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3211)
2017-04-13ASN.1: adapt our use of INTxx et al by making them explicitely embeddedRichard Levitte
Fixes #3191 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3199)
2017-04-12Test printing of ASN.1 types INTxx et alRichard Levitte
[extended tests] Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3190)
2017-04-12Add SSL tests for certificates with embedded SCTsRob Percival
The only SSL tests prior to this tested using certificates with no embedded Signed Certificate Timestamps (SCTs), which meant they couldn't confirm whether Certificate Transparency checks in "strict" mode were working. These tests reveal a bug in the validation of SCT timestamps, which is fixed by the next commit. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3138)
2017-04-12Address review feedback (to be squashed)Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3189)
2017-04-12Convert x509aux, cipherlist, casttestRich Salz
To new test framework Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3189)
2017-04-12OpenSSL::Test: supported filtered command outputRichard Levitte
95-test_external_boringssl.t had a specialised run() variant to prefix the command output so it wouldn't disturb Test::Harness. This functionality if now moved to the run() command, using the added option 'prefix' that can be set to the string to prefix the output with. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3201)
2017-04-12Remove more stale code in ecdhtest.cNicola Tuveri
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3187)
2017-04-12ecdhtest.c: move KATs to evptests.txtNicola Tuveri
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3187)
2017-04-12Remove stale code in ecdhtest.cNicola Tuveri
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3187)
2017-04-12ecdhtest.c: move NAMED CURVES TESTS to evptests.txtNicola Tuveri
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3187)
2017-04-12Update destest to use the test infrastructurePauli
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3173)
2017-04-12test/testutil.c: Flush stdout when running testsRichard Levitte
Because stdout is usually buffered and stderr isn't, error output might get printed in one bunch and all the lines saying which test failed all in one bunch, making it difficult to see exactly what error output belongs to what test. Flushing stdout makes sure the runner output is displayed together with the corresponding error output. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3198)
2017-04-12Remove fprintfs from the poly1305 internal test but keep the test numberPauli
information. The framework will display the non-matching memory. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3156)
2017-04-12Update threadstest to use the test frameworkPauli
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3196)
2017-04-12Update the internal chacha test to use the frameworkPauli
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3195)