]> git.ipfire.org Git - thirdparty/gnutls.git/log
thirdparty/gnutls.git
9 years agofuzz: added PEM base64 decoder and encoder fuzzers [ci skip]
Nikos Mavrogiannopoulos [Thu, 20 Apr 2017 12:03:39 +0000 (14:03 +0200)] 
fuzz: added PEM base64 decoder and encoder fuzzers [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agofuzz: openpgp fuzzer always succeeds when no support is present [ci skip]
Nikos Mavrogiannopoulos [Wed, 19 Apr 2017 18:04:59 +0000 (20:04 +0200)] 
fuzz: openpgp fuzzer always succeeds when no support is present [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years agolib/system/fastopen: simplified TCP fast open for OSX
Nikos Mavrogiannopoulos [Thu, 13 Apr 2017 22:18:56 +0000 (01:18 +0300)] 
lib/system/fastopen: simplified TCP fast open for OSX

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years agolib/system/fastopen: Add TCP Fast Open for OSX
Tim Rühsen [Mon, 10 Apr 2017 10:39:46 +0000 (12:39 +0200)] 
lib/system/fastopen: Add TCP Fast Open for OSX

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
9 years agodoc: removed incorrect comment
Nikos Mavrogiannopoulos [Sat, 8 Apr 2017 14:37:28 +0000 (16:37 +0200)] 
doc: removed incorrect comment

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years agognutls_dh_get_pubkey: fixed operation under PSK authentication
Nikos Mavrogiannopoulos [Sat, 8 Apr 2017 15:02:35 +0000 (17:02 +0200)] 
gnutls_dh_get_pubkey: fixed operation under PSK authentication

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years agotests: test gnutls_dh_get_pubkey in PSK auth
Nikos Mavrogiannopoulos [Sat, 8 Apr 2017 14:15:36 +0000 (16:15 +0200)] 
tests: test gnutls_dh_get_pubkey in PSK auth

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years agotests: combined and enhanced DH params tests
Nikos Mavrogiannopoulos [Sat, 8 Apr 2017 14:33:09 +0000 (16:33 +0200)] 
tests: combined and enhanced DH params tests

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years agotests: added DH parameter check in X.509 auth
Nikos Mavrogiannopoulos [Sat, 8 Apr 2017 14:25:49 +0000 (16:25 +0200)] 
tests: added DH parameter check in X.509 auth

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years agotests: added basic test on gnutls_dh_params_cpy
Nikos Mavrogiannopoulos [Sat, 8 Apr 2017 14:18:26 +0000 (16:18 +0200)] 
tests: added basic test on gnutls_dh_params_cpy

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years agotests: test gnutls_dh_get_pubkey in anonymous auth
Nikos Mavrogiannopoulos [Sat, 8 Apr 2017 14:14:06 +0000 (16:14 +0200)] 
tests: test gnutls_dh_get_pubkey in anonymous auth

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years agodoc update
Nikos Mavrogiannopoulos [Sat, 8 Apr 2017 14:15:46 +0000 (16:15 +0200)] 
doc update

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years agotests: added basic unit test on gnutls_random_art()
Nikos Mavrogiannopoulos [Sat, 8 Apr 2017 13:50:16 +0000 (15:50 +0200)] 
tests: added basic unit test on gnutls_random_art()

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years agodoc: fixed documentation for various function parameters
Nikos Mavrogiannopoulos [Fri, 7 Apr 2017 20:51:09 +0000 (22:51 +0200)] 
doc: fixed documentation for various function parameters

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years ago.gitlab-ci.yml: removed the coverage run under pkcs11 trust store
Nikos Mavrogiannopoulos [Fri, 7 Apr 2017 20:37:54 +0000 (22:37 +0200)] 
.gitlab-ci.yml: removed the coverage run under pkcs11 trust store

It was causing inaccurate total coverage numbers.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years ago.gitlab-ci.yml: added runs under the PKCS#11 trust store in fedora
Nikos Mavrogiannopoulos [Fri, 7 Apr 2017 14:56:06 +0000 (16:56 +0200)] 
.gitlab-ci.yml: added runs under the PKCS#11 trust store in fedora

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: use gnutls_global_init instead of global_init
Nikos Mavrogiannopoulos [Fri, 7 Apr 2017 14:51:46 +0000 (16:51 +0200)] 
tests: use gnutls_global_init instead of global_init

The reason is to force initialization of the PKCS#11 backend,
and thus support for any PKCS#11 trust store when setup.
This fixes running the test suite in Fedora.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: added checks with certificates that contain invalid time field
Nikos Mavrogiannopoulos [Fri, 7 Apr 2017 12:42:10 +0000 (14:42 +0200)] 
tests: added checks with certificates that contain invalid time field

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agox509/time: reject invalid dates in local mktime()
Nikos Mavrogiannopoulos [Fri, 7 Apr 2017 12:33:29 +0000 (14:33 +0200)] 
x509/time: reject invalid dates in local mktime()

Resolves #135

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agocerttool: added newline in error message
Nikos Mavrogiannopoulos [Fri, 7 Apr 2017 12:25:34 +0000 (14:25 +0200)] 
certtool: added newline in error message

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: added basic check for systemkey tool
Nikos Mavrogiannopoulos [Fri, 7 Apr 2017 12:09:31 +0000 (14:09 +0200)] 
tests: added basic check for systemkey tool

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agosystemkey: improved error message on unsupported systems
Nikos Mavrogiannopoulos [Fri, 7 Apr 2017 12:05:45 +0000 (14:05 +0200)] 
systemkey: improved error message on unsupported systems

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: enhanced tofu trustdb checks
Nikos Mavrogiannopoulos [Fri, 7 Apr 2017 12:00:41 +0000 (14:00 +0200)] 
tests: enhanced tofu trustdb checks

Include checks which store and load commitments from the user's home
directory.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: do not run pkgconfig test in systems with invalid libidn flags
Nikos Mavrogiannopoulos [Fri, 7 Apr 2017 08:35:33 +0000 (10:35 +0200)] 
tests: do not run pkgconfig test in systems with invalid libidn flags

This prevents our test from failing, due to invalid flags found in
a dependency of ours.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agodoc: fixed tpmtool and psktool documentation
Nikos Mavrogiannopoulos [Fri, 7 Apr 2017 11:30:16 +0000 (13:30 +0200)] 
doc: fixed tpmtool and psktool documentation

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agodoc update
Nikos Mavrogiannopoulos [Fri, 7 Apr 2017 07:39:50 +0000 (09:39 +0200)] 
doc update

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: added unit tests for the base64 raw decoding functions
Nikos Mavrogiannopoulos [Fri, 7 Apr 2017 07:38:45 +0000 (09:38 +0200)] 
tests: added unit tests for the base64 raw decoding functions

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agognutls_pem_base64_decode: allow decoding raw base64 data
Nikos Mavrogiannopoulos [Fri, 7 Apr 2017 07:37:10 +0000 (09:37 +0200)] 
gnutls_pem_base64_decode: allow decoding raw base64 data

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agox509/output: do not print usage entry when there is none
Nikos Mavrogiannopoulos [Fri, 7 Apr 2017 07:26:01 +0000 (09:26 +0200)] 
x509/output: do not print usage entry when there is none

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agocerttool: improved printing of the key PIN and key ID
Nikos Mavrogiannopoulos [Fri, 7 Apr 2017 07:21:19 +0000 (09:21 +0200)] 
certtool: improved printing of the key PIN and key ID

That is, on private keys use the same format when printing
the public Key ID and public key PIN, as when printing it
in certificates.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years ago.gitlab-ci.yml: fixed freebsd build project restriction
Nikos Mavrogiannopoulos [Thu, 6 Apr 2017 16:34:56 +0000 (18:34 +0200)] 
.gitlab-ci.yml: fixed freebsd build project restriction

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agocerttool: print the key PIN on private and public keys
Nikos Mavrogiannopoulos [Thu, 6 Apr 2017 16:18:02 +0000 (18:18 +0200)] 
certtool: print the key PIN on private and public keys

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agognutls_pem_base64_encode2: do raw base64 when msg is NULL
Nikos Mavrogiannopoulos [Thu, 6 Apr 2017 16:09:14 +0000 (18:09 +0200)] 
gnutls_pem_base64_encode2: do raw base64 when msg is NULL

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years ago.gitlab-ci.yml: simplified CI setup
Nikos Mavrogiannopoulos [Fri, 7 Apr 2017 06:33:54 +0000 (08:33 +0200)] 
.gitlab-ci.yml: simplified CI setup

This makes builds independent by reducing interactions between
artifacts of builds.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years agofuzz: do not enable the openpgp fuzzer when openpgp is disabled
Nikos Mavrogiannopoulos [Thu, 6 Apr 2017 09:53:33 +0000 (11:53 +0200)] 
fuzz: do not enable the openpgp fuzzer when openpgp is disabled

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agoserv: fixed carriage return stripping in strip()
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 12:50:43 +0000 (14:50 +0200)] 
serv: fixed carriage return stripping in strip()

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agoMark with (void) the remove() function and other unchecked functions
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 12:47:30 +0000 (14:47 +0200)] 
Mark with (void) the remove() function and other unchecked functions

