]> git.ipfire.org Git - thirdparty/gnutls.git/log
thirdparty/gnutls.git
8 years agotlsfuzzer: enabled test for ECDHE without the supported groups/EC extension
Nikos Mavrogiannopoulos [Fri, 21 Jul 2017 13:18:38 +0000 (15:18 +0200)] 
tlsfuzzer: enabled test for ECDHE without the supported groups/EC extension

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoSet a default supported curve
Nikos Mavrogiannopoulos [Wed, 2 Aug 2017 15:25:17 +0000 (17:25 +0200)] 
Set a default supported curve

RFC4492 and draft-ietf-tls-rfc4492bis-17 mention:
"A client that proposes ECC cipher suites may choose not to include these
extensions.  In this case, the server is free to choose any one of
the elliptic curves or point formats listed in Section 5."

As such, we set a default curve to be used in the case the
server encounters a handshake with no supported groups/curves
extension.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotlsfuzzer: removed duplicate tests
Nikos Mavrogiannopoulos [Wed, 2 Aug 2017 10:58:48 +0000 (12:58 +0200)] 
tlsfuzzer: removed duplicate tests

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotlsfuzzer: fixed comment fields
Nikos Mavrogiannopoulos [Wed, 2 Aug 2017 10:55:24 +0000 (12:55 +0200)] 
tlsfuzzer: fixed comment fields

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc update
Nikos Mavrogiannopoulos [Tue, 11 Jul 2017 06:02:56 +0000 (08:02 +0200)] 
doc update

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoupdated auto-generated files
Nikos Mavrogiannopoulos [Mon, 24 Jul 2017 06:39:00 +0000 (08:39 +0200)] 
updated auto-generated files

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls-cli: use FFDHE3072 parameters for benchmarking
Nikos Mavrogiannopoulos [Tue, 18 Jul 2017 06:13:00 +0000 (08:13 +0200)] 
gnutls-cli: use FFDHE3072 parameters for benchmarking

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago_gnutls_figure_dh_params: do not use have_ffdhe flag
Nikos Mavrogiannopoulos [Tue, 1 Aug 2017 08:21:37 +0000 (10:21 +0200)] 
_gnutls_figure_dh_params: do not use have_ffdhe flag

This flag is intended to indicate whether the peer has advertized
at least one FFDHE group, and not whether we have negotiated FFDHE.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added unit test for group listings in priority structure
Nikos Mavrogiannopoulos [Mon, 10 Jul 2017 10:23:55 +0000 (12:23 +0200)] 
tests: added unit test for group listings in priority structure

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: updated cipher-listings.sh for the new groups listing
Nikos Mavrogiannopoulos [Mon, 10 Jul 2017 10:05:01 +0000 (12:05 +0200)] 
tests: updated cipher-listings.sh for the new groups listing

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc: documented the use of RFC7919 and groups
Nikos Mavrogiannopoulos [Mon, 10 Jul 2017 09:46:03 +0000 (11:46 +0200)] 
doc: documented the use of RFC7919 and groups

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotlsfuzzer: enabled RFC7919 FFDHE tests
Nikos Mavrogiannopoulos [Mon, 3 Jul 2017 08:44:14 +0000 (10:44 +0200)] 
tlsfuzzer: enabled RFC7919 FFDHE tests

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: enhanced server key exchange tests with explicit DH param setting
Nikos Mavrogiannopoulos [Mon, 3 Jul 2017 07:09:27 +0000 (09:09 +0200)] 
tests: enhanced server key exchange tests with explicit DH param setting

That is, not only check the DH parameter setting using the known_dh_params()
functions, but also with the explicit setting --set_server_dh_params().

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: updated for post-RFC7919 behavior of library
Nikos Mavrogiannopoulos [Fri, 30 Jun 2017 14:17:12 +0000 (16:17 +0200)] 
tests: updated for post-RFC7919 behavior of library

That is, it is no longer necessary to set DH parameters on a
credentials structure, and thus previously expected to fail
connections may succeed even without DH parameters.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added RFC7919 FFDHE unit tests
Nikos Mavrogiannopoulos [Fri, 30 Jun 2017 13:54:27 +0000 (15:54 +0200)] 
tests: added RFC7919 FFDHE unit tests

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agocli,serv: do not print any information on compression
Nikos Mavrogiannopoulos [Fri, 30 Jun 2017 13:37:00 +0000 (15:37 +0200)] 
cli,serv: do not print any information on compression

