Home
last modified time | relevance | path

Searched refs:certs (Results 1 - 25 of 26) sorted by relevance

12

/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/utils/
H A DCertificateUtils.java52 * @param certs certs
55 public static void verifyCertChain(List<X509Certificate> certs) throws VerifyCertificateChainException { in verifyCertChain() argument
56 if (certs.size() <= 1) { in verifyCertChain()
59 for (int i = 1; i < certs.size(); i++) { in verifyCertChain()
61 certs.get(i - 1).verify(certs.get(i).getPublicKey()); in verifyCertChain()
62 certs.get(i - 1).checkValidity(); in verifyCertChain()
63 if (!certs.get(i - 1).getIssuerDN().equals(certs in verifyCertChain()
[all...]
H A DKeyStoreHelper.java250 Certificate[] certs = keyStore.getCertificateChain(alias); in loadCertificates()
251 for (Certificate certificate : certs) { in loadCertificates()
277 * @param certs will create one if null
280 public boolean store(String alias, char[] keyPwd, KeyPair keyPair, X509Certificate[] certs) { in store() argument
286 X509Certificate[] certificates = certs; in store()
/developtools/hapsigner/hapsigntool_cpp_test/unittest/signProfile/
H A Dprofile_test.cpp368 STACK_OF(X509)* certs = pkcs7->d.sign->cert;
370 while (sk_X509_num(certs) > num) {
371 X509* cert = sk_X509_delete(certs, sk_X509_num(certs) - 1);
374 sk_X509_push(certs, sk_X509_value(certs, 0));
375 X509_up_ref(sk_X509_value(certs, 0));
421 STACK_OF(X509)* certs = pkcs7->d.sign->cert;
422 sk_X509_delete(certs, 2);
468 STACK_OF(X509)* certs
[all...]
H A Dpkcs7_data_test.cpp150 static void ReverseX509Stack(STACK_OF(X509)* certs)
152 if (certs == NULL)
155 for (int i = 0; i < sk_X509_num(certs); i++) {
156 certChain.push_back(sk_X509_value(certs, i));
159 while (sk_X509_num(certs))sk_X509_pop(certs); variable
161 sk_X509_push(certs, certChain[i]);
191 STACK_OF(X509)* certs = signer->GetCertificates(); in HWTEST_F()
192 ReverseX509Stack(certs); in HWTEST_F()
193 bool result = VerifyCertOpensslUtils::CertVerify(sk_X509_value(certs, in HWTEST_F()
[all...]
H A Dprovision_test.cpp104 STACK_OF(X509)* certs = NULL; in HWTEST_F()
105 std::shared_ptr<LocalSigner> signer = std::make_shared<LocalSigner>(pkey, certs); in HWTEST_F()
661 STACK_OF(X509)* certs = NULL; in HWTEST_F()
663 signer = std::make_shared<LocalSigner>(pkey, certs); in HWTEST_F()
698 STACK_OF(X509)* certs = NULL; in HWTEST_F()
701 std::shared_ptr<Signer> signer = std::make_shared<LocalSigner>(pkey, certs); in HWTEST_F()
736 STACK_OF(X509)* certs = sk_X509_new(NULL); in HWTEST_F()
739 std::shared_ptr<Signer> signer = std::make_shared<LocalSigner>(pkey, certs); in HWTEST_F()
777 STACK_OF(X509)* certs = signer->GetCertificates(); in HWTEST_F()
779 X509* cert = sk_X509_value(certs, in HWTEST_F()
[all...]
H A Dsign_profile_test.cpp280 STACK_OF(X509)* certs = signer->GetCertificates(); in HWTEST_F()
281 PKCS7Data::PrintCertChainSub(certs); in HWTEST_F()
282 int ret = PKCS7Data::SortX509Stack(certs); in HWTEST_F()
601 STACK_OF(X509)* certs = signer->GetCertificates(); in HWTEST_F()
602 EXPECT_TRUE(certs != NULL); in HWTEST_F()
/developtools/hapsigner/hapsigntool_cpp/profile/src/
H A Dpkcs7_data.cpp201 STACK_OF(X509)* certs = NULL; in InitPkcs7()
214 certs = signer->GetCertificates(); in InitPkcs7()
215 if (SortX509Stack(certs) < 0) { in InitPkcs7()
230 cert = sk_X509_delete(certs, 0); in InitPkcs7()
231 m_p7 = Pkcs7Sign(cert, certs, md, content, m_flags, attrs); in InitPkcs7()
240 sk_X509_pop_free(certs, X509_free); in InitPkcs7()
245 void PKCS7Data::PrintCertChainSub(const STACK_OF(X509)* certs)
247 if (certs == NULL)
250 int certNum = sk_X509_num(certs);
255 VerifyCertOpensslUtils::GetSubjectFromX509(sk_X509_value(certs,
386 sk_X509_pop(certs); global() variable
470 VerifySignerInfoCertchain(PKCS7* pkcs7, PKCS7_SIGNER_INFO* signerInfo, STACK_OF(X509)* certs, STACK_OF(X509)* certChain) const VerifySignerInfoCertchain() argument
787 Pkcs7Sign(X509* entityCert, STACK_OF(X509)* certs, const EVP_MD* hash, const std::string& content, int flags, const std::vector<PKCS7Attr>& attrs) Pkcs7Sign() argument
[all...]
/developtools/hapsigner/hapsigntool_cpp/common/src/
H A Dlocalization_adapter.cpp202 std::vector<X509*> certs = GetCertsFromFile(certPath, Options::PROFILE_CERT_FILE); in GetSignCertChain() local
203 for (int i = 0; i < static_cast<int>(certs.size()); i++) { in GetSignCertChain()
204 sk_X509_push(certificates, certs[i]); in GetSignCertChain()
256 std::vector<X509*> certs; in GetCertsFromFile() local
259 return certs; in GetCertsFromFile()
267 return certs; in GetCertsFromFile()
271 certs.emplace_back(cert); in GetCertsFromFile()
274 return certs; in GetCertsFromFile()
295 std::initializer_list<X509*> certs) in AppAndProfileAssetsRealse()
297 for (auto cert : certs) { in AppAndProfileAssetsRealse()
293 AppAndProfileAssetsRealse(std::initializer_list<EVP_PKEY*> keys, std::initializer_list<X509_REQ*> reqs, std::initializer_list<X509*> certs) AppAndProfileAssetsRealse() argument
[all...]
/developtools/hapsigner/hapsigntool_cpp/profile/include/
H A Dpkcs7_data.h96 static int SortX509Stack(STACK_OF(X509)* certs); member in OHOS::SignatureTools::PKCS7Data
98 static void PrintCertChainSub(const STACK_OF(X509)* certs); member in OHOS::SignatureTools::PKCS7Data
114 int CheckSginerInfoSignTimeInCertChainValidPeriod(PKCS7_SIGNER_INFO* signerInfo, STACK_OF(X509)* certs)const;
116 * @param certs Certificate chain (without Entity certificates)
122 STACK_OF(X509)* certs,
138 PKCS7* Pkcs7Sign(X509* signcert, STACK_OF(X509)* certs, const EVP_MD* md,
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/hap/verify/
H A DVerifyUtils.java59 Store<X509CertificateHolder> certs = cmsSignedData.getCertificates(); in verifyCmsSignedData()
62 Collection<X509CertificateHolder> collection = certs.getMatches(sid); in verifyCmsSignedData()
65 "No matched cert or more than one matched certs: " + collection); in verifyCmsSignedData()
/developtools/hapsigner/hapsigntool_cpp/signer/src/
H A Dsigner_factory.cpp34 STACK_OF(X509)*certs = adapter.GetSignCertChain(); in GetSigner()
35 std::shared_ptr<Signer> signer = std::make_shared<LocalSigner>(keyPair, certs); in GetSigner()
39 sk_X509_pop_free(certs, X509_free); in GetSigner()
/developtools/hapsigner/hapsigntool_cpp/api/include/
H A Dsign_tool_service_impl.h49 bool OutPutCertChain(std::vector<X509*>& certs, const std::string& outPutPath);
52 bool PrintX509CertChainFromMemory(std::vector<X509*> certs);
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/profile/
H A DProfileSignTool.java183 private static ASN1Set createBerSetFromCerts(List<X509Certificate> certs) throws CertificateEncodingException { in createBerSetFromCerts() argument
184 if (certs != null && certs.size() != 0) { in createBerSetFromCerts()
185 ASN1EncodableVector vector = new ASN1EncodableVector(certs.size()); in createBerSetFromCerts()
186 for (X509Certificate cert : certs) { in createBerSetFromCerts()
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/hap/sign/
H A DBcPkcs7Generator.java114 ASN1Set certs = null; in packagePKCS7()
119 certs = createBerSetFromCerts(signerConfig.getCertificates()); in packagePKCS7()
125 new ASN1Integer(1), algorithmIdLst, contentInfo, certs, crls, signerInfoLst); in packagePKCS7()
219 private ASN1Set createBerSetFromCerts(List<X509Certificate> certs) throws CertificateEncodingException { in createBerSetFromCerts() argument
220 if (certs == null || certs.size() == 0) { in createBerSetFromCerts()
225 for (X509Certificate cert : certs) { in createBerSetFromCerts()
/developtools/hapsigner/hapsigntool_cpp_test/fuzztest/profile/profile001_fuzzer/
H A Dprofile001_fuzzer.cpp82 STACK_OF(X509)* certs = signer->GetCertificates(); in SignProfileTest002()
83 PKCS7Data::PrintCertChainSub(certs); in SignProfileTest002()
/developtools/hapsigner/hapsigntool_cpp/common/include/
H A Dlocalization_adapter.h48 std::initializer_list<X509*> certs);
/developtools/hapsigner/hapsigntool_cpp/hap/verify/include/
H A Dverify_hap.h57 bool HapOutPutCertChain(std::vector<X509*>& certs, const std::string& outPutPath);
/developtools/hapsigner/hapsigntool_cpp/utils/include/
H A Dverify_cert_openssl_utils.h43 DLL_EXPORT static void GenerateCertSignFromCertStack(STACK_OF(X509)* certs, CertSign& certVisitSign); member in OHOS::SignatureTools::VerifyCertOpensslUtils
/developtools/hapsigner/hapsigntool_cpp/api/src/
H A Dsign_tool_service_impl.cpp555 bool SignToolServiceImpl::OutPutCertChain(std::vector<X509*>& certs, const std::string& outPutPath) in OutPutCertChain() argument
563 for (auto cert : certs) { in OutPutCertChain()
639 bool SignToolServiceImpl::PrintX509CertChainFromMemory(std::vector<X509*> certs) in PrintX509CertChainFromMemory() argument
641 for (auto cert : certs) { in PrintX509CertChainFromMemory()
/developtools/hapsigner/hapsigntool_cpp/codesigning/sign/src/
H A Dcode_signing.cpp517 STACK_OF(X509)* certs = NULL; in GenerateSignature()
518 certs = signer->GetCertificates(); in GenerateSignature()
519 if (certs == nullptr) { in GenerateSignature()
524 sk_X509_pop_free(certs, X509_free); in GenerateSignature()
/developtools/hapsigner/hapsigntool_cpp/hap/verify/src/
H A Dverify_hap.cpp116 bool VerifyHap::HapOutPutCertChain(std::vector<X509*>& certs, const std::string& outPutPath) in HapOutPutCertChain() argument
119 if (!PrintCertChainToCmd(certs)) { in HapOutPutCertChain()
127 for (auto& cert : certs) { in HapOutPutCertChain()
/developtools/hapsigner/hapsigntool_cpp_test/unittest/generateCA/
H A Dgenerate_general_ca_test.cpp1107 std::string path = "certs"; in HWTEST_F()
1214 std::vector<X509*> certs; in HWTEST_F() local
1215 certs.push_back(cert1); in HWTEST_F()
1216 certs.push_back(cert2); in HWTEST_F()
1217 certs.push_back(cert3); in HWTEST_F()
1218 bool ret = api.OutPutCertChain(certs, path); in HWTEST_F()
1235 std::vector<X509*> certs; in HWTEST_F() local
1236 certs.push_back(cert1); in HWTEST_F()
1237 certs.push_back(cert2); in HWTEST_F()
1238 certs in HWTEST_F()
[all...]
/developtools/hapsigner/hapsigntool_cpp_test/unittest/hapVerify/
H A Dhap_signer_block_utils_test.cpp615 CertChain certs; in HWTEST_F() local
617 certs.push_back(cert1); in HWTEST_F()
618 pkcs7Context.certChain.push_back(certs); in HWTEST_F()
H A Dhap_verify_test.cpp925 STACK_OF(X509)* certs = sk_X509_new_null(); in HWTEST_F()
926 sk_X509_push(certs, nullptr); in HWTEST_F()
928 VerifyCertOpensslUtils::GenerateCertSignFromCertStack(certs, certVisitSign1); in HWTEST_F()
929 sk_X509_pop_free(certs, X509_free); in HWTEST_F()
/developtools/hapsigner/hapsigntool_cpp_test/unittest/hapSign/
H A Dhap_sign_test.cpp1310 STACK_OF(X509) *certs = sk_X509_new_null(); in HWTEST_F()
1311 sk_X509_push(certs, newCert); in HWTEST_F()
1312 signerConfig.SetCertificates(certs); in HWTEST_F()

Completed in 22 milliseconds

12