]> git.ipfire.org Git - thirdparty/gnutls.git/log
thirdparty/gnutls.git
10 years agotests: do not run srp test when no SRP support is compiled in
Nikos Mavrogiannopoulos [Tue, 9 Aug 2016 07:35:03 +0000 (09:35 +0200)] 
tests: do not run srp test when no SRP support is compiled in

10 years agotests: moved child status error checking code in utils.h
Nikos Mavrogiannopoulos [Mon, 8 Aug 2016 09:49:04 +0000 (11:49 +0200)] 
tests: moved child status error checking code in utils.h

10 years agolatex: updated sources for new functions
Nikos Mavrogiannopoulos [Tue, 9 Aug 2016 05:46:42 +0000 (07:46 +0200)] 
latex: updated sources for new functions

10 years agoupdated auto-generated files gnutls_3_5_3
Nikos Mavrogiannopoulos [Tue, 9 Aug 2016 05:28:27 +0000 (07:28 +0200)] 
updated auto-generated files

10 years agoreleased 3.5.3
Nikos Mavrogiannopoulos [Tue, 9 Aug 2016 05:23:36 +0000 (07:23 +0200)] 
released 3.5.3

10 years agognutls_transport_set_fastopen: added flags options
Nikos Mavrogiannopoulos [Mon, 8 Aug 2016 14:30:10 +0000 (16:30 +0200)] 
gnutls_transport_set_fastopen: added flags options

This will allow minor modifications to the semantics of the function
in the future, without introducing a new API.

10 years agodoc update
Nikos Mavrogiannopoulos [Mon, 8 Aug 2016 14:22:42 +0000 (16:22 +0200)] 
doc update

10 years agoFix gnutls_pkcs12_simple_parse to always extract the complete chain
Stefan Sørensen [Mon, 8 Aug 2016 11:31:15 +0000 (13:31 +0200)] 
Fix gnutls_pkcs12_simple_parse to always extract the complete chain

gnutls_pkcs12_simple_parse was only collecting extra certificates that was
possible elements of the certificate chain when the extra_certs argument was
not NULL. Fix by allways collecting all the certificates, any unneeded
certificates are released before returning if extra_certs is NULL anyway.

Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
10 years agotests: check gnutls_certificate_get_x509_crt with more than one certificates
Nikos Mavrogiannopoulos [Mon, 8 Aug 2016 14:08:29 +0000 (16:08 +0200)] 
tests: check gnutls_certificate_get_x509_crt with more than one certificates

This would detect the issue in the "Fix invalid pointer operation in gnutls_certificate_get_x509_crt"

10 years agotests: Use common ca3 test certificates in x509cert, x509dn and x509self tests.
Stefan Sørensen [Mon, 8 Aug 2016 11:31:17 +0000 (13:31 +0200)] 
tests: Use common ca3 test certificates in x509cert, x509dn and x509self tests.

Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
10 years agotests: Remove zero-termination of gnutls_datum encapsulated certificates
Stefan Sørensen [Mon, 8 Aug 2016 11:31:16 +0000 (13:31 +0200)] 
tests: Remove zero-termination of gnutls_datum encapsulated certificates

This allows for memcmp comparison with certificates after processing.

Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
10 years agoFix invalid pointer operation in gnutls_certificate_get_x509_crt
Stefan Sørensen [Mon, 8 Aug 2016 11:31:14 +0000 (13:31 +0200)] 
Fix invalid pointer operation in gnutls_certificate_get_x509_crt

The access to the allocated crt_list variable was missing a pointer
dereference, leading to memory corruption for any certificate list with more
than one element.

Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
10 years agotests: added check for errors when importing illegal RSA keys
Nikos Mavrogiannopoulos [Sun, 7 Aug 2016 10:56:21 +0000 (12:56 +0200)] 
tests: added check for errors when importing illegal RSA keys

10 years agox509: call the fixup functions after loading private keys
Nikos Mavrogiannopoulos [Sun, 7 Aug 2016 10:45:03 +0000 (12:45 +0200)] 
x509: call the fixup functions after loading private keys

That way we can better report errors which relate to illegal
parameters being detected.