This allows static analysers to properly warn on unchecked return values.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agognutls-cli: fixed minor coverity identified issues
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 12:29:16 +0000 (14:29 +0200)] 
gnutls-cli: fixed minor coverity identified issues

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agocerttool: fixed newline skip code in smime-to-p7 code
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 12:26:52 +0000 (14:26 +0200)] 
certtool: fixed newline skip code in smime-to-p7 code

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: added unit test for the certtool smime conversion functionality
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 12:12:03 +0000 (14:12 +0200)] 
tests: added unit test for the certtool smime conversion functionality

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agocerttool: fixed minor issues pointed out by coverity
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 11:41:36 +0000 (13:41 +0200)] 
certtool: fixed minor issues pointed out by coverity

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agognutls-cli: better resource management in benchmark cmd
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 11:38:06 +0000 (13:38 +0200)] 
gnutls-cli: better resource management in benchmark cmd

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agois_level_acceptable: ensure issuer is not dereferenced when null
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 11:30:22 +0000 (13:30 +0200)] 
is_level_acceptable: ensure issuer is not dereferenced when null

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agocerttool: guard the value of tl before gnutls_pkcs7_verify
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 11:25:08 +0000 (13:25 +0200)] 
certtool: guard the value of tl before gnutls_pkcs7_verify

