Skip to content

Commit a03d810

Browse files
author
minggo
committed
Merge pull request #212 from zilongshanren/upgrade-openssl
upgrade curl to 7.48 and openssl to 1.02g [ For v2.x ]
2 parents cc0d8f9 + c8e3ae8 commit a03d810

File tree

19 files changed

+545
-226
lines changed

19 files changed

+545
-226
lines changed

cocos2dx/platform/third_party/android/prebuilt/libcurl/Android.mk

+14
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,18 @@ LOCAL_MODULE := cocos_curl_static
55
LOCAL_MODULE_FILENAME := curl
66
LOCAL_SRC_FILES := libs/$(TARGET_ARCH_ABI)/libcurl.a
77
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
8+
LOCAL_STATIC_LIBRARIES += cocos_ssl_static
9+
LOCAL_STATIC_LIBRARIES += cocos_crypto_static
10+
include $(PREBUILT_STATIC_LIBRARY)
11+
12+
include $(CLEAR_VARS)
13+
14+
LOCAL_MODULE := cocos_crypto_static
15+
LOCAL_MODULE_FILENAME := crypto
16+
LOCAL_SRC_FILES := libs/$(TARGET_ARCH_ABI)/libcrypto.a
17+
include $(PREBUILT_STATIC_LIBRARY)
18+
19+
LOCAL_MODULE := cocos_ssl_static
20+
LOCAL_MODULE_FILENAME := ssl
21+
LOCAL_SRC_FILES := libs/$(TARGET_ARCH_ABI)/libssl.a
822
include $(PREBUILT_STATIC_LIBRARY)

cocos2dx/platform/third_party/android/prebuilt/libcurl/include/curl/curl.h

+337-149
Large diffs are not rendered by default.

cocos2dx/platform/third_party/android/prebuilt/libcurl/include/curl/curlbuild.h

