]> git.ipfire.org Git - thirdparty/gnutls.git/log
thirdparty/gnutls.git
9 years agomention ubsan in README [ci skip]
Nikos Mavrogiannopoulos [Mon, 25 Jul 2016 09:43:08 +0000 (11:43 +0200)] 
mention ubsan in README [ci skip]

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

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

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

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

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

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

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

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

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

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

Relates #114

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

Relates #114

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

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

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

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

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

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

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

9 years agodoc: clarify return codes in verification functions [ci skip]
Nikos Mavrogiannopoulos [Thu, 21 Jul 2016 14:07:56 +0000 (16:07 +0200)] 
doc: clarify return codes in verification functions [ci skip]

9 years agognutls_certificate_verify_peers2: document that hostname comparison follows RFC6125
Nikos Mavrogiannopoulos [Thu, 21 Jul 2016 14:02:42 +0000 (16:02 +0200)] 
gnutls_certificate_verify_peers2: document that hostname comparison follows RFC6125

9 years agornd-getentropy: better handling of error printing with errno
Nikos Mavrogiannopoulos [Thu, 21 Jul 2016 09:53:46 +0000 (11:53 +0200)] 
rnd-getentropy: better handling of error printing with errno

9 years agornd-linux: make getrandom back-end robust against EINTR failures
Nikos Mavrogiannopoulos [Thu, 21 Jul 2016 09:51:05 +0000 (11:51 +0200)] 
rnd-linux: make getrandom back-end robust against EINTR failures

9 years agognutls_init: doc update
Nikos Mavrogiannopoulos [Wed, 20 Jul 2016 11:36:38 +0000 (13:36 +0200)] 
gnutls_init: doc update

9 years agotests: verify that GNUTLS_NONBLOCK is available as a definition
Nikos Mavrogiannopoulos [Wed, 20 Jul 2016 11:31:18 +0000 (13:31 +0200)] 
tests: verify that GNUTLS_NONBLOCK is available as a definition

9 years agognutls.h: define elements of gnutls_init_flags_t
Nikos Mavrogiannopoulos [Wed, 20 Jul 2016 11:23:16 +0000 (13:23 +0200)] 
gnutls.h: define elements of gnutls_init_flags_t

That is, define all the elements that were available prior
the move from #define to enum, to allow code relying on

9 years agognutls.h: documented the version various gnutls_init flags were introduced
Nikos Mavrogiannopoulos [Wed, 20 Jul 2016 11:07:44 +0000 (13:07 +0200)] 
gnutls.h: documented the version various gnutls_init flags were introduced

9 years agoMoved the gnutls_x509_dn API functions to x509_dn.c
Nikos Mavrogiannopoulos [Wed, 20 Jul 2016 09:27:35 +0000 (11:27 +0200)] 
Moved the gnutls_x509_dn API functions to x509_dn.c

9 years agotests: enhanced DN decoding tests with complex encoding
Nikos Mavrogiannopoulos [Tue, 19 Jul 2016 13:12:13 +0000 (15:12 +0200)] 
tests: enhanced DN decoding tests with complex encoding

9 years agoRFC4514 DN decoding: allow decoding of raw ('#') items
Nikos Mavrogiannopoulos [Tue, 19 Jul 2016 12:43:52 +0000 (14:43 +0200)] 
RFC4514 DN decoding: allow decoding of raw ('#') items

In addition allow escaping prefix or suffix spaces as well as
the hash.

9 years agodoc update
Nikos Mavrogiannopoulos [Tue, 19 Jul 2016 12:21:16 +0000 (14:21 +0200)] 
doc update

9 years agotests: enhanced DN decoding tests with encoding
Nikos Mavrogiannopoulos [Tue, 19 Jul 2016 12:10:08 +0000 (14:10 +0200)] 
tests: enhanced DN decoding tests with encoding

This adds unit tests for gnutls_x509_dn_set_str().

9 years agoAdded gnutls_x509_dn_set_str()
Nikos Mavrogiannopoulos [Tue, 19 Jul 2016 12:09:06 +0000 (14:09 +0200)] 
Added gnutls_x509_dn_set_str()

This allows initializing a gnutls_x509_dn_t structure via a DN string.