This utilizes assert() as it cannot be triggered in practice.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agoAvoid using ASN1_MAX_NAME_SIZE directly
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 11:20:44 +0000 (13:20 +0200)] 
Avoid using ASN1_MAX_NAME_SIZE directly

Since ASN1_MAX_NAME_SIZE refers to a single element in the asn1
tree, it is not suitable to hold the maximum combined name. Instead
use a local definition of MAX_NAME_SIZE, which is a multiple of
the ASN1_MAX_NAME_SIZE.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agognutls_x509_crq_set_challenge_password: don't accept null password
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 11:15:38 +0000 (13:15 +0200)] 
gnutls_x509_crq_set_challenge_password: don't accept null password

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agoMark with (void) the functions where the returned value is not checked intentionally
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 11:13:26 +0000 (13:13 +0200)] 
Mark with (void) the functions where the returned value is not checked intentionally

This allows static analysers to properly warn on unchecked return values.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agoremoved duplicate code
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 11:08:11 +0000 (13:08 +0200)] 
removed duplicate code

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agohandshake/record: mark with comments all expected fall-through switches
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 10:47:03 +0000 (12:47 +0200)] 
handshake/record: mark with comments all expected fall-through switches

This reduces warnings from static analysers like coverity and makes
explicit the intention.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agognutlsxx.cpp: fixed misleading indentation issues
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 10:42:18 +0000 (12:42 +0200)] 
gnutlsxx.cpp: fixed misleading indentation issues

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agodoc: document intended fallthrough
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 10:39:23 +0000 (12:39 +0200)] 
doc: document intended fallthrough

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: fixed possible buffer overflow to avoid spurious complaints
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 10:36:52 +0000 (12:36 +0200)] 
tests: fixed possible buffer overflow to avoid spurious complaints

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

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agox509.h: added macro for inhibit any policy
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 09:54:45 +0000 (11:54 +0200)] 
x509.h: added macro for inhibit any policy

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agoNEWS: updated
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 09:50:29 +0000 (11:50 +0200)] 
NEWS: updated

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agodoc: documented the inhibit any policy extension
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 08:24:17 +0000 (10:24 +0200)] 
doc: documented the inhibit any policy extension

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: added PKCS#12 unit test with AES file
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 09:08:09 +0000 (11:08 +0200)] 
tests: added PKCS#12 unit test with AES file

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: added unit test for inhibit anypolicy generation
Nikos Mavrogiannopoulos [Tue, 4 Apr 2017 14:36:48 +0000 (16:36 +0200)] 
tests: added unit test for inhibit anypolicy generation

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agosupported_exts: inhibit anypolicy is listed as supported
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 13:36:47 +0000 (15:36 +0200)] 
supported_exts: inhibit anypolicy is listed as supported

