]> git.ipfire.org Git - thirdparty/gnutls.git/log
thirdparty/gnutls.git
9 years agoconfigure: remove void statement
Alon Bar-Lev [Fri, 20 Jan 2017 19:14:22 +0000 (21:14 +0200)] 
configure: remove void statement

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
9 years agotests: skip tests that requires tools if tools are disabled
Alon Bar-Lev [Fri, 20 Jan 2017 21:39:41 +0000 (23:39 +0200)] 
tests: skip tests that requires tools if tools are disabled

building with --disable-tools should not cause test failure.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
9 years agodoc: improved documentation on DH parameters [ci skip]
Nikos Mavrogiannopoulos [Sat, 21 Jan 2017 23:59:41 +0000 (00:59 +0100)] 
doc: improved documentation on DH parameters [ci skip]

9 years agoRevert "tests: suite: pkcs11: skip if no softhsm"
Nikos Mavrogiannopoulos [Fri, 20 Jan 2017 13:36:51 +0000 (14:36 +0100)] 
Revert "tests: suite: pkcs11: skip if no softhsm"

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.

9 years ago_decode_pkcs8_dsa_key: ensure that the P value is non-zero
Nikos Mavrogiannopoulos [Thu, 19 Jan 2017 08:28:08 +0000 (09:28 +0100)] 
_decode_pkcs8_dsa_key: ensure that the P value is non-zero

When decoding a DSA private key, and constructing the public key
ensure that P is non-zero, and thus can be used as modulus.

Issue found using oss-fuzz:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=393

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: added private key causing FPE
Nikos Mavrogiannopoulos [Thu, 19 Jan 2017 08:24:19 +0000 (09:24 +0100)] 
tests: added private key causing FPE

Issue found using oss-fuzz:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=393

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years ago_gnutls_decrypt_pbes1_des_md5_data: ensure that encrypted data size is a multiple...
Nikos Mavrogiannopoulos [Thu, 19 Jan 2017 08:20:28 +0000 (09:20 +0100)] 
_gnutls_decrypt_pbes1_des_md5_data: ensure that encrypted data size is a multiple of blocksize

That prevents incorrect data reaching nettle which has only
assertion checks (leading to an abort).

Issue found using oss-fuzz:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=389

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: added PKCS#8 key which causes undefined behavior on import
Nikos Mavrogiannopoulos [Thu, 19 Jan 2017 08:14:29 +0000 (09:14 +0100)] 
tests: added PKCS#8 key which causes undefined behavior on import

Issue found using oss-fuzz:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=389

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: added certificate which reproduces a leak in gnutls_x509_ext_import_aia
Nikos Mavrogiannopoulos [Thu, 19 Jan 2017 08:08:49 +0000 (09:08 +0100)] 
tests: added certificate which reproduces a leak in gnutls_x509_ext_import_aia

Issue found using oss-fuzz:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=385

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agox509: eliminated memory leak on gnutls_x509_ext_import_aia
Nikos Mavrogiannopoulos [Thu, 19 Jan 2017 08:08:04 +0000 (09:08 +0100)] 
x509: eliminated memory leak on gnutls_x509_ext_import_aia

Issue found using oss-fuzz:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=385

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agodoc update
Nikos Mavrogiannopoulos [Tue, 17 Jan 2017 14:08:29 +0000 (15:08 +0100)] 
doc update

9 years agotests: added check which ensures a client cannot receive during handshake
Nikos Mavrogiannopoulos [Wed, 18 Jan 2017 12:51:32 +0000 (13:51 +0100)] 
tests: added check which ensures a client cannot receive during handshake

Relates #158

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: added check which ensures a client cannot transmit during handshake
Nikos Mavrogiannopoulos [Wed, 18 Jan 2017 08:51:35 +0000 (09:51 +0100)] 
tests: added check which ensures a client cannot transmit during handshake