10 years agonettle: use rsa_*_key_prepare on key import
Nikos Mavrogiannopoulos [Sun, 7 Aug 2016 10:06:39 +0000 (12:06 +0200)] 
nettle: use rsa_*_key_prepare on key import

Previously we calculated the size of the key directly, but
by using the rsa_*_key_prepare we benefit from any checks that
may be introduced in the future. Specifically any checks for invalid
public keys (e.g., keys that may crash the underlying gmp functions).

This patch avoids calling rsa_private_key_prepare every time we construct
a nettle private key struct, because this function requires a bigint
multiplication. We call that function once on private key import.

10 years agotests: added missing backslash in key-tests Makefile
Nikos Mavrogiannopoulos [Sun, 7 Aug 2016 09:53:19 +0000 (11:53 +0200)] 
tests: added missing backslash in key-tests Makefile

10 years agoRevert "nettle: use rsa_*_key_prepare"
Nikos Mavrogiannopoulos [Mon, 8 Aug 2016 06:25:31 +0000 (08:25 +0200)] 
Revert "nettle: use rsa_*_key_prepare"

This reverts commit c801a15bca9ea8f3f7abd4be48bebd36c54eeba2.

10 years agognutls.h: moved all compatibility defines outside the enum
Nikos Mavrogiannopoulos [Sun, 7 Aug 2016 09:41:47 +0000 (11:41 +0200)] 
gnutls.h: moved all compatibility defines outside the enum

10 years agoprepared for release 3.5.3
Nikos Mavrogiannopoulos [Sun, 7 Aug 2016 09:31:36 +0000 (11:31 +0200)] 
prepared for release 3.5.3

10 years agotests: use gnutls_record_set_timeout instead of kill child processes
Nikos Mavrogiannopoulos [Fri, 5 Aug 2016 13:55:47 +0000 (15:55 +0200)] 
tests: use gnutls_record_set_timeout instead of kill child processes

That way we avoid issues like #118 which are caused by killing the child
process, and we also avoid deadlocks by making sure that recv will terminate
after a long delay.

10 years agotests: mini-record modify in a way to be more fail safe
Nikos Mavrogiannopoulos [Fri, 5 Aug 2016 13:52:17 +0000 (15:52 +0200)] 
tests: mini-record modify in a way to be more fail safe

That is, do not kill the child, but instead switch the roles of
child and parent, and add a timeout on recv to avoid infinite delays.

Relates: #118

10 years agopkcs11: is_object_pkcs11_url -> is_pkcs11_url_object
Nikos Mavrogiannopoulos [Fri, 5 Aug 2016 13:20:48 +0000 (15:20 +0200)] 
pkcs11: is_object_pkcs11_url -> is_pkcs11_url_object

Renamed function for clarity.

10 years agotests: ignore sigpipe in mini-record
Nikos Mavrogiannopoulos [Fri, 5 Aug 2016 07:46:14 +0000 (09:46 +0200)] 
tests: ignore sigpipe in mini-record

10 years agognutls_fips140_mode_enabled: changed return type to unsigned
Nikos Mavrogiannopoulos [Fri, 5 Aug 2016 07:30:14 +0000 (09:30 +0200)] 
gnutls_fips140_mode_enabled: changed return type to unsigned

10 years agodoc: updated contribution guide with more info on test suite [ci skip]
Nikos Mavrogiannopoulos [Thu, 4 Aug 2016 11:58:54 +0000 (13:58 +0200)] 
doc: updated contribution guide with more info on test suite [ci skip]

10 years agognutls_pkcs11_privkey_status: return type changed to unsigned
Nikos Mavrogiannopoulos [Thu, 4 Aug 2016 08:22:50 +0000 (10:22 +0200)] 
gnutls_pkcs11_privkey_status: return type changed to unsigned

10 years agodoc: added section on SCTP protocol [ci skip]
Nikos Mavrogiannopoulos [Thu, 4 Aug 2016 07:57:04 +0000 (09:57 +0200)] 
doc: added section on SCTP protocol [ci skip]

10 years agotests: client-fastopen: removed seccomp conditional
Nikos Mavrogiannopoulos [Tue, 2 Aug 2016 11:46:05 +0000 (13:46 +0200)] 
tests: client-fastopen: removed seccomp conditional

