]> git.ipfire.org Git - thirdparty/gnutls.git/log
thirdparty/gnutls.git
8 years ago_gnutls_proc_srp_client_kx: use same type in subtracted values
Nikos Mavrogiannopoulos [Mon, 14 Aug 2017 06:42:51 +0000 (08:42 +0200)] 
_gnutls_proc_srp_client_kx: use same type in subtracted values

This ensures that there are no issues with subtracting those values.
Note that the second is read from an uint16_t and thus it is always
positive regardless its type.

Resolves #244

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agofuzzer: Move regression corpora from tests/ to fuzz/
Tim Rühsen [Tue, 15 Aug 2017 10:34:25 +0000 (12:34 +0200)] 
fuzzer: Move regression corpora from tests/ to fuzz/

See fuzz/README.md for the corresponding paths.

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agofuzzer: Suppress leak in libgmp <= 6.1.2
Tim Rühsen [Mon, 14 Aug 2017 10:34:00 +0000 (12:34 +0200)] 
fuzzer: Suppress leak in libgmp <= 6.1.2

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agofuzzer: Suppress unsigned integer overflow in rnd-fuzzer.c
Tim Rühsen [Fri, 11 Aug 2017 16:31:35 +0000 (18:31 +0200)] 
fuzzer: Suppress unsigned integer overflow in rnd-fuzzer.c

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agofuzzer: Initial check in for improved fuzzing
Tim Rühsen [Sat, 5 Aug 2017 18:49:19 +0000 (20:49 +0200)] 
fuzzer: Initial check in for improved fuzzing

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agofuzzer: added a fuzzer target
Nikos Mavrogiannopoulos [Wed, 9 Aug 2017 06:24:59 +0000 (08:24 +0200)] 
fuzzer: added a fuzzer target

This allows to compile the library with flags which will add predictable
random generation and eliminate some crypto checks, in order for the
library to be used for testing (fuzzying).

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoupdated auto-generated files
Nikos Mavrogiannopoulos [Tue, 15 Aug 2017 14:40:41 +0000 (16:40 +0200)] 
updated auto-generated files

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls_x509_privkey_export: made a wrapper over gnutls_x509_privkey_export2()
Nikos Mavrogiannopoulos [Tue, 15 Aug 2017 14:39:36 +0000 (16:39 +0200)] 
gnutls_x509_privkey_export: made a wrapper over gnutls_x509_privkey_export2()

In addition, improved function description.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls-http-serv: use RSA-PSS key
Nikos Mavrogiannopoulos [Tue, 15 Aug 2017 11:23:39 +0000 (13:23 +0200)] 
gnutls-http-serv: use RSA-PSS key

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc update
Nikos Mavrogiannopoulos [Tue, 15 Aug 2017 11:11:03 +0000 (13:11 +0200)] 
doc update

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: use certtool to check RSA-PSS to RSA conversion
Nikos Mavrogiannopoulos [Tue, 15 Aug 2017 10:58:02 +0000 (12:58 +0200)] 
tests: use certtool to check RSA-PSS to RSA conversion

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agocerttool: introduced --to-rsa option
Nikos Mavrogiannopoulos [Tue, 15 Aug 2017 10:07:01 +0000 (12:07 +0200)] 
certtool: introduced --to-rsa option

This allows converting an RSA-PSS key to raw RSA.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc update
Nikos Mavrogiannopoulos [Fri, 11 Aug 2017 14:37:21 +0000 (16:37 +0200)] 
doc update

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoupdated auto-generated files
Nikos Mavrogiannopoulos [Fri, 11 Aug 2017 10:30:17 +0000 (12:30 +0200)] 
updated auto-generated files

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added unit tests for gnutls_privkey_import_ext4
Nikos Mavrogiannopoulos [Fri, 4 Aug 2017 13:51:34 +0000 (15:51 +0200)] 
tests: added unit tests for gnutls_privkey_import_ext4

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls_privkey_import_ext4: introduced to allow signing with RSA-PSS or Ed25519 keys
Nikos Mavrogiannopoulos [Fri, 4 Aug 2017 13:00:46 +0000 (15:00 +0200)] 
gnutls_privkey_import_ext4: introduced to allow signing with RSA-PSS or Ed25519 keys

That function allows a signing callback which passes the signature
algorithm, providing all the information to callback for signing.
It also introduces GNUTLS_PRIVKEY_INFO_HAVE_SIGN_ALGO flag which
allows the library to query the private key of the supported
signature algorithms.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoreduce common asserts to assist in debugging the library
Nikos Mavrogiannopoulos [Tue, 15 Aug 2017 08:47:11 +0000 (10:47 +0200)] 
reduce common asserts to assist in debugging the library

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc: algorithms.texi: include list of groups but skip compression methods
Nikos Mavrogiannopoulos [Tue, 15 Aug 2017 08:29:42 +0000 (10:29 +0200)] 
doc: algorithms.texi: include list of groups but skip compression methods

Compression methods are no longer relevant or supported, and groups
replace the elliptic curves.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc: improved elliptic curve and group documentation
Nikos Mavrogiannopoulos [Tue, 15 Aug 2017 08:27:19 +0000 (10:27 +0200)] 
doc: improved elliptic curve and group documentation

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc: mention the AES-DRBG random generator [ci skip]
Nikos Mavrogiannopoulos [Mon, 14 Aug 2017 17:02:45 +0000 (19:02 +0200)] 
doc: mention the AES-DRBG random generator [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotests: improved detection of 64-bit systems
Nikos Mavrogiannopoulos [Fri, 11 Aug 2017 10:40:14 +0000 (12:40 +0200)] 
tests: improved detection of 64-bit systems

We now use the ${ac_cv_sizeof_unsigned_long_int} variable which
gives the numbers used in the host system, not the build one.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: updated for new x86 host
Nikos Mavrogiannopoulos [Thu, 10 Aug 2017 08:51:26 +0000 (10:51 +0200)] 
tests: updated for new x86 host

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago.gitlab-ci.yml: replaced the f23 x86 build with a f26 x86 build
Nikos Mavrogiannopoulos [Thu, 10 Aug 2017 07:37:07 +0000 (09:37 +0200)] 
.gitlab-ci.yml: replaced the f23 x86 build with a f26 x86 build

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agofuzz: explicitly initialize and deinitialize the library [ci skip]
Nikos Mavrogiannopoulos [Fri, 11 Aug 2017 09:09:39 +0000 (11:09 +0200)] 
fuzz: explicitly initialize and deinitialize the library [ci skip]

This enables the fuzzers to run even when statically linked.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: eliminated unnecessary function wrappers
Nikos Mavrogiannopoulos [Tue, 18 Jul 2017 11:08:31 +0000 (13:08 +0200)] 
handshake: eliminated unnecessary function wrappers

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls_int.h: reduce memory occupied by ext_data
Nikos Mavrogiannopoulos [Tue, 18 Jul 2017 08:35:13 +0000 (10:35 +0200)] 
gnutls_int.h: reduce memory occupied by ext_data

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls_int.h: reduced the maximum number of epoch states we keep
Nikos Mavrogiannopoulos [Tue, 18 Jul 2017 08:25:10 +0000 (10:25 +0200)] 
gnutls_int.h: reduced the maximum number of epoch states we keep

There was no need to keep 16 epochs, as we typically we have only
one or two active.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls_int.h: removed unused variable from state
Nikos Mavrogiannopoulos [Tue, 18 Jul 2017 08:14:11 +0000 (10:14 +0200)] 
gnutls_int.h: removed unused variable from state

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoextensions: simplified requirements from send callback
Nikos Mavrogiannopoulos [Fri, 14 Jul 2017 09:30:51 +0000 (11:30 +0200)] 
extensions: simplified requirements from send callback

The callback no longer needs to return the number of sent data;
they are now calculated by the caller.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoext/ecc: renamed Supported curves extension
Nikos Mavrogiannopoulos [Tue, 27 Jun 2017 09:42:25 +0000 (11:42 +0200)] 
ext/ecc: renamed Supported curves extension

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls-serv: --require-client-cert no longer implies --verify-client-cert
Nikos Mavrogiannopoulos [Tue, 27 Jun 2017 09:01:08 +0000 (11:01 +0200)] 
gnutls-serv: --require-client-cert no longer implies --verify-client-cert

That is, it is now possible to require a client certificate without
verifying it.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoCONTRIBUTING.md: corrected typo [ci skip]
Nikos Mavrogiannopoulos [Thu, 10 Aug 2017 08:35:22 +0000 (10:35 +0200)] 
CONTRIBUTING.md: corrected typo [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc update
Nikos Mavrogiannopoulos [Wed, 9 Aug 2017 14:59:15 +0000 (16:59 +0200)] 
doc update

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoupdated auto-generated files
Nikos Mavrogiannopoulos [Wed, 9 Aug 2017 08:30:04 +0000 (10:30 +0200)] 
updated auto-generated files

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoCONTRIBUTING.md: added section on symbol versioning
Nikos Mavrogiannopoulos [Wed, 9 Aug 2017 07:40:03 +0000 (09:40 +0200)] 
CONTRIBUTING.md: added section on symbol versioning

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agolibgnutls.map: separated symbols introduced in 3.6.0
Nikos Mavrogiannopoulos [Fri, 4 Aug 2017 09:06:18 +0000 (11:06 +0200)] 
libgnutls.map: separated symbols introduced in 3.6.0

This separation assists tools like rpm which can detect
the right version of the library to use, by using the
symbol version.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added reproducer for private key import leak
Nikos Mavrogiannopoulos [Wed, 9 Aug 2017 08:21:06 +0000 (10:21 +0200)] 
tests: added reproducer for private key import leak

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

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agornd: use time_t for prng_reseed_time
Nikos Mavrogiannopoulos [Wed, 9 Aug 2017 11:18:33 +0000 (13:18 +0200)] 
rnd: use time_t for prng_reseed_time

This ensures that all time comparisons are done
under the same type.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls_x509_privkey_import_pkcs8: fixed memory leak on incorrect key import
Nikos Mavrogiannopoulos [Wed, 9 Aug 2017 08:20:36 +0000 (10:20 +0200)] 
gnutls_x509_privkey_import_pkcs8: fixed memory leak on incorrect key import

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added reproducer for memory leak in SRP server
Nikos Mavrogiannopoulos [Wed, 9 Aug 2017 07:58:17 +0000 (09:58 +0200)] 
tests: added reproducer for memory leak in SRP server

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

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls_srp_verifier: corrected memory leak
Nikos Mavrogiannopoulos [Wed, 9 Aug 2017 07:57:49 +0000 (09:57 +0200)] 
gnutls_srp_verifier: corrected memory leak

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added reproducer for memory leak in RSA-PSK
Nikos Mavrogiannopoulos [Wed, 9 Aug 2017 07:52:37 +0000 (09:52 +0200)] 
tests: added reproducer for memory leak in RSA-PSK

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

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agorsa-psk: corrected memory leak on invalid decrypt
Nikos Mavrogiannopoulos [Wed, 9 Aug 2017 07:52:21 +0000 (09:52 +0200)] 
rsa-psk: corrected memory leak on invalid decrypt

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

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agop11tool: --generate-xxx options were replaced by generate-privkey
Nikos Mavrogiannopoulos [Wed, 9 Aug 2017 08:41:58 +0000 (10:41 +0200)] 
p11tool: --generate-xxx options were replaced by generate-privkey

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoFix memleaks in gnutls_x509_trust_list_add_crls()
Tim Rühsen [Mon, 7 Aug 2017 21:04:36 +0000 (23:04 +0200)] 
Fix memleaks in gnutls_x509_trust_list_add_crls()

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agoFix memleak in gnutls_x509_crl_list_import()
Tim Rühsen [Mon, 7 Aug 2017 21:04:05 +0000 (23:04 +0200)] 
Fix memleak in gnutls_x509_crl_list_import()

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agopublickey: fixed incorrect assignment
Nikos Mavrogiannopoulos [Tue, 8 Aug 2017 13:03:53 +0000 (15:03 +0200)] 
publickey: fixed incorrect assignment

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agomac: simplified iteration functions
Nikos Mavrogiannopoulos [Tue, 8 Aug 2017 13:03:11 +0000 (15:03 +0200)] 
mac: simplified iteration functions

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agocorrected input to gnutls_sign_supports_pk_algorithm
Nikos Mavrogiannopoulos [Tue, 8 Aug 2017 12:59:56 +0000 (14:59 +0200)] 
corrected input to gnutls_sign_supports_pk_algorithm

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoextensions: corrected flag check
Nikos Mavrogiannopoulos [Tue, 8 Aug 2017 12:59:44 +0000 (14:59 +0200)] 
extensions: corrected flag check

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: updated for new rsa-pss key in doc/credentials
Nikos Mavrogiannopoulos [Tue, 8 Aug 2017 13:50:44 +0000 (15:50 +0200)] 
tests: updated for new rsa-pss key in doc/credentials

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agocert selection: prioritize RSA-PSS certs over RSA
Nikos Mavrogiannopoulos [Tue, 8 Aug 2017 10:51:58 +0000 (12:51 +0200)] 
cert selection: prioritize RSA-PSS certs over RSA

RSA and RSA-PSS can both be used for RSA-PSS operations, and
as such without prioritizing RSA-PSS certificates it is unknown
which certificate will be used for an RSA-PSS operation. The
reason we want to have only RSA-PSS keys used for RSA-PSS operations
is to cover the use case where a server uses a legacy RSA certificate
for clients that don't support RSA-PSS and an RSA-PSS certificate
for the rest, thus separating the keys used for these client
groups. That separation ensures that any issue on PKCS#1 1.5
(legacy RSA), would not affect sessions which use RSA-PSS.

Resolves #243

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls_certificate_credentials_t: combine privkey into cert_st structure
Nikos Mavrogiannopoulos [Tue, 8 Aug 2017 09:35:26 +0000 (11:35 +0200)] 
gnutls_certificate_credentials_t: combine privkey into cert_st structure

This reduces the number of applications and allows for easier
use of the structure information, as they are now self-contained
for most uses.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: verify whether the RSA-PSS key is preferred on RSA-PSS sigs
Nikos Mavrogiannopoulos [Tue, 8 Aug 2017 08:56:17 +0000 (10:56 +0200)] 
tests: verify whether the RSA-PSS key is preferred on RSA-PSS sigs

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agocerttool: eliminated unused variable
Nikos Mavrogiannopoulos [Tue, 8 Aug 2017 07:27:57 +0000 (09:27 +0200)] 
certtool: eliminated unused variable

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added negative tests in provable-privkey
Nikos Mavrogiannopoulos [Mon, 7 Aug 2017 14:32:17 +0000 (16:32 +0200)] 
tests: added negative tests in provable-privkey

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls_pk_params_st: separate flags/qbits and curve
Nikos Mavrogiannopoulos [Mon, 7 Aug 2017 14:23:29 +0000 (16:23 +0200)] 
gnutls_pk_params_st: separate flags/qbits and curve

Previously we were using the field flags to store the
size of q in case of GNUTLS_PK_DH, some key generation flags
in case of GNUTLS_PK_RSA, and the curve in case of elliptic
curve key. Separate this into multiple fields to reduce
confusion on the field.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: check whether validation parameters are lost on key re-import
Nikos Mavrogiannopoulos [Mon, 7 Aug 2017 12:55:38 +0000 (14:55 +0200)] 
tests: check whether validation parameters are lost on key re-import

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agocerttool: improved documentation on --provable option
Nikos Mavrogiannopoulos [Sat, 5 Aug 2017 18:08:31 +0000 (20:08 +0200)] 
certtool: improved documentation on --provable option

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agocerttool: create mapping between --load-x and --info options
Nikos Mavrogiannopoulos [Sat, 5 Aug 2017 17:52:40 +0000 (19:52 +0200)] 
certtool: create mapping between --load-x and --info options

That allows using:
certtool --certificate-info --load-certificate FILE
and
certtool --certificate-info --infile FILE

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agocerttool: removed definitions of non-existing functions
Nikos Mavrogiannopoulos [Sat, 5 Aug 2017 17:35:53 +0000 (19:35 +0200)] 
certtool: removed definitions of non-existing functions

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotests: updated for the new provable private key format
Nikos Mavrogiannopoulos [Sat, 5 Aug 2017 15:08:16 +0000 (17:08 +0200)] 
tests: updated for the new provable private key format

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agognutls_x509_privkey_verify_seed: improved error on missing validation parameters
Nikos Mavrogiannopoulos [Sat, 5 Aug 2017 08:17:46 +0000 (10:17 +0200)] 
gnutls_x509_privkey_verify_seed: improved error on missing validation parameters

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agocerttool: silence warnings related to --pkcs8
Nikos Mavrogiannopoulos [Tue, 1 Aug 2017 14:17:45 +0000 (16:17 +0200)] 
certtool: silence warnings related to --pkcs8

There is no reason to bug the user with such details by default.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agocerttool: better print provable key validation parameters
Nikos Mavrogiannopoulos [Tue, 1 Aug 2017 13:18:34 +0000 (15:18 +0200)] 
certtool: better print provable key validation parameters

That is, include hash in the printable set, and keep spaces
from next fields.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agocerttool: provable private keys are always exported in PKCS#8 form
Nikos Mavrogiannopoulos [Tue, 1 Aug 2017 13:11:12 +0000 (15:11 +0200)] 
certtool: provable private keys are always exported in PKCS#8 form

That allows the provable parameters to be included.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agox509: no longer emit the previous custom format for provable parameters
Nikos Mavrogiannopoulos [Tue, 1 Aug 2017 12:43:04 +0000 (14:43 +0200)] 
x509: no longer emit the previous custom format for provable parameters

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agox509: store and read provable seed in PKCS#8 form of key
Nikos Mavrogiannopoulos [Tue, 1 Aug 2017 12:30:06 +0000 (14:30 +0200)] 
x509: store and read provable seed in PKCS#8 form of key

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoAdded information on OID registry
Nikos Mavrogiannopoulos [Wed, 2 Aug 2017 08:28:07 +0000 (10:28 +0200)] 
Added information on OID registry

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agopkix.asn: removed unused DomainParameters
Nikos Mavrogiannopoulos [Tue, 1 Aug 2017 12:23:31 +0000 (14:23 +0200)] 
pkix.asn: removed unused DomainParameters

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agox509: separated PKIX1 attributes parsing code for cert request handling
Nikos Mavrogiannopoulos [Tue, 1 Aug 2017 09:29:26 +0000 (11:29 +0200)] 
x509: separated PKIX1 attributes parsing code for cert request handling

This allows other code to utilize it.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago_gnutls_fbase64_decode will always return non-zero
Nikos Mavrogiannopoulos [Mon, 7 Aug 2017 07:36:20 +0000 (09:36 +0200)] 
_gnutls_fbase64_decode will always return non-zero

That is, document that fact and update its callers to remove
checks for zero.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago_gnutls_base64_decode: reject all zero-length string encodings on decoding
Nikos Mavrogiannopoulos [Sun, 6 Aug 2017 15:23:52 +0000 (17:23 +0200)] 
_gnutls_base64_decode: reject all zero-length string encodings on decoding

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agowrap_nettle_pk_fixup: added sanity check in RSA-PSS param checking
Nikos Mavrogiannopoulos [Sun, 6 Aug 2017 09:34:39 +0000 (11:34 +0200)] 
wrap_nettle_pk_fixup: added sanity check in RSA-PSS param checking

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years ago_decode_pkcs8_rsa_key: signal error in RSA privkey decoding
Nikos Mavrogiannopoulos [Sun, 6 Aug 2017 09:34:10 +0000 (11:34 +0200)] 
_decode_pkcs8_rsa_key: signal error in RSA privkey decoding

Addresses oss-fuzz issue:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2865

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotests: added reproducer for private key crash
Nikos Mavrogiannopoulos [Sun, 6 Aug 2017 09:28:15 +0000 (11:28 +0200)] 
tests: added reproducer for private key crash

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

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotests: added unit test of gnutls_x509_crt_list_import
Nikos Mavrogiannopoulos [Sun, 6 Aug 2017 08:17:29 +0000 (10:17 +0200)] 
tests: added unit test of gnutls_x509_crt_list_import

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotests: added reproducer applications for psk and srp fuzzers
Nikos Mavrogiannopoulos [Sat, 5 Aug 2017 07:35:14 +0000 (09:35 +0200)] 
tests: added reproducer applications for psk and srp fuzzers

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoupdated auto-generated files
Nikos Mavrogiannopoulos [Fri, 4 Aug 2017 17:47:00 +0000 (19:47 +0200)] 
updated auto-generated files

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agognutls_server_fuzzer: added ed25519 key/cert
Nikos Mavrogiannopoulos [Sun, 30 Jul 2017 00:57:03 +0000 (02:57 +0200)] 
gnutls_server_fuzzer: added ed25519 key/cert

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoremoved references for "new" semantics of PEM base64 encode and decode
Nikos Mavrogiannopoulos [Mon, 31 Jul 2017 07:22:51 +0000 (09:22 +0200)] 
removed references for "new" semantics of PEM base64 encode and decode

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agobase64: reverted the raw semantics from the PEM encoding/decoding functions
Nikos Mavrogiannopoulos [Mon, 31 Jul 2017 07:19:22 +0000 (09:19 +0200)] 
base64: reverted the raw semantics from the PEM encoding/decoding functions

Keeping the complex semantics with NULL headers would most likely cause
issues in the future.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agobase64: test the new base64 encoding and decoding functions
Nikos Mavrogiannopoulos [Mon, 31 Jul 2017 07:15:20 +0000 (09:15 +0200)] 
base64: test the new base64 encoding and decoding functions

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agobase64: uniformly use GNUTLS_E_BASE64_DECODING_ERROR for decoding errors
Nikos Mavrogiannopoulos [Mon, 31 Jul 2017 07:13:35 +0000 (09:13 +0200)] 
base64: uniformly use GNUTLS_E_BASE64_DECODING_ERROR for decoding errors

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agobase64: introduced new functions for base64 encoding
Nikos Mavrogiannopoulos [Mon, 31 Jul 2017 07:08:24 +0000 (09:08 +0200)] 
base64: introduced new functions for base64 encoding

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotests: gnutls_x509_privkey_import: enhanced to test DER key import
Nikos Mavrogiannopoulos [Sun, 30 Jul 2017 17:05:23 +0000 (19:05 +0200)] 
tests: gnutls_x509_privkey_import: enhanced to test DER key import

It seems that this function was not tested for multiple cases of
private keys in DER mode.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agognutls_x509_privkey_import: allow importing ed25519 PKCS#8 keys in DER form
Nikos Mavrogiannopoulos [Sun, 30 Jul 2017 01:43:42 +0000 (03:43 +0200)] 
gnutls_x509_privkey_import: allow importing ed25519 PKCS#8 keys in DER form

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agosign/digest: separate "brokenness" of signatures and hash algorithms
Nikos Mavrogiannopoulos [Fri, 28 Jul 2017 12:00:27 +0000 (14:00 +0200)] 
sign/digest: separate "brokenness" of signatures and hash algorithms

That is, allow digital signatures to be marked as broken irrespective
of their used hash, and restrict hash brokenness to preimage resistance.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agosign: use C99 syntax for signature algorithm's table
Nikos Mavrogiannopoulos [Fri, 28 Jul 2017 11:40:21 +0000 (13:40 +0200)] 
sign: use C99 syntax for signature algorithm's table

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago.gitlab-ci.yml: enable multiple undefined sub-sanitizers
Nikos Mavrogiannopoulos [Fri, 28 Jul 2017 11:22:51 +0000 (13:22 +0200)] 
.gitlab-ci.yml: enable multiple undefined sub-sanitizers

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

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agop11tool: auto-generate the list of PKCS#11 mechanisms from p11-kit
Nikos Mavrogiannopoulos [Mon, 31 Jul 2017 11:51:56 +0000 (13:51 +0200)] 
p11tool: auto-generate the list of PKCS#11 mechanisms from p11-kit

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added unit test for gnutls_x509_privkey_import
Nikos Mavrogiannopoulos [Fri, 28 Jul 2017 10:11:06 +0000 (12:11 +0200)] 
tests: added unit test for gnutls_x509_privkey_import

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added TLS negotiation with various keys under PKCS#11
Nikos Mavrogiannopoulos [Fri, 28 Jul 2017 09:52:28 +0000 (11:52 +0200)] 
tests: added TLS negotiation with various keys under PKCS#11

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agox509_privkey: handle keys which can only have PKCS#8 form transparently
Nikos Mavrogiannopoulos [Fri, 28 Jul 2017 09:48:40 +0000 (11:48 +0200)] 
x509_privkey: handle keys which can only have PKCS#8 form transparently

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: updated for errors returned due to early signature selection
Nikos Mavrogiannopoulos [Fri, 28 Jul 2017 09:00:03 +0000 (11:00 +0200)] 
tests: updated for errors returned due to early signature selection

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added check for the negotiation of ext keys
Nikos Mavrogiannopoulos [Fri, 28 Jul 2017 08:30:25 +0000 (10:30 +0200)] 
tests: added check for the negotiation of ext keys

That is, check whether we can negotiate TLS with ext abstract
key types, and whether the algorithms which cannot be used
with that key type, gracefully fail.

Relates #234

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoprivkey: reject signing with ext keys and GNUTLS_PK_RSA_PSS or GNUTLS_PK_EDDSA_ED25519
Nikos Mavrogiannopoulos [Fri, 28 Jul 2017 08:22:29 +0000 (10:22 +0200)] 
privkey: reject signing with ext keys and GNUTLS_PK_RSA_PSS or GNUTLS_PK_EDDSA_ED25519

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago_gnutls_check_key_cert_match: use the new API for signing
Nikos Mavrogiannopoulos [Fri, 28 Jul 2017 08:09:54 +0000 (10:09 +0200)] 
_gnutls_check_key_cert_match: use the new API for signing

This ensures that the same signature algorithm is used for
signing and verification.

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