1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00
Commit Graph

8064 Commits

Author SHA1 Message Date
Steve Holme
1d25acb038 gskit.h: Code policing of function pointer arguments 2015-01-17 17:02:01 +00:00
Steve Holme
5d5c78b47f vtls: Removed unimplemented overrides of curlssl_close_all()
Carrying on from commit 037cd0d991, removed the following unimplemented
instances of curlssl_close_all():

Curl_axtls_close_all()
Curl_darwinssl_close_all()
Curl_cyassl_close_all()
Curl_gskit_close_all()
Curl_gtls_close_all()
Curl_nss_close_all()
Curl_polarssl_close_all()
2015-01-17 16:41:03 +00:00
Steve Holme
8bb3443a21 vtls: Separate the SSL backend definition from the API setup
Slight code cleanup as the SSL backend #define is mixed up with the API
function setup.
2015-01-17 15:38:22 +00:00
Steve Holme
30ef1a0779 vtls: Fixed compilation errors when SSL not used
Fixed the following warning and error from commit 3af90a6e19 when SSL
is not being used:

url.c:2004: warning C4013: 'Curl_ssl_cert_status_request' undefined;
            assuming extern returning int

error LNK2019: unresolved external symbol Curl_ssl_cert_status_request
               referenced in function Curl_setopt
