Commit Graph

1815 Commits

Author SHA1 Message Date
Howard Chu
80e6316d37 ITS#7759 avoid assert in parse_passwdpolicy_control 2013-12-07 08:36:14 -08:00
Howard Chu
f8efeb4278 ITS#7757 plug memleak 2013-12-03 14:16:20 -08:00
Stef Walter
743a9783d5 ITS#7694 Fix use of IPv6 with LDAP_CONNECTIONLESS
LDAP_CONNECTIONLESS code assumed that the size of an peer address
is equal to or smaller than sizeof (struct sockaddr).

Fix to use struct sockaddr_storage instead which is intended for
this purpose. Use getnameinfo() where appropriate so we don't
assume anything about the contents of struct sockaddr
2013-10-10 10:26:28 -07:00
Emily Backes
85003d8a54 ITS#7712 Fix lock ordering in libldap abandon 2013-09-30 15:31:27 -07:00
Quanah Gibson-Mount
1a712bf18e Enable features that were hidden behind LDAP_DEVEL 2013-09-19 09:50:52 -07:00
Howard Chu
16f8b0902c ITS#7398 add LDAP_OPT_X_TLS_PEERCERT
retrieve peer cert for an active TLS session
2013-09-10 04:31:39 -07:00
Howard Chu
0045e56c34 ITS#7683 more for tls version/cipher info
Add LDAP_OPT_X_TLS_VERSION / LDAP_OPT_X_TLS_CIPHER for
retrieving from an LDAP session handle. Update ldap_get_option(3).
2013-09-09 11:52:10 -07:00
Howard Chu
721e46fe66 ITS#7595 don't try to use EC if OpenSSL lacks it 2013-09-08 06:32:23 -07:00
Howard Chu
7d6d6944c5 ITS#7683 log tls prot/cipher info
Note: I could not test the MozNSS patch due to the absence of
NSS PEM support on my machine. Given the review comments in
https://bugzilla.mozilla.org/show_bug.cgi?id=402712 I doubt that
trustworthy PEM support will be appearing for MozNSS any time soon.
2013-09-07 12:22:09 -07:00
Howard Chu
e631ce808e ITS#7595 Add Elliptic Curve support for OpenSSL 2013-09-07 09:47:40 -07:00
Howard Chu
0205e83f46 ITS#7430 GnuTLS: Avoid use of deprecated function 2013-09-07 09:41:46 -07:00
Howard Chu
3e100bb54d Add GnuTLS channel binding support 2013-09-07 09:38:47 -07:00
Howard Chu
cb00bb0218 Fix double-free on ciphersuite parse failure
GnuTLS does an implicit free on failure.
2013-09-07 08:58:25 -07:00
Howard Chu
cfeb28412c ITS#7506 fix prev commit
The patch unconditionally enabled DHparams, which is a significant
change of behavior. Reverting to previous behavior, which only enables
DH use if a DHparam file was configured.
2013-09-07 06:39:53 -07:00
Ben Jencks
6f120920d3 ITS#7506 tls_o.c: Fix Diffie-Hellman parameter usage.
If a DHParamFile or olcDHParamFile is specified, then it will be used,
otherwise a hardcoded 1024 bit parameter will be used. This allows the use of
larger parameters; previously only 512 or 1024 bit parameters would ever be
used.
2013-09-07 06:33:39 -07:00
Howard Chu
a72d1ffe0f ITS#7506 cleanup prev commit 2013-09-07 06:31:58 -07:00
Ben Jencks
622d13a32e ITS#7506 tls_g.c: Properly support DHParamFile.
If a DHParamFile or olcDHParamFile is specified then it will be loaded. This
allows use of DHE/EDH cipher suites which was previously impossible with
GnuTLS.
2013-09-07 06:29:14 -07:00
Howard Chu
ca310ebff4 Add channel binding support
Currently only implemented for OpenSSL.
Needs an option to set the criticality flag.
2013-08-26 23:31:48 -07:00
Philip Guenther
c6cf495247 ITS#7645 more OpenSSL TLS versions 2013-07-29 07:01:15 -07:00
Stef Walter
ffe383c27b ITS#7583 Fix ldap_init_fd() for LDAP_PROTO_UDP
ldap_init_fd() tried to handle UDP sockets but was missing
certain key pieces to make it work. Fill in the address and
set the UDP flag correctly.
2013-05-23 12:40:09 -07:00
Howard Chu
63312f109f ITS#7582 CLDAP, avoid ref to uninit'd memory 2013-05-23 12:36:15 -07:00
Howard Chu
1e68029078 Drop ldap_int_sasl_mutex
It was introduced for Cyrus 1.5 in 2001; we've been on 2.x since 2002 and
Cyrus does its own locking when needed.
2013-04-24 00:52:52 -07:00
Howard Chu
461db2de1a ITS#7497 fix lineno overflow in ldif_read_record() 2013-01-23 02:19:02 +00:00
David Bender
8f52aa24d3 ITS#7476 Prevent EINTR from stopping otherwise successful connect 2013-01-09 09:11:35 -08:00
Kurt Zeilenga
0fd1bf30b8 Happy New Year 2013-01-02 10:22:57 -08:00
Howard Chu
2565e974b9 ITS#7477 check for invalid LDIF 2012-12-19 09:15:09 -08:00
Ralf Haferkamp
c728ebf586 ITS#7428 Use non-blocking IO during SSL Handshake
If a timeout is set, perform the SSL Handshake using non-blocking IO.  This way
we can timeout if SSL Handshake gets stuck for whatever reason.