9 years agotests: utils: use vasprintf() where available
Nikos Mavrogiannopoulos [Tue, 19 Jul 2016 11:45:08 +0000 (13:45 +0200)] 
tests: utils: use vasprintf() where available

This allows printing long strings.

9 years agotests: added checks for the RFC4514 decoding via gnutls_x509_dn_get_str()
Nikos Mavrogiannopoulos [Tue, 19 Jul 2016 11:35:13 +0000 (13:35 +0200)] 
tests: added checks for the RFC4514 decoding via gnutls_x509_dn_get_str()

9 years agoRemove redundant if expression from tests/mini-loss-time.c
Tim Rühsen [Tue, 19 Jul 2016 10:08:23 +0000 (12:08 +0200)] 
Remove redundant if expression from tests/mini-loss-time.c

9 years agoFix tests/slow/cipher-openssl-compat.c for OpenSSL 1.1.0
Tim Rühsen [Tue, 19 Jul 2016 09:08:10 +0000 (11:08 +0200)] 
Fix tests/slow/cipher-openssl-compat.c for OpenSSL 1.1.0

9 years agocfg.mk: no longer save config.rpath
Nikos Mavrogiannopoulos [Mon, 18 Jul 2016 16:02:25 +0000 (18:02 +0200)] 
cfg.mk: no longer save config.rpath

9 years agoremoved auto-generated files from the repository
Nikos Mavrogiannopoulos [Mon, 18 Jul 2016 14:36:27 +0000 (16:36 +0200)] 
removed auto-generated files from the repository

9 years agotests: removed an skipped failures due to bugs in softhsm 2.0.0
Nikos Mavrogiannopoulos [Sun, 17 Jul 2016 07:37:22 +0000 (09:37 +0200)] 
tests: removed an skipped failures due to bugs in softhsm 2.0.0

These are no longer an issue as the CI has been updated to softhsm
2.1.0, which addresses them, and they prevented catching the
GNUTLS-SA-2016-2 regression.

9 years agodoc update
Nikos Mavrogiannopoulos [Sat, 16 Jul 2016 16:12:27 +0000 (18:12 +0200)] 
doc update

9 years agoDropped support for EGD random generator
Nikos Mavrogiannopoulos [Sat, 16 Jul 2016 15:19:02 +0000 (17:19 +0200)] 
Dropped support for EGD random generator

This removes rarely tested code for systems which no longer exist
and simplifies code for Linux random generator.

Resolves #112

9 years agoconfigure: prevent a version of getentropy() in a linux libc to be used
Nikos Mavrogiannopoulos [Fri, 15 Jul 2016 19:55:04 +0000 (21:55 +0200)] 
configure: prevent a version of getentropy() in a linux libc to be used

For now, we auto-detect and switch between getrandom() and /dev/urandom
when the former is not available. With the complexity of dealing with
libc's that have the feature but kernel not supporting it, or vice versa
it is best keep things simple.

9 years agornd-linux: added sanity check in getrandom output
Nikos Mavrogiannopoulos [Fri, 15 Jul 2016 19:38:02 +0000 (21:38 +0200)] 
rnd-linux: added sanity check in getrandom output

9 years agonettle: split the rnd-common to rnd-windows, rnd-getentropy, and rnd-linux
Nikos Mavrogiannopoulos [Fri, 15 Jul 2016 16:57:01 +0000 (18:57 +0200)] 
nettle: split the rnd-common to rnd-windows, rnd-getentropy, and rnd-linux

That is, to the windows random generator as well as the getentropy()
generator in BSDs, as well as the getrandom(), /dev/urandom,
and EGD generators on Linux systems.

9 years agornd-common: added faster detection of getrandom based on GRND_NONBLOCK
Nikos Mavrogiannopoulos [Fri, 15 Jul 2016 16:51:14 +0000 (18:51 +0200)] 
rnd-common: added faster detection of getrandom based on GRND_NONBLOCK

9 years agodoc update
Nikos Mavrogiannopoulos [Fri, 15 Jul 2016 13:31:16 +0000 (15:31 +0200)] 
doc update

9 years agourandom: use st_ino and st_rdev to determine device uniqueness
Nikos Mavrogiannopoulos [Fri, 15 Jul 2016 12:58:07 +0000 (14:58 +0200)] 
urandom: use st_ino and st_rdev to determine device uniqueness