2015-01-17 15:16:07 +00:00
Steve Holme
81b98dafa1 http_negotiate: Added empty decoded challenge message info text 2015-01-17 14:58:36 +00:00
Steve Holme
47438daa60 http_negotiate: Return CURLcode in Curl_input_negotiate() instead of int 2015-01-17 14:57:17 +00:00
Steve Holme
36e6404228 http_negotiate_sspi: Prefer use of 'attrs' for context attributes
Use the same variable name as other areas of SSPI code.
2015-01-17 13:28:44 +00:00
Steve Holme
930be07067 http_negotiate_sspi: Use correct return type for QuerySecurityPackageInfo()
Use the SECURITY_STATUS typedef rather than a unsigned long for the
QuerySecurityPackageInfo() return and rename the variable as per other
areas of SSPI code.
2015-01-17 13:28:03 +00:00
Steve Holme
30eb6bbdc9 http_negotiate_sspi: Use 'CURLcode result' for CURL result code 2015-01-17 13:15:09 +00:00
Steve Holme
a2f8887b79 curl_endian: Fixed build when 64-bit integers are not supported (Part 2)
Missed Curl_read64_be() in commit bb12d44471 :(
2015-01-16 23:01:27 +00:00
Daniel Stenberg
a4065ebf1c copyright years: after OCSP stapling changes 2015-01-16 23:23:29 +01:00
Alessandro Ghedini
f46c6fbee0 nss: add support for the Certificate Status Request TLS extension
Also known as "status_request" or OCSP stapling, defined in RFC6066 section 8.

This requires NSS 3.15 or higher.
2015-01-16 23:23:29 +01:00
Alessandro Ghedini
f13669a375 gtls: add support for the Certificate Status Request TLS extension
Also known as "status_request" or OCSP stapling, defined in RFC6066 section 8.

This requires GnuTLS 3.1.3 or higher to build, however it's recommended to use
at least GnuTLS 3.3.11 since previous versions had a bug that caused the OCSP
response verfication to fail even on valid responses.
2015-01-16 23:23:29 +01:00
Alessandro Ghedini
3af90a6e19 url: add CURLOPT_SSL_VERIFYSTATUS option
This option can be used to enable/disable certificate status verification using
the "Certificate Status Request" TLS extension defined in RFC6066 section 8.

This also adds the CURLE_SSL_INVALIDCERTSTATUS error, to be used when the
certificate status verification fails, and the Curl_ssl_cert_status_request()
function, used to check whether the SSL backend supports the status_request
extension.
2015-01-16 23:23:29 +01:00
Steve Holme
bb12d44471 curl_endian: Fixed build when 64-bit integers are not supported
Bug: http://curl.haxx.se/mail/lib-2015-01/0094.html
Reported-by: John E. Malmberg
2015-01-16 12:31:24 +00:00
Daniel Stenberg
cc28bc472e Curl_pretransfer: reset expected transfer sizes
Reported-by: Mohammad AlSaleh
Bug: http://curl.haxx.se/mail/lib-2015-01/0065.html
2015-01-14 23:31:57 +01:00
Marc Hoersken
e9834808e9 curl_schannel.c: mark session as removed from cache if not freed
If the session is still used by active SSL/TLS connections, it
cannot be closed yet. Thus we mark the session as not being cached
any longer so that the reference counting mechanism in
Curl_schannel_shutdown is used to close and free the session.

Reported-by: Jean-Francois Durand
2015-01-12 21:56:05 +01:00
Guenter Knauf
d21b66835f Merge pull request #134 from vszakats/mingw-m64
add -m64 CFLAGS when targeting mingw64, add -m32/-m64 to LDFLAGS
2015-01-09 22:03:12 +01:00
Guenter Knauf
4e58589b0e Merge pull request #136 from vszakats/mingw-allow-custom-cflags
mingw build: allow to pass custom CFLAGS
2015-01-09 22:02:23 +01:00
Daniel Stenberg
e6b4b4b66d NSS: fix compiler error when built http2-enabled 2015-01-09 21:55:52 +01:00
Steve Holme
355bf01c82 gssapi: Remove need for duplicated GSS_C_NT_HOSTBASED_SERVICE definitions
Better code reuse and consistency in calls to gss_import_name().
2015-01-09 20:37:47 +00:00
Viktor Szakats
b4f13a4952 mingw build: allow to pass custom CFLAGS 2015-01-09 21:03:54 +01:00
Daniel Stenberg
99e71e6a84 FTP: if EPSV fails on IPV6 connections, bail out
... instead of trying PASV, since PASV can't work with IPv6.

Reported-by: Vojtěch Král
2015-01-08 22:32:37 +01:00
Daniel Stenberg
9a452ba3a1 FTP: fix IPv6 host using link-local address
... and make sure we can connect the data connection to a host name that
is longer than 48 bytes.

Also simplifies the code somewhat by re-using the original host name
more, as it is likely still in the DNS cache.

Original-Patch-by: Vojtěch Král
Bug: http://curl.haxx.se/bug/view.cgi?id=1468
2015-01-08 22:32:37 +01:00
Guenter Knauf
c712fe01a9 NetWare build: added TLS-SRP enabled build. 2015-01-08 21:40:35 +01:00
Steve Holme
5c0e66d632 sasl_gssapi: Fixed build on NetBSD with built-in GSS-API
Bug: http://curl.haxx.se/bug/view.cgi?id=1469
Reported-by: Thomas Klausner
2015-01-08 19:36:58 +00:00
Viktor Szakats
acc8089bc2 add -m64 clags when targeting mingw64, add -m32/-m64 to LDFLAGS 2015-01-08 18:19:03 +01:00
Daniel Stenberg
4ce22c607b darwinssl: fix session ID keys to only reuse identical sessions
...to avoid a session ID getting cached without certificate checking and
then after a subsequent _enabling_ of the check libcurl could still
re-use the session done without cert checks.

Bug: http://curl.haxx.se/docs/adv_20150108A.html
Reported-by: Marc Hesse
2015-01-07 22:55:56 +01:00
Daniel Stenberg
178bd7db34 url-parsing: reject CRLFs within URLs
Bug: http://curl.haxx.se/docs/adv_20150108B.html
Reported-by: Andrey Labunets
2015-01-07 22:55:56 +01:00
Steve Holme
f7d5ecec9c ldap: Convert attribute output to UTF-8 when Unicode 2015-01-07 20:01:29 +00:00
Steve Holme
4e420600c1 ldap: Convert DN output to UTF-8 when Unicode 2015-01-07 20:01:27 +00:00
Daniel Stenberg
9547954978 hostip: remove 'stale' argument from Curl_fetch_addr proto
Also, remove the log output of the resolved name is NOT in the cache in
the spirit of only telling when something is actually happening.
2015-01-07 14:06:12 +00:00
Steve Holme
4626f31d0e ldap/imap: Fixed spelling mistake in comments and variable names
Reported-by: Michael Osipov
2015-01-07 13:50:56 +00:00
Dan Fandrich
39217edb12 curl_multibyte.h: Eliminated some trailing whitespace 2015-01-05 10:08:08 +01:00
Steve Holme
ea93252ef1 ldap: Fixed Unicode usage for all Win32 builds
Otherwise, the fixes in the previous commits would only be applicable
to IDN and SSPI based builds and not others such as OpenSSL with LDAP
enabled.
2015-01-04 22:19:30 +00:00
Steve Holme
f6b168de4c ldap: Fixed memory leak from commit efb64fdf80 2015-01-04 20:33:58 +00:00
Steve Holme
4113ad50e4 ldap: Fix memory leak from commit 3a805c5cc1 2015-01-04 20:06:04 +00:00
Steve Holme
c37dcf0edb ldap: Fixed attribute variable warnings when Unicode is enabled
Use 'TCHAR *' for local attribute variable rather than 'char *'.
2015-01-04 16:25:17 +00:00
Steve Holme
5359936d07 ldap: Fixed DN variable warnings when Unicode is enabled
Use 'TCHAR *' for local DN variable rather than 'char *'.
2015-01-04 16:21:13 +00:00
Steve Holme
ea4f98dca6 ldap: Remove the unescape_elements() function
Due to the recent modifications this function is no longer used.
2015-01-04 16:11:36 +00:00
Steve Holme
f9b50910e0 ldap.c: Fixed compilation warning
ldap.c:98: warning: extra tokens at end of #endif directive
2015-01-04 16:11:08 +00:00
Steve Holme
84143dc57d ldap: Fixed support for Unicode filter in Win32 search call 2015-01-04 15:16:22 +00:00
Steve Holme
747bad7c09 ldap.c: Fixed compilation warning
ldap.c:802: warning: comparison between signed and unsigned integer
            expressions
2015-01-04 15:16:21 +00:00
Steve Holme
3a805c5cc1 ldap: Fixed support for Unicode attributes in Win32 search call 2015-01-04 14:27:51 +00:00
Steve Holme
7241527956 ldap: Fixed memory leak from commit efb64fdf80
The unescapped DN was not freed after a successful character conversion.
2015-01-04 14:21:29 +00:00
Steve Holme
825b0c7968 ldap.c: Fixed compilation error
ldap.c:738: error: macro "LDAP_TRACE" passed 2 arguments, but takes
            just 1
2015-01-04 13:16:20 +00:00
Steve Holme
2948954535 ldap.c: Fixed compilation warning
ldap.c:89: warning: extra tokens at end of #endif directive
2015-01-04 13:04:06 +00:00
Steve Holme
efb64fdf80 ldap: Fixed support for Unicode DN in Win32 search call 2015-01-04 12:10:26 +00:00
Steve Holme
6416dc998b ldap: Fixed Unicode user and password in Win32 bind calls 2015-01-04 01:57:09 +00:00
Steve Holme
0f26148423 ldap: Fixed Unicode host name in Win32 initialisation calls 2015-01-04 01:56:08 +00:00
Steve Holme
f460f12c9d ldap: Use host.dispname for infof() connection failure messages
As host.name may be encoded use dispname for infof() failure messages.
2015-01-04 00:30:55 +00:00
Steve Holme
23bb054129 ldap: Prefer 'CURLcode result' for curl result codes 2015-01-03 18:46:32 +00:00
Steve Holme
d4b540f85a ldap: Pass write length in all Curl_client_write() calls
As we get the length for the DN and attribute variables, and we know
the length for the line terminator, pass the length values rather than
zero as this will save Curl_client_write() from having to perform an
additional strlen() call.
2015-01-03 18:46:31 +00:00
Steve Holme
4967109ffc ldap: Fixed attribute memory leaks on failed client write
Fixed memory leaks from commit 086ad79970 as was noted in the commit
comments.
2015-01-03 18:46:30 +00:00
Steve Holme
a68aa81320 ldap: Fixed DN memory leaks on failed client write
Fixed memory leaks from commit 086ad79970 as was noted in the commit
comments.
2015-01-03 18:46:28 +00:00
Steve Holme
0ea9381b7d curl_ntlm_core.c: Fixed compilation warning from commit 1cb17b2a5d
curl_ntlm_core.c:146: warning: passing 'DES_cblock' (aka 'unsigned char
                      [8]') to parameter of type 'char *' converts
                      between pointers to integer types with different
                      sign
2015-01-02 21:14:36 +00:00
Steve Holme
1cb17b2a5d ntlm: Use extend_key_56_to_64() for all cryptography engines
Rather than duplicate the code in setup_des_key() for OpenSSL and in
extend_key_56_to_64() for non-OpenSSL based crypto engines, as it is
the same, use extend_key_56_to_64() for all engines.
2015-01-02 20:17:05 +00:00
Steve Holme
34f0bd110f curl_ntlm_core.c: Fixed compilation warning
curl_ntlm_core.c:458: warning: 'ascii_uppercase_to_unicode_le' defined
                      but not used
2015-01-02 16:28:03 +00:00
Steve Holme
a75ede4b9b endian: Fixed bit-shift in 64-bit integer read functions
From commit 43792592ca and 4bb5a351b2.

Reported-by: Michael Osipov
2015-01-02 15:53:42 +00:00
Steve Holme
a3daf542ad smb: Use endian functions for reading NBT and message size values 2015-01-01 20:48:05 +00:00
Steve Holme
4bb5a351b2 endian: Added big endian read functions 2015-01-01 20:45:29 +00:00
Steve Holme
43792592ca endian: Added 64-bit integer read function 2015-01-01 20:45:00 +00:00
Steve Holme
7635577ad7 smb.c: Fixed compilation warnings
smb.c:780: warning: passing 'char *' to parameter of type 'unsigned
           char *' converts between pointers to integer types with
           different sign
smb.c:781: warning: passing 'char *' to parameter of type 'unsigned
           char *' converts between pointers to integer types with
           different sign
smb.c:804: warning: passing 'char *' to parameter of type 'unsigned
           char *' converts between pointers to integer types with
           different sign
2015-01-01 04:56:16 +00:00
Steve Holme
0df2ed85fd smb: Use endian functions for reading length and offset values 2014-12-31 16:52:12 +00:00
Steve Holme
5eae12fc80 endian: Added 16-bit integer write function 2014-12-31 16:03:01 +00:00
Steve Holme
b40e37f93d endian: Fixed Linux compilation issues
Having files named endian.[c|h] seemed to cause issues under Linux so
renamed them both to have the curl_ prefix in the filenames.
2014-12-31 14:02:25 +00:00
Steve Holme
e86a6151f4 endian: Added standard function descriptions 2014-12-31 12:17:01 +00:00
Steve Holme
f4413ca65a endian: Renamed functions for curl API naming convention 2014-12-31 12:17:00 +00:00
Steve Holme
7873f9bdbd endian: Moved write functions to new module 2014-12-31 12:16:58 +00:00
Steve Holme
920e684d40 endian: Moved read functions to new module 2014-12-31 12:05:36 +00:00
Steve Holme
81951d9874 endian: Introduced endian module
To allow the little endian functions, currently used in two of the NTLM
source files, to be used by other modules such as the SMB module.
2014-12-31 11:50:28 +00:00
Steve Holme
e9d0c7a6f3 vtls: Use '(void) arg' for unused parameters
Prefer void for unused parameters, rather than assigning an argument to
itself as a) unintelligent compilers won't optimize it out, b) it can't
be used for const parameters, c) it will cause compilation warnings for
clang with -Wself-assign and d) is inconsistent with other areas of the
curl source code.
2014-12-30 17:13:07 +00:00
Steve Holme
56603e2770 smb.c: Fixed compilation warning
smb.c:586: warning: conversion to 'short unsigned int' from 'int' may
           alter its value