This code is currently hidden behind #ifdefs (LDAP_USE_NON_BLOCKING_TLS) and
disabled by default as there seem to be some problems using NON-blocking
I/O during the TLS Handshake when linking against NSS (either a bug in NSS
itself of in tls_m.c, see discussion on -devel)

This patch adds an additional parameter to ldap_int_poll() in order to indicate
if we're waiting in order to perform a read or write operation.
2012-11-21 14:25:18 +01:00
Rich Megginson
a0e48e7246 ITS#7360 accept nss certname in the form of tokenname:certnickname
There are cases where the user may want to force the use of a particular
PKCS11 device to use for a given certificate.  Allow the user to do this
with MozNSS by specifying the cert as "tokenname:certnickname" where
token name is the name of a token/slot in a PKCS11 device and certnickname
is the nickname of a certificate on that device.
2012-08-22 14:21:23 -07:00
Howard Chu
1ebf95c31b ITS#7359 cleanup for loop 2012-08-22 14:13:10 -07:00
Jan Vcelak
6833b8717a ITS#7359 MozNSS: fix whitespaces in all my changes
To be compliant with OpenLDAP coding standards.
2012-08-22 14:12:01 -07:00
Jan Vcelak
46dc6c424b ITS#7359 MozNSS: prefer unlocked slot when getting private key 2012-08-21 13:32:34 -07:00
Howard Chu
68c3cf9795 ITS#7358 fix ITS#7270 patch
commit 8bb9e88d5f breaks Visual C
(as well as our own coding rules)
2012-08-21 13:22:19 -07:00
Jan Vcelak
f425a07d02 ITS#7331 MozNSS: ignore untrusted issuer error when verifying server cert
Untrusted issuer error can appear with self-signed PEM certificates.
2012-07-26 10:16:39 -07:00
Mat Booth
e6d190c7de ITS#7332 Changes required to build with Microsoft Visual Studio 2012-07-23 08:29:39 -07:00
Emily Backes
c453a236fc Update name information 2012-07-22 07:08:35 -07:00
Howard Chu
43d47c46a7 ITS#6262 fix gettime() regression
Add a mutex in ldap_pvt_gettime(), delete the mutex comment
since it's no longer relevant (and was ignored anyway). This
could only ever affect multi-processor machines.
2012-07-11 16:53:33 -07:00
Jan Vcelak
2db5195650 ITS#7316 MozNSS: do not retry when reading the pin from file
Avoid infinite loop if the pin in the password file is wrong.
2012-06-26 06:47:48 -07:00
Jan Vcelak
a171237999 ITS#7315 MozNSS: do not authenticate to a slot manually
We cannot rely on tc_certificate->slot value, the library will choose
the correct slot itself when needed. Just provide correct pin argument.
2012-06-26 06:46:29 -07:00
Jan Vcelak
3531c344e1 ITS#7314 MozNSS: lock whole init and clenaup process 2012-06-26 06:44:46 -07:00
Jan Vcelak
d07779e97b ITS#7313 MozNSS: store certificate object instead of nickname in in ctx
PEM certificates should not be referenced by nicknames, because the
nicknames are derived from basename of the cerificate file and in
general are not easy-predictable.

The code of Mozilla NSS backend depends on some aspects of PEM module
and tries to guess the nicknames correctly. In some cases the guessing
is wrong.
2012-06-26 06:43:11 -07:00
Jan Vcelak
87132b820d ITS#7312 MozNSS: context specific token description for certdb 2012-06-26 06:41:05 -07:00
Jan Vcelak
221531b31a ITS#7241 unbind: free socket prior to destroying TLS context 2012-06-25 12:53:29 -07:00
Howard Chu
450d224291 ITS#7293 make ldapava_free static 2012-06-23 05:41:39 -07:00
Howard Chu
e2b5aaf5dd ITS#7290 fix ldap_int_initialize() to set debug level 2012-06-07 05:15:04 -07:00
Jan Vcelak
00d0e16272 ITS#7291 MozNSS: read pin from file file can cause infinite loop
The buffer allocated for reading password file has to be initialized
with zeros, or we need to append zero at the end of the file. Otherwise
we might read unitialized memory and consider it to be a password.
2012-06-07 05:05:08 -07:00
Tim Strobell (Contractor)
4b6bd2c600 ITS#7289 MozNSS: cipher suite selection by name may be ignored 2012-06-07 05:03:15 -07:00
Jan Vcelak
dc3842fca3 ITS#7287 MozNSS: do not overwrite error in tlsm_verify_cert 2012-06-05 03:43:24 -07:00
Tim Strobell (Contractor)
2c2bb2e7ae ITS#7285 Mozilla NSS: default cipher suite always selected 2012-06-05 03:43:15 -07:00
Jan Vcelak
df1d118de8 ITS#7276 MozNSS: allow CA certdb together with PEM CA bundle file
Prior to this patch, if TLS_CACERTDIR was set to Mozilla NSS certificate
database and TLS_CACERT was set to a PEM bundle file with CA
certificates, the PEM file content was not loaded.

With this patch and the same settings, OpenLDAP can verify certificates
which are signed by CAs stored both in certdb and PEM bundle file.
2012-05-30 06:18:50 -07:00
Frederik Deweerdt
8bb9e88d5f ITS#7270 Protect accesses to ldap_int_hostname with a mutex.
Not protecting the accesses to ldap_int_hostname could lead to a double
free.
2012-05-30 05:49:53 -07:00