10 years agofastopen: improved error checking at connect()
Nikos Mavrogiannopoulos [Tue, 2 Aug 2016 11:34:18 +0000 (13:34 +0200)] 
fastopen: improved error checking at connect()

10 years agonettle: use rsa_*_key_prepare
Nikos Mavrogiannopoulos [Mon, 1 Aug 2016 08:48:46 +0000 (10:48 +0200)] 
nettle: use rsa_*_key_prepare

Previously we calculated the size of the key directly, but
by using the rsa_*_key_prepare we benefit from any checks that
may be introduced in the future. Specifically any checks for invalid
public keys (e.g., keys that may crash the underlying gmp functions).

10 years agognutls_transport_set_fastopen: doc update
Nikos Mavrogiannopoulos [Fri, 29 Jul 2016 13:00:06 +0000 (15:00 +0200)] 
gnutls_transport_set_fastopen: doc update

10 years agodoc update
Nikos Mavrogiannopoulos [Fri, 29 Jul 2016 11:47:27 +0000 (13:47 +0200)] 
doc update

10 years agogetrandom: use SYS_getrandom instead of __NR_getrandom
Nikos Mavrogiannopoulos [Fri, 29 Jul 2016 10:19:25 +0000 (12:19 +0200)] 
getrandom: use SYS_getrandom instead of __NR_getrandom

These are identical definitions, but according to syscall()
SYS_getrandom is the expected value.

10 years agox059: Fix asymmetry in name constraints intersection
Martin Ukrop [Wed, 27 Jul 2016 13:41:08 +0000 (15:41 +0200)] 
x059: Fix asymmetry in name constraints intersection

- In _gnutls_name_constraints_intersect, if *_nc had a node of some type not present in _nc2, this was preserved. However, if it was vice versa (_nc2 having a type not present in *_nc), this node was discarded.
- This is now fixed.
- Removed redundant return value check that was accidentally left when refactoring from set_datum to explicit NULL setting.

Signed-off-by: Martin Ukrop <mukrop@redhat.com>
10 years agotests: Add and improve chain tests
Martin Ukrop [Tue, 26 Jul 2016 15:44:53 +0000 (17:44 +0200)] 
tests: Add and improve chain tests

- Add a new chaintest testing the symmetry of merging name constraints of different types.
- Rename old name_constraints_but_no_name test to match other name constraints tests.
- Improve chain description of older name constraints tests.

Signed-off-by: Martin Ukrop <mukrop@redhat.com>
10 years agodoc update [ci skip]
Nikos Mavrogiannopoulos [Thu, 28 Jul 2016 12:34:15 +0000 (14:34 +0200)] 
doc update [ci skip]

10 years agoconfigure: do not generate makefiles in removed dirs
Nikos Mavrogiannopoulos [Thu, 28 Jul 2016 11:41:11 +0000 (13:41 +0200)] 
configure: do not generate makefiles in removed dirs

10 years agotests: updated paths for new location of p12 files
Nikos Mavrogiannopoulos [Thu, 28 Jul 2016 11:37:31 +0000 (13:37 +0200)] 
tests: updated paths for new location of p12 files

10 years agotests: safe renegotiation tests are run from top dir
Nikos Mavrogiannopoulos [Thu, 28 Jul 2016 11:34:34 +0000 (13:34 +0200)] 
tests: safe renegotiation tests are run from top dir

10 years agotests: srp tests moved outside subdir
Nikos Mavrogiannopoulos [Thu, 28 Jul 2016 11:30:18 +0000 (13:30 +0200)] 
tests: srp tests moved outside subdir

10 years agotests: moved sha2 tests into cert-tests/
Nikos Mavrogiannopoulos [Thu, 28 Jul 2016 11:24:55 +0000 (13:24 +0200)] 
tests: moved sha2 tests into cert-tests/

10 years agotests: moved ecdsa tests to key-tests/
Nikos Mavrogiannopoulos [Thu, 28 Jul 2016 11:20:25 +0000 (13:20 +0200)] 
tests: moved ecdsa tests to key-tests/