2014-12-30 15:42:17 +00:00
Bill Nagel
89cce1e458 smb: Use the connection's upload buffer
Use the connection's upload buffer instead of allocating our own send
buffer.
2014-12-30 13:10:30 +00:00
Steve Holme
1933f9d33c schannel: Moved the ISC return flag definitions to the SSPI module
Moved our Initialize Security Context return attribute definitions to
the SSPI module, as a) these can be used by other SSPI based providers
and b) the ISC required attributes are defined there.
2014-12-30 00:14:58 +00:00
Bill Nagel
cfa0ac7aff smb: Close the connection after a failed client write 2014-12-29 23:46:33 +00:00
Steve Holme
cfc863869f darwinssl: Fixed compilation warning
vtls.c:683:43: warning: unused parameter 'data'
2014-12-28 23:32:07 +00:00
Steve Holme
6e7904f9aa sasl_gssapi: Fixed use of dummy username with real username 2014-12-28 19:28:30 +00:00
Steve Holme
037cd0d991 vtls: Fixed compilation warning and an ignored return code
curl_schannel.h:123: warning: right-hand operand of comma expression
                     has no effect

Some instances of the curlssl_close_all() function were declared with a
void return type whilst others as int. The schannel version returned
CURLE_NOT_BUILT_IN and others simply returned zero, but in all cases the
return code was ignored by the calling function Curl_ssl_close_all().

