Home
last modified time | relevance | path

Searched refs:p7 (Results 1 - 17 of 17) sorted by relevance

/developtools/hapsigner/hapsigntool_cpp/utils/src/
H A Dverify_hap_openssl_utils.cpp53 pkcs7Context.p7 = d2i_PKCS7(nullptr, &packageData, packageLen); in ParsePkcs7Package()
54 if (!CheckPkcs7SignedDataIsValid(pkcs7Context.p7)) { in ParsePkcs7Package()
56 SIGNATURE_TOOLS_LOGE("p7 is invalid"); in ParsePkcs7Package()
59 if (!GetContentInfo(pkcs7Context.p7->d.sign->contents, pkcs7Context.content)) { in ParsePkcs7Package()
66 bool VerifyHapOpensslUtils::GetCertChains(PKCS7* p7, Pkcs7Context& pkcs7Context) in GetCertChains() argument
68 if (!CheckPkcs7SignedDataIsValid(p7)) { in GetCertChains()
69 SIGNATURE_TOOLS_LOGE("p7 is invalid"); in GetCertChains()
73 VerifyCertOpensslUtils::GenerateCertSignFromCertStack(p7->d.sign->cert, certVisitSign); in GetCertChains()
74 Pkcs7SignerInfoStack* signerInfoStack = PKCS7_get_signer_info(p7); in GetCertChains()
93 X509* cert = PKCS7_cert_from_signer_info(p7, signInf in GetCertChains()
111 VerifyCertChain(CertChain& certsChain, PKCS7* p7, PKCS7_SIGNER_INFO* signInfo, Pkcs7Context& pkcs7Context, CertSign& certVisitSign) VerifyCertChain() argument
128 CheckPkcs7SignedDataIsValid(const PKCS7* p7) CheckPkcs7SignedDataIsValid() argument
136 GetCrlStack(PKCS7* p7, STACK_OF(X509_CRL)* x509Crl) GetCrlStack() argument
[all...]
H A Dstring_utils.cpp82 std::string StringUtils::Pkcs7ToString(PKCS7* p7) in Pkcs7ToString() argument
85 int outSize = i2d_PKCS7(p7, &out); in Pkcs7ToString()
/developtools/hapsigner/hapsigntool_cpp_test/unittest/hapSign/
H A Dhap_openssl_utils_test.cpp170 pkcs7Context.p7 = PKCS7_new(); in HWTEST_F()
171 PKCS7_set_type(pkcs7Context.p7, NID_pkcs7_signed); in HWTEST_F()
172 PKCS7_content_new(pkcs7Context.p7, NID_pkcs7_data); in HWTEST_F()
186 pkcs7Context.p7 = PKCS7_new(); in HWTEST_F()
187 PKCS7_set_type(pkcs7Context.p7, NID_pkcs7_data); in HWTEST_F()
201 pkcs7Context.p7 = PKCS7_new(); in HWTEST_F()
202 PKCS7_set_type(pkcs7Context.p7, NID_pkcs7_signed); in HWTEST_F()
215 PKCS7* p7 = nullptr; in HWTEST_F() local
217 bool ret = VerifyHapOpensslUtils::GetCertChains(p7, pkcs7Context); in HWTEST_F()
230 pkcs7Context.p7 in HWTEST_F()
[all...]
/developtools/hapsigner/hapsigntool_cpp/common/include/
H A Dpkcs7_context.h36 PKCS7* p7; member
41 p7(nullptr), certChain(), content() in Pkcs7Context()
46 if (p7 != nullptr) { in ~Pkcs7Context()
47 PKCS7_free(p7); in ~Pkcs7Context()
48 p7 = nullptr; in ~Pkcs7Context()
/developtools/hapsigner/hapsigntool_cpp/codesigning/utils/src/
H A Dcms_utils.cpp49 PKCS7* p7 = d2i_PKCS7(NULL, &data, static_cast<long>(signature.size())); in CheckOwnerID() local
50 if (p7 == nullptr) { in CheckOwnerID()
54 STACK_OF(PKCS7_SIGNER_INFO)* signerInfosk = PKCS7_get_signer_info(p7); in CheckOwnerID()
56 PKCS7_free(p7); in CheckOwnerID()
70 PKCS7_free(p7); in CheckOwnerID()
76 PKCS7_free(p7); in CheckOwnerID()
86 PKCS7_free(p7); in CheckOwnerID()
91 PKCS7_free(p7); in CheckOwnerID()
/developtools/hapsigner/hapsigntool_cpp/utils/include/
H A Dverify_hap_openssl_utils.h39 DLL_EXPORT static bool GetCertChains(PKCS7* p7, Pkcs7Context& pkcs7Context);
41 DLL_EXPORT static bool GetCrlStack(PKCS7* p7, STACK_OF(X509_CRL)* x509Crl);
50 static bool VerifyCertChain(CertChain& certsChain, PKCS7* p7, PKCS7_SIGNER_INFO* signInfo,
53 static bool CheckPkcs7SignedDataIsValid(const PKCS7* p7);
H A Dstring_utils.h38 static std::string Pkcs7ToString(PKCS7* p7);
/developtools/hapsigner/hapsigntool_cpp/profile/include/
H A Dpkcs7_data.h120 int VerifySignerInfoCertchain(PKCS7* p7,
134 int Pkcs7DataFinal(PKCS7* p7, BIO* bio);
136 int Pkcs7Final(PKCS7* p7, const std::string& content, int flags);
/developtools/hapsigner/hapsigntool_cpp_test/unittest/signProfile/
H A Dsign_profile_test.cpp355 PKCS7Data p7; in HWTEST_F() local
356 int result = p7.Parse(p7b); in HWTEST_F()
372 PKCS7Data p7; in HWTEST_F() local
374 int result = p7.Parse(p7b_); in HWTEST_F()
412 PKCS7Data p7; in HWTEST_F() local
414 int result = p7.Sign(content, signer, "SHA384withECDSA", p7b); in HWTEST_F()
452 PKCS7Data p7(PKCS7_DETACHED_FLAGS); in HWTEST_F()
454 int result = p7.Sign(content, signer, "SHA384withECDSA", p7b); in HWTEST_F()
470 PKCS7Data p7; in HWTEST_F() local
471 int result = p7 in HWTEST_F()
488 PKCS7Data p7; HWTEST_F() local
[all...]
H A Dprofile_test.cpp361 PKCS7Data p7;
364 int result = p7.Sign(content, signer, "SHA384withECDSA", p7b);
380 result = p7.Parse(p7b);
382 result = p7.Verify();
414 PKCS7Data p7;
417 int result = p7.Sign(content, signer, "SHA384withECDSA", p7b);
427 result = p7.Parse(p7b);
429 result = p7.Verify();
461 PKCS7Data p7;
464 int result = p7
[all...]
/developtools/hapsigner/hapsigntool_cpp/hap/verify/src/
H A Dverify_hap.cpp64 bool VerifyHap::HapOutPutPkcs7(PKCS7* p7, const std::string& outPutPath) in HapOutPutPkcs7() argument
66 std::string p7bContent = StringUtils::Pkcs7ToString(p7); in HapOutPutPkcs7()
209 if (!VerifyHapOpensslUtils::GetCrlStack(pkcs7Context.p7, x509Crl)) { in Verify()
328 if (!VerifyHapOpensslUtils::GetCertChains(pkcs7Context.p7, pkcs7Context)) { in VerifyAppPkcs7()
393 if (pkcs7Context.p7 == nullptr) { in WriteVerifyOutput()
402 bool pkcs7flag = VerifyHap::HapOutPutPkcs7(pkcs7Context.p7, options->GetString(Options::OUT_PROFILE)); in WriteVerifyOutput()
/developtools/hapsigner/hapsigntool_cpp_test/fuzztest/profile/profile001_fuzzer/
H A Dprofile001_fuzzer.cpp50 PKCS7Data p7; in SignProfileTest001() local
52 int result = p7.Sign(content, signer, signAlg, p7b); in SignProfileTest001()
/developtools/hapsigner/hapsigntool_cpp/hap/verify/include/
H A Dverify_hap.h48 bool HapOutPutPkcs7(PKCS7* p7, const std::string& outPutPath);
/developtools/hapsigner/hapsigntool_cpp/profile/src/
H A Dpkcs7_data.cpp29 static int PKCS7AddAttribute(PKCS7* p7, const std::vector<PKCS7Attr>& attrs) in PKCS7AddAttribute() argument
31 STACK_OF(PKCS7_SIGNER_INFO)* signerInfos = PKCS7_get_signer_info(p7); in PKCS7AddAttribute()
50 static int I2dPkcs7Str(PKCS7* p7, std::string& ret) in I2dPkcs7Str() argument
56 outSize = i2d_PKCS7(p7, &out); in I2dPkcs7Str()
147 /* If p7 has been initialized, it will be released */ in Parse()
191 static void PKCS7AddCrls(PKCS7* p7, STACK_OF(X509_CRL)* crls) in PKCS7AddCrls() argument
194 PKCS7_add_crl(p7, sk_X509_CRL_value(crls, i)); in PKCS7AddCrls()
233 PrintErrorNumberMsg("INVALIDPARAM_ERROR", SIGN_ERROR, "p7 is NULL, pkcs7 sign failed"); in InitPkcs7()
/developtools/hapsigner/hapsigntool_cpp_test/unittest/hapVerify/
H A Dhap_verify_test.cpp327 PKCS7* p7 = nullptr; in HWTEST_F() local
329 bool ret = verify.HapOutPutPkcs7(p7, outPutPath); in HWTEST_F()
537 PKCS7* p7 = nullptr; in HWTEST_F() local
539 bool ret = verify.HapOutPutPkcs7(p7, outPutPath); in HWTEST_F()
H A Dhap_signer_block_utils_test.cpp614 pkcs7Context.p7 = pkcs7; in HWTEST_F()
/developtools/hapsigner/hapsigntool_cpp_test/unittest/generateCA/
H A Dgenerate_sub_ca_test.cpp802 PKCS7* p7 = nullptr; in HWTEST_F() local
804 bool ret = VerifyHapOpensslUtils::GetCertChains(p7, pkcs7Context); in HWTEST_F()
815 PKCS7* p7 = PKCS7_new(); in HWTEST_F() local
817 bool ret = VerifyHapOpensslUtils::GetCertChains(p7, pkcs7Context); in HWTEST_F()
818 PKCS7_free(p7); in HWTEST_F()

Completed in 14 milliseconds