Compression is always NULL.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agocli,serv: no longer print parameters when FFDHE groups are used
Nikos Mavrogiannopoulos [Fri, 30 Jun 2017 13:32:58 +0000 (15:32 +0200)] 
cli,serv: no longer print parameters when FFDHE groups are used

The negotiated RFC7919 group is now printed as part of the Description string,
and there is no reason to print more information on parameters defined by
the protocol.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls-cli: print the supported groups instead of curves
Nikos Mavrogiannopoulos [Mon, 10 Jul 2017 09:57:51 +0000 (11:57 +0200)] 
gnutls-cli: print the supported groups instead of curves

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls_priority_ecc_curve_list: avoid including groups into elliptic curves list
Nikos Mavrogiannopoulos [Mon, 10 Jul 2017 10:02:13 +0000 (12:02 +0200)] 
gnutls_priority_ecc_curve_list: avoid including groups into elliptic curves list

This provides a mostly-compatible behavior of gnutls_priority_ecc_curve_list()
in order to avoid keeping additional information for elliptic curves in the
priority cache. This approach will always return the supported curves, if the set
groups are prioritized with the elliptic curve variants set first. This
is the default in the built-in priorities, and to most common setups.

Items which are non-valid curves will not be returned.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: moved group negotiation after ciphersuite selection
Nikos Mavrogiannopoulos [Wed, 2 Aug 2017 06:42:37 +0000 (08:42 +0200)] 
handshake: moved group negotiation after ciphersuite selection

This allows to cope with situations where the peer prioritizes a
supported group which doesn't map to a supported ciphersuite.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agosecurity_parameters: ease access to group information by keeping pointer to it
Nikos Mavrogiannopoulos [Fri, 14 Jul 2017 08:35:58 +0000 (10:35 +0200)] 
security_parameters: ease access to group information by keeping pointer to it

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agosecurity_parameters: simplified contents by keeping pointer to cipher_suite_entry_st
Nikos Mavrogiannopoulos [Fri, 14 Jul 2017 08:15:23 +0000 (10:15 +0200)] 
security_parameters: simplified contents by keeping pointer to cipher_suite_entry_st

That, in addition to simplifying the contents, it allows faster access
to ciphersuite's properties.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoTLS: introduced support for RFC7919 groups
Nikos Mavrogiannopoulos [Tue, 27 Jun 2017 13:36:04 +0000 (15:36 +0200)] 
TLS: introduced support for RFC7919 groups

That replaces the EC curve extension negotiation with
the negotiated groups extensions, introduces handling
for groups as priority strings, as well as using and
checking of RFC7919 DH parameters once negotiated.

Resolves: #37

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoupdated auto-generated files
Nikos Mavrogiannopoulos [Fri, 21 Jul 2017 14:03:35 +0000 (16:03 +0200)] 
updated auto-generated files

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls-cli: use gnutls_priority_set
Nikos Mavrogiannopoulos [Fri, 21 Jul 2017 12:21:32 +0000 (14:21 +0200)] 
gnutls-cli: use gnutls_priority_set

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: modified gnutls_priority_set2() tests for gnutls_priority_set()
Nikos Mavrogiannopoulos [Fri, 21 Jul 2017 12:20:26 +0000 (14:20 +0200)] 
tests: modified gnutls_priority_set2() tests for gnutls_priority_set()

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls_priority_set: use reference counting
Nikos Mavrogiannopoulos [Fri, 21 Jul 2017 10:09:49 +0000 (12:09 +0200)] 
gnutls_priority_set: use reference counting

That eliminates the need for gnutls_priority_set2() which is now
removed.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoIntroduced atomic.h to simplify handling of atomic integers
Nikos Mavrogiannopoulos [Fri, 21 Jul 2017 09:43:27 +0000 (11:43 +0200)] 
Introduced atomic.h to simplify handling of atomic integers

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoRevert "Documented use gnutls_priority_set2()."
Nikos Mavrogiannopoulos [Fri, 21 Jul 2017 09:22:31 +0000 (11:22 +0200)] 
Revert "Documented use gnutls_priority_set2()."

