Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
98c5ab50
C
ClickHouse
项目概览
2dot5
/
ClickHouse
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
ClickHouse
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
98c5ab50
编写于
12月 12, 2019
作者:
P
Pavel Kovalenko
提交者:
Pavel Kovalenko
12月 12, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
AWS SDK integration - set default ca_bundle and ca_path for curl build.
上级
daf064d1
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
6 addition
and
72 deletion
+6
-72
contrib/curl-cmake/CMakeLists.txt
contrib/curl-cmake/CMakeLists.txt
+6
-72
未找到文件。
contrib/curl-cmake/CMakeLists.txt
浏览文件 @
98c5ab50
...
...
@@ -181,79 +181,13 @@ else()
unset
(
USE_UNIX_SOCKETS CACHE
)
endif
()
#
# CA handling
#
set
(
CURL_CA_BUNDLE
"auto"
CACHE STRING
"Path to the CA bundle. Set 'none' to disable or 'auto' for auto-detection. Defaults to 'auto'."
)
set
(
CURL_CA_FALLBACK OFF CACHE BOOL
"Set ON to use built-in CA store of TLS backend. Defaults to OFF"
)
set
(
CURL_CA_PATH
"auto"
CACHE STRING
"Location of default CA path. Set 'none' to disable or 'auto' for auto-detection. Defaults to 'auto'."
)
if
(
NOT OPENSSL_FOUND
)
set
(
CURL_CA_PATH
"none"
)
endif
()
if
(
"
${
CURL_CA_BUNDLE
}
"
STREQUAL
""
)
message
(
FATAL_ERROR
"Invalid value of CURL_CA_BUNDLE. Use 'none', 'auto' or file path."
)
elseif
(
"
${
CURL_CA_BUNDLE
}
"
STREQUAL
"none"
)
unset
(
CURL_CA_BUNDLE CACHE
)
elseif
(
"
${
CURL_CA_BUNDLE
}
"
STREQUAL
"auto"
)
unset
(
CURL_CA_BUNDLE CACHE
)
set
(
CURL_CA_BUNDLE_AUTODETECT TRUE
)
else
()
set
(
CURL_CA_BUNDLE_SET TRUE
)
endif
()
if
(
"
${
CURL_CA_PATH
}
"
STREQUAL
""
)
message
(
FATAL_ERROR
"Invalid value of CURL_CA_PATH. Use 'none', 'auto' or directory path."
)
elseif
(
"
${
CURL_CA_PATH
}
"
STREQUAL
"none"
)
unset
(
CURL_CA_PATH CACHE
)
elseif
(
"
${
CURL_CA_PATH
}
"
STREQUAL
"auto"
)
unset
(
CURL_CA_PATH CACHE
)
set
(
CURL_CA_PATH_AUTODETECT TRUE
)
else
()
set
(
CURL_CA_PATH_SET TRUE
)
endif
()
if
(
CURL_CA_BUNDLE_SET AND CURL_CA_PATH_AUTODETECT
)
# Skip autodetection of unset CA path because CA bundle is set explicitly
elseif
(
CURL_CA_PATH_SET AND CURL_CA_BUNDLE_AUTODETECT
)
# Skip autodetection of unset CA bundle because CA path is set explicitly
elseif
(
CURL_CA_PATH_AUTODETECT OR CURL_CA_BUNDLE_AUTODETECT
)
# first try autodetecting a CA bundle, then a CA path
if
(
CURL_CA_BUNDLE_AUTODETECT
)
set
(
SEARCH_CA_BUNDLE_PATHS
/etc/ssl/certs/ca-certificates.crt
/etc/pki/tls/certs/ca-bundle.crt
/usr/share/ssl/certs/ca-bundle.crt
/usr/local/share/certs/ca-root-nss.crt
/etc/ssl/cert.pem
)
foreach
(
SEARCH_CA_BUNDLE_PATH
${
SEARCH_CA_BUNDLE_PATHS
}
)
if
(
EXISTS
"
${
SEARCH_CA_BUNDLE_PATH
}
"
)
message
(
STATUS
"Found CA bundle:
${
SEARCH_CA_BUNDLE_PATH
}
"
)
set
(
CURL_CA_BUNDLE
"
${
SEARCH_CA_BUNDLE_PATH
}
"
)
# Explicitly set to most common case
if
(
OPENSSL_FOUND
)
set
(
CURL_CA_BUNDLE
"/etc/ssl/certs/ca-certificates.crt"
)
set
(
CURL_CA_BUNDLE_SET TRUE CACHE BOOL
"Path to the CA bundle has been set"
)
break
()
endif
()
endforeach
()
endif
()
if
(
CURL_CA_PATH_AUTODETECT
AND
(
NOT CURL_CA_PATH_SET
))
if
(
EXISTS
"/etc/ssl/certs"
)
set
(
CURL_CA_PATH
"/etc/ssl/certs"
)
set
(
CURL_CA_PATH_SET TRUE CACHE BOOL
"Path to the CA bundle has been set"
)
endif
()
endif
()
endif
()
if
(
CURL_CA_PATH_SET AND NOT USE_OPENSSL AND NOT USE_MBEDTLS
)
message
(
FATAL_ERROR
"CA path only supported by OpenSSL, GnuTLS or mbed TLS. "
"Set CURL_CA_PATH=none or enable one of those TLS backends."
)
endif
()
check_include_file_concat
(
"stdio.h"
HAVE_STDIO_H
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录