10 years agotests: moved dsa tests into key-tests/
Nikos Mavrogiannopoulos [Thu, 28 Jul 2016 11:13:39 +0000 (13:13 +0200)] 
tests: moved dsa tests into key-tests/

10 years agotests: moved pkcs8 tests to key-tests/
Nikos Mavrogiannopoulos [Thu, 28 Jul 2016 11:08:57 +0000 (13:08 +0200)] 
tests: moved pkcs8 tests to key-tests/

10 years agotests: key-tests: moved data files into data/ subdir
Nikos Mavrogiannopoulos [Thu, 28 Jul 2016 11:04:31 +0000 (13:04 +0200)] 
tests: key-tests: moved data files into data/ subdir

10 years agotests: moved pkcs12 tests into cert-certs/ subdir
Nikos Mavrogiannopoulos [Thu, 28 Jul 2016 10:59:33 +0000 (12:59 +0200)] 
tests: moved pkcs12 tests into cert-certs/ subdir

10 years agomore files to ignore
Nikos Mavrogiannopoulos [Thu, 28 Jul 2016 09:23:43 +0000 (11:23 +0200)] 
more files to ignore

10 years agoRequire compiler to support C99
Tim Rühsen [Thu, 28 Jul 2016 07:55:27 +0000 (09:55 +0200)] 
Require compiler to support C99

10 years agodoc update
Nikos Mavrogiannopoulos [Thu, 28 Jul 2016 11:59:26 +0000 (13:59 +0200)] 
doc update

10 years agoAdd test for gnutls_x509_crt_list_import2 with flag GNUTLS_X509_CRT_LIST_FAIL_IF_UNSO...
Tim Kosse [Sat, 9 Jul 2016 11:03:55 +0000 (13:03 +0200)] 
Add test for gnutls_x509_crt_list_import2 with flag GNUTLS_X509_CRT_LIST_FAIL_IF_UNSORTED.

10 years agognutls_x509_crl_list_import2 was ignoring the passed flags if all CTLs in the list...
Tim Kosse [Sat, 9 Jul 2016 10:24:33 +0000 (12:24 +0200)] 
gnutls_x509_crl_list_import2 was ignoring the passed flags if all CTLs in the list fit within the initially allocated memory.

10 years agognutls_certificate_get_peers may return an unsorted list
Nikos Mavrogiannopoulos [Thu, 28 Jul 2016 08:51:40 +0000 (10:51 +0200)] 
gnutls_certificate_get_peers may return an unsorted list

10 years agognutls_x509_crt_list_import2 was ignoring the passed flags if all certificates in...
Tim Kosse [Sat, 9 Jul 2016 09:53:52 +0000 (11:53 +0200)] 
gnutls_x509_crt_list_import2 was ignoring the passed flags if all certificates in the list fit within the initially allocated memory.

10 years agox509: parse_tlsfeatures: move limit check at the point of addition
Nikos Mavrogiannopoulos [Thu, 28 Jul 2016 08:37:00 +0000 (10:37 +0200)] 
x509: parse_tlsfeatures: move limit check at the point of addition

This prevents appending failures when verifying chains on certificates
which use the maximum allowed number of features. Suggested by Tim
Kosse.

10 years agotests: removed irrelevant comment
Nikos Mavrogiannopoulos [Thu, 28 Jul 2016 08:33:06 +0000 (10:33 +0200)] 
tests: removed irrelevant comment

10 years agocorrect the sign type of integers in debug message
Nikos Mavrogiannopoulos [Thu, 28 Jul 2016 08:31:25 +0000 (10:31 +0200)] 
correct the sign type of integers in debug message

Suggested by Tim Kosse

10 years agoverify_crt: simplified error setting
Nikos Mavrogiannopoulos [Thu, 28 Jul 2016 08:29:18 +0000 (10:29 +0200)] 
verify_crt: simplified error setting

based on suggestion by Tim Kosse.

10 years agoverify_crt: removed text on parameter no longer being present
Nikos Mavrogiannopoulos [Thu, 28 Jul 2016 08:12:46 +0000 (10:12 +0200)] 
verify_crt: removed text on parameter no longer being present