This reverts commit b4aed16ee30f76211c13b075149bb87c012f9bf6.

8 years agotlsfuzzer: enabled test-ecdsa-sig-flexibility.py
Nikos Mavrogiannopoulos [Fri, 21 Jul 2017 08:54:13 +0000 (10:54 +0200)] 
tlsfuzzer: enabled test-ecdsa-sig-flexibility.py

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoupdated auto-generated files
Nikos Mavrogiannopoulos [Fri, 21 Jul 2017 08:05:44 +0000 (10:05 +0200)] 
updated auto-generated files

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc update
Nikos Mavrogiannopoulos [Thu, 20 Jul 2017 12:48:33 +0000 (14:48 +0200)] 
doc update

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoalgorithms/mac: marked RIPEMD160 as insecure for certificates
Nikos Mavrogiannopoulos [Thu, 20 Jul 2017 12:43:20 +0000 (14:43 +0200)] 
algorithms/mac: marked RIPEMD160 as insecure for certificates

This is an algorithm which is not really used in Internet PKI
and due to that has seen no public cryptanalysis. As such
we disable it for certificate verification to prevent it from
being used as an attack vector.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: partially reverted SHA1 broken tests
Nikos Mavrogiannopoulos [Thu, 20 Jul 2017 11:26:46 +0000 (13:26 +0200)] 
tests: partially reverted SHA1 broken tests

SHA1 is now considered broken only for certificates, hence
OCSP or raw signing tests no longer need to use GNUTLS_VERIFY_ALLOW_BROKEN
in the cases where certificate verification is not performed.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agox509/verify: reject SHA1 in signature algorithms for certificate verification
Nikos Mavrogiannopoulos [Thu, 20 Jul 2017 11:18:10 +0000 (13:18 +0200)] 
x509/verify: reject SHA1 in signature algorithms for certificate verification

That is, we now use gnutls_sign_is_secure2() with GNUTLS_SIGN_FLAG_SECURE_FOR_CERTS
flag for checking the validity of the signature algorithm, when
verifying signatures in certificates.

Resolves #229

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added unit tests for gnutls_sign_is_secure2()
Nikos Mavrogiannopoulos [Thu, 20 Jul 2017 11:16:07 +0000 (13:16 +0200)] 
tests: added unit tests for gnutls_sign_is_secure2()

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls_sign_is_secure2: introduced
Nikos Mavrogiannopoulos [Thu, 20 Jul 2017 10:41:47 +0000 (12:41 +0200)] 
gnutls_sign_is_secure2: introduced

This function exports the ability to check the validity of
a signature algorithm for signing certificates.

That also introduces the flag GNUTLS_SIGN_FLAG_SECURE_FOR_CERTS
which when specified will cause the function to return whether
the algorithm is secure for signing certificates.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago_gnutls_digest_is_secure_for_certs: introduced
Nikos Mavrogiannopoulos [Thu, 20 Jul 2017 10:40:34 +0000 (12:40 +0200)] 
_gnutls_digest_is_secure_for_certs: introduced

This is a macro to allow checking the security of a hash algorithm
with respect to signing certificates.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agomac: re-organized the hash algorithms table
Nikos Mavrogiannopoulos [Thu, 20 Jul 2017 10:17:40 +0000 (12:17 +0200)] 
mac: re-organized the hash algorithms table

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added reproducer with ed25519 private key
Nikos Mavrogiannopoulos [Thu, 20 Jul 2017 14:28:15 +0000 (16:28 +0200)] 
tests: added reproducer with ed25519 private key

Found with oss-fuzz:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2689

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoEnsure that public key parameters are initialized on import
Nikos Mavrogiannopoulos [Thu, 20 Jul 2017 14:43:18 +0000 (16:43 +0200)] 
Ensure that public key parameters are initialized on import

Previously we depended on initialization during the _init()
call, however, there can be cases where this re-initialization
is needed (e.g., on multiple tries to load a key).

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago_decode_pkcs8_eddsa_key: ensure that the key size read matches the curve size
Nikos Mavrogiannopoulos [Thu, 20 Jul 2017 14:49:11 +0000 (16:49 +0200)] 
_decode_pkcs8_eddsa_key: ensure that the key size read matches the curve size