9 years agoAdded auto-detection of getrandom() system call in Linux systems
Nikos Mavrogiannopoulos [Fri, 15 Jul 2016 12:34:38 +0000 (14:34 +0200)] 
Added auto-detection of getrandom() system call in Linux systems

In addition use getrandom() via the syscall interface if it doesn't
exist in Libc. The reason for the latter is that getrandom() support
for glibc is in limbo for several years, and for auto-detection is that
even if it is going to be present in libc we will not be able to guarrantee
that the system call is available just because it is present in glibc.
For that we detect on initialization whether getrandom() can obtain
random data, and if yes, we continue using that.

9 years agotests: seccomp examples: use cert-common.h
Nikos Mavrogiannopoulos [Fri, 15 Jul 2016 11:58:16 +0000 (13:58 +0200)] 
tests: seccomp examples: use cert-common.h

9 years agotests: enhanced arbitrary extension tests with octet_string encoding
Nikos Mavrogiannopoulos [Thu, 14 Jul 2016 08:00:19 +0000 (10:00 +0200)] 
tests: enhanced arbitrary extension tests with octet_string encoding

9 years agocerttool: added the ability to encode arbitrary extensions
Nikos Mavrogiannopoulos [Thu, 14 Jul 2016 07:43:28 +0000 (09:43 +0200)] 
certtool: added the ability to encode arbitrary extensions

That is, added the ability to encode as an octet string any
specified extension data.

9 years ago.gitlab-ci.yml: added expiration time of a week for failure artifacts
Nikos Mavrogiannopoulos [Thu, 14 Jul 2016 07:21:16 +0000 (09:21 +0200)] 
.gitlab-ci.yml: added expiration time of a week for failure artifacts

9 years agodoc update
Nikos Mavrogiannopoulos [Mon, 11 Jul 2016 14:36:39 +0000 (16:36 +0200)] 
doc update

9 years agotests: added basic testing of gnutls_x509_crq_set_extension_by_oid()
Nikos Mavrogiannopoulos [Mon, 11 Jul 2016 14:31:47 +0000 (16:31 +0200)] 
tests: added basic testing of gnutls_x509_crq_set_extension_by_oid()

9 years agotests: added checks on certificate and request generation with arbitrary extensions
Nikos Mavrogiannopoulos [Mon, 11 Jul 2016 14:13:12 +0000 (16:13 +0200)] 
tests: added checks on certificate and request generation with arbitrary extensions

This tests the add_extension and add_critical_extension options of certtool.

9 years agocerttool: added options to set arbitrary extensions to certificates and requests
Nikos Mavrogiannopoulos [Mon, 11 Jul 2016 09:43:10 +0000 (11:43 +0200)] 
certtool: added options to set arbitrary extensions to certificates and requests

This allows setting arbitrary extensions using the following new template options:
add_extension = "5.6.7.8 0x0001020304050607AAABCD"
add_critical_extension = "9.10.11.12.13.14.15.16.17.1.5 0xCAFE"

The "0x" prefix can be omitted.

9 years agoadded gnutls_x509_crq_set_extension_by_oid()
Nikos Mavrogiannopoulos [Mon, 11 Jul 2016 09:41:14 +0000 (11:41 +0200)] 
added gnutls_x509_crq_set_extension_by_oid()

This is a function to add an arbitrary extension into a
certificate request.

9 years agodoc: mention the need of libtasn1-tools in Fedora based systems [ci skip]
Nikos Mavrogiannopoulos [Wed, 13 Jul 2016 11:20:10 +0000 (13:20 +0200)] 
doc: mention the need of libtasn1-tools in Fedora based systems [ci skip]

9 years agodoc update [ci skip]
Nikos Mavrogiannopoulos [Wed, 13 Jul 2016 10:11:57 +0000 (12:11 +0200)] 
doc update [ci skip]

9 years agodoc: mention libcmocka dependency
Nikos Mavrogiannopoulos [Mon, 11 Jul 2016 08:54:09 +0000 (10:54 +0200)] 
doc: mention libcmocka dependency

9 years agotests: added unit testing for DTLS sliding window implementation
Nikos Mavrogiannopoulos [Sat, 9 Jul 2016 12:52:42 +0000 (14:52 +0200)] 
tests: added unit testing for DTLS sliding window implementation

This was taken from the unit testing of AF_KTLS.

