summaryrefslogtreecommitdiffstats
path: root/test
AgeCommit message (Collapse)Author
2016-06-04Make 25-test_gen.t and 25-test_req.t into oneRichard Levitte
Since one generates files that the other depends on, there's no real reason to keep them separate. Since they were both different aspects of 'openssl req', the merge ends up in 25-test_req.t. This also makes cleanup easier. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-04Have some more test recipes clean up after themselvesRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-04Generate simple build test filesRichard Levitte
Generate small test programs to check that external programs can be built with our stuff at a very basic level. For now, they check that each of our header files can be included individually without compile failure. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-03tests: clean up temporary SSL session files.Richard Levitte
RT#4557 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-03Update client authentication testsEmilia Kasper
Port client auth tests to the new framework, add coverage. The old tests were only testing success, and only for some protocol versions; the new tests add all protocol versions and various failure modes. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-02Testing symbol presence: also take note of small objectsRichard Levitte
The S symbol class wasn't checked. Notified by Sebastian Andrzej Siewior Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-06-01Remove/rename some old files.Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-06-01Add final(?) set of copyrights.Rich Salz
Add copyright to missing assembler files. Add copyrights to missing test/* files. Add copyrights Various source and misc files. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-06-01RT4337: Crash in DESRich Salz
Salt must be two ASCII characters. Add tests to check for that, and a test to test the checks. Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-30perl: use the 'if' module to conditionally load File::GlobRichard Levitte
Trying to use normal perl conditions to conditionally 'use' a perl module didn't quite work. Using the 'if' module to do so does work. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-05-29Configure,test/recipes: "pin" glob to File::Glob::glob.Andy Polyakov
As it turns out default glob's behaviour for quoted argument varies from version to version, making it impossible to Configure or run tests in some cases. The reason for quoting globs was to accommodate source path with spaces in its name, which was treated by default glob as multiple paths. File::Glob::glob on the other hand doesn't consider spaces as delimiters and therefore works with unquoted patterns. [Unfortunaltely File::Glob::glob, being too csh-ly, doesn't work on VMS, hence the "pinning" is conditional.] Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-27make sure to put quotes around -config argument, in case of spacesRichard Levitte
RT#4486 Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-27perl glob: make sure to put quotes around the pattern, in case of spacesRichard Levitte
RT#4486 Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-27Avoid msys name manglingMatt Caswell
If using the msys console then msys attempts to "fix" command line arguments to convert them from Unix style to Windows style. One of the things it does is to look for arguments seperated by colons. This it assumes is a list of file paths, so it replaces the colon with a semi-colon. This was causing one of our tests to fail when calling the "req" command line app. We were attempting to create a new DSA key and passing the argument "dsa:../apps/dsa1024.pem". This is exactly what we intended but Msys mangles it to "dsa;../apps/dsa1024.pem" and the command fails. There doesn't seem to be a way to suppress Msys name mangling. Fortunately we can work around this issue by generating the DSA key in a separate step by calling "gendsa". RT#4255 Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-27Silence some "may be uninitialized when used" warningMatt Caswell
Clang was complaining about some variables possibly being uninitialized when used. The warnings are bogus, but clang can't figure that out. This silences the warnings. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-27Add a test for printing floating point format specifiersMatt Caswell
Previous commits fixed the implementation of the %e and %g format specifiers as well as other issues. This commit adds a test. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-25build.info files: add quotes around any spec that may contain spacesRichard Levitte
RT#4492 Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-05-23Add checks on CRYPTO_set_ex_data return valueFdaSilvaYY
Fix possible leak in danetest.c Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-21Add OpenSSL copyright to .pl filesRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-20Add an async io testMatt Caswell
This adds an async IO test. There are two test runs. The first one does a normal handshake with lots of async IO events. The second one does the same but this time breaks up all the written records into multiple records of one byte in length. We do this all the way up until the CCS. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-05-20Simplify SSL BIO buffering logicMatt Caswell
The write BIO for handshake messages is bufferred so that we only write out to the network when we have a complete flight. There was some complexity in the buffering logic so that we switched buffering on and off at various points through out the handshake. The only real reason to do this was historically it complicated the state machine when you wanted to flush because you had to traverse through the "flush" state (in order to cope with NBIO). Where we knew up front that there was only going to be one message in the flight we switched off buffering to avoid that. In the new state machine there is no longer a need for a flush state so it is simpler just to have buffering on for the whole handshake. This also gives us the added benefit that we can simply call flush after every flight even if it only has one message in it. This means that BIO authors can implement their own buffering strategies and not have to be aware of the state of the SSL object (previously they would have to switch off their own buffering during the handshake because they could not rely on a flush being received when they really needed to write data out). This last point addresses GitHub Issue #322. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-05-17Copyright consolidation 02/10Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-16test/evp_test.c: exercise in-place encryption.Andy Polyakov
Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-05-16Use OPENSSL_hexchar2intRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-16Fold threads.h into crypto.h making API publicViktor Dukhovni
Document thread-safe lock creation Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-13VMS perl: Fix glob outputRichard Levitte
In some cases, perl's glob() thinks it needs to return file names with generation numbers, such as when a file name pattern includes two periods. Constructing other file names by simple appending to file names with generation numbers isn't a good idea, so for the VMS case, just peal the generation numbers if they are there. Fortunately, this is easy, as the returned generation number delimiter will always be a semi-colon. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-13Add some additional NewSessionTicket testsMatt Caswell
If the server does not send a session ticket extension, it should not then send the NewSessionTicket message. If the server sends the session ticket extension, it MUST then send the NewSessionTicket message. Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-05-12Remove proxy tests. Add verify callback tests.Emilia Kasper
The old proxy tests test the implementation of an application proxy policy callback defined in the test itself, which is not particularly useful. It is, however, useful to test cert verify overrides in general. Therefore, replace these tests with tests for cert verify callback behaviour. Also glob the ssl test inputs on the .in files to catch missing generated files. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-11Replace cipherlist testEmilia Kasper
The old cipherlist test in ssltest.c only tests the internal order of the cipher table, which is pretty useless. Replace this test with a test that catches inadvertent changes to the default cipherlist. Fix run_tests.pl to correctly filter tests that have "list" in their name. (Also includes a small drive-by fix in .gitignore.) Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-11Fix i2d_X509_AUX, update docs and add testsViktor Dukhovni
When *pp is NULL, don't write garbage, return an unexpected pointer or leak memory on error. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-05-09Recognise VERBOSE and V as well as HARNESS_VERBOSEDr. Stephen Henson
PR#4462 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-09fix tab-space mixed indentationFdaSilvaYY
No code change Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-06testlib/OpenSSL/Test.pm: address 5.10 warnings.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-06test/evp_test.c: exercise different combinations of data misalignment.Andy Polyakov
Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-05-04Fix the no-tls optionMatt Caswell
The TLSProxy based tests don't work when TLS is disabled so we shouldn't run them. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-03Add ASN.1 INTEGER tests.Dr. Stephen Henson
Add tests for ASN.1 INTEGER: invalid tag, valid 0, 1, -1 and 0, -1 with illegal padding. Also add ASN1_ANY tests for 0, 1 and -1. Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-05-03add ASN1_INTEGER type to d2i_testDr. Stephen Henson
Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-05-03Add test for CVE-2016-2018Dr. Stephen Henson
Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-05-02Secure memory fixesTodd Short
Fix some of the variables to be (s)size_t, so that more than 1GB of secure memory can be allocated. The arena has to be a power of 2, and 2GB fails because it ends up being a negative 32-bit signed number. The |too_late| flag is not strictly necessary; it is easy to figure out if something is secure memory by looking at the arena. As before, secure memory allocations will not fail, but now they can be freed correctly. Once initialized, secure memory can still be used, even if allocations occured before initialization. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-04-29Misc tweaks for EBCDIC based on feedback receivedMatt Caswell
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-04-29Fix the tests to work with EBCDICMatt Caswell
Most of the tests already pass with EBCIDC but a few were trying to write into read only memory. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-04-28various spelling fixesFdaSilvaYY
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/952)
2016-04-23add test for CVE-2016-2109Dr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-23In d2i_test return error for malloc failure.Dr. Stephen Henson
Bad ASN.1 data should never be able to trigger a malloc failure so return an error in d2i_test if a malloc failure occurs. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-22Extensions to d2i_test.Dr. Stephen Henson
Using ASN1_ITEM tables in d2i_test: this then uses consistent names and makes it easier to extend. Add bio, reencode and compare tests. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-04-22Unified copyright for test recipesRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-22Add a best effort test to check shared library consistencyRichard Levitte
Our main development platforms are of the Unix family, which doesn't have the same strictness regarding a shared library being consistent with the contents of the ld script (.map file, on Linux and Solaris) as Windows is with the contents of the .def file or VMS is with the linker symb_vector option. To eliminate surprises, we therefore need to make sure to check that the contents of the .map file is matched with the shared library, at least to check that the shared library isn't missing any symbols that should be present. This test isn't absolutely perfect, as it will only check the symbols that would be present on Linux / Solaris and will therefore miss those that would only appear on Windows or VMS. On the other hand, those platform specific are few and far apart in time, so it's not likely they will pose a problem. Reviewed-by: Matt Caswell <matt@openssl.org>
2016-04-20Copyright consolidation; .pm and ConfigureRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-20Remove --classic build entirelyRichard Levitte
The Unix build was the last to retain the classic build scheme. The new unified scheme has matured enough, even though some details may need polishing. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-04-20Copyright consolidation: perl filesRich Salz
Add copyright to most .pl files This does NOT cover any .pl file that has other copyright in it. Most of those are Andy's but some are public domain. Fix typo's in some existing files. Reviewed-by: Richard Levitte <levitte@openssl.org>