That is, in the newly introduced ed25519 keys we didn't check
whether the input size in the PKCS#8 file matched the curve
size.

Found using oss-fuzz:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2689

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotlsfuzzer: enabled SNI and other tests from master
Nikos Mavrogiannopoulos [Tue, 18 Jul 2017 14:40:11 +0000 (16:40 +0200)] 
tlsfuzzer: enabled SNI and other tests from master

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: updated to reflect the fact that invalid dns names are rejected
Nikos Mavrogiannopoulos [Thu, 20 Jul 2017 06:22:10 +0000 (08:22 +0200)] 
tests: updated to reflect the fact that invalid dns names are rejected

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoserver_name: several simplifications of the code base
Nikos Mavrogiannopoulos [Tue, 18 Jul 2017 14:32:07 +0000 (16:32 +0200)] 
server_name: several simplifications of the code base

The existing code was written with the intention of supporting multiple
server names, however that was never happened, and this extension is
currently only used for DNS server names. Remove unneeded extensibility.

In addition, removed conversion of client provided server name (DNS) to
IDNA. Clients not providing valid names are violating the spec and
that conversion step not only wastes resources, but increases
the attack surface of a server.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoserver_name: be strict in decoding errors
Nikos Mavrogiannopoulos [Tue, 18 Jul 2017 14:11:05 +0000 (16:11 +0200)] 
server_name: be strict in decoding errors

That is, return error when a malformed extension is seen.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotlsfuzzer: enabled RSA-PSS checks on certificate verify
Nikos Mavrogiannopoulos [Tue, 18 Jul 2017 09:23:11 +0000 (11:23 +0200)] 
tlsfuzzer: enabled RSA-PSS checks on certificate verify

Relates: #208

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotlsfuzzer: enabled test-extended-master-secret-extension.py
Nikos Mavrogiannopoulos [Tue, 18 Jul 2017 09:16:09 +0000 (11:16 +0200)] 
tlsfuzzer: enabled test-extended-master-secret-extension.py

That allows testing the extended master secret behavior.

Resolves: #231

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoext_master_secret: return proper error code on decoding error
Nikos Mavrogiannopoulos [Tue, 18 Jul 2017 08:59:23 +0000 (10:59 +0200)] 
ext_master_secret: return proper error code on decoding error

Proper meaning that it maps to the alert 'decode error' rather
than illegal parameter. According to tlsfuzzer the former is more
suitable.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls-cli: re-use priorities for both client and server on benchmarks
Nikos Mavrogiannopoulos [Tue, 18 Jul 2017 06:07:24 +0000 (08:07 +0200)] 
gnutls-cli: re-use priorities for both client and server on benchmarks

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls-cli: re-use priorities when measuring performance
Nikos Mavrogiannopoulos [Mon, 17 Jul 2017 17:14:33 +0000 (19:14 +0200)] 
gnutls-cli: re-use priorities when measuring performance

This avoids measuring cache misses due to priority processing time.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotests: enhanced SSL3.0 openssl detection in testcompat-openssl
Nikos Mavrogiannopoulos [Mon, 17 Jul 2017 12:06:50 +0000 (14:06 +0200)] 
tests: enhanced SSL3.0 openssl detection in testcompat-openssl

