summaryrefslogtreecommitdiffstats
path: root/test
AgeCommit message (Collapse)Author
2016-01-28Add a test for small subgroup attacks on DH/DHEMatt Caswell
Following on from the previous commit, add a test to ensure that DH_compute_key correctly fails if passed a bad y such that: y^q (mod p) != 1 Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-27Test all built-in curves and let the library choose the EC_METHODBilly Brumley
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-27Skip all explicitely if the number of tests is 0Richard Levitte
It seems that Test::More doesn't like 0 tests, a line like this raises an error and stops the recipe entirely: plan tests => 0; So we need to check for 0 tests beforehand and skip the subtest explicitely in that case. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-27Be careful when applying EXE_SHELLRichard Levitte
$EXE_SHELL should only be used with out own programs, not with surrounding programs such as the perl interpreter. Reviewed-by: Matt Caswell <matt@openssl.org>
2016-01-26Fix Custom Extension tests skip countViktor Dukhovni
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-26Remove /* foo.c */ commentsRich Salz
This was done by the following find . -name '*.[ch]' | /tmp/pl where /tmp/pl is the following three-line script: print unless $. == 1 && m@/\* .*\.[ch] \*/@; close ARGV if eof; # Close file to reset $. And then some hand-editing of other files. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-26RT4272: Unit tests fail when DTLS disabledTodd Short
Missing SKIP: block in SSL unit tests for DTLS and TLS version tests. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-2680-test_ca.t is made to use the new perlapp()Richard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-01-26Have OpenSSL::Test handle perl scripts like any programRichard Levitte
Since we're building some of our perl scripts and the result might not end up in apps/ (*), we may need to treat them like the compile programs we use for testing. This introduces perlapp() and perltest(), which behave like app() and test(), but will add the perl executable in the command line. ----- (*) For example, with a mk1mf build, the result will end up in $(BIN_D) Reviewed-by: Matt Caswell <matt@openssl.org>
2016-01-26Use the new OpenSSL::Test::Utils routines.Richard Levitte
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-26Use Configure's @disablables and %disabled through configdata.pmRichard Levitte
Enhances the routines in OpenSSL::Test::Utils for checking disabled stuff to get their information directly from Configure instead of 'openssl list -disabled'. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-25For every test in 80-test_ssl.t, check that the protocol(s) used is enabledRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-25Make tests use configdata.pm rather than parsing MakefileRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-25Fix OpenSSL::Test::Simple to take more than one algorithmRichard Levitte
Some test programs may depend on more than just one TLS version, for example. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-22dsatest: use the correct BIO to print the test errorMarcus Meissner
Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2016-01-22few typo fixesFdaSilvaYY
Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2016-01-22Remove outdated conftest.cRich Salz
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-01-20Multiple -trusted/-untrusted/-CRLfile options in verifyViktor Dukhovni
It is sometimes useful (especially in automated tests) to supply multiple trusted or untrusted certificates via separate files rather than have to prepare a single file containing them all. To that end, change verify(1) to accept these options zero or more times. Also automatically set -no-CAfile and -no-CApath when -trusted is specified. Improve verify(1) documentation, which could still use some work. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-20More X509_verify_cert() tests via verify(1).Viktor Dukhovni
Still need tests for trusted-first and tests that probe construction of alternate chains. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-20Commit pre-generated test_verify certsViktor Dukhovni
These can be re-generated via: cd test/certs; ./setup.sh if need be. The keys are all RSA 2048-bit keys, but it is possible to change that via environment variables. cd test/certs rm -f *-key.pem *-key2.pem OPENSSL_KEYALG=rsa OPENSSL_KEYBITS=3072 ./setup.sh cd test/certs rm -f *-key.pem *-key2.pem OPENSSL_KEYALG=ecdsa OPENSSL_KEYBITS=secp384r1 ./setup.sh ... Keys are re-used if already present, so the environment variables are only used when generating any keys that are missing. Hence the "rm -f" Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-20Scripts to generate verify test certsViktor Dukhovni
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-20Remove update tagsRich Salz
Also remove depend/local_depend. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-19Remove the GOST engineMatt Caswell
The GOST engine is now out of date and is removed by this commit. An up to date GOST engine is now being maintained in an external repository. See: https://wiki.openssl.org/index.php/Binaries Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-19Support disabling any or all TLS or DTLS versionsViktor Dukhovni
Some users want to disable SSL 3.0/TLS 1.0/TLS 1.1, and enable just TLS 1.2. In the future they might want to disable TLS 1.2 and enable just TLS 1.3, ... This commit makes it possible to disable any or all of the TLS or DTLS protocols. It also considerably simplifies the SSL/TLS tests, by auto-generating the min/max version tests based on the set of supported protocols (425 explicitly written out tests got replaced by two loops that generate all 425 tests if all protocols are enabled, fewer otherwise). Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-19add TLS1-PRF testsDr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-01-19Add TLS1-PRF test support to evp_testDr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-01-18Use POSIX functions on Cygwin, not Win32 functionCorinna Vinschen
Signed-off-by: Corinna Vinschen <vinschen@redhat.com> Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-17Fix build break; restore missing targetRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-17Remove some old makefile targetsRich Salz
Remove lint, tags, dclean, tests. This is prep for a new makedepend scheme. This is temporary pending unified makefile, and might help it. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-17The TLSProxy tests can't run if no-engine has been configuredRichard Levitte
Make sure they detect that. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-15NGX-2040 - fix wildcard match on punycode/IDNA DNS namesZi Lin
- bugfix: should not treat '--' as invalid domain substring. - '-' should not be the first letter of a domain Signed-off-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-14In __cwd, make sure the given directory is seen as such and not a fileRichard Levitte
On Unixly platforms, this doesn't matter. On VMS, it does. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-14Do not use redirection on binary filesRichard Levitte
On some platforms, the shell will determine what attributes a file will have, so while the program might think it's safely outputting binary data, it's not always true. For the sake of the tests, it's therefore safer to use -out than to use redirection. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-14Add a directry spec for mcr if there is noneRichard Levitte
On VMS, the command MCR will assume SYS$SYSTEM: when the first argument lacks a directory spec. So for programs in the current directory, we add [] to tell MCR it is in the current directory. It's the same as having ./ at the start of a program on Unix so the shell doesn't start looking along $PATH. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-13Fix verify(1) to report failure when verification failsViktor Dukhovni
Regenerated expired test certificates, good for the next 100 years. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-01-13Fix test_ordinalsMatt Caswell
This used to work but somewhere along the line it broke and was failing to detect duplicate ordinals - which was the whole point of the test! Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-13Remove test_probable_prime_coprime from test/bntest.cRichard Levitte
This test relies on a private function, which isn't exported. This test would work better as a unit test in crypto/bn/bn_prime.c. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-13VMS perl doesn't implement fork(), so don't run the TLSProxy tests thereRichard Levitte
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-13Pipes on VMS do not work well with binary data, use an intermediary fileRichard Levitte
VMS being a record oriented operating system, it's uncertain how the 'pipe' passes binary data from one process to another. Experience shows that we get in trouble, and it's probably due to the pipe in itself being opened in text mode (variable length records). It's safer to pass data via an intermediary file instead. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-13Fix test/recipes/80-test_ca.t to work on VMSRichard Levitte
VMS uses a variant of openssl.cnf named openssl-vms.cnf. There's a Perl on VMS mystery where a open pipe will not SIGPIPE when the child process exits, which means that a loop sending "y\n" to it will never stop. Adding a counter helps fix this (set to 10, we know that none of the CA.pl commands will require more). Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12Move Makefiles to Makefile.inRich Salz
Create Makefile's from Makefile.in Rename Makefile.org to Makefile.in Rename Makefiles to Makefile.in Address review feedback from Viktor and Richard Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-12fix jpaketest and correct commentDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12make updateRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12Adapt all EVP_CIPHER_CTX users for it becoming opaqueRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-11Fix jpaketest compilation error.Dr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-11Only run DANE tests when EC is supportedRichard Levitte
Since danetest is to test DANE rather than specific algorithms, it's acceptable to require EC when testing it. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-11Update leak test to check return values.Dr. Stephen Henson
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-11Enable/disable crypto-mdebug just like other featuresViktor Dukhovni
Also always abort() on leak failure. Reviewed-by: Stephen Henson <steve@openssl.org>
2016-01-10fix shadow warningDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-08Fixup actually update danetest.cViktor Dukhovni
Reviewed-by: Rich Salz <rsalz@openssl.org>