For the time being and to keep the internal API consistent, changed all
declarations to use a void return type.

To reduce code we might want to consider removing the unimplemented
versions and use a void #define like schannel does.
2014-12-28 17:33:01 +00:00
Steve Holme
325a64d8a2 openldap: Prefer use of 'CURLcode result' 2014-12-27 22:50:50 +00:00
Steve Holme
e9e48a6ff2 openldap: Use 'LDAPMessage *msg' for messages
This frees up the 'result' variable for CURLcode based result codes.
2014-12-27 22:50:47 +00:00
Steve Holme
2728caa613 nss: Don't ignore Curl_extract_certinfo() OOM failure 2014-12-27 22:18:08 +00:00
Steve Holme
0943045108 nss: Don't ignore Curl_ssl_init_certinfo() OOM failure 2014-12-27 21:25:41 +00:00
Steve Holme
b235c29366 nss: Use 'CURLcode result' for curl result codes
...and don't use CURLE_OK in failure/success comparisons.
2014-12-27 21:13:44 +00:00
Steve Holme
f0a9221897 getinfo: Code style policing 2014-12-27 17:49:33 +00:00
Steve Holme
fd281e9c4b getinfo: Use 'CURLcode result' for curl result codes 2014-12-27 17:46:25 +00:00
Steve Holme
e0d265d3eb darwinssl: Use 'CURLcode result' for curl result codes 2014-12-27 17:36:35 +00:00
Steve Holme
98d37c5a0c polarssl: Use 'CURLcode result' for curl result codes 2014-12-27 17:30:51 +00:00
Steve Holme
151ae59436 code/docs: Use correct case for IPv4 and IPv6
For consistency, as we seem to have a bit of a mixed bag, changed all
instances of ipv4 and ipv6 in comments and documentations to use the
correct case.
2014-12-27 11:31:55 +00:00
Steve Holme
1abe65d928 code/docs: Use Unix rather than UNIX to avoid use of the trademark
Use Unix when generically writing about Unix based systems as UNIX is
the trademark and should only be used in a particular product's name.
2014-12-26 21:42:44 +00:00
Steve Holme
b7f740f2fc ip2ip.c: Fixed compilation warning when IPv6 Scope ID not supported
if2ip.c:119: warning: unused parameter 'remote_scope_id'