That disables SSL 3.0 testing in openssl versions which cannot negotiated
it (see https://bugzilla.redhat.com/show_bug.cgi?id=1471783 for rationale)
and corrects a typo in the variable name and printed message.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago.gitlab-ci.yml: document that the x86 build is our openssl 1.0.x compat testing as...
Nikos Mavrogiannopoulos [Mon, 17 Jul 2017 09:57:41 +0000 (11:57 +0200)] 
.gitlab-ci.yml: document that the x86 build is our openssl 1.0.x compat testing as well

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: disable ARCFOUR interop tests if openssl doesn't support the cipher
Nikos Mavrogiannopoulos [Mon, 17 Jul 2017 09:08:07 +0000 (11:08 +0200)] 
tests: disable ARCFOUR interop tests if openssl doesn't support the cipher

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: testcompat-openssl: 3DES is explicitly enabled for SSL 3.0
Nikos Mavrogiannopoulos [Mon, 17 Jul 2017 06:32:08 +0000 (08:32 +0200)] 
tests: testcompat-openssl: 3DES is explicitly enabled for SSL 3.0

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoUse gcc's attribute to mark fallthrough statements
Nikos Mavrogiannopoulos [Sat, 15 Jul 2017 16:06:01 +0000 (18:06 +0200)] 
Use gcc's attribute to mark fallthrough statements

gcc7 is more verbose on fallthrough warnings, and this patch set
cleans up the current state by making use of the attribute when
necessary.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoconfigure: do not utilize the -Wno-format-truncation gcc warning
Nikos Mavrogiannopoulos [Sat, 15 Jul 2017 16:09:18 +0000 (18:09 +0200)] 
configure: do not utilize the -Wno-format-truncation gcc warning

The warnings it produces have little value in our use of string functions.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years ago.gitlab-ci.yml: switched to fedora 26 for CI builds
Nikos Mavrogiannopoulos [Sat, 15 Jul 2017 15:43:09 +0000 (17:43 +0200)] 
.gitlab-ci.yml: switched to fedora 26 for CI builds

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotests: introduced tests on public key import-export
Nikos Mavrogiannopoulos [Mon, 17 Jul 2017 13:17:08 +0000 (15:17 +0200)] 
tests: introduced tests on public key import-export

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added sign/verification test using rfc8080 keys
Nikos Mavrogiannopoulos [Mon, 17 Jul 2017 07:31:10 +0000 (09:31 +0200)] 
tests: added sign/verification test using rfc8080 keys

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: verify that a server with an ed25519 key will fail when client does not advert...
Nikos Mavrogiannopoulos [Mon, 17 Jul 2017 08:20:41 +0000 (10:20 +0200)] 
tests: verify that a server with an ed25519 key will fail when client does not advertise it

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: privkey-keygen: added unit test for Ed25519 keys
Nikos Mavrogiannopoulos [Mon, 17 Jul 2017 07:11:59 +0000 (09:11 +0200)] 
tests: privkey-keygen: added unit test for Ed25519 keys

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoprivkey_sign_and_hash_data: in pre-hashed schemes, allow empty hash algorithm
Nikos Mavrogiannopoulos [Mon, 17 Jul 2017 07:06:52 +0000 (09:06 +0200)] 
privkey_sign_and_hash_data: in pre-hashed schemes, allow empty hash algorithm

In these schemes the hash algorithm is fixed in the signature algorithm
and thus the empty (unknown) value will act as a wildcard.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added private key parameter verification in key-import-export checks
Nikos Mavrogiannopoulos [Sat, 15 Jul 2017 18:10:24 +0000 (20:10 +0200)] 
tests: added private key parameter verification in key-import-export checks

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agonettle: wrap_nettle_pk_verify_priv_params: verify whether public key matches private
Nikos Mavrogiannopoulos [Sat, 15 Jul 2017 18:03:21 +0000 (20:03 +0200)] 
nettle: wrap_nettle_pk_verify_priv_params: verify whether public key matches private

This enables gnutls_privkey_verify_params() for Ed25519 keys.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoCONTRIBUTING.md: specified rules on boolean functions
Nikos Mavrogiannopoulos [Fri, 14 Jul 2017 18:52:49 +0000 (20:52 +0200)] 
CONTRIBUTING.md: specified rules on boolean functions

Based on suggestion by Hubert Kario.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agopriority: enabled Ed25519 signature by default
Nikos Mavrogiannopoulos [Fri, 14 Jul 2017 12:08:20 +0000 (14:08 +0200)] 
priority: enabled Ed25519 signature by default

As our implementation interoperates with boringssl's implementation
of Ed25519, we can now enable it.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoupdated auto-generated files
Nikos Mavrogiannopoulos [Mon, 19 Jun 2017 08:45:49 +0000 (10:45 +0200)] 
updated auto-generated files

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: return better error code on unwanted algorithm
Nikos Mavrogiannopoulos [Wed, 7 Jun 2017 07:50:29 +0000 (09:50 +0200)] 
handshake: return better error code on unwanted algorithm

That is, when a signature algorithm is available which was not
asked by the peer, then return GNUTLS_E_UNWANTED_ALGORITHM
instead of the UNKNOWN_ALGORITHM.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added check on Ed25519 chain verification
Nikos Mavrogiannopoulos [Wed, 7 Jun 2017 08:05:50 +0000 (10:05 +0200)] 
tests: added check on Ed25519 chain verification

This chain was generated using certtool, and passed verification
with OpenSSL's implementation (commit: db0f35dda18403accabe98e7780f3dfc516f49de)

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls-cli: added RSA-PSS signatures in benchmark
Nikos Mavrogiannopoulos [Tue, 6 Jun 2017 09:34:49 +0000 (11:34 +0200)] 
gnutls-cli: added RSA-PSS signatures in benchmark

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc update
Nikos Mavrogiannopoulos [Tue, 6 Jun 2017 09:47:48 +0000 (11:47 +0200)] 
doc update

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoprivkey_sign_and_hash_data: added sanity check on param validity
Nikos Mavrogiannopoulos [Tue, 6 Jun 2017 09:47:09 +0000 (11:47 +0200)] 
privkey_sign_and_hash_data: added sanity check on param validity

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls-cli: added benchmark on X25519-Ed25519 key exchange
Nikos Mavrogiannopoulos [Tue, 6 Jun 2017 08:42:58 +0000 (10:42 +0200)] 
gnutls-cli: added benchmark on X25519-Ed25519 key exchange

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: pkcs7: added ed25519 basic signing and verification checks
Nikos Mavrogiannopoulos [Tue, 6 Jun 2017 07:42:22 +0000 (09:42 +0200)] 
tests: pkcs7: added ed25519 basic signing and verification checks

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoprivkey_sign_and_hash_data: handle prehashed signatures
Nikos Mavrogiannopoulos [Tue, 6 Jun 2017 07:23:53 +0000 (09:23 +0200)] 
privkey_sign_and_hash_data: handle prehashed signatures

This allows this function to handle ed25519, i.e., allows it
to operate for PKCS#7 signatures.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agopkcs7: improved syntax in if-clause
Nikos Mavrogiannopoulos [Tue, 6 Jun 2017 07:21:48 +0000 (09:21 +0200)] 
pkcs7: improved syntax in if-clause

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: enhanced OID tests for Ed25519 OIDs
Nikos Mavrogiannopoulos [Mon, 5 Jun 2017 08:14:43 +0000 (10:14 +0200)] 
tests: enhanced OID tests for Ed25519 OIDs

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: key-import-export: added Ed25519 key import/export checks
Nikos Mavrogiannopoulos [Fri, 2 Jun 2017 09:27:34 +0000 (11:27 +0200)] 
tests: key-import-export: added Ed25519 key import/export checks

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc update
Nikos Mavrogiannopoulos [Fri, 2 Jun 2017 07:52:51 +0000 (09:52 +0200)] 
doc update

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: replaced rsa-pss/eddsa certtool options with --key-type
Nikos Mavrogiannopoulos [Fri, 2 Jun 2017 07:44:52 +0000 (09:44 +0200)] 
tests: replaced rsa-pss/eddsa certtool options with --key-type

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agocerttool: introduced the --key-type option
Nikos Mavrogiannopoulos [Fri, 2 Jun 2017 07:41:56 +0000 (09:41 +0200)] 
certtool: introduced the --key-type option

This replaces the --rsa-pss and --eddsa options.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoRenamed GNUTLS_PK_ECDHX to GNUTLS_PK_ECDH_X25519
Nikos Mavrogiannopoulos [Tue, 30 May 2017 11:02:06 +0000 (13:02 +0200)] 
Renamed GNUTLS_PK_ECDHX to GNUTLS_PK_ECDH_X25519

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: parse and interpret an EdDSA public key
Nikos Mavrogiannopoulos [Tue, 30 May 2017 10:53:40 +0000 (12:53 +0200)] 
tests: parse and interpret an EdDSA public key

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added TLS handshake test with EdDSA25519 certificates
Nikos Mavrogiannopoulos [Mon, 29 May 2017 14:23:10 +0000 (16:23 +0200)] 
tests: added TLS handshake test with EdDSA25519 certificates

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoAllowed Ed25519 signing in TLS handshakes
Nikos Mavrogiannopoulos [Mon, 29 May 2017 14:22:27 +0000 (16:22 +0200)] 
Allowed Ed25519 signing in TLS handshakes

This follows draft-ietf-tls-rfc4492bis-17

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added tests on EdDSA signature validation using the sign/verify_data APIs
Nikos Mavrogiannopoulos [Mon, 29 May 2017 13:23:21 +0000 (15:23 +0200)] 
tests: added tests on EdDSA signature validation using the sign/verify_data APIs

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: Added unit test on EdDSA key parsing
Nikos Mavrogiannopoulos [Fri, 26 May 2017 15:26:34 +0000 (17:26 +0200)] 
tests: Added unit test on EdDSA key parsing

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added Ed25519 key and certificate generation tests
Nikos Mavrogiannopoulos [Mon, 29 May 2017 10:52:12 +0000 (12:52 +0200)] 
tests: added Ed25519 key and certificate generation tests

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoAdded support for EdDSA (Ed25519) curve keys
Nikos Mavrogiannopoulos [Fri, 26 May 2017 13:20:38 +0000 (15:20 +0200)] 
Added support for EdDSA (Ed25519) curve keys

This adds support for draft-ietf-curdle-pkix-04.

Resolves #25

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoparse_pem_cert_mem: fixed issue resulting to accessing past the input data
Nikos Mavrogiannopoulos [Sat, 15 Jul 2017 16:52:33 +0000 (18:52 +0200)] 
parse_pem_cert_mem: fixed issue resulting to accessing past the input data

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agosupported_exts.h: make sure that the generated function is static
Nikos Mavrogiannopoulos [Sat, 15 Jul 2017 15:54:01 +0000 (17:54 +0200)] 
supported_exts.h: make sure that the generated function is static

That avoids compiler warnings due to missing prototype.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotlsfuzzer: enabled chacha20 tests
Nikos Mavrogiannopoulos [Wed, 14 Jun 2017 13:12:11 +0000 (15:12 +0200)] 
tlsfuzzer: enabled chacha20 tests

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoupdated tlsfuzzer
Nikos Mavrogiannopoulos [Thu, 13 Jul 2017 12:50:55 +0000 (14:50 +0200)] 
updated tlsfuzzer

That fixes issue detecting connection termination from gnutls-serv
in chacha20 test.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: csr-invalid.der: modify the SPKI OID to use SECP384R1
Nikos Mavrogiannopoulos [Wed, 12 Jul 2017 13:54:38 +0000 (15:54 +0200)] 
tests: csr-invalid.der: modify the SPKI OID to use SECP384R1

That avoids false positives in error detection in 'crq' test due to
SECP224R1 not being supported in our CI platforms.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agox509/output: do not attempt to print the key ID on unknown SPKI algorithms
Nikos Mavrogiannopoulos [Wed, 12 Jul 2017 14:04:49 +0000 (16:04 +0200)] 
x509/output: do not attempt to print the key ID on unknown SPKI algorithms

On unknown algorithms, it is not always possible to parse the SPKI
field. Instead avoid printing errors.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago.gitlab-ci.yml: corrected location of artifacts in aarch64 build
Nikos Mavrogiannopoulos [Wed, 12 Jul 2017 13:24:23 +0000 (15:24 +0200)] 
.gitlab-ci.yml: corrected location of artifacts in aarch64 build

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: certtool-rsa-pss: use unique temp files
Nikos Mavrogiannopoulos [Wed, 12 Jul 2017 11:44:24 +0000 (13:44 +0200)] 
tests: certtool-rsa-pss: use unique temp files

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoupdated auto-generated files
Nikos Mavrogiannopoulos [Tue, 11 Jul 2017 08:28:16 +0000 (10:28 +0200)] 
updated auto-generated files

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago_gnutls_buffer_append_data_prefix: cleanup
Nikos Mavrogiannopoulos [Mon, 19 Jun 2017 13:18:20 +0000 (15:18 +0200)] 
_gnutls_buffer_append_data_prefix: cleanup

This eliminates a misleading code that assumed that the called functions
will return the appended size. Always return zero on success which is
what the existing callers assume.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>