Since we don't support certificate verification based on policies,
we make sure we do not reject any certificates based on the inhibit
any policy extension being present.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agocerttool: added template option inhibit_anypolicy_skip_certs
Nikos Mavrogiannopoulos [Tue, 4 Apr 2017 14:27:34 +0000 (16:27 +0200)] 
certtool: added template option inhibit_anypolicy_skip_certs

This option writes the inhibit anyPolicy option in a certificate.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agox509: output the inhibit anyPolicy value
Nikos Mavrogiannopoulos [Tue, 4 Apr 2017 14:25:47 +0000 (16:25 +0200)] 
x509: output the inhibit anyPolicy value

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agodocumented the GNUTLS_X509_OID_POLICY_ANY macro
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 08:29:32 +0000 (10:29 +0200)] 
documented the GNUTLS_X509_OID_POLICY_ANY macro

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agox509: added function to set and retrieve inhibit anypolicy extension value
Nikos Mavrogiannopoulos [Tue, 4 Apr 2017 14:03:34 +0000 (16:03 +0200)] 
x509: added function to set and retrieve inhibit anypolicy extension value

That is, introduced:
 * gnutls_x509_crt_get_inhibit_anypolicy
 * gnutls_x509_crt_set_inhibit_anypolicy

Resolves #180

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years ago_gnutls_x509_write_uint32: ensure we prepend leading zero when writing
Nikos Mavrogiannopoulos [Tue, 4 Apr 2017 13:53:05 +0000 (15:53 +0200)] 
_gnutls_x509_write_uint32: ensure we prepend leading zero when writing

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agoAdded helper functions to parse the inhibit anyPolicy X.509 extension
Nikos Mavrogiannopoulos [Tue, 4 Apr 2017 13:46:45 +0000 (15:46 +0200)] 
Added helper functions to parse the inhibit anyPolicy X.509 extension

That introduces:
 * gnutls_x509_ext_export_inhibit_anypolicy
 * gnutls_x509_ext_import_inhibit_anypolicy

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: added unit test for PKCS#12 with file that uses PBES1 with no salt
Nikos Mavrogiannopoulos [Tue, 4 Apr 2017 13:22:06 +0000 (15:22 +0200)] 
tests: added unit test for PKCS#12 with file that uses PBES1 with no salt

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: added basic check for system trust store
Nikos Mavrogiannopoulos [Thu, 6 Apr 2017 03:14:25 +0000 (05:14 +0200)] 
tests: added basic check for system trust store

This checks whether the gnutls_certificate_set_x509_system_trust()
and thus the trust list equivalent function operate as expected
and return a positive number of certificates. The test is ignored
in systems where these functions return GNUTLS_E_UNIMPLEMENTED_FEATURE.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years agognutls_x509_trust_list_add_system_trust: Add macOS keychain support
David Caldwell [Wed, 5 Apr 2017 04:29:55 +0000 (21:29 -0700)] 
gnutls_x509_trust_list_add_system_trust: Add macOS keychain support

Also don't check for a default_trust_store_file in configure when building on
macOS (unless explicitly asked to with --with-default-trust-store-file=xxx),
because otherwise it finds /etc/ssl/cert.pem: This file is new (since
10.12.2?), which means libraries built on the newest OS version wouldn't work
the same way on an older versions (and vice versa).  "/etc/ssl/cert.pem" also
doesn't seem to reflect additions and deletions from the user's or system's
trusted roots keychain (in my limited testing).

Signed-off-by: David Caldwell <david@porkrind.org>
9 years agoRename uint64 to gnutls_uint64 to avoid conflict with macOS
David Caldwell [Wed, 5 Apr 2017 18:15:45 +0000 (11:15 -0700)] 
Rename uint64 to gnutls_uint64 to avoid conflict with macOS

Signed-off-by: David Caldwell <david@porkrind.org>
9 years agompi: openpgp integer scanning was put into conditional
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 08:11:01 +0000 (10:11 +0200)] 
mpi: openpgp integer scanning was put into conditional

