Commit Graph

2882 Commits

Author SHA1 Message Date
Pierangelo Masarati
98a8b74d53 expose SASL_USERNAME when it makes sense (EXTERN needs work, much like SASL_SSL) (ITS#6257) 2009-08-18 18:47:56 +00:00
Howard Chu
b87553684a More for prev commit 2009-08-14 20:02:08 +00:00
Howard Chu
9b764c3f9e Fix prev commit again, IPPROTO_TCP is the documented correct approach 2009-08-13 21:35:38 +00:00
Howard Chu
f5bad5673b Fix prev commit, it was not Linux-only as it claimed to be. 2009-08-13 20:55:04 +00:00
Hallvard Furuseth
b0e6e73d1c ITS#6215 cleanup: Export ber_skip_element() to complement ber_peek_element() 2009-08-12 22:13:50 +00:00
Hallvard Furuseth
3e20bda971 Trying again: No need to maintain ber->ber_usertag except at ber_printf "!" 2009-08-12 22:12:15 +00:00
Hallvard Furuseth
791035d93f Fix last commit: cast strcasecmp unsigned char* to char* 2009-08-07 21:46:25 +00:00
Hallvard Furuseth
3802aa5483 More ITS#6215: Catch malformed elements in ber_get_stringbvl().
Do not use ber_<first/next>_element(), which have no error return.
2009-08-07 19:26:11 +00:00
Hallvard Furuseth
bc20500e62 More ITS#6215: Define and use ber_tag_and_rest() and ber_<peek/skip>_element() 2009-08-07 19:15:26 +00:00
Hallvard Furuseth
95fbdcab4e More ITS#6215: Fix wrong fix in rev 1.121 2009-08-07 16:04:25 +00:00
Howard Chu
e229b7c398 In session_chkhost get the last CN, not the first. 2009-08-07 11:59:42 +00:00
Hallvard Furuseth
455c49ba3e Simplify struct bgbvr and ber_get_stringbvl(), preserving behavior. 2009-08-04 21:11:38 +00:00
Howard Chu
d479db53e0 Minor cleanup 2009-07-31 03:26:03 +00:00
Howard Chu
403ee0b62e Fix, reqcert == ALLOW should ignore cert verification failures 2009-07-31 01:51:34 +00:00
Howard Chu
3f2101198b ITS#6239 use our own hostname checking for MozNSS 2009-07-31 01:32:51 +00:00
Hallvard Furuseth
02e165258c Might help ITS#6145: change while to do-while, to make visible that the
loop saving malloced data is run at least once.
2009-07-31 00:05:32 +00:00
Howard Chu
d4f2a06887 Check for CN length match as well in chkhost 2009-07-30 21:52:09 +00:00
Hallvard Furuseth
19b8065922 More ITS#6215: Fix va_arg integer types for ber_scanf "bei" & ber_printf "BX" 2009-07-29 23:03:10 +00:00
Hallvard Furuseth
8b3bb91e93 More ITS#6215: Fix ber_scanf(,"mMvVW",) cleanup on error:
Parse args correctly and free up memory.
Also set some lengths=0 and remove unneeded ptr==NULL tests before frees.
2009-07-29 22:38:19 +00:00
Hallvard Furuseth
886520f193 More ITS#6215: Free data to the memory context used to allocate it 2009-07-29 22:10:45 +00:00
Hallvard Furuseth
b6bad3e995 More ITS#6215:
Reject indefinite-length format in ber_skip_tag().  localize *len.
Reject broken and too large bitstrings in ber_get_bitstringa().
Simplify a number of functions somewhat - no functionality changes.
Remove unnecessary tests and ber_tag updates after ber_skip_tag().
2009-07-29 21:47:54 +00:00
Hallvard Furuseth
29aa1d07c7 For ITS#6215: No need to maintain ber->ber_usertag except at ber_printf "!" 2009-07-29 17:21:54 +00:00
Hallvard Furuseth
4bed42ae5a For ITS#6215: Do not expose obsolete Seqorset. Note ber_write(,,,nonzero) is gone. 2009-07-29 17:07:52 +00:00
Hallvard Furuseth
36d2dc034d More ITS#6215 -
Speedup & less memory allocation:
  Simplify the work to encode tag, length, integer/enum, sequence/set.
  Drop struct seqorset and allocations of it.  Replace BerElement.ber_sos.
  Drop ber_write(,,,nonzero) support. Callers, if any, need to be rewritten.
  Make ber_log_sos_dump() and ber_sos_dump() stubs, they could no longer work.
Fix ber_write() buffer overrun after ber_start_seqorset().
Check overflow and max sizes, e.g. for functions returning int size.
Some cleanup, and handwaves in the direction of supporting CHAR_BIT>8.
Add/fix comments and a few descriptive types/macros.
2009-07-29 16:49:42 +00:00
Hallvard Furuseth
53f884ac1d Remove useless asserts that will be re-assert()ed before the variable is used 2009-07-29 15:06:28 +00:00
Hallvard Furuseth
12a6f3e055 ITS#6215: Fix buffer overrun and write through NULL pointer 2009-07-29 14:57:09 +00:00
Howard Chu
e0bcb7b571 ITS#4643 never use native getpass(), it's deprecated/unsafe 2009-07-22 06:34:37 +00:00
Howard Chu
91dc4501d4 Add VLV Error 2009-07-13 13:13:38 +00:00
Howard Chu
72e319bd02 ITS#5892 return -1 from ldif_read_record on error 2009-07-07 22:30:55 +00:00
Hallvard Furuseth
bbe015f65b ITS#6197 - normalize & speed up ldap_err2string/ldap_perror():
Use same result code -> string mapping for both, removing ldap_int_error():
- Classify unknown error codes as API/extension/etc like _err2string did.
- Pass all strings through _(), i.e. the optional gettext, as _perror did.

Also use a switch instead of linear search for the code->string mapping.
Hopefully the compiler will optimize that.  Though the extra gettext,
if anyone uses it, probably counters that speedup.
2009-07-07 20:05:09 +00:00
Howard Chu
159461bfc8 ITS#5696 des_set_key -> des_set_key_and_parity 2009-07-03 22:19:52 +00:00
Howard Chu
8680c13c5f Cleanup ciphernum 2009-07-03 02:06:24 +00:00
Howard Chu
d95bc8d2d8 Acknowledge richm 2009-07-02 23:19:44 +00:00
Howard Chu
4b8485c47a ITS#5696 Additional MozNSS support from rmeggins@redhat.com 2009-07-02 23:10:23 +00:00
Howard Chu
de91bde800 ITS#6192 add all digests. Also stop using SSLeay-compatible function
names, we're only concerned with OpenSSL these days.
2009-07-01 23:46:36 +00:00
Howard Chu
093fed660d ITS#6188 add stub for ldap_pvt_thread_pool_retract() 2009-06-25 23:15:38 +00:00
Hallvard Furuseth
671bed5270 Cleanup & slight speedup (no real change):
Remove '#if 0 / broken code / #endif.  Rearrange pool_wrapper() to avoid
decrement-increment(ltp_active_count) when more tasks available.
2009-06-12 20:46:36 +00:00
Hallvard Furuseth
461cb6b7ca Update last commit: avoid LDAP_STAILQ_REMOVE in ldap_pvt_thread_pool_retract 2009-06-12 19:32:53 +00:00
Hallvard Furuseth
13cbd433bd Cast getpeername() arg from struct sockaddr_un* to struct sockaddr* 2009-06-11 16:21:52 +00:00
Howard Chu
39c9b1ab25 Fix prev commit, note *task* not *thread* ... 2009-06-11 05:02:58 +00:00
Howard Chu
23783a9164 Add ldap_pvt_thread_pool_retract() to cancel pending threads 2009-06-11 04:46:04 +00:00
Ralf Haferkamp
5725d5d6e9 Introduce options to configure tcp-keepalive settings per connection. These
settings only work on Linux and are ignore when not supported (see
discussion on -devel)
2009-05-06 13:14:36 +00:00
Hallvard Furuseth
4b01f4b23a ITS#6080 again: simplify ber_strnlen, don't use strnlen, revert _GNU_SOURCE 2009-05-01 03:10:25 +00:00
Hallvard Furuseth
4e3f04edc3 Fix previous fix: Don't #ifdef HAVE_STRNLEN before portable.h #defines that 2009-05-01 02:17:28 +00:00
Hallvard Furuseth
a59f93f32f Update previous commit: #define _GNU_SOURCE if needed for strnlen() 2009-05-01 02:11:42 +00:00
Pierangelo Masarati
85b47ab0e7 define and use ber_strnlen() (ITS#6080); please regenerate configure and include/portable.hin 2009-04-29 11:38:31 +00:00
Pierangelo Masarati
99fe30b326 (nearly blind) fix for NULL in TLS error message (ITS#6079) 2009-04-29 11:31:39 +00:00
Ralf Haferkamp
eec889f6d9 more warning fixes 2009-04-24 09:48:08 +00:00
Hallvard Furuseth
7434318a17 ITS#5464, #5666 Update last change: Conflicted with compiler flag -D_GNU_SOURCE 2009-04-16 18:02:01 +00:00
Howard Chu
9e7b5d8f19 ITS#5464, #5666 define _GNU_SOURCE 2009-04-15 07:36:56 +00:00
Howard Chu
44f91f1464 ITS#6041 Windows opendir/closedir issues (from ITS#5408...) 2009-04-11 04:22:27 +00:00
Howard Chu
e223d0b124 ITS#6053 must use gnutls_x509_privkey_init() 2009-04-11 03:53:26 +00:00
Howard Chu
94ab6a31b2 ITS#6038 revert prev commits, ITS rejected 2009-03-27 11:07:42 +00:00
Rein Tollevik
c8cf2fc47a ITS#6038: Write slapadd progress meter to stdout. 2009-03-26 22:50:54 +00:00
Howard Chu
d39bd12e9f Skip redundant PACKETS logging 2009-03-13 23:10:37 +00:00
Howard Chu
d8e3b4e83e ITS#6005 crypt salt_format must use ber_memfree 2009-03-09 01:28:00 +00:00
Howard Chu
02b71d58ec ITS#6005 strings returned to slapd must use ber_mem* 2009-03-08 00:11:25 +00:00
Howard Chu
5d74bea520 ITS#6005 librewrite must use the same mem allocators as slapd 2009-03-07 23:21:26 +00:00
Howard Chu
0ba084d8b0 More cleanup 2009-03-05 09:15:02 +00:00
Howard Chu
c3f8e67615 Tweak prev commit 2009-03-05 09:13:26 +00:00
Howard Chu
9bc829dbef ITS#5991 build cert chain, GnuTLS doesn't do it for us 2009-03-05 08:04:49 +00:00
Howard Chu
54ed3779d6 ITS#5992 trust X509v1 CA certs 2009-03-05 04:35:49 +00:00
Howard Chu
bd312123d6 ITS#5980 clear res_matched after successfully chasing referral 2009-03-03 17:57:24 +00:00
Howard Chu
ee5b6762ae ITS#5980 - find_connection should match URLs with empty hostname 2009-03-03 17:56:44 +00:00
Howard Chu
a1861fd162 ITS#5849 patch was wrong, don't X509_free session cert 2009-03-02 17:43:38 +00:00
Howard Chu
c3cff40c1c ITS#5981 fix GnuTLS TLSVerifyClient try 2009-03-02 03:01:41 +00:00
Howard Chu
e5e9191aeb ITS#5976 check for cert/DN 2009-02-25 21:48:10 +00:00
Howard Chu
64884e7c6c Don't call NSS_Shutdown if someone else init'd the library 2009-02-25 10:14:00 +00:00
Pierangelo Masarati
0d6e859846 fix ldap namespace (part of ITS#5974) 2009-02-24 21:09:41 +00:00
Pierangelo Masarati
ed97e96944 re-fix ITS#5916 2009-02-20 01:07:00 +00:00
Quanah Gibson-Mount
3b743a3b79 Revert part of last commit
Remove erroneous comment
2009-02-17 21:47:09 +00:00
Quanah Gibson-Mount
83cb8883a6 More for ITS#5955
Also special case rand file bits that are OpenSSL only
2009-02-17 21:39:50 +00:00
Quanah Gibson-Mount
331a57fa37 ITS#5955 2009-02-17 21:32:09 +00:00
Pierangelo Masarati
040f945d36 fix misc warnings 2009-02-15 21:59:16 +00:00
Howard Chu
f38d2df19b Add comments about ITS#3134, #5938, RFC4513 for posterity. This
file will be moving to the Attic...
2009-02-11 01:35:56 +00:00
Howard Chu
07e79f26a4 Revert prev commit 2009-02-10 21:29:56 +00:00
Howard Chu
b886c2ad8a ITS#5937 fix ancient IPv6 typo 2009-02-10 13:27:22 +00:00
Pierangelo Masarati
2b95e7d288 partially addresses an issue with ITS#5931 2009-02-10 12:44:12 +00:00
Howard Chu
80c6ea52ea ITS#5853 restructure wait4msg / try_read1msg again. Consolidate
the two try_read1msg cases into one, bump refcnts to prevent
lconn's from being freed prematurely.
2009-02-10 09:51:31 +00:00
Howard Chu
fbf42baefa ITS#5934 fix NULL pointer deref 2009-02-09 21:14:46 +00:00
Howard Chu
4bc8cb6336 ITS#5928 hide all ldap_pvt_tls APIs when !HAVE_TLS 2009-02-08 03:25:48 +00:00
Howard Chu
bc486f123d Fix spinner in prev commit 2009-02-05 10:07:20 +00:00
Howard Chu
d0515c4017 ITS#5922 with namespace changes 2009-02-05 09:38:07 +00:00
Howard Chu
ff8838aa28 ITS#5920 restore old HAS_TLS test 2009-02-04 08:56:04 +00:00
Howard Chu
2b08e96b53 ITS#5916 - externally callable functions are ldap_pvt, not ldap_int. 2009-02-02 21:14:34 +00:00
Pierangelo Masarati
0ded1f16d5 Allow alias dereferencing in search C API; use new API in proxy backends (ITS#5916) 2009-01-31 10:27:07 +00:00
Hallvard Furuseth
ff08c4194c Cleanup - macroize magic constant (ITS#5909) 2009-01-30 14:14:22 +00:00
Howard Chu
7aa5ae49ca Modular TLS 2009-01-27 01:01:41 +00:00
Howard Chu
08905d6792 ITS#5789 again 2009-01-26 21:08:55 +00:00
Howard Chu
f59ce2b9a1 ITS#5462 add randfile support for gcrypt 1.4 2009-01-26 03:41:27 +00:00
Howard Chu
2558951251 ITS#5887 add native support for cipher suites for GnuTLS >= 2.2.0 2009-01-26 03:21:16 +00:00
Howard Chu
f9fd0f0cc4 ITS#5655 for new structure 2009-01-26 02:16:46 +00:00
Howard Chu
4dff3e6807 Switch to using modular TLS code, single-implementation version 2009-01-26 02:06:45 +00:00
Howard Chu
988fb232d2 ITS#5896 don't return immediately on Intermediate responses 2009-01-24 07:18:35 +00:00
Howard Chu
cf1558659b ITS#5655 TLS_PROTOCOL_MIN from Philip Guenther 2009-01-24 03:34:49 +00:00
Kurt Zeilenga
4af9eb9715 Update copyright notices 2009-01-22 00:40:04 +00:00
Ralf Haferkamp
af79710c4d Fixed typo 2008-12-12 10:08:07 +00:00
Pierangelo Masarati
7681642bcf fix LDAP deref control response; fix tool response handling; add lutil_memcopy() for API uniformity (more about ITS#5768) 2008-12-11 23:17:08 +00:00
Ralf Haferkamp
5977f20127 Avoid locking up slapd when paused during shutdown (ITS#5841), reverting
r1.81
2008-12-09 10:57:15 +00:00
Howard Chu
187efdad6c ITS#5849 free peer cert after retrieving DN 2008-12-05 09:00:24 +00:00