9 years agodtls: imported Fridolin's DTLS sliding window implementation
Nikos Mavrogiannopoulos [Fri, 10 Jun 2016 21:14:03 +0000 (23:14 +0200)] 
dtls: imported Fridolin's DTLS sliding window implementation

This simplifies the current code, and reduces the memory needed.

9 years agodtls: moved DTLS window handling to separate file
Nikos Mavrogiannopoulos [Fri, 10 Jun 2016 20:42:21 +0000 (22:42 +0200)] 
dtls: moved DTLS window handling to separate file

9 years agoex-client-x509: removed unused call to gnutls_session_set_ptr()
Nikos Mavrogiannopoulos [Tue, 12 Jul 2016 16:37:53 +0000 (18:37 +0200)] 
ex-client-x509: removed unused call to gnutls_session_set_ptr()

9 years agolibtasn1: updated to allow large OIDs to be used even on 32-bit systems
Nikos Mavrogiannopoulos [Tue, 12 Jul 2016 12:48:14 +0000 (14:48 +0200)] 
libtasn1: updated to allow large OIDs to be used even on 32-bit systems

9 years agodoc: updated contribution guide
Nikos Mavrogiannopoulos [Mon, 11 Jul 2016 15:44:28 +0000 (17:44 +0200)] 
doc: updated contribution guide

9 years agodoc: updated contribution guide
Nikos Mavrogiannopoulos [Mon, 11 Jul 2016 15:43:04 +0000 (17:43 +0200)] 
doc: updated contribution guide

9 years agotests: link the resume tests to gnulib due to their missing memmem()
Nikos Mavrogiannopoulos [Mon, 11 Jul 2016 15:19:16 +0000 (17:19 +0200)] 
tests: link the resume tests to gnulib due to their missing memmem()

This fixes compilation of gnutls in solaris. Reported by Dagobert Michelsen.

9 years agoNEWS: corrected release date [ci skip]
Nikos Mavrogiannopoulos [Fri, 8 Jul 2016 12:26:38 +0000 (14:26 +0200)] 
NEWS: corrected release date [ci skip]

9 years ago.gitlab-ci.yml: keep the artifacts on failure
Nikos Mavrogiannopoulos [Thu, 7 Jul 2016 20:55:48 +0000 (22:55 +0200)] 
.gitlab-ci.yml: keep the artifacts on failure

9 years agowrite_nss_key_log: write the premaster secret while it is still valid
Nikos Mavrogiannopoulos [Thu, 7 Jul 2016 19:00:56 +0000 (21:00 +0200)] 
write_nss_key_log: write the premaster secret while it is still valid

9 years agoupdated libtasn1
Nikos Mavrogiannopoulos [Thu, 7 Jul 2016 18:55:03 +0000 (20:55 +0200)] 
updated libtasn1

9 years agoreleased 3.5.2 gnutls_3_5_2
Nikos Mavrogiannopoulos [Wed, 6 Jul 2016 06:43:58 +0000 (08:43 +0200)] 
released 3.5.2

9 years agocfg.mk: reduced the generated changelog size
Nikos Mavrogiannopoulos [Tue, 5 Jul 2016 16:40:32 +0000 (18:40 +0200)] 
cfg.mk: reduced the generated changelog size

9 years agobumped version
Nikos Mavrogiannopoulos [Tue, 5 Jul 2016 16:37:15 +0000 (18:37 +0200)] 
bumped version

9 years agotests: ignore any memory leaks from libcrypto
Nikos Mavrogiannopoulos [Tue, 5 Jul 2016 10:03:51 +0000 (12:03 +0200)] 
tests: ignore any memory leaks from libcrypto

9 years agodoc update
Nikos Mavrogiannopoulos [Tue, 5 Jul 2016 09:33:54 +0000 (11:33 +0200)] 
doc update

9 years agoasm: updated openssl and the asm sources for AES-GCM from openssl 1.0.2h
Nikos Mavrogiannopoulos [Fri, 1 Jul 2016 11:51:18 +0000 (13:51 +0200)] 
asm: updated openssl and the asm sources for AES-GCM from openssl 1.0.2h

This improves the performance of AES-GCM significantly by taking
advantage of AVX and MOVBE instructions where available. This
utilizes Andy Polyakov's code under BSD license.

