Home
last modified time | relevance | path

Searched refs:signer (Results 1 - 25 of 29) sorted by relevance

12

/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/hap/config/
H A DSignerConfig.java21 import com.ohos.hapsigntool.signer.ISigner;
22 import com.ohos.hapsigntool.signer.SignerFactory;
64 private ISigner signer; field in SignerConfig
95 if (isInputCertChainNotEmpty() || signer == null) { in getCertificates()
98 return signer.getCertificates(); in getCertificates()
116 if (isInputCertChainNotEmpty() || isInputCrlNotEmpty() || signer == null) { in getX509CRLs()
119 return signer.getCrls(); in getX509CRLs()
168 * get signer
170 * @return content signer
173 if (signer in getSigner()
[all...]
/developtools/hapsigner/hapsigntool_cpp/hap/config/src/
H A Dsigner_config.cpp27 signer(nullptr), in SignerConfig()
57 if (IsInputCertChainNotEmpty() || signer == nullptr) { in GetCertificates()
60 return signer->GetCertificates(); in GetCertificates()
70 if (IsInputCertChainNotEmpty() || IsInputCrlNotEmpty() || signer == nullptr) { in GetX509CRLs()
73 return signer->GetCrls(); in GetX509CRLs()
103 // if (signer == nullptr) { in GetSigner()
106 // signer = factory.GetSigner(adapter); in GetSigner()
108 return signer; in GetSigner()
/developtools/hapsigner/hapsigntool_cpp/profile/src/
H A Dprofile_sign_tool.cpp36 std::shared_ptr<Signer> signer(signerFactory->GetSigner(adapter)); in GenerateP7b()
37 if (signer == NULL) { in GenerateP7b()
38 SIGNATURE_TOOLS_LOGE("signer is NULL, get signer failed"); in GenerateP7b()
43 result = SignProfile(content, signer, sigAlg, ret) < 0; in GenerateP7b()
63 * @param signer signer
68 int ProfileSignTool::SignProfile(const std::string& content, const std::shared_ptr<Signer>& signer,
73 result = p7Data.Sign(content, signer, sigAlg, ret);
H A Dpkcs7_data.cpp19 #include "signer.h"
34 "signer info count not equal 1,pkcs7 add customize attribute failed"); in PKCS7AddAttribute()
115 int PKCS7Data::Sign(const std::string& content, const std::shared_ptr<Signer>& signer, in Sign() argument
119 if ((result = InitPkcs7(content, signer, sigAlg, attrs)) < 0) { in Sign()
198 int PKCS7Data::InitPkcs7(const std::string& content, const std::shared_ptr<Signer>& signer, in InitPkcs7() argument
207 if (signer == NULL) { in InitPkcs7()
208 PrintErrorNumberMsg("INVALIDPARAM_ERROR", INVALIDPARAM_ERROR, "signer is NULL , sign failed"); in InitPkcs7()
212 m_signer = signer; in InitPkcs7()
214 certs = signer->GetCertificates(); in InitPkcs7()
237 PKCS7AddCrls(m_p7, signer in InitPkcs7()
[all...]
/developtools/hapsigner/hapsigntool_cpp/hap/sign/src/
H A Dbc_pkcs7_generator.cpp49 std::shared_ptr<Signer> signer(factory.GetSigner(adapter)); in GenerateSignedData()
50 if (signer == NULL) { in GenerateSignedData()
51 SIGNATURE_TOOLS_LOGE("signer is NULL"); in GenerateSignedData()
59 result = PackagePKCS7(content, signer, sigAlg, ret); in GenerateSignedData()
66 int BCPkcs7Generator::PackagePKCS7(const std::string& content, const std::shared_ptr<Signer>& signer, in PackagePKCS7() argument
71 result = p7Data.Sign(content, signer, sigAlg, ret); in PackagePKCS7()
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/profile/
H A DProfileSignTool.java23 import com.ohos.hapsigntool.signer.ISigner;
24 import com.ohos.hapsigntool.signer.SignerFactory;
89 ISigner signer = new SignerFactory().getSigner(adapter); in generateP7b()
90 byte[] p7b = signProfile(content, signer, adapter.getSignAlg()); in generateP7b()
107 * @param signer signer
111 public static byte[] signProfile(byte[] content, ISigner signer, String sigAlg) { in signProfile() argument
119 byte[] signature = signer.getSignature(signedAttr.getEncoded("DER"), sigAlg, null); in signProfile()
121 VerifyHelper.verifySignature(signer.getCertificates().get(0), signature, in signProfile()
123 SignerIdentifier signerIdentifier = generateSignerIdentifier(signer in signProfile()
[all...]
H A DVerifyHelper.java145 for (SignerInformation signer : signers) { in verify()
146 SignerId sid = signer.getSID(); in verify()
147 Date signTime = getSignTime(signer); in verify()
167 Date getSignTime(SignerInformation signer) { in getSignTime() argument
170 Attribute attribute = signer.getSignedAttributes().get(PKCSObjectIdentifiers.pkcs_9_at_signingTime); in getSignTime()
/developtools/hapsigner/hapsigntool_cpp/signer/src/
H A Dsigner_factory.cpp29 SIGNATURE_TOOLS_LOGE("key is NULL, get signer failed"); in GetSigner()
35 std::shared_ptr<Signer> signer = std::make_shared<LocalSigner>(keyPair, certs); in GetSigner() local
36 if (signer == NULL) { in GetSigner()
37 SIGNATURE_TOOLS_LOGE("signer is NULL, create LocalSigner failed"); in GetSigner()
42 return signer; in GetSigner()
78 Signer* signer = remoteSignerCreator(keyAliasType, signServerType, onlineAuthModeType, usernameType, userPwdType); in LoadRemoteSigner() local
84 std::shared_ptr<Signer> remoteSigner(signer); in LoadRemoteSigner()
/developtools/hapsigner/hapsigntool_cpp/codesigning/sign/src/
H A Dbc_signeddata_generator.cpp49 std::shared_ptr<Signer> signer(factory.GetSigner(adapter)); in GenerateSignedData()
50 // std::shared_ptr<Signer> signer = signerConfig->GetSigner(); in GenerateSignedData()
51 if (signer == NULL) { in GenerateSignedData()
53 "signer is NULL"); in GenerateSignedData()
61 result = PackageSignedData(content, signer, sigAlg, ret); in GenerateSignedData()
74 int BCSignedDataGenerator::PackageSignedData(const std::string& content, const std::shared_ptr<Signer>& signer, in PackageSignedData() argument
88 result = p7Data.Sign(content, signer, sigAlg, ret, attrs); in PackageSignedData()
/developtools/hapsigner/hapsigntool_cpp_test/unittest/signProfile/
H A Dprovision_test.cpp105 std::shared_ptr<LocalSigner> signer = std::make_shared<LocalSigner>(pkey, certs); in HWTEST_F() local
106 STACK_OF(X509_CRL)* crls = signer->GetCrls(); in HWTEST_F()
144 std::shared_ptr<Signer> signer = factory.GetSigner(adapter); in HWTEST_F() local
145 std::string signature1 = signer->GetSignature(content, "SHA384withECDSA"); in HWTEST_F()
147 std::string signature2 = signer->GetSignature(content, "SHA256withECDSA"); in HWTEST_F()
149 std::string signature3 = signer->GetSignature(content, "SHA999withECDSA"); in HWTEST_F()
151 std::string signature4 = signer->GetSignature("", "SHA384withECDSA"); in HWTEST_F()
526 std::shared_ptr<Signer> signer = factory.GetSigner(adapter); in HWTEST_F() local
529 int result = ProfileSignTool::SignProfile(content, signer, SIGN_PROFILE_SIGN_ALG, ret); in HWTEST_F()
625 std::shared_ptr<Signer> signer in HWTEST_F() local
662 std::shared_ptr<Signer> signer = NULL; HWTEST_F() local
701 std::shared_ptr<Signer> signer = std::make_shared<LocalSigner>(pkey, certs); HWTEST_F() local
739 std::shared_ptr<Signer> signer = std::make_shared<LocalSigner>(pkey, certs); HWTEST_F() local
776 std::shared_ptr<Signer> signer = factory.GetSigner(adapter); HWTEST_F() local
[all...]
H A Dsign_profile_test.cpp279 std::shared_ptr<Signer> signer = factory.GetSigner(adapter); in HWTEST_F() local
280 STACK_OF(X509)* certs = signer->GetCertificates(); in HWTEST_F()
411 std::shared_ptr<Signer> signer = factory.GetSigner(adapter); in HWTEST_F() local
414 int result = p7.Sign(content, signer, "SHA384withECDSA", p7b); in HWTEST_F()
451 std::shared_ptr<Signer> signer = factory.GetSigner(adapter); in HWTEST_F() local
454 int result = p7.Sign(content, signer, "SHA384withECDSA", p7b); in HWTEST_F()
527 std::shared_ptr<Signer> signer = factory.GetSigner(adapter); in HWTEST_F() local
528 EXPECT_TRUE(signer != NULL); in HWTEST_F()
563 std::shared_ptr<Signer> signer = factory.GetSigner(adapter); in HWTEST_F() local
564 STACK_OF(X509_CRL)* crls = signer in HWTEST_F()
600 std::shared_ptr<Signer> signer = factory.GetSigner(adapter); HWTEST_F() local
[all...]
H A Dprofile_test.cpp132 * @tc.desc: Test function of Pkcs7Generator::GenerateSignedData() failed for nullptr signer.
154 // config设置算法 signer in HWTEST_F()
194 // config设置算法 signer
234 // config设置算法 signer
274 // config设置算法 signer
316 // config设置算法 signer
360 std::shared_ptr<Signer> signer = factory.GetSigner(adapter);
364 int result = p7.Sign(content, signer, "SHA384withECDSA", p7b);
413 std::shared_ptr<Signer> signer = factory.GetSigner(adapter);
417 int result = p7.Sign(content, signer, "SHA384withECDS
[all...]
H A Dpkcs7_data_test.cpp190 std::shared_ptr<Signer> signer = factory.GetSigner(adapter); in HWTEST_F() local
191 STACK_OF(X509)* certs = signer->GetCertificates(); in HWTEST_F()
299 std::shared_ptr<Signer> signer = factory.GetSigner(adapter); in HWTEST_F() local
300 STACK_OF(X509)* certs = signer->GetCertificates(); in HWTEST_F()
330 std::shared_ptr<Signer> signer = factory.GetSigner(adapter); in HWTEST_F() local
331 STACK_OF(X509)* certs = signer->GetCertificates(); in HWTEST_F()
/developtools/hapsigner/hapsigntool_cpp_test/fuzztest/profile/profile001_fuzzer/
H A Dprofile001_fuzzer.cpp49 std::shared_ptr<Signer> signer = factory.GetSigner(adapter); in SignProfileTest001() local
52 int result = p7.Sign(content, signer, signAlg, p7b); in SignProfileTest001()
81 std::shared_ptr<Signer> signer = factory.GetSigner(adapter); in SignProfileTest002() local
82 STACK_OF(X509)* certs = signer->GetCertificates(); in SignProfileTest002()
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/test/java/com/ohos/hapsigntool/
H A DProfileTest.java28 import com.ohos.hapsigntool.signer.ISigner;
29 import com.ohos.hapsigntool.signer.LocalSigner;
143 ISigner signer = new LocalSigner(privateKey, adapter.getSignCertChain()); in testProfile()
144 byte[] p7b = ProfileSignTool.signProfile(provisionContent, signer, adapter.getSignAlg()); in testProfile()
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/signer/
H A DSignerFactory.java16 package com.ohos.hapsigntool.signer;
44 * Factory pattern to create signer.
54 * Create a signer.
57 * @return Local signer or remote signer
65 LOGGER.warn("load remote signer failed, use default implementation"); in getSigner()
95 try (InputStream inputStream = classLoader.getResourceAsStream("signer.properties")) { in loadRemoteSigner()
97 LOGGER.warn("can not find entry signer.properties in {}", plugin); in loadRemoteSigner()
104 LOGGER.warn("can not find {} in signer.properties", ISigner.class.getName()); in loadRemoteSigner()
109 Object signer in loadRemoteSigner()
[all...]
H A DISigner.java16 package com.ohos.hapsigntool.signer;
H A DRemoteSigner.java16 package com.ohos.hapsigntool.signer;
36 * Empty remote signer.
43 * Signed by remote signer.
H A DLocalSigner.java16 package com.ohos.hapsigntool.signer;
57 * Create local signer.
/developtools/hapsigner/hapsigntool_cpp/hap/sign/include/
H A Dbc_pkcs7_generator.h24 #include "signer.h"
31 * Generate PKCS#7 signed data with the specific content and signer config.
34 * @param signerConfig configurations of signer.
41 int PackagePKCS7(const std::string& content, const std::shared_ptr<Signer>& signer,
/developtools/hapsigner/hapsigntool_cpp/profile/include/
H A Dprofile_sign_tool.h24 #include "signer.h"
50 * @param signer signer
56 const std::shared_ptr<Signer>& signer, const std::string& sigAlg, std::string& ret);
H A Dpkcs7_data.h33 #include "signer.h"
76 * @param signer signer
82 int Sign(const std::string& content, const std::shared_ptr<Signer>& signer, const std::string& sigAlg,
108 int InitPkcs7(const std::string& content, const std::shared_ptr<Signer>& signer,
/developtools/hapsigner/hapsigntool_cpp/codesigning/sign/include/
H A Dbc_signeddata_generator.h26 #include "signer.h"
49 int PackageSignedData(const std::string& content, const std::shared_ptr<Signer>& signer,
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/hap/verify/
H A DHapVerify.java224 private VerifyResult parserSigner(ByteBuffer signer) { in parserSigner() argument
225 return parserSigner(signer, true); in parserSigner()
228 private VerifyResult parserSigner(ByteBuffer signer, boolean verifyContent) { in parserSigner() argument
229 byte[] signingBlock = new byte[signer.remaining()]; in parserSigner()
230 signer.get(signingBlock); in parserSigner()
257 throw new VerifyHapException("PKCS7 cms data has no signer info, size: " + size); in getSignerInformations()
/developtools/hapsigner/hapsigntool_cpp/hap/config/include/
H A Dsigner_config.h25 #include "signer.h"
55 std::shared_ptr<Signer> signer; member in OHOS::SignatureTools::SignerConfig

Completed in 217 milliseconds

12