10 years agox509: avoid using int declaration within a for-loop
Nikos Mavrogiannopoulos [Wed, 27 Jul 2016 21:36:20 +0000 (23:36 +0200)] 
x509: avoid using int declaration within a for-loop

This addresses compilation problem with old compilers,
and brings consistency as this type of declaration is not
used in gnutls' code.

10 years agognutls_global_init/deinit: don't use any locking during constructor
Nikos Mavrogiannopoulos [Wed, 27 Jul 2016 21:32:28 +0000 (23:32 +0200)] 
gnutls_global_init/deinit: don't use any locking during constructor

This ensures that there is no deadlock on unexpected errors, such
as missing symbols (e.g., on lazy linking). Reported by Ludovic Courtès.

10 years agornd-linux: use better define check for linux systems
Nikos Mavrogiannopoulos [Wed, 27 Jul 2016 21:27:07 +0000 (23:27 +0200)] 
rnd-linux: use better define check for linux systems

10 years agognutls_prf: document when its output matches gnutls_prf_rfc5705
Nikos Mavrogiannopoulos [Wed, 27 Jul 2016 11:10:28 +0000 (13:10 +0200)] 
gnutls_prf: document when its output matches gnutls_prf_rfc5705

10 years agodoc: gnutls_session_set_id: added since
Nikos Mavrogiannopoulos [Wed, 27 Jul 2016 09:05:59 +0000 (11:05 +0200)] 
doc: gnutls_session_set_id: added since

10 years ago.gitlab-ci.yml: keep the guile logs as artifacts on test suite failure
Nikos Mavrogiannopoulos [Wed, 27 Jul 2016 08:38:47 +0000 (10:38 +0200)] 
.gitlab-ci.yml: keep the guile logs as artifacts on test suite failure

10 years agodoc update
Nikos Mavrogiannopoulos [Wed, 27 Jul 2016 07:20:52 +0000 (09:20 +0200)] 
doc update

10 years agoAdd extra dependency flags
David Walker [Wed, 20 Jul 2016 11:43:26 +0000 (12:43 +0100)] 
Add extra dependency flags

This fixes the build when the dependencies are split up during a cross-compile

Resolves: #113

10 years agomoved system-keys-win.c and system-key-dummy.c under system/
Nikos Mavrogiannopoulos [Tue, 26 Jul 2016 13:14:33 +0000 (15:14 +0200)] 
moved system-keys-win.c and system-key-dummy.c under system/

10 years agosplit system.c to various files under system/
Nikos Mavrogiannopoulos [Mon, 25 Jul 2016 13:47:19 +0000 (15:47 +0200)] 
split system.c to various files under system/

10 years agognutls.h: giovec_t is a typedef to iovec where that is available
Nikos Mavrogiannopoulos [Mon, 25 Jul 2016 14:26:39 +0000 (16:26 +0200)] 
gnutls.h: giovec_t is a typedef to iovec where that is available

10 years agotests: added unit test for linux _rnd_get_system_entropy
Nikos Mavrogiannopoulos [Tue, 26 Jul 2016 11:37:43 +0000 (13:37 +0200)] 
tests: added unit test for linux _rnd_get_system_entropy

This tests whether the function can operate as expected while being
interrupted by signals.

10 years agogetrandom: loop around getrandom to get the requested number of bytes
Nikos Mavrogiannopoulos [Tue, 26 Jul 2016 10:03:54 +0000 (12:03 +0200)] 
getrandom: loop around getrandom to get the requested number of bytes

This simplifies and enhanced the previous error handling code.

10 years agoREADME.ci-runners: document asan and ubsan tags
Nikos Mavrogiannopoulos [Tue, 26 Jul 2016 09:45:30 +0000 (11:45 +0200)] 
README.ci-runners: document asan and ubsan tags

10 years agotests: removed pkcs1-padding from subdirs
Nikos Mavrogiannopoulos [Tue, 26 Jul 2016 13:17:35 +0000 (15:17 +0200)] 
tests: removed pkcs1-padding from subdirs

