Commit Graph

1799 Commits

Author SHA1 Message Date
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
Howard Chu
dcf94e25f5 ITS#7207 check for ld->ld_defconn 2012-03-26 03:35:31 -07:00
Howard Chu
bb921063e0 ITS#7194 fix IPv6 URL detection 2012-03-08 19:35:44 -08:00
Howard Chu
33f6bc4fe6 ITS#7167 only poll sockets for write as needed 2012-02-20 14:51:30 -08:00
Hallvard Furuseth
ffbad797c8 Fix typo in ldap_int_client_controls() comment 2012-02-07 16:11:43 +01:00
Jan Vcelak
4e9926ca97 ITS#7136 MozNSS: store TLS params until the deferred initialization is finished
Deferred TLS initialization is used with Mozilla NSS. The real
initialization takes place when the TLS context is needed for the first
time. If the initialization parameters were freed immediately after
tlsm_ctx_init was called, they were not available at the time of
deferred initialization which caused segmentation fault.

With this patch, initialization parameters are copied and stored until
the deferred initialization is finished. The parameters are freed
afterwards.

Red Hat Bugzilla: #783431
2012-01-25 21:24:28 -08:00
Jan Vcelak
1107103dd7 ITS#7135 MozNSS, PEM: fix segfault when TLS certificate key is not set
Red Hat Bugzilla: #772890
2012-01-25 21:22:47 -08:00
Howard Chu
ce2c041671 Cleanup gssapi_flags -> ldo_gssapi_flags 2012-01-24 15:43:39 -08:00
Howard Chu
7ff18967d7 More for prev commit (270ef33acf) 2012-01-24 15:43:14 -08:00
Howard Chu
270ef33acf ITS#7118, #7133 tentative fix
Move mutexes to end of structs, so libldap can ignore them
2012-01-24 13:32:52 -08:00
Hallvard Furuseth
1a931a86ee Silence 'assign away const' warning 2012-01-24 01:45:51 +01:00
Kurt Zeilenga
2bbf9804b9 Happy New Year! 2012-01-01 07:10:53 -08:00
Howard Chu
277a8edd2e Android defines wctomb but doesn't provide it 2011-10-12 19:18:05 -07:00
Howard Chu
8a5d0952ad ITS#7006 fix MozNSS wildcard cert match 2011-09-30 03:27:19 -07:00
Rich Megginson
8e9af53fb6 ITS#7034 use mutex for connection handshake when using PEM nss
PEM nss is not thread safe when establishing the initial connection
using SSL_ForceHandshake.  Create a new mutex - tlsm_pem_mutex - to
protect this function call.
The call to SSL_ConfigServerSessionIDCache() is not thread-safe - move it
to the init section and protect it with the init mutex.
2011-09-30 03:16:57 -07:00
Howard Chu
9b082bf716 ITS#7051 fix GNUtls cert dn parse 2011-09-30 00:41:13 -07:00
Howard Chu
c7d6c0fab3 Add a few NULL checks to defend against dumb API checkers.
Unfortunately automated checkers don't seem to read the documentation
for how APIs are expected to be used, and the C declaration syntax
isn't expressive enough to encode the documented usage.
2011-09-08 23:41:06 -07:00