Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2615a5d

Browse files
author
Felipe Zimmerle
committed
mlogc: Checks if curl supports CURL_SSLVERSION_TLSv1_2 before use it
Seems like curl versions older than 7.34.0 does not have support for`CURL_SSLVERSION_TLSv1_2'. In this cases, using CURL_SSLVERSION_TLSv1which was added at version 7.9.2. ModSecurity demands a curl versionnewer than 7.15.1.
1 parent54bf71f commit2615a5d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

‎build/find_curl.m4‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ if test -n "${curl_path}"; then
6666
curl_ver=`echo ${CURL_VERSION} | awk -F. '{print (\$ 1 * 1000000) + (\$ 2 * 1000) + \$ 3}'`
6767
if test "$curl_min_ver" -le "$curl_ver"; then
6868
AC_MSG_RESULT([yes, $CURL_VERSION])
69+
curl_tlsv2_ver=`echo 7.34.0 | awk -F. '{print (\$ 1 * 1000000) + (\$ 2 * 1000) + \$ 3}'`
70+
if test "$curl_tlsv2_ver" -le "$curl_ver"; then
71+
CURL_CFLAGS="${CURL_CFLAGS} -DWITH_CURL_SSLVERSION_TLSv1_2"
72+
fi
6973
else
7074
AC_MSG_RESULT([no, $CURL_VERSION])
7175
AC_MSG_NOTICE([NOTE: curl library may be too old])

‎mlogc/mlogc.c‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1218,8 +1218,14 @@ static void logc_init(void)
12181218
curl_easy_setopt(curl,CURLOPT_HTTPAUTH,CURLAUTH_BASIC);
12191219
curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER, FALSE);
12201220
curl_easy_setopt(curl,CURLOPT_SSL_VERIFYHOST,0);
1221+
/* Seems like CURL_SSLVERSION_TLSv1_2 is not supported on libcurl
1222+
* < v7.34.0
1223+
*/
1224+
#ifdefWITH_CURL_SSLVERSION_TLSv1_2
12211225
curl_easy_setopt(curl,CURLOPT_SSLVERSION,CURL_SSLVERSION_TLSv1_2);
1222-
1226+
#else
1227+
curl_easy_setopt(curl,CURLOPT_SSLVERSION,CURL_SSLVERSION_TLSv1);
1228+
#endif
12231229
curl_easy_setopt(curl,CURLOPT_CONNECTTIMEOUT,15);
12241230
curl_easy_setopt(curl,CURLOPT_NOSIGNAL, TRUE);
12251231
curl_easy_setopt(curl,CURLOPT_HEADER, TRUE);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp