]>
git.ipfire.org Git - thirdparty/gnutls.git/log
Nikos Mavrogiannopoulos [Thu, 25 May 2017 09:12:33 +0000 (11:12 +0200)]
gnutls_pubkey_verify_hash2: corrected operation with RSA-PSS keys
That is, do not check the flag GNUTLS_VERIFY_USE_RSA_PSS, as we
already have enough information to determine whether an RSA-PSS
signature is used (the sign algorithm). Also return the code
GNUTLS_E_INCOMPATIBLE_SIG_WITH_KEY when a signature algorithm
incompatible with the public key is encountered.
In addition, fixed few misplacements of GNUTLS_PK_RSA_PSS in switch
cases.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Thu, 25 May 2017 08:48:30 +0000 (10:48 +0200)]
Introduced gnutls_sign_supports_pk_algorithm()
This function allows to test whether a combination of public key
algorithm and signature algorithm are supported. This is introduced
for RSA-PSS signatures which can be generated by a GNUTLS_PK_RSA key
or by a GNUTLS_PK_RSA_PSS key.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Daiki Ueno [Thu, 16 Mar 2017 10:38:58 +0000 (11:38 +0100)]
x509: implement RSA-PSS signature scheme
This patch enables RSA-PSS signature scheme in the X.509 functions and
certtool.
When creating RSA-PSS signature, there are 3 different scenarios:
a. both a private key and a certificate are RSA-PSS
b. the private key is RSA, while the certificate is RSA-PSS
c. both the private key and the certificate are RSA
For (a) and (b), the RSA-PSS parameters are read from the certificate.
Any conflicts in parameters between the private key and the certificate
are reported as an error.
For (c), the sign functions, such as gnutls_x509_crt_privkey_sign() or
gnutls_privkey_sign_data(), shall be instructed to generate an RSA-PSS
signature. This can be done with the new flag
GNUTLS_PRIVKEY_SIGN_FLAG_RSA_PSS.
Verification is similar to signing, except for the case (c), use the
flag GNUTLS_VERIFY_USE_RSA_PSS instead of
GNUTLS_PRIVKEY_SIGN_FLAG_RSA_PSS.
From the command line, certtool has a couple of new options: --rsa-pss
and --rsa-pss-sign. The --rsa-pss option indicates that the generated
private key or certificate is restricted to RSA-PSS, while the
--rsa-pss-sign option indicates that the generated certificate is signed
with RSA-PSS.
For simplicity, there is no means of choosing arbitrary salt length.
When it is not given by a private key or a certificate, it is
automatically calculated from the underlying hash algorithm and the
RSA modulus bits.
[minor naming changes by nmav]
Signed-off-by: Daiki Ueno <dueno@redhat.com>
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Thu, 25 May 2017 08:19:22 +0000 (10:19 +0200)]
fuzz: added RSA-PSS certificate
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Daiki Ueno [Fri, 31 Mar 2017 12:36:46 +0000 (14:36 +0200)]
build: import files from Nettle for RSA-PSS
Signed-off-by: Daiki Ueno <dueno@redhat.com>
Nikos Mavrogiannopoulos [Sat, 27 May 2017 05:29:44 +0000 (07:29 +0200)]
libtasn1: updated to 4.11
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Nikos Mavrogiannopoulos [Thu, 25 May 2017 13:10:17 +0000 (15:10 +0200)]
updated auto-generated files
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Thu, 25 May 2017 07:39:10 +0000 (09:39 +0200)]
tests: added unit tests for gnutls_de/encode_rs_value
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Thu, 25 May 2017 06:38:43 +0000 (08:38 +0200)]
pk: exported gnutls_decode_rs_value() and gnutls_encode_rs_value()
These functions allow encoding to and from a Dss-Sig-Value.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Fri, 26 May 2017 10:43:21 +0000 (12:43 +0200)]
tests: skip x86-specific tests when not in x86
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Fri, 26 May 2017 08:56:30 +0000 (10:56 +0200)]
updated auto-generated files
Nikos Mavrogiannopoulos [Fri, 26 May 2017 08:18:09 +0000 (10:18 +0200)]
tests: tls-fuzzer: corrected unlocking at tls-fuzzer-cert.sh
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Fri, 26 May 2017 08:42:28 +0000 (10:42 +0200)]
examples: made a comment that getpass() output needs to be sanitized
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Fri, 26 May 2017 08:13:05 +0000 (10:13 +0200)]
certtool: avoid printing legacy options in --help
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Wed, 24 May 2017 15:34:31 +0000 (17:34 +0200)]
Makefile: improved code coverage extraction from lcov output
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Wed, 24 May 2017 13:48:31 +0000 (15:48 +0200)]
configure: warn when building as static library [ci skip]
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Wed, 24 May 2017 12:01:56 +0000 (14:01 +0200)]
gnutls_ocsp_status_request_enable_client: removed support for problematic parameters
Removed support for responder_id and extensions parameters. These
had very difficult semantics to use and the underlying implementation
had encoding errors, meaning there was no interoperation with other
clients. Given that issue it means there are no applications depending on
these parameters; ignore these parameters completely and no longer send
either responder_id or extensions.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Wed, 24 May 2017 09:48:24 +0000 (11:48 +0200)]
gnutls_ocsp_status_request_enable_client: documented requirements for parameters
That is, the fact that extensions and responder_id parameters must be
allocated, and are assigned to the session.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Wed, 24 May 2017 09:38:16 +0000 (11:38 +0200)]
ext/status_request: Removed the parsing of responder IDs from client extension
These values were never used by gnutls, nor were accessible to applications,
and as such there is not reason to parse them.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Wed, 24 May 2017 08:46:03 +0000 (10:46 +0200)]
ext/status_request: ensure response IDs are properly deinitialized
That is, do not attempt to loop through the array if there is no array
allocated.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Wed, 24 May 2017 08:28:28 +0000 (10:28 +0200)]
tlsfuzzer: enabled ocsp stapling test
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Wed, 24 May 2017 08:17:09 +0000 (10:17 +0200)]
tlsfuzzer: updated to latest version
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Tue, 23 May 2017 07:26:10 +0000 (09:26 +0200)]
self-tests: limit compatibility API checks to vectors with plaintext
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Nikos Mavrogiannopoulos [Mon, 22 May 2017 14:43:38 +0000 (16:43 +0200)]
tests: on cipher override do not run the compatibility checks
That is, because we introduce a cipher using the new AEAD API which
does not provide compatibility hooks.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Mon, 22 May 2017 14:41:48 +0000 (16:41 +0200)]
self-tests: introduced flag GNUTLS_SELF_TEST_FLAG_NO_COMPAT
This allows skipping the compatibility APIs when running self tests.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Mon, 22 May 2017 14:39:14 +0000 (16:39 +0200)]
self-tests: all parameter was replaced by flags
This allows to introduce more options than just check all
ciphers.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Mon, 22 May 2017 12:41:56 +0000 (14:41 +0200)]
aarch64: fix AES-GCM in-place encryption and decryption
Resolves #204
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Mon, 22 May 2017 09:54:25 +0000 (11:54 +0200)]
crypto: self-tests: enhance to include compatibility APIs
That is, run the compatibility gnutls_cipher_* APIs on self tests
for AEAD ciphers in addition to the AEAD API.
Relates #204
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Mon, 22 May 2017 12:23:14 +0000 (14:23 +0200)]
crypto-api: refuse to run gnutls_cipher_init() in full AEAD modes
That is, there are AEAD modes like CCM that can only be used through
the AEAD API. Always refuse calls to gnutls_cipher_init() in these
modes.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Mon, 22 May 2017 07:19:53 +0000 (09:19 +0200)]
doc: corrected error in gnutls_x509_privkey_sign_data parameters [ci skip]
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Sat, 20 May 2017 18:41:30 +0000 (20:41 +0200)]
sysrng-linux: improved detection of getrandom()
The getrandom() call is defined in sys/random.h.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Nikos Mavrogiannopoulos [Sat, 20 May 2017 18:34:40 +0000 (20:34 +0200)]
gnutls-cli: use 16k buffers in --benchmark-tls-ciphers
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Nikos Mavrogiannopoulos [Sat, 20 May 2017 18:31:33 +0000 (20:31 +0200)]
gnutls-cli: cleaned up --benchmark-ciphers output
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Nikos Mavrogiannopoulos [Sat, 20 May 2017 18:20:34 +0000 (20:20 +0200)]
gnutls-cli: no longer include arcfour in benchmarks
This cipher is considered broken and no longer included in
the default set of ciphers.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Nikos Mavrogiannopoulos [Sat, 20 May 2017 06:51:55 +0000 (08:51 +0200)]
documented the make files-update make option
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Nikos Mavrogiannopoulos [Sat, 20 May 2017 06:48:26 +0000 (08:48 +0200)]
updated auto-generated files
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Nikos Mavrogiannopoulos [Sat, 20 May 2017 06:26:47 +0000 (08:26 +0200)]
tests: added TLS server test for multi-key usage
That is, a server which utilizes both RSA and ECDSA keys.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Nikos Mavrogiannopoulos [Sat, 20 May 2017 06:14:59 +0000 (08:14 +0200)]
p11tool: mark provider opts as deprecated
That is, to avoid listing that option in p11tool --help, as it is
only useful for debugging very low level interfaces with PKCS#11
parameter passing.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Dmitry Eremin-Solenikov [Fri, 19 May 2017 23:19:17 +0000 (02:19 +0300)]
gnutls-serv: allow user to specify multiple x509certile/x509keyfile
Instead of adding more and more variants like x509dsakeyfile or
x509ecckeyfile (counting eddsa and gost in future), allow user to
specify x509certfile/x509keyfile multiple times. Keep the old
options as compatibility options.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Dmitry Eremin-Solenikov [Thu, 18 May 2017 20:55:57 +0000 (23:55 +0300)]
Fix two memory leaks in debug output of gnutls tools
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Dmitry Eremin-Solenikov [Wed, 30 Nov 2016 04:13:09 +0000 (07:13 +0300)]
Don't let GnuTLS headers in NETTLE_CFLAGS override local headers
Change order of CFLAGS so that local headers always come before ones in
$(NETTLE_CFLAGS).
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Nikos Mavrogiannopoulos [Fri, 12 May 2017 15:58:55 +0000 (17:58 +0200)]
find_signer: eliminate memory leak
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Karl Tarbe [Mon, 8 May 2017 12:06:33 +0000 (15:06 +0300)]
tests: add test for signing with certificate list
Signing with one certificate, but includes the other certificates
inside the PKCS#7 structure.
Signed-off-by: Karl Tarbe <karl.tarbe@cyber.ee>
Karl Tarbe [Thu, 4 May 2017 13:46:14 +0000 (16:46 +0300)]
certtool: allow multiple certificates in --p7-sign
Signed-off-by: Karl Tarbe <karl.tarbe@cyber.ee>
Andreas Metzler [Sun, 14 May 2017 09:21:07 +0000 (11:21 +0200)]
Fix autoconf progress message concerning heartbeat [ci skip]
Nikos Mavrogiannopoulos [Thu, 11 May 2017 20:03:08 +0000 (22:03 +0200)]
doc: corrected typo [ci skip]
Reported by Andreas Metzler.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Nikos Mavrogiannopoulos [Thu, 11 May 2017 20:01:10 +0000 (22:01 +0200)]
test: corrected typo preventing the run of openpgp test [ci skip]
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Nikos Mavrogiannopoulos [Wed, 10 May 2017 15:43:32 +0000 (17:43 +0200)]
updated auto-generated files
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Wed, 10 May 2017 15:23:54 +0000 (17:23 +0200)]
pkcs11_override_cert_exts: do not use CKA_X_DISTRUSTED flag when retrieving
This flag was introduced in order for reducing the number of duplicate
stapled extensions returned by p11-kit. Unfortunately that fix was bogus
and in fact it resulted to p11-kit not returning any stapled extensions.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Wed, 10 May 2017 15:08:11 +0000 (17:08 +0200)]
tests: added unit test for p11-kit trust store
This verifies whether an Example Root CA can be read together
with its stapled extensions.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Wed, 10 May 2017 14:40:10 +0000 (16:40 +0200)]
p11tool: added the --provider-opts option
This option allows passing parameters to the PKCS#11 module
loading process, i.e., passed to gnutls_pkcs11_add_provider().
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Wed, 10 May 2017 14:34:25 +0000 (16:34 +0200)]
pkcs11_add_provider: allow passing parameters to p11-kit trust module
When the @params argument of gnutls_pkcs11_add_provider() starts with
'p11-kit:' the specified provider is loaded as an unmanaged module
and the rest of parameters are being passed opaque to the module. This
allows loading for example the p11-kit trust module with a custom path
for the trust database.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Tue, 9 May 2017 20:03:45 +0000 (22:03 +0200)]
tests: introduced checks in alternative chain discovery
These cope with alternative chain discovery in the case of insecure
algorithm found in the chain.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Nikos Mavrogiannopoulos [Tue, 9 May 2017 19:24:36 +0000 (21:24 +0200)]
tests: modified pkcs1-pad to account for alt path search
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Nikos Mavrogiannopoulos [Mon, 8 May 2017 04:43:28 +0000 (06:43 +0200)]
gnutls_x509_trust_list_verify_crt2: treat signers with insecure algorithms as unknown
The reason is that many servers utilize a legacy chain to improve compatibility
with old clients and that chain often contains insecure algorithm. In that case
try to construct alternative paths. To maintain compatibility with previous
versions, we ensure that the same error code (verification status) is returned
in these cases as before by sending the cached error if the alternative path fails
too.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Nikos Mavrogiannopoulos [Tue, 9 May 2017 18:57:40 +0000 (20:57 +0200)]
updated auto-generated files
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Nikos Mavrogiannopoulos [Tue, 9 May 2017 18:57:00 +0000 (20:57 +0200)]
Makefile: files-update directive will update the auto-generated files in src/
This simplifies the update of files generated by autogen.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Nikos Mavrogiannopoulos [Mon, 8 May 2017 05:02:16 +0000 (07:02 +0200)]
tests: added check for gnutls-cli's sni-hostname option
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Nikos Mavrogiannopoulos [Mon, 8 May 2017 04:13:59 +0000 (06:13 +0200)]
gnutls-cli: introduced --sni-hostname option
This allows overriding the value set on the TLS server name indication
extension.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Nikos Mavrogiannopoulos [Wed, 10 May 2017 08:39:22 +0000 (10:39 +0200)]
Makefile: added phony targets to .PHONY [ci skip]
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Tue, 9 May 2017 12:51:44 +0000 (14:51 +0200)]
fuzz: doc update [ci skip]
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Mon, 8 May 2017 04:27:21 +0000 (06:27 +0200)]
errors.h: _gnutls_cert_log will only print on non-null certificates
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Nicolas Dufresne [Fri, 28 Apr 2017 21:17:32 +0000 (17:17 -0400)]
rsa-psk: Use the correct username datum
In rsa-psk we properly request username for the case the
application uses a callback, but later we use the username
cached in the credentials structure. This will lead to empty
username issues.
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Nikos Mavrogiannopoulos [Sat, 6 May 2017 21:06:45 +0000 (23:06 +0200)]
tests: added check for PSK client callback in RSA-PSK
This check verifies whether gnutls_psk_client_credentials_function
is operational, and the parameters sent are taken into account
by the server.
Relates !364
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Sat, 6 May 2017 20:47:32 +0000 (22:47 +0200)]
tests: simplified name of mini-rsa-psk check
In addition modernize the used APIs and added explicit check
on the received by the server username value.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Fri, 5 May 2017 12:31:30 +0000 (14:31 +0200)]
tests: utilize the email_protection_key template option
This ensures that generated certificates and requests will
include that key purpose when the option is present.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Fri, 5 May 2017 12:21:13 +0000 (14:21 +0200)]
certtool: introduced the email_protection_key option
This option was introduced in documentation for certtool without
an implementation of it. It is a shortcut for option
key_purpose_oid = 1.3.6.1.5.5.7.3.4
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Andreas Metzler [Mon, 1 May 2017 17:20:38 +0000 (19:20 +0200)]
gnutls-cli: Use CRLF with --starttls-proto=smtp.
Closes https://gitlab.com/gnutls/gnutls/issues/200
Nikos Mavrogiannopoulos [Sun, 30 Apr 2017 23:43:40 +0000 (01:43 +0200)]
doc: remove libidn from instructions and add libidn2
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Sun, 30 Apr 2017 22:59:12 +0000 (00:59 +0200)]
doc: update
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Sun, 30 Apr 2017 22:26:47 +0000 (00:26 +0200)]
added newline in debug messages [ci skip]
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Tue, 4 Apr 2017 18:13:11 +0000 (20:13 +0200)]
Removed support for libidn1
Currently we support both IDNA2003 and IDNA2008. However, IDNA2003
is already obsolete by registrars and NICs, thus there is no reason
to continue supporting it. We switch to IDNA2008 exclusively using libidn2.
Resolves #194
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Nikos Mavrogiannopoulos [Mon, 1 May 2017 10:44:46 +0000 (12:44 +0200)]
updated minitasn1
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Mon, 1 May 2017 10:42:57 +0000 (12:42 +0200)]
gnutls.h: introduced GNUTLS_E_ASN1_TIME_ERROR
This corresponds to libtasn1 ASN1_TIME_ENCODING_ERROR and
indicates an error in the DER or BER encoding of time field.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Sun, 30 Apr 2017 11:25:16 +0000 (13:25 +0200)]
gnutls_pkcs12_simple_parse: set to null vars after deinitialization
This avoids having the variables being deinitialized twice during
cleanup.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Sun, 30 Apr 2017 10:52:51 +0000 (12:52 +0200)]
tests: enhance with checks to verify that textual IPs are not matched
That verifies that the hostname check verification function will
not succeed if given textual IPs, and the certificate contains
textual IPs in DNSname or in the CN fields.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Sat, 29 Apr 2017 11:30:50 +0000 (13:30 +0200)]
gnutls_x509_crt_check_hostname2: no match dns fields against IPs
Previously we were checking textual IP address matching against
the DNS fields. This match was non-standard and was intended to
work around few broken servers. However that also led to not
evaluating and IP constraints for that IP. No longer follow that
broken behavior.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Sun, 30 Apr 2017 10:45:19 +0000 (12:45 +0200)]
tests: check against symbols present only in IDNA2003
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Sat, 29 Apr 2017 12:00:24 +0000 (14:00 +0200)]
gnutls_idna_map: fallback to IDNA2008 transitional encoding on failure
This aligns with the behavior of firefox, which maps to IDNA2008, and
fallbacks to IDNA2003 if that fails (e.g., mapping doesn't exist).
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Fri, 28 Apr 2017 21:12:19 +0000 (23:12 +0200)]
fuzz: fix leaks in PKCS#12 fuzzer
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Fri, 28 Apr 2017 20:46:48 +0000 (22:46 +0200)]
pkcs12: release CRL data on error path
This addresses issue:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1295
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Tue, 25 Apr 2017 10:01:25 +0000 (12:01 +0200)]
doc: added gnutls_ext_flags_t enumeration
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Tue, 25 Apr 2017 09:55:10 +0000 (11:55 +0200)]
_gnutls_base64_decode: corrected leak on decoding error
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Tue, 25 Apr 2017 09:08:47 +0000 (11:08 +0200)]
tests: fixed expected error code in base64 check
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Tue, 25 Apr 2017 13:15:27 +0000 (15:15 +0200)]
certtool: ensure no leaks on pkcs12_info() error paths
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Tue, 25 Apr 2017 09:02:01 +0000 (11:02 +0200)]
tests: added reproducer for mem leak in PKCS#12 decoding
This relates to:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1173
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Tue, 25 Apr 2017 08:59:58 +0000 (10:59 +0200)]
pkcs12: eliminate mem leaks in _pkcs12_decode_safe_contents
This makes sure we deinitialize previously available elements.
This addresses:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1173
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Tue, 25 Apr 2017 08:48:46 +0000 (10:48 +0200)]
cleanups in _pkcs12_decode_safe_contents
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Tue, 25 Apr 2017 08:36:22 +0000 (10:36 +0200)]
pkcs12: clean ups in PKCS#12 parsing
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Mon, 24 Apr 2017 12:16:24 +0000 (14:16 +0200)]
Added explicit check for the bounds of the generated 'd'.
This is according to FIPS186-4 sec. B.3.1.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Mon, 24 Apr 2017 11:06:45 +0000 (13:06 +0200)]
fips140-2: enhanced check of generated parameters
That is, replaced all assert() calls with if statements to allow
gracefull fail.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Mon, 24 Apr 2017 11:11:04 +0000 (13:11 +0200)]
dsa-fips.h: include nettle/bignum.h to allow compilation under nettle-mini
Relates #197
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Tue, 25 Apr 2017 07:50:08 +0000 (09:50 +0200)]
tests: added base64 reproducer of mem leak
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Mon, 24 Apr 2017 11:28:39 +0000 (13:28 +0200)]
doc update [ci skip]
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Sun, 23 Apr 2017 09:54:38 +0000 (11:54 +0200)]
gnutls.h: introduced flag GNUTLS_EXT_FLAG_OVERRIDE_INTERNAL [ci skip]
This flag is expected to be used by applications which handle
custom extensions that are not currently supported in gnutls, but
support for them may be added in the future.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Nikos Mavrogiannopoulos [Fri, 21 Apr 2017 07:28:47 +0000 (09:28 +0200)]
_gnutls_base64_decode: addressed memory leak in decoding
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Fri, 21 Apr 2017 07:19:56 +0000 (09:19 +0200)]
gnutls_pem_base64_decode: allow decoding raw base64 data
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Fri, 21 Apr 2017 07:14:18 +0000 (09:14 +0200)]
tests: check whether gnutls_pem_base64_decode2 decodes with null argument
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Nikos Mavrogiannopoulos [Fri, 21 Apr 2017 07:12:51 +0000 (09:12 +0200)]
Revert "gnutls_pem_base64_decode: allow decoding raw base64 data"
This reverts commit
fa86fc6892d6551340f24da6a6af4f484a62b884 .
Nikos Mavrogiannopoulos [Thu, 20 Apr 2017 14:34:56 +0000 (16:34 +0200)]
doc: clarifications on custom thread override [ci skip]
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>