That is, no longer include that code when compiling without openpgp
support.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agoMoved all openpgp-related variables and definitions into ifdef blocks
Nikos Mavrogiannopoulos [Wed, 29 Mar 2017 10:38:34 +0000 (12:38 +0200)] 
Moved all openpgp-related variables and definitions into ifdef blocks

This allows compilation with -Werror even if openpgp is disabled.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agoOpenPGP authentication is disabled by default
Nikos Mavrogiannopoulos [Wed, 29 Mar 2017 07:55:36 +0000 (09:55 +0200)] 
OpenPGP authentication is disabled by default

The flag --enable-openpgp-authenticationcan be used to revert
this change.

Resolves #178

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotools: remove outfile when exited on error
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 06:50:53 +0000 (08:50 +0200)] 
tools: remove outfile when exited on error

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agocerttool: added examples on verifying certificates
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 06:32:48 +0000 (08:32 +0200)] 
certtool: added examples on verifying certificates

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agocerttool: improved documentation
Nikos Mavrogiannopoulos [Wed, 5 Apr 2017 06:12:17 +0000 (08:12 +0200)] 
certtool: improved documentation

Incorporated comments made in Lenka Horakova's thesis study.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: added unit test for PKCS#12 with file that uses PBES1 with no salt
Nikos Mavrogiannopoulos [Tue, 4 Apr 2017 13:22:06 +0000 (15:22 +0200)] 
tests: added unit test for PKCS#12 with file that uses PBES1 with no salt

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agodoc update
Nikos Mavrogiannopoulos [Tue, 4 Apr 2017 09:28:27 +0000 (11:28 +0200)] 
doc update

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: add unit test for PKCS#12 with file that uses SHA512 for MAC
Nikos Mavrogiannopoulos [Tue, 4 Apr 2017 10:52:14 +0000 (12:52 +0200)] 
tests: add unit test for PKCS#12 with file that uses SHA512 for MAC

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agopkcs12: increased the maximum salt size
Nikos Mavrogiannopoulos [Tue, 4 Apr 2017 10:11:27 +0000 (12:11 +0200)] 
pkcs12: increased the maximum salt size

This accomodates for files which have salt sizes up to 256 bytes.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years ago_gnutls_pkcs12_string_to_key: allow SHA384 and SHA512
Nikos Mavrogiannopoulos [Tue, 4 Apr 2017 10:01:15 +0000 (12:01 +0200)] 
_gnutls_pkcs12_string_to_key: allow SHA384 and SHA512

The previous implementation of the function was restricted to SHA1 and
SHA256. Extended to allow SHA384 and SHA512 as well.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agoPKCS#12: added support for files with zero salt length in MAC
Nikos Mavrogiannopoulos [Tue, 4 Apr 2017 09:25:22 +0000 (11:25 +0200)] 
PKCS#12: added support for files with zero salt length in MAC

Resolves #191
Resolves #190

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: added unit test for PKCS#12 with file with no salt in MAC
Nikos Mavrogiannopoulos [Tue, 4 Apr 2017 09:19:23 +0000 (11:19 +0200)] 
tests: added unit test for PKCS#12 with file with no salt in MAC

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agotests: verify that the encryption OID is printed
Nikos Mavrogiannopoulos [Mon, 3 Apr 2017 07:44:43 +0000 (09:44 +0200)] 
tests: verify that the encryption OID is printed

That is, verify whether certtool --p12-info will print the
actual encryption OID on unsupported files, rather than the
generic PBES2 algorithm.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agognutls_pkcs8_info: return the encryption algorithm OID on failure
Nikos Mavrogiannopoulos [Mon, 3 Apr 2017 07:35:31 +0000 (09:35 +0200)] 
gnutls_pkcs8_info: return the encryption algorithm OID on failure

When failing to import a structure due to an unsupported encryption
algorithm OID, return the unsupported OID instead of the generic
PBES2 OID.

Resolves: #193

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agognutls_transport_set_pull_timeout_function: doc update [ci skip]
Nikos Mavrogiannopoulos [Tue, 4 Apr 2017 08:26:43 +0000 (10:26 +0200)] 
gnutls_transport_set_pull_timeout_function: doc update [ci skip]

Clarified when this function should be set. Based on suggestion by
Sean Greenslade.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agoUse NORMAL priority for SSLv23_*_method.
Andreas Metzler [Sun, 2 Apr 2017 15:56:15 +0000 (17:56 +0200)] 
Use NORMAL priority for SSLv23_*_method.

Instead of enforcing TLS1.0/SSL3.0 use gnutls NORMAL priority for
SSLv23_*_methods.

http://bugs.debian.org/857436

9 years ago.gitlab-ci.yml: renamed dist build to doc-dist
Nikos Mavrogiannopoulos [Sun, 2 Apr 2017 13:14:41 +0000 (15:14 +0200)] 
.gitlab-ci.yml: renamed dist build to doc-dist

This better describes the name of the build.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years ago.gitlab-ci.yml: combined minimal and no-tools builds
Nikos Mavrogiannopoulos [Sun, 2 Apr 2017 13:12:44 +0000 (15:12 +0200)] 
.gitlab-ci.yml: combined minimal and no-tools builds

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years ago.gitlab-ci.yml: combined static analyser runs
Nikos Mavrogiannopoulos [Sun, 2 Apr 2017 13:07:05 +0000 (15:07 +0200)] 
.gitlab-ci.yml: combined static analyser runs

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years ago.gitlab-ci.yml: reduced builds and stages
Nikos Mavrogiannopoulos [Sat, 1 Apr 2017 21:40:12 +0000 (23:40 +0200)] 
.gitlab-ci.yml: reduced builds and stages

That is an improvement to run the CI faster.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years agotests: added unit test for gnutls_priority_get_cipher_suite_index
Nikos Mavrogiannopoulos [Thu, 30 Mar 2017 18:56:01 +0000 (20:56 +0200)] 
tests: added unit test for gnutls_priority_get_cipher_suite_index

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years agognutls-cli: eliminate leak on --list option
Nikos Mavrogiannopoulos [Fri, 31 Mar 2017 18:33:49 +0000 (20:33 +0200)] 
gnutls-cli: eliminate leak on --list option

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years agognutls_priority_get_cipher_suite_index: fixed returned protocols
Nikos Mavrogiannopoulos [Wed, 29 Mar 2017 16:52:48 +0000 (18:52 +0200)] 
gnutls_priority_get_cipher_suite_index: fixed returned protocols

That is no longer return indexes for ciphersuites which would not have
been available due to TLS version mismatch in the priorities cache.

Resolves #146

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years agotests: Copy template out of ${srcdir}
Matt Turner [Fri, 31 Mar 2017 20:45:04 +0000 (13:45 -0700)] 
tests: Copy template out of ${srcdir}

Otherwise, out of tree builds will fail to copy the template.

Signed-off-by: Matt Turner <mattst88@gmail.com>
9 years agognutls_cipher_get_tag_size: document behavior on non-AEAD ciphers
Nikos Mavrogiannopoulos [Fri, 31 Mar 2017 18:56:04 +0000 (20:56 +0200)] 
gnutls_cipher_get_tag_size: document behavior on non-AEAD ciphers

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years agodoc: make a note that parts of the crypto API are in Core API
Nikos Mavrogiannopoulos [Fri, 31 Mar 2017 18:53:19 +0000 (20:53 +0200)] 
doc: make a note that parts of the crypto API are in Core API

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years agotests: added checks with problematic PKCS#12 files
Nikos Mavrogiannopoulos [Fri, 31 Mar 2017 14:27:03 +0000 (16:27 +0200)] 
tests: added checks with problematic PKCS#12 files

These check whether parsing of unsupported files (e.g., with RC2-128),
will succeed. This serves as functionality check for gnutls_pkcs8_info.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agognutls_pkcs8_info: do not free oid on GNUTLS_E_UNKNOWN_CIPHER_TYPE
Nikos Mavrogiannopoulos [Fri, 31 Mar 2017 14:17:07 +0000 (16:17 +0200)] 
gnutls_pkcs8_info: do not free oid on GNUTLS_E_UNKNOWN_CIPHER_TYPE

The documented behavior of the function was to return a valid
OID in that case.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
9 years agodoc update [ci skip]
Nikos Mavrogiannopoulos [Thu, 30 Mar 2017 17:58:22 +0000 (19:58 +0200)] 
doc update [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
9 years agoMakefile.am: dropped .clcopying from dist files [ci skip]
Nikos Mavrogiannopoulos [Wed, 29 Mar 2017 12:08:26 +0000 (14:08 +0200)] 
Makefile.am: dropped .clcopying from dist files [ci skip]

It is no longer being used.

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