+10-3
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
* | (__| |_| | _ <| |___
99
* \___|\___/|_| \_\_____|
1010
*
11-
* Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, et al.
11+
* Copyright (C) 1998 - 2012, Daniel Stenberg, <[email protected]>, et al.
1212
*
1313
* This software is licensed as described in the file COPYING, which
1414
* you should have received as part of this distribution. The terms
15-
* are also available at http://curl.haxx.se/docs/copyright.html.
15+
* are also available at https://curl.haxx.se/docs/copyright.html.
1616
*
1717
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
1818
* copies of the Software, and permit persons to whom the Software is
@@ -36,7 +36,7 @@
3636
*
3737
* If you think that something actually needs to be changed, adjusted
3838
* or fixed in this file, then, report it on the libcurl development
39-
* mailing list: http://cool.haxx.se/mailman/listinfo/curl-library/
39+
* mailing list: https://cool.haxx.se/mailman/listinfo/curl-library/
4040
*
4141
* This header file shall only export symbols which are 'curl' or 'CURL'
4242
* prefixed, otherwise public name space would be polluted.
@@ -152,6 +152,13 @@
152152
# include <sys/socket.h>
153153
#endif
154154

155+
/* Configure process defines this to 1 when it finds out that system */
156+
/* header file sys/poll.h must be included by the external interface. */
157+
/* #undef CURL_PULL_SYS_POLL_H */
158+
#ifdef CURL_PULL_SYS_POLL_H
159+
# include <sys/poll.h>
160+
#endif
161+
155162
/* The size of `long', as computed by sizeof. */
156163
#define CURL_SIZEOF_LONG 4
157164

cocos2dx/platform/third_party/android/prebuilt/libcurl/include/curl/curlrules.h

+5-4
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
* | (__| |_| | _ <| |___
88
* \___|\___/|_| \_\_____|
99
*
10-
* Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, et al.
10+
* Copyright (C) 1998 - 2012, Daniel Stenberg, <[email protected]>, et al.
1111
*
1212
* This software is licensed as described in the file COPYING, which
1313
* you should have received as part of this distribution. The terms
14-
* are also available at http://curl.haxx.se/docs/copyright.html.
14+
* are also available at https://curl.haxx.se/docs/copyright.html.
1515
*
1616
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
1717
* copies of the Software, and permit persons to whom the Software is
@@ -47,7 +47,7 @@
4747
* library is properly built and used.
4848
*
4949
* You can find further help on the libcurl development mailing list:
50-
* http://cool.haxx.se/mailman/listinfo/curl-library/
50+
* https://cool.haxx.se/mailman/listinfo/curl-library/
5151
*
5252
* NOTE 2
5353
* ------
@@ -190,7 +190,7 @@ typedef char
190190
* CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow
191191
* these to be visible and exported by the external libcurl interface API,
192192
* while also making them visible to the library internals, simply including
193-
* setup.h, without actually needing to include curl.h internally.
193+
* curl_setup.h, without actually needing to include curl.h internally.
194194
* If some day this section would grow big enough, all this should be moved
195195
* to its own header file.
196196
*/
@@ -248,6 +248,7 @@ typedef char
248248
#undef CURL_PULL_WS2TCPIP_H
249249
#undef CURL_PULL_SYS_TYPES_H
250250
#undef CURL_PULL_SYS_SOCKET_H
251+
#undef CURL_PULL_SYS_POLL_H
251252
#undef CURL_PULL_STDINT_H
252253
#undef CURL_PULL_INTTYPES_H
253254

cocos2dx/platform/third_party/android/prebuilt/libcurl/include/curl/curlver.h

+15-7
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
* | (__| |_| | _ <| |___
88
* \___|\___/|_| \_\_____|
99
*
10-
* Copyright (C) 1998 - 2012, Daniel Stenberg, <[email protected]>, et al.
10+
* Copyright (C) 1998 - 2016, Daniel Stenberg, <[email protected]>, et al.
1111
*
1212
* This software is licensed as described in the file COPYING, which
1313
* you should have received as part of this distribution. The terms
14-
* are also available at http://curl.haxx.se/docs/copyright.html.
14+
* are also available at https://curl.haxx.se/docs/copyright.html.
1515
*
1616
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
1717
* copies of the Software, and permit persons to whom the Software is
@@ -26,16 +26,16 @@
2626
a script at release-time. This was made its own header file in 7.11.2 */
2727

2828
/* This is the global package copyright */
29-
#define LIBCURL_COPYRIGHT "1996 - 2012 Daniel Stenberg, <[email protected]>."
29+
#define LIBCURL_COPYRIGHT "1996 - 2016 Daniel Stenberg, <[email protected]>."
3030

3131
/* This is the version number of the libcurl package from which this header
3232
file origins: */
33-
#define LIBCURL_VERSION "7.26.0"
33+
#define LIBCURL_VERSION "7.48.0"
3434

3535
/* The numeric version number is also available "in parts" by using these
3636
defines: */
3737
#define LIBCURL_VERSION_MAJOR 7
38-
#define LIBCURL_VERSION_MINOR 26
38+
#define LIBCURL_VERSION_MINOR 48
3939
#define LIBCURL_VERSION_PATCH 0
4040

4141
/* This is the numeric version of the libcurl version number, meant for easier
@@ -52,8 +52,12 @@
5252
This 6-digit (24 bits) hexadecimal number does not show pre-release number,
5353
and it is always a greater number in a more recent release. It makes
5454
comparisons with greater than and less than work.
55+
56+
Note: This define is the full hex number and _does not_ use the
57+
CURL_VERSION_BITS() macro since curl's own configure script greps for it
58+
and needs it to contain the full number.
5559
*/
56-
#define LIBCURL_VERSION_NUM 0x071a00
60+
#define LIBCURL_VERSION_NUM 0x073000
5761

5862
/*
5963
* This is the date and time when the full source package was created. The
@@ -64,6 +68,10 @@
6468
*
6569
* "Mon Feb 12 11:35:33 UTC 2007"
6670
*/
67-
#define LIBCURL_TIMESTAMP "Thu May 24 16:05:42 UTC 2012"
71+
#define LIBCURL_TIMESTAMP "Wed Mar 23 06:57:50 UTC 2016"
72+
73+
#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|z)
74+
#define CURL_AT_LEAST_VERSION(x,y,z) \
75+
(LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z))
6876

6977
#endif /* __CURL_CURLVER_H */

cocos2dx/platform/third_party/android/prebuilt/libcurl/include/curl/easy.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
* This software is licensed as described in the file COPYING, which
1313
* you should have received as part of this distribution. The terms
14-
* are also available at http://curl.haxx.se/docs/copyright.html.
14+
* are also available at https://curl.haxx.se/docs/copyright.html.
1515
*
1616
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
1717
* copies of the Software, and permit persons to whom the Software is

cocos2dx/platform/third_party/android/prebuilt/libcurl/include/curl/mprintf.h

+2-9
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
* | (__| |_| | _ <| |___
88
* \___|\___/|_| \_\_____|
99
*
10-
* Copyright (C) 1998 - 2006, Daniel Stenberg, <[email protected]>, et al.
10+
* Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
1111
*
1212
* This software is licensed as described in the file COPYING, which
1313
* you should have received as part of this distribution. The terms
14-
* are also available at http://curl.haxx.se/docs/copyright.html.
14+
* are also available at https://curl.haxx.se/docs/copyright.html.
1515
*
1616
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
1717
* copies of the Software, and permit persons to whom the Software is
@@ -57,15 +57,8 @@ CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args);
5757
# undef vaprintf
5858
# define printf curl_mprintf
5959
# define fprintf curl_mfprintf
60-
#ifdef CURLDEBUG
61-
/* When built with CURLDEBUG we define away the sprintf() functions since we
62-
don't want internal code to be using them */
63-
# define sprintf sprintf_was_used
64-
# define vsprintf vsprintf_was_used
65-
#else
6660
# define sprintf curl_msprintf
6761
# define vsprintf curl_mvsprintf
68-
#endif
6962
# define snprintf curl_msnprintf
7063
# define vprintf curl_mvprintf
7164
# define vfprintf curl_mvfprintf

cocos2dx/platform/third_party/android/prebuilt/libcurl/include/curl/multi.h

+92-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
* | (__| |_| | _ <| |___
88
* \___|\___/|_| \_\_____|
99
*
10-
* Copyright (C) 1998 - 2007, Daniel Stenberg, <[email protected]>, et al.
10+
* Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
1111
*
1212
* This software is licensed as described in the file COPYING, which
1313
* you should have received as part of this distribution. The terms
14-
* are also available at http://curl.haxx.se/docs/copyright.html.
14+
* are also available at https://curl.haxx.se/docs/copyright.html.
1515
*
1616
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
1717
* copies of the Software, and permit persons to whom the Software is
@@ -64,6 +64,8 @@ typedef enum {
6464
CURLM_INTERNAL_ERROR, /* this is a libcurl bug */
6565
CURLM_BAD_SOCKET, /* the passed in socket argument did not match */
6666
CURLM_UNKNOWN_OPTION, /* curl_multi_setopt() with unsupported option */
67+
CURLM_ADDED_ALREADY, /* an easy handle already added to a multi handle was
68+
attempted to get added - again */
6769
CURLM_LAST
6870
} CURLMcode;
6971

@@ -72,6 +74,11 @@ typedef enum {
7274
curl_multi_perform() and CURLM_CALL_MULTI_PERFORM */
7375
#define CURLM_CALL_MULTI_SOCKET CURLM_CALL_MULTI_PERFORM
7476

77+
/* bitmask bits for CURLMOPT_PIPELINING */
78+
#define CURLPIPE_NOTHING 0L
79+
#define CURLPIPE_HTTP1 1L
80+
#define CURLPIPE_MULTIPLEX 2L
81+
7582
typedef enum {
7683
CURLMSG_NONE, /* first, not used */
7784
CURLMSG_DONE, /* This easy handle has completed. 'result' contains
@@ -89,6 +96,19 @@ struct CURLMsg {
8996
};
9097
typedef struct CURLMsg CURLMsg;
9198

99+
/* Based on poll(2) structure and values.
100+
* We don't use pollfd and POLL* constants explicitly
101+
* to cover platforms without poll(). */
102+
#define CURL_WAIT_POLLIN 0x0001
103+
#define CURL_WAIT_POLLPRI 0x0002
104+
#define CURL_WAIT_POLLOUT 0x0004
105+
106+
struct curl_waitfd {
107+
curl_socket_t fd;
108+
short events;
109+
short revents; /* not supported yet */
110+
};
111+
92112
/*
93113
* Name: curl_multi_init()
94114
*
@@ -133,6 +153,20 @@ CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle,
133153
fd_set *exc_fd_set,
134154
int *max_fd);
135155

156+
/*
157+
* Name: curl_multi_wait()
158+
*
159+
* Desc: Poll on all fds within a CURLM set as well as any
160+
* additional fds passed to the function.
161+
*
162+
* Returns: CURLMcode type, general multi error code.
163+
*/
164+
CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle,
165+
struct curl_waitfd extra_fds[],
166+
unsigned int extra_nfds,
167+
int timeout_ms,
168+
int *ret);
169+
136170
/*
137171
* Name: curl_multi_perform()
138172
*
@@ -311,6 +345,37 @@ typedef enum {
311345
/* maximum number of entries in the connection cache */
312346
CINIT(MAXCONNECTS, LONG, 6),
313347

348+
/* maximum number of (pipelining) connections to one host */
349+
CINIT(MAX_HOST_CONNECTIONS, LONG, 7),
350+
351+
/* maximum number of requests in a pipeline */
352+
CINIT(MAX_PIPELINE_LENGTH, LONG, 8),
353+
354+
/* a connection with a content-length longer than this
355+
will not be considered for pipelining */
356+
CINIT(CONTENT_LENGTH_PENALTY_SIZE, OFF_T, 9),
357+
358+
/* a connection with a chunk length longer than this
359+
will not be considered for pipelining */
360+
CINIT(CHUNK_LENGTH_PENALTY_SIZE, OFF_T, 10),
361+
362+
/* a list of site names(+port) that are blacklisted from
363+
pipelining */
364+
CINIT(PIPELINING_SITE_BL, OBJECTPOINT, 11),
365+
366+
/* a list of server types that are blacklisted from
367+
pipelining */
368+
CINIT(PIPELINING_SERVER_BL, OBJECTPOINT, 12),
369+
370+
/* maximum number of open connections in total */
371+
CINIT(MAX_TOTAL_CONNECTIONS, LONG, 13),
372+
373+
/* This is the server push callback function pointer */
374+
CINIT(PUSHFUNCTION, FUNCTIONPOINT, 14),
375+
376+
/* This is the argument passed to the server push callback */
377+
CINIT(PUSHDATA, OBJECTPOINT, 15),
378+
314379
CURLMOPT_LASTENTRY /* the last unused */
315380
} CURLMoption;
316381

@@ -338,6 +403,31 @@ CURL_EXTERN CURLMcode curl_multi_setopt(CURLM *multi_handle,
338403
CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle,
339404
curl_socket_t sockfd, void *sockp);
340405

406+
407+
/*
408+
* Name: curl_push_callback
409+
*
410+
* Desc: This callback gets called when a new stream is being pushed by the
411+
* server. It approves or denies the new stream.
412+
*
413+
* Returns: CURL_PUSH_OK or CURL_PUSH_DENY.
414+
*/
415+
#define CURL_PUSH_OK 0
416+
#define CURL_PUSH_DENY 1
417+
418+
struct curl_pushheaders; /* forward declaration only */
419+
420+
CURL_EXTERN char *curl_pushheader_bynum(struct curl_pushheaders *h,
421+
size_t num);
422+
CURL_EXTERN char *curl_pushheader_byname(struct curl_pushheaders *h,
423+
const char *name);
424+
425+
typedef int (*curl_push_callback)(CURL *parent,
426+
CURL *easy,
427+
size_t num_headers,
428+
struct curl_pushheaders *headers,
429+
void *userp);
430+
341431
#ifdef __cplusplus
342432
} /* end of extern "C" */
343433
#endif

cocos2dx/platform/third_party/android/prebuilt/libcurl/include/curl/stdcheaders.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
* This software is licensed as described in the file COPYING, which
1313
* you should have received as part of this distribution. The terms
14-
* are also available at http://curl.haxx.se/docs/copyright.html.
14+
* are also available at https://curl.haxx.se/docs/copyright.html.
1515
*
1616
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
1717
* copies of the Software, and permit persons to whom the Software is

0 commit comments

Comments
 (0)