Julien Chaffraix
7d4f8c2809
security.c: Curl_sec_read_msg tweaks
...
- Renamed the variables name to better match their intend.
- Unified the |decoded_len| checks.
- Added some FIXMEs to flag some improvement that did not go in this
change.
2010-09-22 23:34:36 +02:00
Julien Chaffraix
d23c59ecfc
security.c: Curl_sec_set_protection_level tweaking
...
- Removed sec_prot_internal as it is now inlined in the function (this removed
a redundant check).
- Changed the prototype to return an error code.
- Updated the method to use the new ftp_send_command function.
- Added a level_to_char helper method to avoid relying on the compiler's
bound checks. This default to the maximum security we have in case of a
wrong input.
2010-09-22 23:34:36 +02:00
Julien Chaffraix
1d95a48fe9
security.c: factored the logic from Curl_sec_login into a dedicated method that better reflect its intent.
...
Introduced a helper method ftp_send_command that synchronously send
an FTP query.
2010-09-22 23:34:36 +02:00
Julien Chaffraix
512a82d395
security.c: Remove out_buffer as it was never written into.
2010-09-22 23:34:36 +02:00
Julien Chaffraix
fbb38de415
security.c: buffer_read various fixes.
...
Tighten the type of the |data| parameter to avoid a cast. Also made
it const as we should not modify it.
Added a DEBUGASSERT on the size to be written while changing it.
2010-09-22 23:34:36 +02:00
Julien Chaffraix
0006cdddee
security.c: Made block_write return a CURLcode.
...
While doing so, renamed it to socket_write to better match its
function.
2010-09-22 23:34:36 +02:00
Julien Chaffraix
b684ccd8b1
security.c: Made block_read and sec_get_data return CURLcode.
...
To do so, made block_read call Curl_read_plain instead of read.
While changing them renamed block_read to socket_read and sec_get_data
to read_data to better match their function.
Also fixed a potential memory leak in block_read.
2010-09-22 23:34:36 +02:00
Julien Chaffraix
3f64d05d34
Security.c: Fix headers guard to match the rest of the code.
2010-09-22 23:34:35 +02:00
Howard Chu
bc8fc9803f
sendrecv: make them two pairs of send/recv to properly deal with FTPS
...
FTP(S) use two connections that can be set to different recv and
send functions independently, so by introducing recv+send pairs
in the same manner we already have sockets/connections we can
work with FTPS fine.
This commit fixes the FTPS regression introduced in change d64bd82
.
2010-05-11 22:48:38 +02:00
Howard Chu
d64bd82bdc
sendrecv: split the I/O handling into private handler
...
Howard Chu brought the bulk work of this patch that properly
moves out the sending and recving of data to the parts of the
code that are properly responsible for the various ways of doing
so.
Daniel Stenberg assisted with polishing a few bits and fixed some
minor flaws in the original patch.
Another upside of this patch is that we now abuse CURLcodes less
with the "magic" -1 return codes and instead use CURLE_AGAIN more
consistently.
2010-05-07 15:05:34 +02:00
Daniel Stenberg
4e75c70874
silence a compiler warning
2009-07-11 09:57:54 +00:00
Yang Tse
33a3753c3f
libcurl's memory.h renamed to curl_memory.h
2009-04-21 11:46:16 +00:00
Dan Fandrich
484d549ece
Marked with TODO comments a number of problems in the Kerberos code detected
...
while investigating the issue in http://curl.haxx.se/mail/lib-2008-09/0262.html
I'm hesitant to fix them because I have no way of testing the result.
2008-11-02 05:01:39 +00:00
Daniel Stenberg
b701ea36a7
moved the Curl_raw_ functions into the new lib/rawstr.c file for easier curlx_
...
inclusion by the curl tool without colliding with the curl_strequal functions.
2008-10-23 11:49:19 +00:00
Daniel Stenberg
6c14c96e71
added include to make the krb4 code compile again
2008-10-23 08:06:47 +00:00
Dan Fandrich
bab5183820
Created Curl_raw_nequal() which does a C-locale string case comparison.
...
Changed checkprefix() to use it and those instances of strnequal() that
compare host names or other protocol strings that are defined to be
independent of case in the C locale. This should fix a few more
Turkish locale problems.
2008-10-23 01:20:57 +00:00
Yang Tse
ac18b471d2
libcurl internal base64.h header file renamed to curl_base64.h
2008-08-17 00:25:38 +00:00
Yang Tse
d6f8f16068
fix: preprocessor complaining about macro redefinition
2008-05-26 01:59:00 +00:00
Dan Fandrich
4aa176c127
Fixed some include file problems on Windows reported by David Rosenstrauch
2008-05-22 19:44:10 +00:00
Michal Marek
e2b82b4325
- Make Curl_write and it's callees accept a const pointer, in preparation
...
of tetetest's patch for curl_easy_send()
2008-05-09 11:27:54 +00:00
Daniel Stenberg
cbd1a77ec2
if () => if()
...
while () => while()
and some other minor re-indentings
2007-11-07 09:21:35 +00:00
Daniel Stenberg
74ad8516d7
Thomas J. Moore made it build with less warnings
2007-07-06 22:14:29 +00:00
Daniel Stenberg
54967d2a3a
Thomas J. Moore provided a patch that introduces Kerberos5 support in
...
libcurl. This also makes the options change name to --krb (from --krb4) and
CURLOPT_KRBLEVEL (from CURLOPT_KRB4LEVEL) but the old names are still
2007-07-01 22:01:18 +00:00
Daniel Stenberg
be0d17e812
cleaned up Curl_write() and the sub functions it uses for various protocols.
...
They all now return ssize_t to Curl_write().
Unfortunately, Curl_read() is in a sorrier state but it too would benefit from
a similar cleanup.
2006-11-11 21:34:43 +00:00
Daniel Stenberg
62970da675
Removed security.h since it shadows an include file mingw needs when building
...
for SSPI support. The contents of the file has been moved into the krb4.h file.
2005-03-14 00:00:45 +00:00
Daniel Stenberg
f8b4ba80e0
krb4 fixed
2005-02-22 12:20:30 +00:00
Dan Fandrich
a28b32aa45
Make some arrays of pointers const, too.
2004-12-15 02:32:04 +00:00
Dan Fandrich
1ba47e7af9
Add 'const' to immutable arrays.
2004-12-15 01:38:25 +00:00
Daniel Stenberg
62f97f1817
use curl_strnequal(), not strncasecmp()
2004-10-07 22:56:24 +00:00
Daniel Stenberg
39af394a1c
removed tabs and trailing whitespace from source
2004-10-06 07:50:18 +00:00
Daniel Stenberg
6c3759d78d
removed trailing whitespace, free a missing malloc when returning error
2004-06-30 11:51:24 +00:00
Daniel Stenberg
bbafb2eb27
curl_global_init_mem() allows the memory functions to be replaced.
...
memory.h is included everywhere for this.
2004-05-11 11:30:23 +00:00
Daniel Stenberg
800052dc50
use the HAVE_KRB4 define instead of just KRB4
2003-12-02 13:27:29 +00:00
Daniel Stenberg
308bc9d919
use CURLDEBUG instead of MALLOCDEBUG for preprocessor conditions
2003-06-26 11:22:12 +00:00
Daniel Stenberg
a7c72b7abf
removed the local variables for emacs and vim, use the new sample.emacs
...
way for emacs, and vim users should provide a similar non-polluting style
2003-01-29 10:14:20 +00:00
Daniel Stenberg
a15133f5cf
removed unused code
2003-01-09 11:50:34 +00:00
Daniel Stenberg
d0b97f7e1f
Curl_GetFTPResponse() takes a different set of parameters and now return a
...
proper CURLcode. The default timeout for reading one response is now also
possible to change while running.
2002-12-03 10:25:31 +00:00
Daniel Stenberg
08ef208fb7
added disable-[protocol] support, largely provided by Miklos Nemeth
2002-06-11 11:13:01 +00:00
Daniel Stenberg
e192261788
failf() calls should not have newlines in the message string!
2001-12-11 13:13:01 +00:00
Daniel Stenberg
4118c68df1
check Curl_ftpsendf return codes
2001-10-31 15:06:38 +00:00
Sterling Hughes
8e91d5de8e
looks nicer and is better compatible with older vim versions
2001-10-11 09:32:19 +00:00
Daniel Stenberg
88e21894c7
improved readability slightly
2001-09-28 09:25:59 +00:00
Daniel Stenberg
09da2c1767
fixed the missing getftpresponse edits
2001-09-28 09:19:35 +00:00
Daniel Stenberg
ae2ecfc5cb
removed the socket argument from some functions that always passed in the
...
same socket and it was available from the passed-in struct anyway!
2001-09-28 09:15:19 +00:00
Sterling Hughes
6147879837
Added formatting sections for emacs and vim
2001-09-07 04:01:32 +00:00
Daniel Stenberg
47e7a3e678
a few more struct fixes
2001-08-30 22:59:58 +00:00
Daniel Stenberg
0ece1b5c34
Major rename and redesign of the internal "backbone" structs. Details will
...
be posted in a minute to the libcurl list.
2001-08-30 22:48:34 +00:00
Daniel Stenberg
a2688b6ca1
removed dead/unused code
...
removed use of global variables
removed name space pollutions (added Curl_ prefixes)
2001-08-17 10:11:46 +00:00
Daniel Stenberg
8e1f95ac7d
cleaned up some picky compiler warnings and indented the code curl style
2001-08-14 08:32:50 +00:00
Daniel Stenberg
a1d6ad2610
multiple connection support initial commit
2001-02-20 17:35:51 +00:00