summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* tests: added test case with invalid openpgp certNikos Mavrogiannopoulos2017-02-203-2/+4
| | | | | | | That triggers a heap buffer overflow: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=420 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* Add LMTP, POP3, NNTP, Sieve and PostgreSQL support to gnutls-cliRobert Scheck2017-02-196-0/+66
| | | | | | Add LMTP (RFC 2033), POP3 (RFC 2595), NNTP (RFC 4642), Sieve (RFC 5804) and PostgreSQL support to gnutls-cli ("--starttls-proto"). Signed-off-by: Robert Scheck <robert@fedoraproject.org>
* tests: Improve port-checking infrastructure.tmp-work-without-netstatRical Jasan2017-02-191-6/+47
| | | | | | | | | | | | | | | | | | | | | | | The test suite unnecessarily failed on systems without netstat because it was assumed to be present. Instead of simply checking for its presence and indicating an unsupported test, however, the ss utility can be used as a drop-in replacement. When netstat/net-tools is not present, the ss utility from iproute2 still stands a fair chance of existing, and they also have similar enough semantics that they can be used interchangeably in the test suite. The functions in tests/scripts/common.sh that used netstat (wait_for_port, wait_for_free_port) now use new functions, check_if_port_in_use and check_if_port_listening, to abstract the call to netstat/ss. The eval'd variable GETPORT also used netstat, and has been updated accordingly. The new port-checking functions use another new function, have_port_finder, which takes care of the details of selecting ss (preferred) or netstat, or fails otherwise. Signed-off-by: Rical Jasan <ricaljasan@pacific.net> Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: ignore sanity checks in broken cert testNikos Mavrogiannopoulos2017-02-171-0/+2
| | | | | | | This allows the existing reproducers which contain certificates which are rejected by sanity checks, to still be used to detect regressions. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: enhanced test suite to include invalid X509v3 certNikos Mavrogiannopoulos2017-02-173-1/+29
| | | | | | | That certificate contains a GeneralizedTime with fractional seconds. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: enhanced test suite to include creation of invalid certificatesNikos Mavrogiannopoulos2017-02-172-1/+217
| | | | | | | That is, check whether the creation of invalid V2 or V1 certificates will be detected, and that the correct error codes are returned. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: enhanced test suite to include invalid V1 certsNikos Mavrogiannopoulos2017-02-174-2/+96
| | | | | | | That is, added X.509v1 certificates with attributes that shouldn't have been presented (valid for X.509v2 only). Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: modified tests for the disablement of 3DESNikos Mavrogiannopoulos2017-02-052-10/+10
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* x509: optimize subject alternative name accesstmp-san-parsing-optimizationNikos Mavrogiannopoulos2017-02-051-0/+1
| | | | | | | | | | That reads SAN and IAN early on import, significantly reducing the running time of functions which iterate over the alternative names of a certificate, e.g., gnutls_x509_crt_check_hostname(). Relates #165 Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* tests: enable all IDNA tests when compiled with libidn2Nikos Mavrogiannopoulos2017-02-047-11/+26
| | | | | | Keep IDNA2003-only tests on the ifdef HAVE_LIBIDN. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* Address test suite failure due to timezone differences.Nikos Mavrogiannopoulos2017-02-021-1/+1
| | | | | | Reported by Thorsten Glaser and Andreas Metzler. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: use the exported API for IDNA testingNikos Mavrogiannopoulos2017-01-261-13/+28
| | | | | | | In addition group together the tests which require libidn2 >= 0.14. This allows the tests to succeed. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* tests: simplified str-idnaNikos Mavrogiannopoulos2017-01-261-39/+58
| | | | | | | This separates the directions that are tested (utf-8 -> punycode and vice versa). Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Add support for libidn2 (IDNA 2008 + TR46)Tim Rühsen2017-01-251-3/+11
| | | | Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
* tests: verify that a written certificate will inherit its ID from privkeytmp-assign-same-pkcs11-idNikos Mavrogiannopoulos2017-01-242-0/+167
| | | | | | | That is, whether p11tool will do the right thing and figure the proper ID to use for a certificate object, if the public key is available. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: skip tests that requires tools if tools are disabledAlon Bar-Lev2017-01-231-1/+5
| | | | | | building with --disable-tools should not cause test failure. Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
* Revert "tests: suite: pkcs11: skip if no softhsm"Nikos Mavrogiannopoulos2017-01-201-1/+1
| | | | | | This reverts commit 276a6ee44d80d4d3b144a78794020c177be8f0ea. The reason is to avoid having changes in softhsm packaging, result to skipping large parts of the test suite without someone noticing.
* tests: added private key causing FPENikos Mavrogiannopoulos2017-01-193-2/+3
| | | | | | | Issue found using oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=393 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: added PKCS#8 key which causes undefined behavior on importNikos Mavrogiannopoulos2017-01-193-2/+2
| | | | | | | Issue found using oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=389 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: added certificate which reproduces a leak in gnutls_x509_ext_import_aiaNikos Mavrogiannopoulos2017-01-192-0/+1
| | | | | | | Issue found using oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=385 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: added check which ensures a client cannot receive during handshakeNikos Mavrogiannopoulos2017-01-182-1/+299
| | | | | | Relates #158 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: added check which ensures a client cannot transmit during handshakeNikos Mavrogiannopoulos2017-01-182-1/+296
| | | | | | Relates #158 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: cleanup error reporting in handshake-false-startNikos Mavrogiannopoulos2017-01-181-19/+19
|
* tests: added missing fileNikos Mavrogiannopoulos2017-01-091-1/+1
|
* tests: remove bash usageAlon Bar-Lev2017-01-0516-18/+16
| | | | Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
* tests: suite: chain: support separate builddirAlon Bar-Lev2017-01-051-1/+3
| | | | Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
* tests: skip tests that requires tools if tools are disabledAlon Bar-Lev2017-01-0520-0/+121
| | | | | | building with --disable-tools should not cause test failure. Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
* tests: added test case with invalid openpgp certNikos Mavrogiannopoulos2017-01-042-35/+9
| | | | | | | This triggers an out of memory error. Issue found using oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=337 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: added test case with invalid openpgp certNikos Mavrogiannopoulos2017-01-043-1/+7
| | | | | | | This triggers a memory error. Issue found using oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=340 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: added test case with invalid openpgp certNikos Mavrogiannopoulos2017-01-043-1/+7
| | | | | | | This triggers a memory error. Issue found using oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=346 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: added test case with invalid openpgp certNikos Mavrogiannopoulos2017-01-043-1/+8
| | | | | | | This triggers a memory error. Issue found using oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=338 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: openpgp-cert-parser: simplifiedNikos Mavrogiannopoulos2017-01-041-8/+16
|
* tests: added reproducer for server issuesNikos Mavrogiannopoulos2017-01-043-2/+117
| | | | | | | | This allows to reproduce issues found on server side, by adding a transcript in server-interesting. Currently it contains values found using oss-fuzz. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: added test with private key that causes memory leakNikos Mavrogiannopoulos2017-01-043-2/+2
| | | | | | | Issue found using oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=371 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: added test with PKCS#8 key that signals FPENikos Mavrogiannopoulos2017-01-043-2/+4
| | | | | | | Issue found using oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=376 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: skip tests that requires tools if tools are disabledAlon Bar-Lev2017-01-0444-10/+260
| | | | | | building with --disable-tools should not cause test failure. Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
* tests: cert-tests: pkcs12 drop builddir usageAlon Bar-Lev2017-01-042-4/+2
| | | | | | sync with other tests Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
* tests: suite: pkcs11: skip if no softhsmAlon Bar-Lev2017-01-041-1/+1
| | | | | | similar to other tests Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
* tests: added test case with invalid X.509 certNikos Mavrogiannopoulos2017-01-032-1/+1
| | | | | | | This triggers a memory leak. Issue found using oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=294 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: added test case with invalid X.509 certNikos Mavrogiannopoulos2017-01-032-1/+1
| | | | | | | Issue found using oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=300 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: added reproducer for client issuesNikos Mavrogiannopoulos2017-01-035-1/+118
| | | | | | | | | | | This allows to reproduce issues found on client handling, by adding a transcript in client-interesting. Currently it contains values found using oss-fuzz. The client3.disabled transcript is disabled because it depends on a fix in nettle. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: do not run key-tests under leak sanitizerNikos Mavrogiannopoulos2017-01-031-1/+1
| | | | | | | | | The reason is that we cannot distinguish between a memory leak on application failure (which is followed by exit- thus should be ignored) and an address sanitizer issue (which should never be ignored). As such we disable leak detection with asan and rely on valgrind. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: illegal-rsa: don't hide stderrNikos Mavrogiannopoulos2017-01-031-2/+2
|
* tests: added suite for checking PKCS#7 structure importNikos Mavrogiannopoulos2017-01-036-2/+149
| | | | | The initial (problematic) structures have been obtained from oss-fuzz project.
* tests: added test case with invalid X.509 certificateNikos Mavrogiannopoulos2017-01-022-1/+2
| | | | | | | | | This certificate causes a memory leak while printing. Issue found using oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=280 Relates #156
* tests: cert-tests: force asan to return an error code other than one on failureNikos Mavrogiannopoulos2017-01-021-1/+1
|
* tests: added test for invalid private keysNikos Mavrogiannopoulos2017-01-023-2/+54
| | | | | Also force asan to return an error code other than one (the normally expected for invalid keys).
* tests: added certificate to reproduce memory leakNikos Mavrogiannopoulos2017-01-022-1/+1
| | | | | | | Found by oss-fuzz project: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=299 Relates #156
* tests: added test case with invalid PKCS#8 dataNikos Mavrogiannopoulos2017-01-023-2/+2
| | | | | | | Issue found using oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=363 Relates #156
* Corrected a leak in OpenPGP sub-packet parsing.Alex Gaynor2017-01-022-0/+5
| | | | Signed-off-by: Alex Gaynor <alex.gaynor@gmail.com>