...and some minor code style policing in the same function.
2014-12-26 13:28:29 +00:00
Steve Holme
cdc1cc22e7 vtls: Don't set cert info count until memory allocation is successful
Otherwise Curl_ssl_init_certinfo() can fail and set the num_of_certs
member variable to the requested count, which could then be used
incorrectly as libcurl closes down.
2014-12-26 13:11:43 +00:00
Steve Holme
fe43a662a2 vtls: Use CURLcode for Curl_ssl_init_certinfo() return type
The return type for this function was 0 on success and 1 on error. This
was then examined by the calling functions and, in most cases, used to
return CURLE_OUT_OF_MEMORY.

Instead use CURLcode for the return type and return the out of memory
error directly, propagating it up the call stack.
2014-12-26 13:11:40 +00:00
Steve Holme
6cb7b0c0ac vtls: Use bool for Curl_ssl_getsessionid() return type
The return type of this function is a boolean value, and even uses a
bool internally, so use bool in the function declaration as well as
the variables that store the return value, to avoid any confusion.
2014-12-25 17:15:15 +00:00
Steve Holme
38aaf6c380 schannel: Minor code style policing for casts 2014-12-25 13:48:44 +00:00
Steve Holme
ed4c0b53cc schannel: Prefer 'CURLcode result' for curl result codes 2014-12-25 13:45:29 +00:00
Steve Holme
95f78b2b56 cyassl: Prefer 'CURLcode result' for curl result codes 2014-12-25 13:45:27 +00:00
Steve Holme
ed16a1695f curl_ntlm_core.c: Fixed compilation warnings
curl_ntlm_core.c:301: warning: pointer targets in passing argument 2 of
                      'CryptImportKey' differ in signedness
curl_ntlm_core.c:310: warning: passing argument 6 of 'CryptEncrypt' from
                      incompatible pointer type
curl_ntlm_core.c:540: warning: passing argument 4 of 'CryptGetHashParam'
                      from incompatible pointer type
2014-12-24 22:22:07 +00:00
Steve Holme
8830df8b66 gtls: Use preferred 'CURLcode result' 2014-12-24 17:25:35 +00:00
Steve Holme
a89ec793d0 openldap: Use standard naming for setup connection function
Renamed ldap_setup() to ldap_setup_connection() to follow more widely
used function naming.
2014-12-24 17:13:37 +00:00