Relates #158

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: cleanup error reporting in handshake-false-start
Nikos Mavrogiannopoulos [Tue, 17 Jan 2017 14:28:05 +0000 (15:28 +0100)] 
tests: cleanup error reporting in handshake-false-start

9 years agoRefuse to receive data during handshake
Nikos Mavrogiannopoulos [Wed, 18 Jan 2017 12:47:02 +0000 (13:47 +0100)] 
Refuse to receive data during handshake

This prevents buggy applications from receiving non-authenticated data
that may have arrived during the handshake.

Relates #158

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agoRefuse to send data during handshake
Nikos Mavrogiannopoulos [Tue, 17 Jan 2017 14:05:35 +0000 (15:05 +0100)] 
Refuse to send data during handshake

That prevents buggy applications from transmitting sensitive data during
handshake.

Resolves #158

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agoDisable AVX support when it is not supported by the CPU
Nikos Mavrogiannopoulos [Sun, 15 Jan 2017 09:40:02 +0000 (10:40 +0100)] 
Disable AVX support when it is not supported by the CPU

This mostly affects virtual systems. Reported by Frank Chen.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years agoopencdk: improved error code checking in the stream reading functions
Nikos Mavrogiannopoulos [Tue, 17 Jan 2017 12:34:33 +0000 (13:34 +0100)] 
opencdk: improved error code checking in the stream reading functions

This amends 49be4f7b82eba2363bb8d4090950dad976a77a3a

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agominitasn1: updated to latest git version
Nikos Mavrogiannopoulos [Mon, 16 Jan 2017 16:09:36 +0000 (17:09 +0100)] 
minitasn1: updated to latest git version

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agodoc: removed references to OpenPGP functions and enumerations
Nikos Mavrogiannopoulos [Mon, 16 Jan 2017 12:01:56 +0000 (13:01 +0100)] 
doc: removed references to OpenPGP functions and enumerations

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agodoc: removed documentation related to OpenPGP and guile
Nikos Mavrogiannopoulos [Sun, 15 Jan 2017 10:11:19 +0000 (11:11 +0100)] 
doc: removed documentation related to OpenPGP and guile

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years agodoc: removed documentation related to OpenPGP
Nikos Mavrogiannopoulos [Fri, 6 Jan 2017 07:26:17 +0000 (08:26 +0100)] 
doc: removed documentation related to OpenPGP

Also added section explaining why OpenPGP is being deprecated.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agoopenpgp.h: all openpgp functionality was marked as deprecated
Nikos Mavrogiannopoulos [Fri, 6 Jan 2017 07:14:09 +0000 (08:14 +0100)] 
openpgp.h: all openpgp functionality was marked as deprecated

This is to prevent new applications using that functionality.
As the OpenPGP certificate for HTTPS (or TLS in general) never got
any traction, GnuTLS is the only implementation supporting it,
and the quality of the OpenPGP supporting code is questionable,
we deprecate that code with the intention to drop it completely
when an opportunity is given.

Relates #102

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: added missing file
Nikos Mavrogiannopoulos [Mon, 9 Jan 2017 07:36:02 +0000 (08:36 +0100)] 
tests: added missing file