10 years ago.gitignore: more tests files to ignore
Nikos Mavrogiannopoulos [Tue, 26 Jul 2016 13:10:49 +0000 (15:10 +0200)] 
.gitignore: more tests files to ignore

10 years agoconfigure.ac: don't generate makefiles of moved tests
Nikos Mavrogiannopoulos [Tue, 26 Jul 2016 12:59:34 +0000 (14:59 +0200)] 
configure.ac: don't generate makefiles of moved tests

10 years agotests: pkcs1-pad: moved to cert-tests
Nikos Mavrogiannopoulos [Tue, 26 Jul 2016 12:57:44 +0000 (14:57 +0200)] 
tests: pkcs1-pad: moved to cert-tests

10 years agotests: userid test moved to cert-tests/
Nikos Mavrogiannopoulos [Tue, 26 Jul 2016 12:55:25 +0000 (14:55 +0200)] 
tests: userid test moved to cert-tests/

10 years agotests: rsa-md5-collision: run from top-level
Nikos Mavrogiannopoulos [Tue, 26 Jul 2016 12:51:59 +0000 (14:51 +0200)] 
tests: rsa-md5-collision: run from top-level

10 years agodoc: updated documentation for gnutls_transport_set_int*
Nikos Mavrogiannopoulos [Tue, 26 Jul 2016 12:29:45 +0000 (14:29 +0200)] 
doc: updated documentation for gnutls_transport_set_int*

10 years agodoc: added section on reducing round-trips
Nikos Mavrogiannopoulos [Tue, 26 Jul 2016 11:59:04 +0000 (13:59 +0200)] 
doc: added section on reducing round-trips

That discusses TCP fast open with gnutls_transport_set_fastopen(), and false start.

10 years agotests: added test of gnutls_transport_set_fastopen
Nikos Mavrogiannopoulos [Tue, 26 Jul 2016 09:38:32 +0000 (11:38 +0200)] 
tests: added test of gnutls_transport_set_fastopen

10 years agotests: added test of TCP fast open using gnutls-cli and gnutls-serv
Tim Ruehsen [Mon, 25 Jul 2016 11:05:30 +0000 (13:05 +0200)] 
tests: added test of TCP fast open using gnutls-cli and gnutls-serv

10 years agodoc update
Tim Ruehsen [Mon, 25 Jul 2016 11:08:28 +0000 (13:08 +0200)] 
doc update

10 years agotools: TLS handling has been incorporated into socket_open()
Nikos Mavrogiannopoulos [Tue, 26 Jul 2016 08:33:24 +0000 (10:33 +0200)] 
tools: TLS handling has been incorporated into socket_open()

This is of particular usage to the server IP address loop, since
we can detect fast open errors and retry handshake to the next IP
address.

10 years agognutls-cli: added example usage of TCP fastopen
Tim Ruehsen [Mon, 25 Jul 2016 11:04:11 +0000 (13:04 +0200)] 
gnutls-cli: added example usage of TCP fastopen

It is enabled with the new --fastopen option.

10 years agoSupport TCP Fast Open
Tim Ruehsen [Mon, 25 Jul 2016 11:00:12 +0000 (13:00 +0200)] 
Support TCP Fast Open

This introduces a new function gnutls_transport_set_fastopen().

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Signed-off-by: Tim Ruehsen <tim.ruehsen@gmx.de>
10 years ago.gitlab-ci.yml: added asan tag for builds which require asan
Nikos Mavrogiannopoulos [Tue, 26 Jul 2016 09:09:56 +0000 (11:09 +0200)] 
.gitlab-ci.yml: added asan tag for builds which require asan

10 years agotests: pkcs11-privkey-fork: added explicit pkcs11 deinitialization
Nikos Mavrogiannopoulos [Tue, 26 Jul 2016 09:08:12 +0000 (11:08 +0200)] 
tests: pkcs11-privkey-fork: added explicit pkcs11 deinitialization

Also ignore known leaks for p11-kit.

10 years agomention ubsan in README [ci skip]
Nikos Mavrogiannopoulos [Mon, 25 Jul 2016 09:43:08 +0000 (11:43 +0200)] 
mention ubsan in README [ci skip]

