From ffedef6ef331377bfef5996108e0fa2be3f186fa Mon Sep 17 00:00:00 2001 From: winnie-hu Date: Tue, 27 Dec 2022 11:33:05 +0800 Subject: [PATCH] add inner kits define for external_deps Signed-off-by: winnie-hu --- BUILD.gn | 26 +++--------- bundle.json | 41 +++++++++++++++++-- frameworks/BUILD.gn | 4 +- .../x509certificate_fuzzer/BUILD.gn | 6 +-- .../certificate/x509crl_fuzzer/BUILD.gn | 3 +- .../hcfciphercreate_fuzzer/BUILD.gn | 6 +-- .../hcfkeyagreementcreate_fuzzer/BUILD.gn | 6 +-- .../hcfmaccreate_fuzzer/BUILD.gn | 6 +-- .../hcfmdcreate_fuzzer/BUILD.gn | 6 +-- .../hcfsigncreate_fuzzer/BUILD.gn | 6 +-- .../hcfverifycreate_fuzzer/BUILD.gn | 6 +-- .../key/asykeygenerator_fuzzer/BUILD.gn | 6 +-- .../key/symkeygenerator_fuzzer/BUILD.gn | 3 +- .../rand/hcfrandcreate_fuzzer/BUILD.gn | 6 +-- 14 files changed, 65 insertions(+), 66 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 468f633..45ca4f0 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -11,25 +11,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -group("crypto_framework_lib") { - if (os_level == "standard") { - deps = - [ "//base/security/crypto_framework/frameworks:crypto_framework_lib" ] - } -} - -group("crypto_openssl_plugin_lib") { - if (os_level == "standard") { - deps = - [ "//base/security/crypto_framework/plugin:crypto_openssl_plugin_lib" ] - } -} - -group("cryptoframework_napi") { +group("crypto_framework_component") { if (os_level == "standard") { deps = [ - "//base/security/crypto_framework/frameworks/js/napi/certificate:cert_napi", - "//base/security/crypto_framework/frameworks/js/napi/crypto:cryptoframework_napi", + "frameworks:crypto_framework_lib", + "frameworks/js/napi/certificate:cert_napi", + "frameworks/js/napi/crypto:cryptoframework_napi", + "plugin:crypto_openssl_plugin_lib", ] } } @@ -37,9 +25,7 @@ group("cryptoframework_napi") { group("crypto_framework_test") { testonly = true if (os_level == "standard") { - deps = [ - "//base/security/crypto_framework/test/unittest:crypto_framework_test", - ] + deps = [ "test/unittest:crypto_framework_test" ] } } diff --git a/bundle.json b/bundle.json index 3ff987c..6ed02db 100644 --- a/bundle.json +++ b/bundle.json @@ -32,11 +32,44 @@ }, "build": { "sub_component": [ - "//base/security/crypto_framework:crypto_framework_lib", - "//base/security/crypto_framework:crypto_openssl_plugin_lib", - "//base/security/crypto_framework:cryptoframework_napi" + "//base/security/crypto_framework:crypto_framework_component" + ], + "inner_kits": [ + { + "name": "//base/security/crypto_framework/frameworks:crypto_framework_lib", + "header": { + "header_files": [ + "algorithm_parameter/algorithm_parameter.h", + "algorithm_parameter/detailed_ccm_params.h", + "algorithm_parameter/detailed_gcm_params.h", + "algorithm_parameter/detailed_iv_params.h", + "certificate/cert_chain_validator.h", + "certificate/certificate.h", + "certificate/crl.h", + "certificate/x509_certificate.h", + "certificate/x509_crl_entry.h", + "certificate/x509_crl.h", + "common/blob.h", + "common/object_base.h", + "common/result.h", + "crypto_operation/cipher.h", + "crypto_operation/key_agreement.h", + "crypto_operation/mac.h", + "crypto_operation/md.h", + "crypto_operation/signature.h", + "key/asy_key_generator.h", + "key/key_pair.h", + "key/key.h", + "key/pri_key.h", + "key/pub_key.h", + "key/sym_key_generator.h", + "key/sym_key.h", + "rand/rand.h" + ], + "header_base": "//base/security/crypto_framework/interfaces/innerkits" + } + } ], - "inner_kits": [], "test": [ "//base/security/crypto_framework:crypto_framework_test", "//base/security/crypto_framework:crypto_framework_fuzztest" diff --git a/frameworks/BUILD.gn b/frameworks/BUILD.gn index c816180..6613613 100644 --- a/frameworks/BUILD.gn +++ b/frameworks/BUILD.gn @@ -53,8 +53,8 @@ ohos_shared_library("crypto_framework_lib") { ] deps = [ - "//base/security/crypto_framework:crypto_openssl_plugin_lib", - "//base/security/crypto_framework/common:crypto_plugin_common", + "../common:crypto_plugin_common", + "../plugin:crypto_openssl_plugin_lib", ] external_deps = [ diff --git a/test/fuzztest/certificate/x509certificate_fuzzer/BUILD.gn b/test/fuzztest/certificate/x509certificate_fuzzer/BUILD.gn index 8bcdd80..3a19b37 100755 --- a/test/fuzztest/certificate/x509certificate_fuzzer/BUILD.gn +++ b/test/fuzztest/certificate/x509certificate_fuzzer/BUILD.gn @@ -30,13 +30,11 @@ ohos_fuzztest("X509CertificateFuzzTest") { "-fno-omit-frame-pointer", ] sources = [ "x509certificate_fuzzer.cpp" ] - deps = [ - "//base/security/crypto_framework:crypto_framework_lib", - "//third_party/bounds_checking_function:libsec_shared", - ] + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] external_deps = [ "c_utils:utils", + "crypto_framework:crypto_framework_lib", "hiviewdfx_hilog_native:libhilog", ] } diff --git a/test/fuzztest/certificate/x509crl_fuzzer/BUILD.gn b/test/fuzztest/certificate/x509crl_fuzzer/BUILD.gn index 14f0842..1efffe8 100755 --- a/test/fuzztest/certificate/x509crl_fuzzer/BUILD.gn +++ b/test/fuzztest/certificate/x509crl_fuzzer/BUILD.gn @@ -42,14 +42,13 @@ ohos_fuzztest("X509CrlFuzzTest") { } deps = [ - "//base/security/crypto_framework:crypto_framework_lib", - "//base/security/crypto_framework:crypto_openssl_plugin_lib", "//third_party/bounds_checking_function:libsec_shared", "//third_party/openssl:libcrypto_shared", ] external_deps = [ "c_utils:utils", + "crypto_framework:crypto_framework_lib", "hiviewdfx_hilog_native:libhilog", ] } diff --git a/test/fuzztest/crypto_operation/hcfciphercreate_fuzzer/BUILD.gn b/test/fuzztest/crypto_operation/hcfciphercreate_fuzzer/BUILD.gn index a96af87..b72ab87 100755 --- a/test/fuzztest/crypto_operation/hcfciphercreate_fuzzer/BUILD.gn +++ b/test/fuzztest/crypto_operation/hcfciphercreate_fuzzer/BUILD.gn @@ -30,13 +30,11 @@ ohos_fuzztest("HcfCipherCreateFuzzTest") { "-fno-omit-frame-pointer", ] sources = [ "hcfciphercreate_fuzzer.cpp" ] - deps = [ - "//base/security/crypto_framework:crypto_framework_lib", - "//third_party/bounds_checking_function:libsec_shared", - ] + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] external_deps = [ "c_utils:utils", + "crypto_framework:crypto_framework_lib", "hiviewdfx_hilog_native:libhilog", ] } diff --git a/test/fuzztest/crypto_operation/hcfkeyagreementcreate_fuzzer/BUILD.gn b/test/fuzztest/crypto_operation/hcfkeyagreementcreate_fuzzer/BUILD.gn index 2373526..6c524bb 100755 --- a/test/fuzztest/crypto_operation/hcfkeyagreementcreate_fuzzer/BUILD.gn +++ b/test/fuzztest/crypto_operation/hcfkeyagreementcreate_fuzzer/BUILD.gn @@ -30,13 +30,11 @@ ohos_fuzztest("HcfKeyAgreementCreateFuzzTest") { "-fno-omit-frame-pointer", ] sources = [ "hcfkeyagreementcreate_fuzzer.cpp" ] - deps = [ - "//base/security/crypto_framework:crypto_framework_lib", - "//third_party/bounds_checking_function:libsec_shared", - ] + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] external_deps = [ "c_utils:utils", + "crypto_framework:crypto_framework_lib", "hiviewdfx_hilog_native:libhilog", ] } diff --git a/test/fuzztest/crypto_operation/hcfmaccreate_fuzzer/BUILD.gn b/test/fuzztest/crypto_operation/hcfmaccreate_fuzzer/BUILD.gn index 40439ff..7355009 100755 --- a/test/fuzztest/crypto_operation/hcfmaccreate_fuzzer/BUILD.gn +++ b/test/fuzztest/crypto_operation/hcfmaccreate_fuzzer/BUILD.gn @@ -30,13 +30,11 @@ ohos_fuzztest("HcfMacCreateFuzzTest") { "-fno-omit-frame-pointer", ] sources = [ "hcfmaccreate_fuzzer.cpp" ] - deps = [ - "//base/security/crypto_framework:crypto_framework_lib", - "//third_party/bounds_checking_function:libsec_shared", - ] + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] external_deps = [ "c_utils:utils", + "crypto_framework:crypto_framework_lib", "hiviewdfx_hilog_native:libhilog", ] } diff --git a/test/fuzztest/crypto_operation/hcfmdcreate_fuzzer/BUILD.gn b/test/fuzztest/crypto_operation/hcfmdcreate_fuzzer/BUILD.gn index 5345931..0544d2d 100755 --- a/test/fuzztest/crypto_operation/hcfmdcreate_fuzzer/BUILD.gn +++ b/test/fuzztest/crypto_operation/hcfmdcreate_fuzzer/BUILD.gn @@ -30,13 +30,11 @@ ohos_fuzztest("HcfMdCreateFuzzTest") { "-fno-omit-frame-pointer", ] sources = [ "hcfmdcreate_fuzzer.cpp" ] - deps = [ - "//base/security/crypto_framework:crypto_framework_lib", - "//third_party/bounds_checking_function:libsec_shared", - ] + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] external_deps = [ "c_utils:utils", + "crypto_framework:crypto_framework_lib", "hiviewdfx_hilog_native:libhilog", ] } diff --git a/test/fuzztest/crypto_operation/hcfsigncreate_fuzzer/BUILD.gn b/test/fuzztest/crypto_operation/hcfsigncreate_fuzzer/BUILD.gn index d3ec343..419f7e3 100755 --- a/test/fuzztest/crypto_operation/hcfsigncreate_fuzzer/BUILD.gn +++ b/test/fuzztest/crypto_operation/hcfsigncreate_fuzzer/BUILD.gn @@ -30,13 +30,11 @@ ohos_fuzztest("HcfSignCreateFuzzTest") { "-fno-omit-frame-pointer", ] sources = [ "hcfsigncreate_fuzzer.cpp" ] - deps = [ - "//base/security/crypto_framework:crypto_framework_lib", - "//third_party/bounds_checking_function:libsec_shared", - ] + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] external_deps = [ "c_utils:utils", + "crypto_framework:crypto_framework_lib", "hiviewdfx_hilog_native:libhilog", ] } diff --git a/test/fuzztest/crypto_operation/hcfverifycreate_fuzzer/BUILD.gn b/test/fuzztest/crypto_operation/hcfverifycreate_fuzzer/BUILD.gn index fd0cd8d..66c370a 100755 --- a/test/fuzztest/crypto_operation/hcfverifycreate_fuzzer/BUILD.gn +++ b/test/fuzztest/crypto_operation/hcfverifycreate_fuzzer/BUILD.gn @@ -30,13 +30,11 @@ ohos_fuzztest("HcfVerifyCreateFuzzTest") { "-fno-omit-frame-pointer", ] sources = [ "hcfverifycreate_fuzzer.cpp" ] - deps = [ - "//base/security/crypto_framework:crypto_framework_lib", - "//third_party/bounds_checking_function:libsec_shared", - ] + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] external_deps = [ "c_utils:utils", + "crypto_framework:crypto_framework_lib", "hiviewdfx_hilog_native:libhilog", ] } diff --git a/test/fuzztest/key/asykeygenerator_fuzzer/BUILD.gn b/test/fuzztest/key/asykeygenerator_fuzzer/BUILD.gn index 551714b..7bf850e 100755 --- a/test/fuzztest/key/asykeygenerator_fuzzer/BUILD.gn +++ b/test/fuzztest/key/asykeygenerator_fuzzer/BUILD.gn @@ -30,13 +30,11 @@ ohos_fuzztest("AsyKeyGeneratorFuzzTest") { "-fno-omit-frame-pointer", ] sources = [ "asykeygenerator_fuzzer.cpp" ] - deps = [ - "//base/security/crypto_framework:crypto_framework_lib", - "//third_party/bounds_checking_function:libsec_shared", - ] + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] external_deps = [ "c_utils:utils", + "crypto_framework:crypto_framework_lib", "hiviewdfx_hilog_native:libhilog", ] } diff --git a/test/fuzztest/key/symkeygenerator_fuzzer/BUILD.gn b/test/fuzztest/key/symkeygenerator_fuzzer/BUILD.gn index d22e67c..698bf99 100755 --- a/test/fuzztest/key/symkeygenerator_fuzzer/BUILD.gn +++ b/test/fuzztest/key/symkeygenerator_fuzzer/BUILD.gn @@ -43,14 +43,13 @@ ohos_fuzztest("SymKeyGeneratorFuzzTest") { } deps = [ - "//base/security/crypto_framework:crypto_framework_lib", - "//base/security/crypto_framework:crypto_openssl_plugin_lib", "//third_party/bounds_checking_function:libsec_shared", "//third_party/openssl:libcrypto_shared", ] external_deps = [ "c_utils:utils", + "crypto_framework:crypto_framework_lib", "hiviewdfx_hilog_native:libhilog", ] } diff --git a/test/fuzztest/rand/hcfrandcreate_fuzzer/BUILD.gn b/test/fuzztest/rand/hcfrandcreate_fuzzer/BUILD.gn index 43f6bd2..597ca5e 100755 --- a/test/fuzztest/rand/hcfrandcreate_fuzzer/BUILD.gn +++ b/test/fuzztest/rand/hcfrandcreate_fuzzer/BUILD.gn @@ -32,13 +32,11 @@ ohos_fuzztest("HcfRandCreateFuzzTest") { "-fno-omit-frame-pointer", ] sources = [ "hcfrandcreate_fuzzer.cpp" ] - deps = [ - "//base/security/crypto_framework:crypto_framework_lib", - "//third_party/bounds_checking_function:libsec_shared", - ] + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] external_deps = [ "c_utils:utils", + "crypto_framework:crypto_framework_lib", "hiviewdfx_hilog_native:libhilog", ] } -- Gitee