aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* test/evp_test.c: exercise in-place encryption.Andy Polyakov2016-05-161-19/+35
| | | | Reviewed-by: Emilia Käsper <emilia@openssl.org>
* Use OPENSSL_hexchar2intRich Salz2016-05-161-8/+5
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fold threads.h into crypto.h making API publicViktor Dukhovni2016-05-162-2/+0
| | | | | | Document thread-safe lock creation Reviewed-by: Richard Levitte <levitte@openssl.org>
* VMS perl: Fix glob outputRichard Levitte2016-05-131-0/+1
| | | | | | | | | | | | 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>
* Add some additional NewSessionTicket testsMatt Caswell2016-05-131-1/+38
| | | | | | | | | | 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>
* Remove proxy tests. Add verify callback tests.Emilia Kasper2016-05-1213-519/+479
| | | | | | | | | | | | | | | 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>
* Replace cipherlist testEmilia Kasper2016-05-116-70/+243
| | | | | | | | | | | | | | 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>
* Fix i2d_X509_AUX, update docs and add testsViktor Dukhovni2016-05-114-4/+260
| | | | | | | 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>
* Recognise VERBOSE and V as well as HARNESS_VERBOSEDr. Stephen Henson2016-05-091-0/+5
| | | | | | PR#4462 Reviewed-by: Rich Salz <rsalz@openssl.org>
* fix tab-space mixed indentationFdaSilvaYY2016-05-091-34/+34
| | | | | | | No code change Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* testlib/OpenSSL/Test.pm: address 5.10 warnings.Andy Polyakov2016-05-061-4/+4
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* test/evp_test.c: exercise different combinations of data misalignment.Andy Polyakov2016-05-061-24/+55
| | | | Reviewed-by: Emilia Käsper <emilia@openssl.org>
* Fix the no-tls optionMatt Caswell2016-05-046-0/+18
| | | | | | | The TLSProxy based tests don't work when TLS is disabled so we shouldn't run them. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Add ASN.1 INTEGER tests.Dr. Stephen Henson2016-05-036-1/+46
| | | | | | | | | 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>
* add ASN1_INTEGER type to d2i_testDr. Stephen Henson2016-05-031-1/+2
| | | | Reviewed-by: Emilia Käsper <emilia@openssl.org>
* Add test for CVE-2016-2018Dr. Stephen Henson2016-05-032-1/+10
| | | | Reviewed-by: Emilia Käsper <emilia@openssl.org>
* Secure memory fixesTodd Short2016-05-021-6/+67
| | | | | | | | | | | | | | | 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>
* Misc tweaks for EBCDIC based on feedback receivedMatt Caswell2016-04-293-7/+3
| | | | Reviewed-by: Andy Polyakov <appro@openssl.org>
* Fix the tests to work with EBCDICMatt Caswell2016-04-294-40/+34
| | | | | | | 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>
* various spelling fixesFdaSilvaYY2016-04-281-1/+1
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/952)
* add test for CVE-2016-2109Dr. Stephen Henson2016-04-232-1/+5
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* In d2i_test return error for malloc failure.Dr. Stephen Henson2016-04-231-0/+3
| | | | | | | 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>
* Extensions to d2i_test.Dr. Stephen Henson2016-04-222-17/+103
| | | | | | | | | 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>
* Unified copyright for test recipesRich Salz2016-04-2275-533/+580
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Add a best effort test to check shared library consistencyRichard Levitte2016-04-221-0/+115
| | | | | | | | | | | | | | | | | | | | | 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>
* Copyright consolidation; .pm and ConfigureRich Salz2016-04-204-1/+28
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove --classic build entirelyRichard Levitte2016-04-201-410/+0
| | | | | | | | 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>
* Copyright consolidation: perl filesRich Salz2016-04-206-104/+36
| | | | | | | | | 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>
* Make string_to_hex/hex_to_string publicRich Salz2016-04-181-1/+1
| | | | | | Give the API new names, document it. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Rename some lowercase API'sRich Salz2016-04-181-15/+15
| | | | | | | | | Make OBJ_name_cmp internal Rename idea_xxx to IDEA_xxx Rename get_rfc_xxx to BN_get_rfc_xxx Rename v3_addr and v3_asid functions to X509v3_... Reviewed-by: Richard Levitte <levitte@openssl.org>
* Make many X509_xxx types opaque.Rich Salz2016-04-151-11/+17
| | | | | | | | | Make X509_OBJECT, X509_STORE_CTX, X509_STORE, X509_LOOKUP, and X509_LOOKUP_METHOD opaque. Remove unused X509_CERT_FILE_CTX Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Fix no-stdio and no-autoalginitMatt Caswell2016-04-141-206/+208
| | | | | | | | | | | | | | no-stdio does not work with the apps. Since the tests also need the apps it doesn't support that either. Therefore we disable building of both. no-autoalginit is not compatible with the apps because it requires explicit loading of the algorithms, and the apps don't do that. Therefore we disable building the apps for this option. Similarly the tests depend on the apps so we also disable the tests. Finally the whole point about no-autoalginit is to avoid excessive executable sizes when doing static linking. Therefore we disable "shared" if this option is selected. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix AFALG kernel and headers mismatch problemMatt Caswell2016-04-141-0/+16
| | | | | | | | | | | | During Configure we attempt to check the kernel version of this platform to see whether we can compile the AFALG engine. If the kernel version looks recent enough then we enable AFALG. However when we compile e_afalg.c we check the version of the linux headers. If there is a mismatch between the linux headers and the currently running kernel then we don't compile the AFLAG engine and continue. This was causing a link error. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Don't use deprecated CONF_modules_free() in testsViktor Dukhovni2016-04-141-1/+0
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix no-tls1_1 and no-tls1_2Matt Caswell2016-04-131-1/+1
| | | | | | The above config options were failing in test_ssl_old. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix the no-tls optionMatt Caswell2016-04-111-15/+18
| | | | | | The no-tls option was failing in the tests. This fixes it. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix the no-nextprotoneg optionMatt Caswell2016-04-112-0/+6
| | | | | | Misc fixes to get no-nextprotoneg config option working again. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Fix warnings exposed by clang-3.8Emilia Kasper2016-04-101-2/+5
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Don't check the generated ssl-tests configs on VMSRichard Levitte2016-04-091-1/+2
| | | | | | | The simple reason is that the pre-generated files are mainly for Unix. The VMS variants look slightly different, so comparing will always fail. Reviewed-by: Emilia Käsper <emilia@openssl.org>
* VMS doesn't have directory separators in the same sense as UnixRichard Levitte2016-04-091-3/+5
| | | | | | | Don't add / in file specs on VMS. The directory "separator" is part of the directory spec. Reviewed-by: Emilia Käsper <emilia@openssl.org>
* Make DH opaqueMatt Caswell2016-04-092-32/+62
| | | | | | | Move the dh_st structure into an internal header file and provide relevant accessors for the internal fields. Reviewed-by: Richard Levitte <levitte@openssl.org>
* test/[dane|evp_]test.c: BIO-fy file I/O.Andy Polyakov2016-04-072-19/+19
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Suppress CT callback as appropriateViktor Dukhovni2016-04-073-32/+31
| | | | | | | | | | | | | | | | | | | | | | Suppress CT callbacks with aNULL or PSK ciphersuites that involve no certificates. Ditto when the certificate chain is validated via DANE-TA(2) or DANE-EE(3) TLSA records. Also skip SCT processing when the chain is fails verification. Move and consolidate CT callbacks from libcrypto to libssl. We also simplify the interface to SSL_{,CTX_}_enable_ct() which can specify either a permissive mode that just collects information or a strict mode that requires at least one valid SCT or else asks to abort the connection. Simplified SCT processing and options in s_client(1) which now has just a simple pair of "-noct" vs. "-ct" options, the latter enables the permissive callback so that we can complete the handshake and report all relevant information. When printing SCTs, print the validation status if set and not valid. Signed-off-by: Rob Percival <robpercival@google.com> Reviewed-by: Emilia Käsper <emilia@openssl.org>
* OpenSSL::Test: when moving directory, affect env as wellRichard Levitte2016-04-071-0/+22
| | | | | | | | | The environment variables TOP, SRCTOP, BLDTOP, ... are used to affect the testing framework. However, subprocesses may want to use them as well, and therefore need their values corrected when we move to a different directory. Reviewed-by: Emilia Käsper <emilia@openssl.org>
* Allow generate_ssl_tests.pl to find testlibEmilia Kasper2016-04-071-0/+1
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Better use BIO_snprintf() than snprintf(), in case the later isn't availableRichard Levitte2016-04-071-2/+2
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Make the RSA structure opaqueRichard Levitte2016-04-061-11/+14
| | | | | | | | Move rsa_st away from public headers. Add accessor/writer functions for the public RSA data. Adapt all other source to use the accessors and writers. Reviewed-by: Matt Caswell <matt@openssl.org>
* Fix no-ocspMatt Caswell2016-04-062-0/+7
| | | | | | Misc fixes for no-ocsp Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add missing mem leak test activation and checksFdaSilvaYY2016-04-063-0/+28
| | | | | Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* Rename ssltest -> ssltest_oldEmilia Kasper2016-04-054-26/+26
| | | | | | | ssltest_old.c is deprecated. New tests should use ssl_test.c, and the recipes in 80-test_ssl_new.t Reviewed-by: Richard Levitte <levitte@openssl.org>