10 years agodoc update
Nikos Mavrogiannopoulos [Thu, 21 Jul 2016 18:14:39 +0000 (20:14 +0200)] 
doc update

10 years agotests: added checks for OCSP response file support
Nikos Mavrogiannopoulos [Fri, 22 Jul 2016 12:11:25 +0000 (14:11 +0200)] 
tests: added checks for OCSP response file support

That is, check the usability of the APIs for setting and using
an ocsp response. This improves and makes more generic the
test suite API and test_cli_serv() in particular.

10 years agodtls: added a null pointer check in record_overhead
Nikos Mavrogiannopoulos [Fri, 22 Jul 2016 13:36:55 +0000 (15:36 +0200)] 
dtls: added a null pointer check in record_overhead

According to my reading this check is unnecessary as in
no case a null pointer can be encountered. However gcc6
warns about a null pointer derefence and thus adding it,
to be safe.

10 years agognutls_x509_crt_check_hostname*: use unsigned a return value
Nikos Mavrogiannopoulos [Fri, 22 Jul 2016 12:43:49 +0000 (14:43 +0200)] 
gnutls_x509_crt_check_hostname*: use unsigned a return value

This is to prevent issues to callers who may check for negative
error values.

10 years agodoc update [ci skip]
Nikos Mavrogiannopoulos [Fri, 22 Jul 2016 09:17:08 +0000 (11:17 +0200)] 
doc update [ci skip]

10 years agointroduced: GNUTLS_E_UNAVAILABLE_DURING_HANDSHAKE
Nikos Mavrogiannopoulos [Fri, 22 Jul 2016 09:08:32 +0000 (11:08 +0200)] 
introduced: GNUTLS_E_UNAVAILABLE_DURING_HANDSHAKE

This error code is returned when the session resumption parameters
are requested during a handshake. That is, to increase the clarity
when requesting these parameters while false start is active and
the handshake is not complete even if gnutls_handshake() has returned.

Relates #114

10 years agotests: added check of the return values of resumption data functions during false...
Nikos Mavrogiannopoulos [Thu, 21 Jul 2016 16:58:24 +0000 (18:58 +0200)] 
tests: added check of the return values of resumption data functions during false start

Relates #114

10 years agodoc: mention that the session data functions will fail prior to handshake completion
Nikos Mavrogiannopoulos [Fri, 22 Jul 2016 08:57:37 +0000 (10:57 +0200)] 
doc: mention that the session data functions will fail prior to handshake completion

10 years agox509: Fix DNS name constraints checking
Martin Ukrop [Wed, 20 Jul 2016 12:52:00 +0000 (14:52 +0200)] 
x509: Fix DNS name constraints checking

- If the intersection of name constraints of the given type was empty, the results allowed all names instead of none.
- Fixed by adding an universal excluded name constraint in case the intersection for the particular type is empty.
- Moved the logic of creating a name constraint node copy from _gnutls_name_constraints_intersect to name_constraints_intersect_nodes (previously name_constraints_match), as intersecting IP addresses will require further processing (not just taking one of the compared nodes as was the implementation till now).
- GNUTLS_SAN_MAX added in order to comfortably iterate over SAN type enum.

10 years agotests: Add DNS name constraints tests
Martin Ukrop [Wed, 20 Jul 2016 12:29:40 +0000 (14:29 +0200)] 
tests: Add DNS name constraints tests

- One chaintest with empty permitted intersection.
- Merge testset with 2 permitted constraints with empty intersection (intersected list is completely empty).
- Merge testset with 3 permitted constraints, 2 of which have empty intersection.
- Merge testset with 2 permitted constraints with empty intersection and one constraints of different type that remains (intersected list is not empty).
- Enhance failing function with suite number for easier comprehension.

10 years agotests: Tidy up old X509 name constraints tests
Martin Ukrop [Wed, 20 Jul 2016 12:28:20 +0000 (14:28 +0200)] 
tests: Tidy up old X509 name constraints tests

- Use convenience functions for error checking and failure reporting.
- Drop explicit (de)initialization (prevents some not reed reachable memory due to PKCS11 subsystem not being deinitialized in the destructor).
- Use variables to count set permitted/excluded constraints instead of hard-coded numbers.