9 years agoCONTRIBUTING.md: Improve instructions on git-template [ci skip]
Nikos Mavrogiannopoulos [Mon, 9 Jan 2017 07:18:33 +0000 (08:18 +0100)] 
CONTRIBUTING.md: Improve instructions on git-template [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years agotests: remove bash usage
Alon Bar-Lev [Thu, 5 Jan 2017 08:35:29 +0000 (10:35 +0200)] 
tests: remove bash usage

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
9 years agotests: suite: chain: support separate builddir
Alon Bar-Lev [Thu, 5 Jan 2017 12:01:30 +0000 (14:01 +0200)] 
tests: suite: chain: support separate builddir

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
9 years agotests: skip tests that requires tools if tools are disabled
Alon Bar-Lev [Thu, 5 Jan 2017 08:34:07 +0000 (10:34 +0200)] 
tests: skip tests that requires tools if tools are disabled

building with --disable-tools should not cause test failure.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
9 years agogitignore: update [ci skip]
Alon Bar-Lev [Tue, 3 Jan 2017 14:46:46 +0000 (16:46 +0200)] 
gitignore: update [ci skip]

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
9 years agogitignore: sort()
Alon Bar-Lev [Tue, 3 Jan 2017 14:45:19 +0000 (16:45 +0200)] 
gitignore: sort()

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
9 years agoopencdk: added error checking in the stream reading functions
Nikos Mavrogiannopoulos [Wed, 4 Jan 2017 14:22:13 +0000 (15:22 +0100)] 
opencdk: added error checking in the stream reading functions

This addresses 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>
9 years agotests: added test case with invalid openpgp cert
Nikos Mavrogiannopoulos [Wed, 4 Jan 2017 14:03:12 +0000 (15:03 +0100)] 
tests: added test case with invalid openpgp cert

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>
9 years agoopencdk: cdk_pk_get_keyid: fix stack overflow
Nikos Mavrogiannopoulos [Wed, 4 Jan 2017 13:56:50 +0000 (14:56 +0100)] 
opencdk: cdk_pk_get_keyid: fix stack overflow

Issue found using oss-fuzz:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=340

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: added test case with invalid openpgp cert
Nikos Mavrogiannopoulos [Wed, 4 Jan 2017 13:48:38 +0000 (14:48 +0100)] 
tests: added test case with invalid openpgp cert

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>
9 years agotests: added test case with invalid openpgp cert
Nikos Mavrogiannopoulos [Wed, 4 Jan 2017 13:47:11 +0000 (14:47 +0100)] 
tests: added test case with invalid openpgp cert

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>
9 years agoopencdk: read_attribute: added more precise checks when reading stream
Nikos Mavrogiannopoulos [Wed, 4 Jan 2017 13:42:03 +0000 (14:42 +0100)] 
opencdk: read_attribute: added more precise checks when reading stream

That addresses heap read overflows found using oss-fuzz:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=338
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=346

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: added test case with invalid openpgp cert
Nikos Mavrogiannopoulos [Wed, 4 Jan 2017 13:34:05 +0000 (14:34 +0100)] 
tests: added test case with invalid openpgp cert

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>
9 years agotests: openpgp-cert-parser: simplified
Nikos Mavrogiannopoulos [Wed, 4 Jan 2017 13:31:26 +0000 (14:31 +0100)] 
tests: openpgp-cert-parser: simplified

9 years agoauth rsa: eliminated memory leak on pkcs-1 formatting attack path
Nikos Mavrogiannopoulos [Wed, 4 Jan 2017 08:46:26 +0000 (09:46 +0100)] 
auth rsa: eliminated memory leak on pkcs-1 formatting attack path

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: added reproducer for server issues
Nikos Mavrogiannopoulos [Wed, 4 Jan 2017 08:42:25 +0000 (09:42 +0100)] 
tests: added reproducer for server issues

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>
9 years ago_decode_pkcs8_dsa_key: fixed memory leak on error path
Nikos Mavrogiannopoulos [Wed, 4 Jan 2017 08:32:17 +0000 (09:32 +0100)] 
_decode_pkcs8_dsa_key: fixed memory leak on error path

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agodecode_private_key_info: eliminate memory leaks on error path
Nikos Mavrogiannopoulos [Wed, 4 Jan 2017 08:28:23 +0000 (09:28 +0100)] 
decode_private_key_info: eliminate memory leaks on error path

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years ago_gnutls_x509_read_dsa_params: update params structure parameters size on successful...
Nikos Mavrogiannopoulos [Wed, 4 Jan 2017 08:26:07 +0000 (09:26 +0100)] 
_gnutls_x509_read_dsa_params: update params structure parameters size on successful read

That will allow proper deinitialization of the parameters even if
the structure fill up doesn't succeed.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: added test with private key that causes memory leak
Nikos Mavrogiannopoulos [Wed, 4 Jan 2017 08:18:03 +0000 (09:18 +0100)] 
tests: added test with private key that causes memory leak

Issue found using oss-fuzz:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=371

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years ago_gnutls_pkcs12_string_to_key: avoid division by zero when salt_size = 0
Nikos Mavrogiannopoulos [Wed, 4 Jan 2017 08:10:54 +0000 (09:10 +0100)] 
_gnutls_pkcs12_string_to_key: avoid division by zero when salt_size = 0

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: added test with PKCS#8 key that signals FPE
Nikos Mavrogiannopoulos [Wed, 4 Jan 2017 08:07:10 +0000 (09:07 +0100)] 
tests: added test with PKCS#8 key that signals FPE

Issue found using oss-fuzz:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=376

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: skip tests that requires tools if tools are disabled
Alon Bar-Lev [Sat, 31 Dec 2016 03:07:47 +0000 (05:07 +0200)] 
tests: skip tests that requires tools if tools are disabled

building with --disable-tools should not cause test failure.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
9 years agotests: cert-tests: pkcs12 drop builddir usage
Alon Bar-Lev [Tue, 3 Jan 2017 12:56:05 +0000 (14:56 +0200)] 
tests: cert-tests: pkcs12 drop builddir usage

sync with other tests

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
9 years agotests: suite: pkcs11: skip if no softhsm
Alon Bar-Lev [Tue, 3 Jan 2017 12:40:36 +0000 (14:40 +0200)] 
tests: suite: pkcs11: skip if no softhsm

similar to other tests

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
9 years agognutls_x509_ext_import_policies: fixed memory leak on error path
Nikos Mavrogiannopoulos [Tue, 3 Jan 2017 15:10:07 +0000 (16:10 +0100)] 
gnutls_x509_ext_import_policies: fixed memory leak on error path

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: added test case with invalid X.509 cert
Nikos Mavrogiannopoulos [Tue, 3 Jan 2017 14:53:27 +0000 (15:53 +0100)] 
tests: added test case with invalid X.509 cert

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>
9 years agox509 output: fixed memory leak in AIA extension printing
Nikos Mavrogiannopoulos [Tue, 3 Jan 2017 14:49:37 +0000 (15:49 +0100)] 
x509 output: fixed memory leak in AIA extension printing

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: added test case with invalid X.509 cert
Nikos Mavrogiannopoulos [Tue, 3 Jan 2017 14:46:41 +0000 (15:46 +0100)] 
tests: added test case with invalid X.509 cert

Issue found using oss-fuzz:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=300

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agodoc: document how to enhance the testsuite with issues found
Nikos Mavrogiannopoulos [Tue, 3 Jan 2017 14:00:59 +0000 (15:00 +0100)] 
doc: document how to enhance the testsuite with issues found

9 years agostatus_request: eliminated leak on error path
Nikos Mavrogiannopoulos [Tue, 3 Jan 2017 13:37:18 +0000 (14:37 +0100)] 
status_request: eliminated leak on error path

Issue found using oss-fuzz:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=269

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agoproc_server_kx: eliminated leak on error path
Nikos Mavrogiannopoulos [Tue, 3 Jan 2017 12:49:18 +0000 (13:49 +0100)] 
proc_server_kx: eliminated leak on error path

Issue found using oss-fuzz:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=272

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: added reproducer for client issues
Nikos Mavrogiannopoulos [Tue, 3 Jan 2017 13:49:03 +0000 (14:49 +0100)] 
tests: added reproducer for client issues

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>
9 years agotests: do not run key-tests under leak sanitizer
Nikos Mavrogiannopoulos [Tue, 3 Jan 2017 12:39:43 +0000 (13:39 +0100)] 
tests: do not run key-tests under leak sanitizer

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>
9 years agotests: illegal-rsa: don't hide stderr
Nikos Mavrogiannopoulos [Tue, 3 Jan 2017 12:20:16 +0000 (13:20 +0100)] 
tests: illegal-rsa: don't hide stderr

9 years agotests: added suite for checking PKCS#7 structure import
Nikos Mavrogiannopoulos [Mon, 2 Jan 2017 09:47:24 +0000 (10:47 +0100)] 
tests: added suite for checking PKCS#7 structure import

The initial (problematic) structures have been obtained from oss-fuzz
project.

9 years agofuzz: added basic Makefile to assist in reproducing [ci skip]
Nikos Mavrogiannopoulos [Tue, 3 Jan 2017 10:39:13 +0000 (11:39 +0100)] 
fuzz: added basic Makefile to assist in reproducing [ci skip]

Also updated README.md

9 years agoSimplified contribution policy [ci skip]
Nikos Mavrogiannopoulos [Mon, 2 Jan 2017 16:24:41 +0000 (17:24 +0100)] 
Simplified contribution policy [ci skip]

Also added a template to assist in the required steps to contribute.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years ago_gnutls_x509_get_signature: fix memory leak on error path
Nikos Mavrogiannopoulos [Mon, 2 Jan 2017 16:05:29 +0000 (17:05 +0100)] 
_gnutls_x509_get_signature: fix memory leak on error path

9 years agotests: added test case with invalid X.509 certificate
Nikos Mavrogiannopoulos [Mon, 2 Jan 2017 16:04:29 +0000 (17:04 +0100)] 
tests: added test case with invalid X.509 certificate

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

9 years agovalgrind: use different exit code to signify error
Nikos Mavrogiannopoulos [Mon, 2 Jan 2017 14:07:48 +0000 (15:07 +0100)] 
valgrind: use different exit code to signify error

This allows the test suite to differentiate between valgrind and expected
errors from tools.

9 years agotests: cert-tests: force asan to return an error code other than one on failure
Nikos Mavrogiannopoulos [Mon, 2 Jan 2017 14:01:26 +0000 (15:01 +0100)] 
tests: cert-tests: force asan to return an error code other than one on failure

9 years agognutls_pkcs8_info: addressed memory leak on error path
Nikos Mavrogiannopoulos [Mon, 2 Jan 2017 14:00:24 +0000 (15:00 +0100)] 
gnutls_pkcs8_info: addressed memory leak on error path

9 years agocerttool: pkcs8_info_int: fix memory leak
Nikos Mavrogiannopoulos [Mon, 2 Jan 2017 13:55:14 +0000 (14:55 +0100)] 
certtool: pkcs8_info_int: fix memory leak

9 years agowrap_nettle_mpi_modm: bail on a modulus that is zero
Nikos Mavrogiannopoulos [Mon, 2 Jan 2017 12:44:46 +0000 (13:44 +0100)] 
wrap_nettle_mpi_modm: bail on a modulus that is zero

Relates #156

9 years agotests: added test for invalid private keys
Nikos Mavrogiannopoulos [Mon, 2 Jan 2017 12:32:41 +0000 (13:32 +0100)] 
tests: added test for invalid private keys

Also force asan to return an error code other than one (the normally
expected for invalid keys).

9 years agox509: address leak in print_altname - cert printing
Nikos Mavrogiannopoulos [Mon, 2 Jan 2017 11:02:53 +0000 (12:02 +0100)] 
x509: address leak in print_altname - cert printing

9 years agotests: added certificate to reproduce memory leak
Nikos Mavrogiannopoulos [Mon, 2 Jan 2017 11:03:35 +0000 (12:03 +0100)] 
tests: added certificate to reproduce memory leak

Found by oss-fuzz project:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=299

Relates #156

9 years agotests: added test case with invalid PKCS#8 data
Nikos Mavrogiannopoulos [Mon, 2 Jan 2017 10:05:21 +0000 (11:05 +0100)] 
tests: added test case with invalid PKCS#8 data

Issue found using oss-fuzz:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=363

Relates #156

9 years agonettle: added a safety net on wrap_nettle_cipher_setiv()
Nikos Mavrogiannopoulos [Mon, 2 Jan 2017 10:20:45 +0000 (11:20 +0100)] 
nettle: added a safety net on wrap_nettle_cipher_setiv()

Return error if attempting to set invalid IV size.

9 years agopkcs7 decrypt: require a valid IV size on all ciphers
Nikos Mavrogiannopoulos [Mon, 2 Jan 2017 10:51:10 +0000 (11:51 +0100)] 
pkcs7 decrypt: require a valid IV size on all ciphers

That is, do not accept the IV size present in the structure as valid
without checking.

Relates #156

9 years agofuzz: added a PBES1 PKCS#8 private key file into corpus
Nikos Mavrogiannopoulos [Mon, 2 Jan 2017 12:26:29 +0000 (13:26 +0100)] 
fuzz: added a PBES1 PKCS#8 private key file into corpus

9 years agopkcs8: pkcs8_key_info() will correctly detect non-encrypted files
Nikos Mavrogiannopoulos [Mon, 2 Jan 2017 12:23:01 +0000 (13:23 +0100)] 
pkcs8: pkcs8_key_info() will correctly detect non-encrypted files

9 years agocerttool: don't print PKCS#8 information when outputting DER data
Nikos Mavrogiannopoulos [Mon, 2 Jan 2017 12:19:49 +0000 (13:19 +0100)] 
certtool: don't print PKCS#8 information when outputting DER data

9 years agoCorrected a leak in OpenPGP sub-packet parsing.
Alex Gaynor [Sun, 1 Jan 2017 14:15:09 +0000 (09:15 -0500)] 
Corrected a leak in OpenPGP sub-packet parsing.

Signed-off-by: Alex Gaynor <alex.gaynor@gmail.com>
9 years agodoc: fixed copyright date in gnutls.texi
Nikos Mavrogiannopoulos [Mon, 2 Jan 2017 09:13:48 +0000 (10:13 +0100)] 
doc: fixed copyright date in gnutls.texi

9 years agognutls_rnd: document the available values of level [ci skip]
Nikos Mavrogiannopoulos [Mon, 2 Jan 2017 07:43:47 +0000 (08:43 +0100)] 
gnutls_rnd: document the available values of level [ci skip]

This enables using the function by only checking the man page.

9 years agopkcs11 verification: ensure that an issuer we retrieve is not blacklist
Nikos Mavrogiannopoulos [Fri, 9 Dec 2016 15:45:19 +0000 (16:45 +0100)] 
pkcs11 verification: ensure that an issuer we retrieve is not blacklist

It may happen in p11-kit trust module that a trusted certificate is
both in the trusted set, and the blacklisted set. To avoid accepting
a certificate when in both sets, we always check whether a trusted
issuer certificate is in the blacklisted set.

9 years agoAttempt to fix a leak in OpenPGP cert parsing.
Alex Gaynor [Sat, 31 Dec 2016 02:17:22 +0000 (21:17 -0500)] 
Attempt to fix a leak in OpenPGP cert parsing.

9 years agotests: enable all the ciphersuite in openssl cli for DSS checks
Nikos Mavrogiannopoulos [Sat, 31 Dec 2016 13:57:57 +0000 (14:57 +0100)] 
tests: enable all the ciphersuite in openssl cli for DSS checks

9 years agocerttool: improved error reporting on file error
Nikos Mavrogiannopoulos [Sat, 31 Dec 2016 10:48:44 +0000 (11:48 +0100)] 
certtool: improved error reporting on file error

9 years agotests: don't check against 3DES if disabled in openssl
Nikos Mavrogiannopoulos [Sat, 31 Dec 2016 12:27:10 +0000 (13:27 +0100)] 
tests: don't check against 3DES if disabled in openssl

9 years agotests: do not pass the -dhparams to openssl 1.1.0; it doesn't work
Nikos Mavrogiannopoulos [Sat, 31 Dec 2016 12:25:23 +0000 (13:25 +0100)] 
tests: do not pass the -dhparams to openssl 1.1.0; it doesn't work

9 years agotests: simplified DH params format
Nikos Mavrogiannopoulos [Sat, 31 Dec 2016 11:14:44 +0000 (12:14 +0100)] 
tests: simplified DH params format

Also switch to RFC7919 DH params.

9 years agotests: corrected type in openssl compat tests
Nikos Mavrogiannopoulos [Sat, 31 Dec 2016 11:13:20 +0000 (12:13 +0100)] 
tests: corrected type in openssl compat tests

9 years agotests: added common variable for DH parameters
Nikos Mavrogiannopoulos [Sat, 31 Dec 2016 11:12:33 +0000 (12:12 +0100)] 
tests: added common variable for DH parameters

9 years agotests: fixed paths in compat tests
Nikos Mavrogiannopoulos [Wed, 28 Dec 2016 09:36:37 +0000 (10:36 +0100)] 
tests: fixed paths in compat tests

9 years agotests: better termination checking in compat tests
Nikos Mavrogiannopoulos [Wed, 28 Dec 2016 08:04:59 +0000 (09:04 +0100)] 
tests: better termination checking in compat tests

This ensures that the exit code of all spawned processes is
checked.

9 years agocfg.mk: exclude devel/ subdirectory from syntax checks
Nikos Mavrogiannopoulos [Sat, 31 Dec 2016 09:12:34 +0000 (10:12 +0100)] 
cfg.mk: exclude devel/ subdirectory from syntax checks

9 years agocerttool: properly report unencrypted PKCS#8 keys in --p8-info
Nikos Mavrogiannopoulos [Fri, 30 Dec 2016 14:50:45 +0000 (15:50 +0100)] 
certtool: properly report unencrypted PKCS#8 keys in --p8-info

9 years agofuzz: added decrypted PKCS#8 keys
Nikos Mavrogiannopoulos [Fri, 30 Dec 2016 14:41:53 +0000 (15:41 +0100)] 
fuzz: added decrypted PKCS#8 keys

9 years agofuzz: added PKCS#8 keys with low iteration count
Nikos Mavrogiannopoulos [Fri, 30 Dec 2016 14:23:17 +0000 (15:23 +0100)] 
fuzz: added PKCS#8 keys with low iteration count

This makes sure that the fuzzer will not timeout while
trying to decode keys.

9 years agosubmodules: use the github mirror of openssl
Nikos Mavrogiannopoulos [Wed, 28 Dec 2016 10:01:37 +0000 (11:01 +0100)] 
submodules: use the github mirror of openssl

9 years agoDo not infinite loop if an EOF occurs while skipping a PGP packet
Alex Gaynor [Mon, 26 Dec 2016 18:15:25 +0000 (13:15 -0500)] 
Do not infinite loop if an EOF occurs while skipping a PGP packet

Signed-off-by: Alex Gaynor <alex.gaynor@gmail.com>
9 years agoAdded a fuzzer for OpenPGP cert parsing
Alex Gaynor [Tue, 27 Dec 2016 14:45:31 +0000 (09:45 -0500)] 
Added a fuzzer for OpenPGP cert parsing

Signed-off-by: Alex Gaynor <alex.gaynor@gmail.com>
9 years agofuzz: document the convention for initial values
Nikos Mavrogiannopoulos [Wed, 28 Dec 2016 08:59:34 +0000 (09:59 +0100)] 
fuzz: document the convention for initial values