9 years agotests: when testing with openssl disallow any CPU optimizations
Nikos Mavrogiannopoulos [Tue, 5 Jul 2016 09:44:59 +0000 (11:44 +0200)] 
tests: when testing with openssl disallow any CPU optimizations

This ensures that we test our optimized code (which is mostly
openssl based), with code that is not identical.

9 years agotests: added openssl compatibility tests for AES-GCM cipher
Nikos Mavrogiannopoulos [Fri, 1 Jul 2016 12:29:40 +0000 (14:29 +0200)] 
tests: added openssl compatibility tests for AES-GCM cipher

9 years agodane: corrected the license of libdane files
Nikos Mavrogiannopoulos [Tue, 5 Jul 2016 09:41:20 +0000 (11:41 +0200)] 
dane: corrected the license of libdane files

The license was always LGPL version 2.1, and these
files mentioned LGPL version 3. Reported by Thomas
Petazzoni.

9 years agotests: ignore leaks due to p11-kit in test suite
Nikos Mavrogiannopoulos [Mon, 4 Jul 2016 15:29:30 +0000 (17:29 +0200)] 
tests: ignore leaks due to p11-kit in test suite

This addresses issue in "pkcs11-privkey-fork" which failed
when compiled under asan due to leaks in p11-kit after fork.

9 years agotests: added check to ensure that pkcs11 objects will be reopened on fork
Nikos Mavrogiannopoulos [Mon, 4 Jul 2016 13:28:27 +0000 (15:28 +0200)] 
tests: added check to ensure that pkcs11 objects will be reopened on fork

This checks whether C_Initialize() and C_OpenSession() will be called
again when using a PKCS#11 module.

Resolves #95

9 years agopkcs11: on object import always check for a support public key algorithm
Nikos Mavrogiannopoulos [Mon, 4 Jul 2016 13:19:32 +0000 (15:19 +0200)] 
pkcs11: on object import always check for a support public key algorithm

9 years agognutls_aead_cipher_decrypt: corrected the return value of ptext_len
Nikos Mavrogiannopoulos [Fri, 1 Jul 2016 13:29:58 +0000 (15:29 +0200)] 
gnutls_aead_cipher_decrypt: corrected the return value of ptext_len

That is, do not account the tag_size into the plaintext.

10 years agodoc update
Nikos Mavrogiannopoulos [Thu, 30 Jun 2016 13:29:44 +0000 (15:29 +0200)] 
doc update

10 years agoconfigure: check for libdl irrespective of FIPS140 configuration
Nikos Mavrogiannopoulos [Thu, 30 Jun 2016 13:22:22 +0000 (15:22 +0200)] 
configure: check for libdl irrespective of FIPS140 configuration

This allows to link to libdl for the tests that require it.

10 years agotests: account pkcs11/pkcs11-mock-ext.h in Makefile
Nikos Mavrogiannopoulos [Thu, 30 Jun 2016 11:44:57 +0000 (13:44 +0200)] 
tests: account pkcs11/pkcs11-mock-ext.h in Makefile

10 years agotests: link pkcs11-import-url-privkey with libdl
Nikos Mavrogiannopoulos [Thu, 30 Jun 2016 11:41:51 +0000 (13:41 +0200)] 
tests: link pkcs11-import-url-privkey with libdl

That is because it uses dlopen().

10 years agomore files to ignore
Nikos Mavrogiannopoulos [Thu, 30 Jun 2016 08:47:02 +0000 (10:47 +0200)] 
more files to ignore

10 years agotests: avoid compiler warning from pkcs11-pubkey-import
Nikos Mavrogiannopoulos [Thu, 30 Jun 2016 07:34:33 +0000 (09:34 +0200)] 
tests: avoid compiler warning from pkcs11-pubkey-import

10 years agotests: added check to verify the tolerance of broken C_GetAttributes
Nikos Mavrogiannopoulos [Thu, 30 Jun 2016 07:30:47 +0000 (09:30 +0200)] 
tests: added check to verify the tolerance of broken C_GetAttributes

That is, test gnutls_pkcs11_obj_list_import_url4() when importing
private keys from tokens that return CKR_OK on sensitive objects,
and tokens that return CKR_ATTRIBUTE_SENSTIVE.

Relates #108

