mirror of
https://gitee.com/openharmony/security_certificate_manager
synced 2024-11-26 17:20:54 +00:00
SASDK整改
Signed-off-by: 上官景威 <shangguanjingwei@huawei.com>
This commit is contained in:
parent
da22732029
commit
d4430d7ca9
@ -16,7 +16,10 @@
|
||||
"component": {
|
||||
"name": "certificate_manager",
|
||||
"subsystem": "security",
|
||||
"syscap": [ "SystemCapability.Security.CertificateManager" ],
|
||||
"syscap": [
|
||||
"SystemCapability.Security.CertificateManagerDialog",
|
||||
"SystemCapability.Security.CertificateManager"
|
||||
],
|
||||
"features": [
|
||||
"certificate_manager_deps_huks_enabled",
|
||||
"certificate_manager_feature_ca_enabled",
|
||||
@ -74,7 +77,8 @@
|
||||
"name": "//base/security/certificate_manager/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"header": {
|
||||
"header_files": [
|
||||
"cert_manager_api.h"
|
||||
"cert_manager_api.h",
|
||||
"cm_type.h"
|
||||
],
|
||||
"header_base": "//base/security/certificate_manager/interfaces/innerkits/cert_manager_standard/main/include"
|
||||
}
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
use_crypto_lib = "openssl"
|
||||
non_rwlock_support = false
|
||||
cert_manager_root_dir = "//base/security/certificate_manager"
|
||||
|
||||
declare_args() {
|
||||
# depend on the definition of huks security level in base/security/huks/build/config.gni
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/ohos.gni")
|
||||
|
||||
config("cert_manager_config") {
|
||||
@ -29,16 +30,11 @@ ohos_static_library("libcert_manager_common_standard_static") {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
}
|
||||
defines = [
|
||||
"L2_STANDARD",
|
||||
"_CM_LOG_ENABLE_",
|
||||
]
|
||||
|
||||
public_configs =
|
||||
[ ":cert_manager_config" ] # Share include files for other gn when deps.
|
||||
|
||||
include_dirs =
|
||||
[ "../../../../interfaces/innerkits/cert_manager_standard/main/include" ]
|
||||
|
||||
include_dirs = [ "${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main/include" ]
|
||||
sources = [
|
||||
"src/cm_advsecmode_check.c",
|
||||
"src/cm_param.c",
|
||||
@ -54,7 +50,6 @@ ohos_static_library("libcert_manager_common_standard_static") {
|
||||
"openssl:libcrypto_shared",
|
||||
]
|
||||
cflags = [
|
||||
"-DHILOG_ENABLE",
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
]
|
||||
|
@ -22,12 +22,10 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _CM_LOG_ENABLE_
|
||||
#undef LOG_TAG
|
||||
#define LOG_TAG "CertManager"
|
||||
#undef LOG_DOMAIN
|
||||
#define LOG_DOMAIN 0xD002F09 /* CertManager's domain id */
|
||||
#endif
|
||||
|
||||
enum CmLogLevel {
|
||||
CM_LOG_LEVEL_I,
|
||||
@ -36,19 +34,12 @@ enum CmLogLevel {
|
||||
CM_LOG_LEVEL_D,
|
||||
};
|
||||
|
||||
#ifdef _CM_LOG_ENABLE_
|
||||
void CmLog(uint32_t logLevel, const char *funcName, uint32_t lineNo, const char *format, ...);
|
||||
|
||||
#define CM_LOG_I(...) CmLog(CM_LOG_LEVEL_I, __func__, __LINE__, __VA_ARGS__)
|
||||
#define CM_LOG_W(...) CmLog(CM_LOG_LEVEL_W, __func__, __LINE__, __VA_ARGS__)
|
||||
#define CM_LOG_E(...) CmLog(CM_LOG_LEVEL_E, __func__, __LINE__, __VA_ARGS__)
|
||||
#define CM_LOG_D(...) CmLog(CM_LOG_LEVEL_D, __func__, __LINE__, __VA_ARGS__)
|
||||
#else
|
||||
#define CM_LOG_I(...)
|
||||
#define CM_LOG_W(...)
|
||||
#define CM_LOG_E(...)
|
||||
#define CM_LOG_D(...)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -11,16 +11,12 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/ohos.gni")
|
||||
|
||||
config("cert_manager_log_mem_config") {
|
||||
include_dirs = [ "../common/include" ]
|
||||
}
|
||||
|
||||
ohos_static_library("libcert_manager_log_mem_static") {
|
||||
subsystem_name = "security"
|
||||
part_name = "certificate_manager"
|
||||
public_configs = [ ":cert_manager_log_mem_config" ]
|
||||
branch_protector_ret = "pac_ret"
|
||||
sanitize = {
|
||||
cfi = true
|
||||
@ -30,23 +26,19 @@ ohos_static_library("libcert_manager_log_mem_static") {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
}
|
||||
include_dirs =
|
||||
[ "../../../../interfaces/innerkits/cert_manager_standard/main/include" ]
|
||||
defines = [
|
||||
"L2_STANDARD",
|
||||
"_CM_LOG_ENABLE_",
|
||||
]
|
||||
include_dirs = [ "${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main/include" ]
|
||||
|
||||
sources = [
|
||||
"./log/cm_log.c",
|
||||
"./posix/cm_mem.c",
|
||||
]
|
||||
|
||||
deps = [ "${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static" ]
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
"hilog:libhilog",
|
||||
]
|
||||
cflags = [
|
||||
"-DHILOG_ENABLE",
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
]
|
||||
@ -70,18 +62,14 @@ ohos_static_library("libcert_manager_ipc_client_static") {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
}
|
||||
include_dirs =
|
||||
[ "../../../../interfaces/innerkits/cert_manager_standard/main/include" ]
|
||||
defines = [
|
||||
"L2_STANDARD",
|
||||
"_CM_LOG_ENABLE_",
|
||||
]
|
||||
include_dirs = [ "${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main/include" ]
|
||||
|
||||
sources = [
|
||||
"./cm_ipc/src/cm_ipc_client.c",
|
||||
"./cm_ipc/src/cm_ipc_client_serialization.c",
|
||||
"./cm_ipc/src/cm_request.cpp",
|
||||
]
|
||||
deps = [ ":libcert_manager_log_mem_static" ]
|
||||
deps = [ "${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static" ]
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
"hilog:libhilog",
|
||||
@ -90,7 +78,6 @@ ohos_static_library("libcert_manager_ipc_client_static") {
|
||||
"samgr:samgr_proxy",
|
||||
]
|
||||
cflags_cc = [
|
||||
"-DHILOG_ENABLE",
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
]
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/ohos.gni")
|
||||
|
||||
config("cert_manager_config") {
|
||||
@ -32,23 +33,18 @@ if (os_level == "standard") {
|
||||
innerapi_tags = [
|
||||
"platformsdk",
|
||||
"chipsetsdk",
|
||||
"sasdk",
|
||||
]
|
||||
part_name = "certificate_manager"
|
||||
public_configs = [ ":cert_manager_config" ]
|
||||
defines = [
|
||||
"L2_STANDARD",
|
||||
"_HARDWARE_ROOT_KEY_",
|
||||
"_CM_LOG_ENABLE_",
|
||||
]
|
||||
|
||||
sources = [ "src/cert_manager_api.c" ]
|
||||
|
||||
cflags = [
|
||||
"-DHILOG_ENABLE",
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
]
|
||||
deps = [ "../../../../frameworks/cert_manager_standard/main:cert_manager_standard_frameworks" ]
|
||||
deps = [ "${cert_manager_root_dir}/frameworks/cert_manager_standard/main:cert_manager_standard_frameworks" ]
|
||||
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_shared",
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("cj_cert_manager_ffi") {
|
||||
@ -23,16 +24,8 @@ ohos_shared_library("cj_cert_manager_ffi") {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
}
|
||||
defines = [
|
||||
"L2_STANDARD",
|
||||
"_HARDWARE_ROOT_KEY_",
|
||||
"_CM_LOG_ENABLE_",
|
||||
]
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"include",
|
||||
]
|
||||
include_dirs = [ "include" ]
|
||||
|
||||
sources = [ "src/cj_cert_manager_ffi.c" ]
|
||||
|
||||
@ -40,7 +33,11 @@ ohos_shared_library("cj_cert_manager_ffi") {
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
]
|
||||
deps = [ "../../innerkits/cert_manager_standard/main:cert_manager_sdk" ]
|
||||
|
||||
deps = [
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
]
|
||||
|
||||
innerapi_tags = [ "platformsdk" ]
|
||||
subsystem_name = "security"
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("certmanager") {
|
||||
@ -23,16 +24,8 @@ ohos_shared_library("certmanager") {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
}
|
||||
defines = [
|
||||
"L2_STANDARD",
|
||||
"_HARDWARE_ROOT_KEY_",
|
||||
"_CM_LOG_ENABLE_",
|
||||
]
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"include",
|
||||
]
|
||||
include_dirs = [ "include" ]
|
||||
|
||||
sources = [
|
||||
"src/cm_napi.cpp",
|
||||
@ -62,7 +55,10 @@ ohos_shared_library("certmanager") {
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
]
|
||||
deps = [ "../../innerkits/cert_manager_standard/main:cert_manager_sdk" ]
|
||||
deps = [
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
]
|
||||
|
||||
relative_install_dir = "module/security"
|
||||
subsystem_name = "security"
|
||||
@ -79,16 +75,8 @@ ohos_shared_library("certmanagerdialog") {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
}
|
||||
defines = [
|
||||
"L2_STANDARD",
|
||||
"_HARDWARE_ROOT_KEY_",
|
||||
"_CM_LOG_ENABLE_",
|
||||
]
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"include/dialog",
|
||||
]
|
||||
include_dirs = [ "include/dialog" ]
|
||||
|
||||
sources = [
|
||||
"src/dialog/cm_napi_dialog.cpp",
|
||||
@ -116,7 +104,10 @@ ohos_shared_library("certmanagerdialog") {
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
]
|
||||
deps = [ "../../innerkits/cert_manager_standard/main:cert_manager_sdk" ]
|
||||
deps = [
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
]
|
||||
|
||||
relative_install_dir = "module/security"
|
||||
subsystem_name = "security"
|
||||
|
@ -40,10 +40,7 @@ ohos_shared_library("cert_manager_service") {
|
||||
}
|
||||
subsystem_name = "security"
|
||||
part_name = "certificate_manager"
|
||||
defines = [
|
||||
"L2_STANDARD",
|
||||
"_CM_LOG_ENABLE_",
|
||||
]
|
||||
defines = []
|
||||
|
||||
if (certificate_manager_feature_ca_enabled == "false") {
|
||||
defines += [ "CERTIFICATE_MANAGER_FEATURE_CA_DISABLED" ]
|
||||
@ -54,7 +51,6 @@ ohos_shared_library("cert_manager_service") {
|
||||
|
||||
deps = [
|
||||
":cert_manager_service.rc",
|
||||
"cert_manager_engine/main/core:cert_manager_engine_core_standard",
|
||||
"cert_manager_engine/main/rdb:libcert_manager_rdb_static",
|
||||
"cert_manager_service/main/os_dependency:libcert_manager_service_os_dependency_standard_static",
|
||||
]
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/ohos.gni")
|
||||
|
||||
config("cert_manager_engine_core_config") {
|
||||
@ -30,15 +31,8 @@ ohos_static_library("cert_manager_engine_core_standard") {
|
||||
ubsan = true
|
||||
}
|
||||
|
||||
defines = [
|
||||
"L2_STANDARD",
|
||||
"_CM_LOG_ENABLE_",
|
||||
"OPENSSL_SUPPRESS_DEPRECATED",
|
||||
]
|
||||
include_dirs = [
|
||||
"../rdb/include",
|
||||
"../../../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
]
|
||||
defines = [ "OPENSSL_SUPPRESS_DEPRECATED" ]
|
||||
include_dirs = [ "${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main/include" ]
|
||||
cflags = [
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
@ -68,8 +62,8 @@ ohos_static_library("cert_manager_engine_core_standard") {
|
||||
]
|
||||
|
||||
deps = [
|
||||
"../../../../../frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"../../../../../frameworks/cert_manager_standard/main/os_dependency:libcert_manager_log_mem_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_engine/main/rdb:libcert_manager_rdb_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
@ -79,4 +73,6 @@ ohos_static_library("cert_manager_engine_core_standard") {
|
||||
"ipc:ipc_core",
|
||||
"openssl:libcrypto_shared",
|
||||
]
|
||||
|
||||
complete_static_lib = true
|
||||
}
|
||||
|
@ -9,8 +9,9 @@
|
||||
# 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.
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/ohos.gni")
|
||||
|
||||
config("cert_manager_config") {
|
||||
@ -31,10 +32,7 @@ ohos_static_library("libcert_manager_rdb_static") {
|
||||
ubsan = true
|
||||
}
|
||||
|
||||
include_dirs = [
|
||||
"../../../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
]
|
||||
include_dirs = [ "${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main/include" ]
|
||||
|
||||
sources = [
|
||||
"src/cm_cert_property_rdb.cpp",
|
||||
@ -42,14 +40,13 @@ ohos_static_library("libcert_manager_rdb_static") {
|
||||
"src/cm_rdb_open_callback.cpp",
|
||||
]
|
||||
|
||||
deps = [ "${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static" ]
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
"hilog:libhilog",
|
||||
"relational_store:native_rdb",
|
||||
]
|
||||
|
||||
defines = [ "_CM_LOG_ENABLE_" ]
|
||||
|
||||
cflags_cc = [
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/ohos.gni")
|
||||
|
||||
config("cert_manager_config") {
|
||||
@ -30,12 +31,7 @@ ohos_static_library("libcert_manager_hisysevent_wrapper_static") {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
}
|
||||
include_dirs = [
|
||||
"../../../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../../../frameworks/cert_manager_standard/main/os_dependency/cm_ipc/include",
|
||||
"../../../../../services/cert_manager_standard/cert_manager_engine/main/core/include",
|
||||
"../../../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
]
|
||||
include_dirs = [ "${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main/include" ]
|
||||
sources = [
|
||||
"src/cm_report_wrapper.c",
|
||||
"src/hisysevent_wrapper.cpp",
|
||||
@ -44,12 +40,14 @@ ohos_static_library("libcert_manager_hisysevent_wrapper_static") {
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
]
|
||||
defines = [
|
||||
"L2_STANDARD",
|
||||
"_CM_LOG_ENABLE_",
|
||||
deps = [
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/os_dependency:libcert_manager_ipc_client_static",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_engine/main/core:cert_manager_engine_core_standard",
|
||||
]
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"bounds_checking_function:libsec_shared",
|
||||
"hisysevent:libhisysevent",
|
||||
]
|
||||
complete_static_lib = true
|
||||
}
|
||||
|
@ -11,11 +11,16 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/ohos.gni")
|
||||
|
||||
config("cert_manager_config") {
|
||||
include_dirs = [ "sa" ]
|
||||
}
|
||||
ohos_static_library("libcert_manager_service_os_dependency_standard_static") {
|
||||
subsystem_name = "security"
|
||||
part_name = "certificate_manager"
|
||||
public_configs = [ ":cert_manager_config" ]
|
||||
branch_protector_ret = "pac_ret"
|
||||
sanitize = {
|
||||
cfi = true
|
||||
@ -25,20 +30,13 @@ ohos_static_library("libcert_manager_service_os_dependency_standard_static") {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
}
|
||||
include_dirs = [
|
||||
"../../../cert_manager_engine/main/core/include",
|
||||
"../../../cert_manager_engine/main/rdb/include",
|
||||
"../../../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
]
|
||||
|
||||
defines = [
|
||||
"L2_STANDARD",
|
||||
"_CM_LOG_ENABLE_",
|
||||
]
|
||||
include_dirs = [ "${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main/include" ]
|
||||
defines = []
|
||||
sources = [ "sa/cm_sa.cpp" ]
|
||||
deps = [
|
||||
"../../../../../frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"../../../../../frameworks/cert_manager_standard/main/os_dependency:libcert_manager_log_mem_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_engine/main/core:cert_manager_engine_core_standard",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_engine/main/rdb:libcert_manager_rdb_static",
|
||||
"idl:libcm_service_idl_standard_static",
|
||||
]
|
||||
|
||||
@ -61,7 +59,6 @@ ohos_static_library("libcert_manager_service_os_dependency_standard_static") {
|
||||
"os_account:os_account_innerkits",
|
||||
]
|
||||
}
|
||||
|
||||
cflags_cc = [
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/ohos.gni")
|
||||
|
||||
config("cert_manager_config") {
|
||||
@ -30,25 +31,20 @@ ohos_static_library("libcm_service_idl_standard_static") {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
}
|
||||
include_dirs = [
|
||||
"../../../../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
"../../../../cert_manager_engine/main/core/include",
|
||||
]
|
||||
defines = [
|
||||
"L2_STANDARD",
|
||||
"_CM_LOG_ENABLE_",
|
||||
]
|
||||
include_dirs = [ "${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main/include" ]
|
||||
defines = []
|
||||
sources = [
|
||||
"cm_ipc/cm_ipc_service.c",
|
||||
"cm_ipc/cm_ipc_service_serialization.c",
|
||||
"cm_ipc/cm_response.cpp",
|
||||
]
|
||||
deps = [
|
||||
"../../../../../../frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"../../../../../../frameworks/cert_manager_standard/main/os_dependency:libcert_manager_log_mem_static",
|
||||
"../../hisysevent_wrapper:libcert_manager_hisysevent_wrapper_static",
|
||||
"../../security_guard_report:libcert_manager_sg_report_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_engine/main/core:cert_manager_engine_core_standard",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/hisysevent_wrapper:libcert_manager_hisysevent_wrapper_static",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/security_guard_report:libcert_manager_sg_report_static",
|
||||
]
|
||||
|
||||
external_deps = [
|
||||
"ability_base:want",
|
||||
"c_utils:utils",
|
||||
@ -65,9 +61,7 @@ ohos_static_library("libcm_service_idl_standard_static") {
|
||||
]
|
||||
defines += []
|
||||
}
|
||||
|
||||
cflags_cc = [
|
||||
"-DHILOG_ENABLE",
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
]
|
||||
|
@ -11,8 +11,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/ohos.gni")
|
||||
import("../../../../../cert_manager.gni")
|
||||
|
||||
config("cert_manager_config") {
|
||||
include_dirs = [ "include" ]
|
||||
@ -31,11 +31,11 @@ ohos_static_library("libcert_manager_sg_report_static") {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
}
|
||||
include_dirs = [
|
||||
"../../../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
|
||||
deps = [
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
]
|
||||
deps = [ "../../../../../frameworks/cert_manager_standard/main/os_dependency:libcert_manager_log_mem_static" ]
|
||||
sources = [
|
||||
"src/cm_security_guard_info.c",
|
||||
"src/cm_security_guard_report.cpp",
|
||||
@ -44,10 +44,9 @@ ohos_static_library("libcert_manager_sg_report_static") {
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
]
|
||||
defines = [ "_CM_LOG_ENABLE_" ]
|
||||
|
||||
external_deps = [
|
||||
"bounds_checking_function:libsec_static",
|
||||
"bounds_checking_function:libsec_shared",
|
||||
"c_utils:utils",
|
||||
"ipc:ipc_single",
|
||||
]
|
||||
@ -56,4 +55,5 @@ ohos_static_library("libcert_manager_sg_report_static") {
|
||||
cflags_cc = [ "-DSUPPORT_SECURITY_GUARD" ]
|
||||
external_deps += [ "security_guard:libsg_collect_sdk" ]
|
||||
}
|
||||
complete_static_lib = true
|
||||
}
|
||||
|
@ -11,8 +11,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/test.gni")
|
||||
import("../cert_manager.gni")
|
||||
|
||||
module_output_path = "cert_manager_standard/cert_manager_standard_test"
|
||||
|
||||
@ -53,8 +53,8 @@ ohos_unittest("cm_sdk_test") {
|
||||
}
|
||||
|
||||
deps = [
|
||||
"../frameworks/cert_manager_standard/main:cert_manager_standard_frameworks",
|
||||
"../interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main:cert_manager_standard_frameworks",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,25 +20,19 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmAbortFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cmabort_fuzzer"
|
||||
fuzz_config_file = "${cert_manager_root_dir}/test/fuzz_test/cmabort_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmabort_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmabort_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include "cert_manager_api.h"
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
@ -37,7 +36,7 @@ namespace OHOS {
|
||||
return false;
|
||||
}
|
||||
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
(void)CmAbort(&abHandle);
|
||||
|
||||
CmFree(myData);
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,28 +20,22 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmAppCertFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cmappcert_fuzzer"
|
||||
fuzz_config_file = "${cert_manager_root_dir}/test/fuzz_test/cmappcert_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../frameworks/cert_manager_standard/main/os_dependency/cm_ipc/include",
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
"../../../services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmappcert_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmappcert_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../services/cert_manager_standard:cert_manager_service",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/os_dependency:libcert_manager_ipc_client_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard:cert_manager_service",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl:libcm_service_idl_standard_static",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -16,15 +16,16 @@
|
||||
#include "cmappcert_fuzzer.h"
|
||||
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_test_common.h"
|
||||
#include "cm_cert_data_part1_rsa.h"
|
||||
#include "cm_cert_data_rsa.h"
|
||||
#include "cm_ipc_client_serialization.h"
|
||||
#include "cm_ipc_service.h"
|
||||
#include "cm_param.h"
|
||||
#include "cert_manager_api.h"
|
||||
#include "cm_type.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
constexpr uint32_t TEST_USERID = 100;
|
||||
constexpr uint32_t MIN_DATA_USE_TIME = 4;
|
||||
static bool InstallAppCert(uint8_t *tmpData, uint32_t *remainSize, uint32_t *offset, uint32_t store,
|
||||
struct CmBlob *keyUri)
|
||||
@ -132,7 +133,7 @@ namespace OHOS {
|
||||
|
||||
uint32_t remainSize = static_cast<uint32_t>(size);
|
||||
uint32_t offset = 0;
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
|
||||
uint32_t store;
|
||||
if (!GetUintFromBuffer(tmpData, &remainSize, &offset, &store)) {
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,25 +20,19 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmFinishFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cmfinish_fuzzer"
|
||||
fuzz_config_file = "${cert_manager_root_dir}/test/fuzz_test/cmfinish_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmfinish_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmfinish_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include "cert_manager_api.h"
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
@ -52,7 +51,7 @@ namespace OHOS {
|
||||
return false;
|
||||
}
|
||||
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
(void)CmFinish(&fiHandle, &inData, &outData);
|
||||
|
||||
CmFree(myData);
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,25 +20,20 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmGetAppCertFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cmgetappcert_fuzzer"
|
||||
fuzz_config_file =
|
||||
"${cert_manager_root_dir}/test/fuzz_test/cmgetappcert_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmgetappcert_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmgetappcert_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include "cert_manager_api.h"
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
@ -58,7 +57,7 @@ namespace OHOS {
|
||||
}
|
||||
credCert.credData.data = const_cast<uint8_t *>(myData + offset);
|
||||
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
(void)CmGetAppCert(&appCertUri, store, &credCert);
|
||||
|
||||
CmFree(myData);
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,25 +20,20 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmGetAppCertListFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cmgetappcertlist_fuzzer"
|
||||
fuzz_config_file =
|
||||
"${cert_manager_root_dir}/test/fuzz_test/cmgetappcertlist_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmgetappcertlist_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmgetappcertlist_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include "cert_manager_api.h"
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
@ -49,7 +48,7 @@ namespace OHOS {
|
||||
}
|
||||
credCertList.credentialAbstract = reinterpret_cast<struct CredentialAbstract *>(myData + offset);
|
||||
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
(void)CmGetAppCertList(credStore, &credCertList);
|
||||
|
||||
CmFree(myData);
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,25 +20,20 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmGetAuthorizedAppListFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cmgetauthorizedapplist_fuzzer"
|
||||
fuzz_config_file =
|
||||
"${cert_manager_root_dir}/test/fuzz_test/cmgetauthorizedapplist_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmgetauthorizedapplist_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmgetauthorizedapplist_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include "cert_manager_api.h"
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
@ -49,7 +48,7 @@ namespace OHOS {
|
||||
}
|
||||
appUidList.appUid = reinterpret_cast<uint32_t *>(myData + offset);
|
||||
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
(void)CmGetAuthorizedAppList(&authorUri, &appUidList);
|
||||
|
||||
CmFree(myData);
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,25 +20,20 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmGetCertInfoFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cmgetcertinfo_fuzzer"
|
||||
fuzz_config_file =
|
||||
"${cert_manager_root_dir}/test/fuzz_test/cmgetcertinfo_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmgetcertinfo_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmgetcertinfo_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include "cert_manager_api.h"
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
@ -49,7 +48,7 @@ namespace OHOS {
|
||||
return false;
|
||||
}
|
||||
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
(void)CmGetCertInfo(&sysUri, store, &sysCertInfo);
|
||||
|
||||
CmFree(myData);
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,25 +20,20 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmGetCertListFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cmgetcertlist_fuzzer"
|
||||
fuzz_config_file =
|
||||
"${cert_manager_root_dir}/test/fuzz_test/cmgetcertlist_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmgetcertlist_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmgetcertlist_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include "cert_manager_api.h"
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
@ -43,7 +42,7 @@ namespace OHOS {
|
||||
return false;
|
||||
}
|
||||
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
(void)CmGetCertList(sysStore, &sysCertList);
|
||||
|
||||
CmFree(myData);
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,25 +20,20 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmGetUserCertInfoFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cmgetusercertinfo_fuzzer"
|
||||
fuzz_config_file =
|
||||
"${cert_manager_root_dir}/test/fuzz_test/cmgetusercertinfo_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmgetusercertinfo_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmgetusercertinfo_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include "cert_manager_api.h"
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
@ -50,7 +49,7 @@ namespace OHOS {
|
||||
return false;
|
||||
}
|
||||
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
(void)CmGetUserCertInfo(&userCertUri, store, &userCertInfo);
|
||||
|
||||
CmFree(myData);
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,25 +20,20 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmGetUserCertListFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cmgetusercertlist_fuzzer"
|
||||
fuzz_config_file =
|
||||
"${cert_manager_root_dir}/test/fuzz_test/cmgetusercertlist_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmgetusercertlist_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmgetusercertlist_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include "cert_manager_api.h"
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
@ -44,7 +43,7 @@ namespace OHOS {
|
||||
return false;
|
||||
}
|
||||
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
(void)CmGetUserCertList(userStore, &userCertList);
|
||||
|
||||
CmFree(myData);
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,25 +20,20 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmGrantAppCertificateFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cmgrantappcertificate_fuzzer"
|
||||
fuzz_config_file =
|
||||
"${cert_manager_root_dir}/test/fuzz_test/cmgrantappcertificate_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmgrantappcertificate_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmgrantappcertificate_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include "cert_manager_api.h"
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
@ -50,7 +49,7 @@ namespace OHOS {
|
||||
return false;
|
||||
}
|
||||
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
(void)CmGrantAppCertificate(&keyUri, appUid, &authUri);
|
||||
|
||||
CmFree(myData);
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,25 +20,19 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmInitFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cminit_fuzzer"
|
||||
fuzz_config_file = "${cert_manager_root_dir}/test/fuzz_test/cminit_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cminit_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cminit_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include "cert_manager_api.h"
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
@ -55,7 +54,7 @@ namespace OHOS {
|
||||
return false;
|
||||
}
|
||||
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
(void)CmInit(&authUri, &spec, &handle);
|
||||
|
||||
CmFree(myData);
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,25 +20,20 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmInstallAppCertFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cminstallappcert_fuzzer"
|
||||
fuzz_config_file =
|
||||
"${cert_manager_root_dir}/test/fuzz_test/cminstallappcert_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cminstallappcert_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cminstallappcert_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include "cert_manager_api.h"
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
@ -64,7 +63,7 @@ namespace OHOS {
|
||||
return false;
|
||||
}
|
||||
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
(void)CmInstallAppCert(&appCert, &appCertPwd, &certAlias, store, &keyUri);
|
||||
|
||||
CmFree(myData);
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,25 +20,20 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmInstallUserTrustedCertFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cminstallusertrustedcert_fuzzer"
|
||||
fuzz_config_file =
|
||||
"${cert_manager_root_dir}/test/fuzz_test/cminstallusertrustedcert_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cminstallusertrustedcert_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cminstallusertrustedcert_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include "cert_manager_api.h"
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
@ -51,7 +50,7 @@ namespace OHOS {
|
||||
return false;
|
||||
}
|
||||
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
(void)CmInstallUserTrustedCert(&userCert, &certAlias, &certUri);
|
||||
|
||||
CmFree(myData);
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,27 +20,22 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmIpcServiceAbortFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cmipcserviceabort_fuzzer"
|
||||
fuzz_config_file =
|
||||
"${cert_manager_root_dir}/test/fuzz_test/cmipcserviceabort_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
"../../../services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmipcserviceabort_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmipcserviceabort_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../services/cert_manager_standard:cert_manager_service",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard:cert_manager_service",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl:libcm_service_idl_standard_static",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_ipc_service.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
{
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
if (!IpcServiceApiFuzzerTest(data, size, CM_MSG_ABORT, false, CmIpcServiceAbort)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,27 +20,22 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmIpcServiceFinishFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cmipcservicefinish_fuzzer"
|
||||
fuzz_config_file =
|
||||
"${cert_manager_root_dir}/test/fuzz_test/cmipcservicefinish_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
"../../../services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmipcservicefinish_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmipcservicefinish_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../services/cert_manager_standard:cert_manager_service",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard:cert_manager_service",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl:libcm_service_idl_standard_static",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_ipc_service.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
{
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
if (!IpcServiceApiFuzzerTest(data, size, CM_MSG_FINISH, false, CmIpcServiceFinish)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,27 +20,22 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmIpcServiceGetAppCertFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cmipcservicegetappcert_fuzzer"
|
||||
fuzz_config_file =
|
||||
"${cert_manager_root_dir}/test/fuzz_test/cmipcservicegetappcert_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
"../../../services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmipcservicegetappcert_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmipcservicegetappcert_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../services/cert_manager_standard:cert_manager_service",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard:cert_manager_service",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl:libcm_service_idl_standard_static",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_ipc_service.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
{
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
if (!IpcServiceApiFuzzerTest(data, size, CM_MSG_GET_APP_CERTIFICATE,
|
||||
false, CmIpcServiceGetAppCert)) {
|
||||
return false;
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,27 +20,21 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmIpcServiceGetAppCertListFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cmipcservicegetappcertlist_fuzzer"
|
||||
fuzz_config_file = "${cert_manager_root_dir}/test/fuzz_test/cmipcservicegetappcertlist_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
"../../../services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmipcservicegetappcertlist_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmipcservicegetappcertlist_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../services/cert_manager_standard:cert_manager_service",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard:cert_manager_service",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl:libcm_service_idl_standard_static",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_ipc_service.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
{
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
if (!IpcServiceApiFuzzerTest(data, size, CM_MSG_GET_APP_CERTIFICATE_LIST,
|
||||
false, CmIpcServiceGetAppCertList)) {
|
||||
return false;
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,28 +20,21 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmIpcServiceGetAuthorizedAppListFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file =
|
||||
"../../../test/fuzz_test/cmipcservicegetauthorizedapplist_fuzzer"
|
||||
fuzz_config_file = "${cert_manager_root_dir}/test/fuzz_test/cmipcservicegetauthorizedapplist_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
"../../../services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmipcservicegetauthorizedapplist_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmipcservicegetauthorizedapplist_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../services/cert_manager_standard:cert_manager_service",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard:cert_manager_service",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl:libcm_service_idl_standard_static",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_ipc_service.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
{
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
if (!IpcServiceApiFuzzerTest(data, size, CM_MSG_GET_AUTHED_LIST,
|
||||
false, CmIpcServiceGetAuthorizedAppList)) {
|
||||
return false;
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,28 +20,21 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmIpcServiceGetCertificateInfoFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file =
|
||||
"../../../test/fuzz_test/cmipcservicegetcertificateinfo_fuzzer"
|
||||
fuzz_config_file = "${cert_manager_root_dir}/test/fuzz_test/cmipcservicegetcertificateinfo_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
"../../../services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmipcservicegetcertificateinfo_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmipcservicegetcertificateinfo_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../services/cert_manager_standard:cert_manager_service",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard:cert_manager_service",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl:libcm_service_idl_standard_static",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_ipc_service.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
{
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
if (!IpcServiceApiFuzzerTest(data, size, CM_MSG_GET_CERTIFICATE_INFO,
|
||||
false, CmIpcServiceGetCertificateInfo)) {
|
||||
return false;
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,28 +20,21 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmIpcServiceGetCertificateListFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file =
|
||||
"../../../test/fuzz_test/cmipcservicegetcertificatelist_fuzzer"
|
||||
fuzz_config_file = "${cert_manager_root_dir}/test/fuzz_test/cmipcservicegetcertificatelist_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
"../../../services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmipcservicegetcertificatelist_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmipcservicegetcertificatelist_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../services/cert_manager_standard:cert_manager_service",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard:cert_manager_service",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl:libcm_service_idl_standard_static",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_ipc_service.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
{
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
if (!IpcServiceApiFuzzerTest(data, size, CM_MSG_GET_CERTIFICATE_LIST,
|
||||
false, CmIpcServiceGetCertificateList)) {
|
||||
return false;
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,28 +20,21 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmIpcServiceGetUserCertInfoFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file =
|
||||
"../../../test/fuzz_test/cmipcservicegetusercertinfo_fuzzer"
|
||||
fuzz_config_file = "${cert_manager_root_dir}/test/fuzz_test/cmipcservicegetusercertinfo_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
"../../../services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmipcservicegetusercertinfo_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmipcservicegetusercertinfo_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../services/cert_manager_standard:cert_manager_service",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard:cert_manager_service",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl:libcm_service_idl_standard_static",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_ipc_service.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
{
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
if (!IpcServiceApiFuzzerTest(data, size, CM_MSG_GET_USER_CERTIFICATE_INFO,
|
||||
false, CmIpcServiceGetUserCertInfo)) {
|
||||
return false;
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,28 +20,21 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmIpcServiceGetUserCertListFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file =
|
||||
"../../../test/fuzz_test/cmipcservicegetusercertlist_fuzzer"
|
||||
fuzz_config_file = "${cert_manager_root_dir}/test/fuzz_test/cmipcservicegetusercertlist_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
"../../../services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmipcservicegetusercertlist_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmipcservicegetusercertlist_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../services/cert_manager_standard:cert_manager_service",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard:cert_manager_service",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl:libcm_service_idl_standard_static",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_ipc_service.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
{
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
if (!IpcServiceApiFuzzerTest(data, size, CM_MSG_GET_USER_CERTIFICATE_LIST,
|
||||
false, CmIpcServiceGetUserCertList)) {
|
||||
return false;
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,28 +20,21 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmIpcServiceGrantAppCertificateFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file =
|
||||
"../../../test/fuzz_test/cmipcservicegrantappcertificate_fuzzer"
|
||||
fuzz_config_file = "${cert_manager_root_dir}/test/fuzz_test/cmipcservicegrantappcertificate_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
"../../../services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmipcservicegrantappcertificate_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmipcservicegrantappcertificate_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../services/cert_manager_standard:cert_manager_service",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard:cert_manager_service",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl:libcm_service_idl_standard_static",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_ipc_service.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
{
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
if (!IpcServiceApiFuzzerTest(data, size, CM_MSG_GRANT_APP_CERT,
|
||||
false, CmIpcServiceGrantAppCertificate)) {
|
||||
return false;
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,27 +20,22 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmIpcServiceInitFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cmipcserviceinit_fuzzer"
|
||||
fuzz_config_file =
|
||||
"${cert_manager_root_dir}/test/fuzz_test/cmipcserviceinit_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
"../../../services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmipcserviceinit_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmipcserviceinit_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../services/cert_manager_standard:cert_manager_service",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard:cert_manager_service",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl:libcm_service_idl_standard_static",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_ipc_service.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
{
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
if (!IpcServiceApiFuzzerTest(data, size, CM_MSG_INIT, false, CmIpcServiceInit)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,27 +20,21 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmIpcServiceInstallAppCertFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cmipcserviceinstallappcert_fuzzer"
|
||||
fuzz_config_file = "${cert_manager_root_dir}/test/fuzz_test/cmipcserviceinstallappcert_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
"../../../services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmipcserviceinstallappcert_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmipcserviceinstallappcert_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../services/cert_manager_standard:cert_manager_service",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard:cert_manager_service",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl:libcm_service_idl_standard_static",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_ipc_service.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
{
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
if (!IpcServiceApiFuzzerTest(data, size, CM_MSG_INSTALL_APP_CERTIFICATE,
|
||||
false, CmIpcServiceInstallAppCert)) {
|
||||
return false;
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,28 +20,21 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmIpcServiceInstallUserCertFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file =
|
||||
"../../../test/fuzz_test/cmipcserviceinstallusercert_fuzzer"
|
||||
fuzz_config_file = "${cert_manager_root_dir}/test/fuzz_test/cmipcserviceinstallusercert_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
"../../../services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmipcserviceinstallusercert_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmipcserviceinstallusercert_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../services/cert_manager_standard:cert_manager_service",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard:cert_manager_service",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl:libcm_service_idl_standard_static",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_ipc_service.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
{
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
if (!IpcServiceApiFuzzerTest(data, size, CM_MSG_INSTALL_USER_CERTIFICATE,
|
||||
false, CmIpcServiceInstallUserCert)) {
|
||||
return false;
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,28 +20,21 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmIpcServiceIsAuthorizedAppFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file =
|
||||
"../../../test/fuzz_test/cmipcserviceisauthorizedapp_fuzzer"
|
||||
fuzz_config_file = "${cert_manager_root_dir}/test/fuzz_test/cmipcserviceisauthorizedapp_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
"../../../services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmipcserviceisauthorizedapp_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmipcserviceisauthorizedapp_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../services/cert_manager_standard:cert_manager_service",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard:cert_manager_service",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl:libcm_service_idl_standard_static",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_ipc_service.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
{
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
if (!IpcServiceApiFuzzerTest(data, size, CM_MSG_CHECK_IS_AUTHED_APP,
|
||||
false, CmIpcServiceIsAuthorizedApp)) {
|
||||
return false;
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,28 +20,21 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmIpcServiceRemoveGrantedAppFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file =
|
||||
"../../../test/fuzz_test/cmipcserviceremovegrantedapp_fuzzer"
|
||||
fuzz_config_file = "${cert_manager_root_dir}/test/fuzz_test/cmipcserviceremovegrantedapp_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
"../../../services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmipcserviceremovegrantedapp_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmipcserviceremovegrantedapp_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../services/cert_manager_standard:cert_manager_service",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard:cert_manager_service",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl:libcm_service_idl_standard_static",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_ipc_service.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
{
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
if (!IpcServiceApiFuzzerTest(data, size, CM_MSG_REMOVE_GRANT_APP,
|
||||
false, CmIpcServiceRemoveGrantedApp)) {
|
||||
return false;
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,27 +20,22 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmIpcServiceSetCertStatusFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cmipcservicesetcertstatus_fuzzer"
|
||||
fuzz_config_file =
|
||||
"${cert_manager_root_dir}/test/fuzz_test/cmipcservicesetcertstatus_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
"../../../services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmipcservicesetcertstatus_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmipcservicesetcertstatus_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../services/cert_manager_standard:cert_manager_service",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard:cert_manager_service",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl:libcm_service_idl_standard_static",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_ipc_service.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
{
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
if (!IpcServiceApiFuzzerTest(data, size, CM_MSG_SET_CERTIFICATE_STATUS,
|
||||
false, CmIpcServiceSetCertStatus)) {
|
||||
return false;
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,28 +20,21 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmIpcServiceSetUserCertStatusFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file =
|
||||
"../../../test/fuzz_test/cmipcservicesetusercertstatus_fuzzer"
|
||||
fuzz_config_file = "${cert_manager_root_dir}/test/fuzz_test/cmipcservicesetusercertstatus_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
"../../../services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmipcservicesetusercertstatus_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmipcservicesetusercertstatus_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../services/cert_manager_standard:cert_manager_service",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard:cert_manager_service",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl:libcm_service_idl_standard_static",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_ipc_service.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
{
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
if (!IpcServiceApiFuzzerTest(data, size, CM_MSG_SET_USER_CERTIFICATE_STATUS,
|
||||
false, CmIpcServiceSetUserCertStatus)) {
|
||||
return false;
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,28 +20,21 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmIpcServiceUninstallAllAppCertFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file =
|
||||
"../../../test/fuzz_test/cmipcserviceuninstallallappcert_fuzzer"
|
||||
fuzz_config_file = "${cert_manager_root_dir}/test/fuzz_test/cmipcserviceuninstallallappcert_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
"../../../services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmipcserviceuninstallallappcert_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmipcserviceuninstallallappcert_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../services/cert_manager_standard:cert_manager_service",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard:cert_manager_service",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl:libcm_service_idl_standard_static",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_ipc_service.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
{
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
if (!IpcServiceApiFuzzerTest(data, size, CM_MSG_UNINSTALL_APP_CERTIFICATE,
|
||||
false, CmIpcServiceUninstallAllAppCert)) {
|
||||
return false;
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,28 +20,21 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmIpcServiceUninstallAllUserCertFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file =
|
||||
"../../../test/fuzz_test/cmipcserviceuninstallallusercert_fuzzer"
|
||||
fuzz_config_file = "${cert_manager_root_dir}/test/fuzz_test/cmipcserviceuninstallallusercert_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
"../../../services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmipcserviceuninstallallusercert_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmipcserviceuninstallallusercert_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../services/cert_manager_standard:cert_manager_service",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard:cert_manager_service",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl:libcm_service_idl_standard_static",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_ipc_service.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
{
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
if (!IpcServiceApiFuzzerTest(data, size, CM_MSG_UNINSTALL_ALL_USER_CERTIFICATE,
|
||||
false, CmIpcServiceUninstallAllUserCert)) {
|
||||
return false;
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,28 +20,21 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmIpcServiceUninstallAppCertFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file =
|
||||
"../../../test/fuzz_test/cmipcserviceuninstallappcert_fuzzer"
|
||||
fuzz_config_file = "${cert_manager_root_dir}/test/fuzz_test/cmipcserviceuninstallappcert_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
"../../../services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmipcserviceuninstallappcert_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmipcserviceuninstallappcert_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../services/cert_manager_standard:cert_manager_service",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard:cert_manager_service",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl:libcm_service_idl_standard_static",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_ipc_service.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
{
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
if (!IpcServiceApiFuzzerTest(data, size, CM_MSG_UNINSTALL_APP_CERTIFICATE,
|
||||
false, CmIpcServiceUninstallAppCert)) {
|
||||
return false;
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,28 +20,21 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmIpcServiceUninstallUserCertFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file =
|
||||
"../../../test/fuzz_test/cmipcserviceuninstallusercert_fuzzer"
|
||||
fuzz_config_file = "${cert_manager_root_dir}/test/fuzz_test/cmipcserviceuninstallusercert_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
"../../../services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmipcserviceuninstallusercert_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmipcserviceuninstallusercert_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../services/cert_manager_standard:cert_manager_service",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard:cert_manager_service",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl:libcm_service_idl_standard_static",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_ipc_service.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
{
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
if (!IpcServiceApiFuzzerTest(data, size, CM_MSG_UNINSTALL_USER_CERTIFICATE,
|
||||
false, CmIpcServiceUninstallUserCert)) {
|
||||
return false;
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,27 +20,22 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmIpcServiceUpdateFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cmipcserviceupdate_fuzzer"
|
||||
fuzz_config_file =
|
||||
"${cert_manager_root_dir}/test/fuzz_test/cmipcserviceupdate_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
"../../../services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmipcserviceupdate_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmipcserviceupdate_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../services/cert_manager_standard:cert_manager_service",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard:cert_manager_service",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl:libcm_service_idl_standard_static",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_ipc_service.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
{
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
if (!IpcServiceApiFuzzerTest(data, size, CM_MSG_UPDATE, false, CmIpcServiceUpdate)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,25 +20,20 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmIsAuthorizedAppFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cmisauthorizedapp_fuzzer"
|
||||
fuzz_config_file =
|
||||
"${cert_manager_root_dir}/test/fuzz_test/cmisauthorizedapp_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmisauthorizedapp_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmisauthorizedapp_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include "cert_manager_api.h"
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
@ -38,7 +37,7 @@ namespace OHOS {
|
||||
return false;
|
||||
}
|
||||
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
(void)CmIsAuthorizedApp(&authAppUri);
|
||||
|
||||
CmFree(myData);
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,27 +20,23 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmOnRemoteRequestFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cmonremoterequest_fuzzer"
|
||||
fuzz_config_file =
|
||||
"${cert_manager_root_dir}/test/fuzz_test/cmonremoterequest_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main/include",
|
||||
"../../../services/cert_manager_standard/cert_manager_service/main/os_dependency/sa",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmonremoterequest_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmonremoterequest_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../services/cert_manager_standard:cert_manager_service",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard:cert_manager_service",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/os_dependency:libcert_manager_service_os_dependency_standard_static",
|
||||
"${cert_manager_root_dir}/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl:libcm_service_idl_standard_static",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_sa.h"
|
||||
#include "cm_test_common.h"
|
||||
#include "message_option.h"
|
||||
#include "message_parcel.h"
|
||||
|
||||
@ -67,7 +66,7 @@ namespace OHOS {
|
||||
|
||||
MessageParcel reply;
|
||||
MessageOption option;
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
SystemAbilityOnDemandReason reason;
|
||||
(void)myService.OnStart(reason);
|
||||
(void)myService.OnRemoteRequest(code, messageData, reply, option);
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -20,25 +21,20 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
ohos_fuzztest("CmRemoveGrantedAppFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
|
||||
fuzz_config_file = "../../../test/fuzz_test/cmremovegrantedapp_fuzzer"
|
||||
fuzz_config_file =
|
||||
"${cert_manager_root_dir}/test/fuzz_test/cmremovegrantedapp_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmremovegrantedapp_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmremovegrantedapp_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include "cert_manager_api.h"
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
@ -44,7 +43,7 @@ namespace OHOS {
|
||||
return false;
|
||||
}
|
||||
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
(void)CmRemoveGrantedApp(&grantKeyUri, appUid);
|
||||
|
||||
CmFree(myData);
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,26 +20,21 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmSendRequestFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cmsendrequest_fuzzer"
|
||||
fuzz_config_file =
|
||||
"${cert_manager_root_dir}/test/fuzz_test/cmsendrequest_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../frameworks/cert_manager_standard/main/os_dependency/cm_ipc/include/",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmsendrequest_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmsendrequest_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/os_dependency:libcert_manager_ipc_client_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_param.h"
|
||||
#include "cm_request.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
@ -56,7 +55,7 @@ namespace OHOS {
|
||||
return false;
|
||||
}
|
||||
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
(void)SendRequest(type, &inBlob, &outBlob);
|
||||
|
||||
CmFree(myData);
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,25 +20,20 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmSetCertStatusFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cmsetcertstatus_fuzzer"
|
||||
fuzz_config_file =
|
||||
"${cert_manager_root_dir}/test/fuzz_test/cmsetcertstatus_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmsetcertstatus_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmsetcertstatus_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include "cert_manager_api.h"
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
@ -51,7 +50,7 @@ namespace OHOS {
|
||||
bool status;
|
||||
(void)memcpy_s(&status, sizeof(bool), myData + offset, sizeof(bool));
|
||||
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
(void)CmSetCertStatus(&sysCertUri, store, status);
|
||||
CmFree(myData);
|
||||
return true;
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/certificate_manager/cert_manager.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
@ -19,25 +20,20 @@ module_output_path = "certificate_manager/certificate_manager"
|
||||
##############################fuzztest##########################################
|
||||
ohos_fuzztest("CmSetUserCertStatusFuzzTest") {
|
||||
module_out_path = module_output_path
|
||||
fuzz_config_file = "../../../test/fuzz_test/cmsetusercertstatus_fuzzer"
|
||||
fuzz_config_file =
|
||||
"${cert_manager_root_dir}/test/fuzz_test/cmsetusercertstatus_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"../../../frameworks/cert_manager_standard/main/common/include",
|
||||
"../../../test/unittest/include",
|
||||
]
|
||||
cflags = [
|
||||
"-g",
|
||||
"-O0",
|
||||
"-Wno-unused-variable",
|
||||
"-fno-omit-frame-pointer",
|
||||
]
|
||||
sources = [
|
||||
"../../../test/unittest/src/cm_test_common.cpp",
|
||||
"cmsetusercertstatus_fuzzer.cpp",
|
||||
]
|
||||
sources = [ "cmsetusercertstatus_fuzzer.cpp" ]
|
||||
deps = [
|
||||
"../../../interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"../../../test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
"${cert_manager_root_dir}/frameworks/cert_manager_standard/main/common:libcert_manager_common_standard_static",
|
||||
"${cert_manager_root_dir}/interfaces/innerkits/cert_manager_standard/main:cert_manager_sdk",
|
||||
"${cert_manager_root_dir}/test/fuzz_test/fuzz_test_common:libcert_manager_fuzz_test_common_static",
|
||||
]
|
||||
external_deps = [
|
||||
"access_token:libaccesstoken_sdk",
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include "cert_manager_api.h"
|
||||
#include "cm_fuzz_test_common.h"
|
||||
#include "cm_test_common.h"
|
||||
|
||||
using namespace CmFuzzTest;
|
||||
namespace OHOS {
|
||||
@ -51,7 +50,7 @@ namespace OHOS {
|
||||
bool status;
|
||||
(void)memcpy_s(&status, sizeof(bool), myData + offset, sizeof(bool));
|
||||
|
||||
CertmanagerTest::SetATPermission();
|
||||
SetATPermission();
|
||||
(void)CmSetUserCertStatus(&setUserUri, userStore, status);
|
||||
|
||||
CmFree(myData);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user