mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2025-03-03 18:00:54 +00:00
support https ca certify
Signed-off-by: lushi <lushi@huawei.com> Change-Id: I6bc29eb5edacd62fce8ce62063ac1a115b93d448
This commit is contained in:
parent
7c75cd65d3
commit
677f565c71
1
OAT.xml
1
OAT.xml
@ -63,6 +63,7 @@ Note:If the text contains special characters, please escape them according to th
|
||||
<filefilter name="binaryFileTypePolicyFilter" desc="二进制文件校验策略的过滤条件" >
|
||||
<filteritem type="filepath" name="frameworks/base/resource/binary/mac/.*.o" desc="来源于代码仓foundation/ace/ace_engine/frameworks/base/resource/binary下的svg编译而来。现有的objcopy工具链在mac上不能用,使用开源工具转换成.o。"/>
|
||||
<filteritem type="filepath" name="adapter/preview/sdk/cacert.pem" desc="三方库libcurl在windows环境下使用的公钥证书文件,由Mozilla的根证书文件解压得到。"/>
|
||||
<filteritem type="filepath" name="frameworks/base/network/cacert.pem" desc="三方库libcur使用的公钥证书文件,curl官网下载得到。"/>
|
||||
</filefilter>
|
||||
<filefilter name="binaryFileTypePolicyFilter" desc="二进制文件校验策略的过滤条件" >
|
||||
<filteritem type="filepath" name="test/resource/graphicalbasicability/imageprovider/images/broken.bmp" desc="自造的二进制图片"/>
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Copyright (c) 2021-2022 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
@ -73,7 +73,10 @@ template("ace_base_source_set") {
|
||||
if (defined(config.use_curl_download) && config.use_curl_download) {
|
||||
configs += [ "//third_party/curl:curl_config" ]
|
||||
sources += [ "$ace_root/frameworks/base/network/download_manager.cpp" ]
|
||||
deps += [ "//third_party/curl:curl" ]
|
||||
deps += [
|
||||
"$ace_root/frameworks/base/network:cacert.pem",
|
||||
"//third_party/curl:curl",
|
||||
]
|
||||
}
|
||||
|
||||
cflags_cc = []
|
||||
|
22
frameworks/base/network/BUILD.gn
Normal file
22
frameworks/base/network/BUILD.gn
Normal file
@ -0,0 +1,22 @@
|
||||
# Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//build/ohos.gni")
|
||||
import("//foundation/ace/ace_engine/ace_config.gni")
|
||||
|
||||
ohos_prebuilt_etc("cacert.pem") {
|
||||
relative_install_dir = "ssl/certs"
|
||||
source = "cacert.pem"
|
||||
part_name = ace_engine_part
|
||||
subsystem_name = "ace"
|
||||
}
|
3311
frameworks/base/network/cacert.pem
Normal file
3311
frameworks/base/network/cacert.pem
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -63,7 +63,7 @@ public:
|
||||
// Some servers don't like requests that are made without a user-agent field, so we provide one
|
||||
ACE_CURL_EASY_SET_OPTION(handle.get(), CURLOPT_USERAGENT, "libcurl-agent/1.0");
|
||||
ACE_CURL_EASY_SET_OPTION(handle.get(), CURLOPT_URL, url.c_str());
|
||||
|
||||
ACE_CURL_EASY_SET_OPTION(handle.get(), CURLOPT_CAINFO, "/etc/ssl/certs/cacert.pem");
|
||||
ACE_CURL_EASY_SET_OPTION(handle.get(), CURLOPT_VERBOSE, 1L);
|
||||
ACE_CURL_EASY_SET_OPTION(handle.get(), CURLOPT_ERRORBUFFER, errorStr_.data());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user