10 years agopkcs11_get_attribute_avalue: correctly handle a -1 value length from C_GetAttributeValue
Nikos Mavrogiannopoulos [Thu, 30 Jun 2016 07:11:40 +0000 (09:11 +0200)] 
pkcs11_get_attribute_avalue: correctly handle a -1 value length from C_GetAttributeValue

That is, work-around modules which do not return an error on sensitive
objects.

Relates #108

10 years agopkcs11_get_attribute_avalue: do not assign values on failure
Nikos Mavrogiannopoulos [Wed, 29 Jun 2016 16:52:22 +0000 (18:52 +0200)] 
pkcs11_get_attribute_avalue: do not assign values on failure

When C_GetAttributeValue() returns size but does not return data
then pkcs11_get_attribute_avalue() would set the return data pointer
to a free'd value. This is against the convention expected by callers,
i.e, set data to NULL. Reported by Anthony Alba in #108.

10 years agotests: use datefudge in name-constraints test
Nikos Mavrogiannopoulos [Wed, 29 Jun 2016 15:25:06 +0000 (17:25 +0200)] 
tests: use datefudge in name-constraints test

This avoids the expiration of the used certificate to affect the test.

10 years agotests: link libpkcs11mock1 with gnulib
Nikos Mavrogiannopoulos [Tue, 28 Jun 2016 07:17:13 +0000 (09:17 +0200)] 
tests: link libpkcs11mock1 with gnulib

This allows it to use gnulib for strndup where it is needed.

10 years agop11tool: do not return from void functions
Nikos Mavrogiannopoulos [Tue, 28 Jun 2016 07:15:55 +0000 (09:15 +0200)] 
p11tool: do not return from void functions

This fixes a compilation issue with solaris compiler. Reported
by Peter Eriksson.

10 years agodoc: mention the boolean functions in the gnutls API
Nikos Mavrogiannopoulos [Fri, 24 Jun 2016 09:01:35 +0000 (11:01 +0200)] 
doc: mention the boolean functions in the gnutls API

10 years agotests: removed remainders of pkcs11 tests from suite/
Nikos Mavrogiannopoulos [Fri, 24 Jun 2016 08:55:37 +0000 (10:55 +0200)] 
tests: removed remainders of pkcs11 tests from suite/

10 years agognutls_pkcs11_crt_is_known: changed to unsigned type
Nikos Mavrogiannopoulos [Fri, 24 Jun 2016 06:37:03 +0000 (08:37 +0200)] 
gnutls_pkcs11_crt_is_known: changed to unsigned type

10 years agotests: pkcs11-is-known: check that no flags enforce compare
Nikos Mavrogiannopoulos [Thu, 23 Jun 2016 21:24:19 +0000 (23:24 +0200)] 
tests: pkcs11-is-known: check that no flags enforce compare

10 years agognutls_pkcs11_crt_is_known: always assume GNUTLS_PKCS11_OBJ_FLAG_COMPARE unless GNUTL...
Nikos Mavrogiannopoulos [Thu, 23 Jun 2016 21:13:50 +0000 (23:13 +0200)] 
gnutls_pkcs11_crt_is_known: always assume GNUTLS_PKCS11_OBJ_FLAG_COMPARE unless GNUTLS_PKCS11_OBJ_FLAG_RETRIEVE_DISTRUSTED is given

10 years agotests: moved pkcs11-softhsm test suite into pkcs11/
Nikos Mavrogiannopoulos [Thu, 23 Jun 2016 21:06:29 +0000 (23:06 +0200)] 
tests: moved pkcs11-softhsm test suite into pkcs11/

10 years agofind_cert_cb: minor cleanups in find_cert_cb
Nikos Mavrogiannopoulos [Thu, 23 Jun 2016 20:40:26 +0000 (22:40 +0200)] 
find_cert_cb: minor cleanups in find_cert_cb

10 years agotests: added more unit tests for gnutls_pkcs11_crt_is_known()
Nikos Mavrogiannopoulos [Thu, 23 Jun 2016 20:25:06 +0000 (22:25 +0200)] 
tests: added more unit tests for gnutls_pkcs11_crt_is_known()

10 years agodn2: updated to account for serial number being printed
Nikos Mavrogiannopoulos [Wed, 22 Jun 2016 16:04:45 +0000 (18:04 +0200)] 
dn2: updated to account for serial number being printed