Home
last modified time | relevance | path

Searched refs:ownerID (Results 1 - 22 of 22) sorted by relevance

/base/security/code_signature/test/unittest/
H A Dlocal_code_sign_test.cpp156 std::string ownerID = "AppName123"; in HWTEST_F() local
157 int ret = LocalCodeSignKit::SignLocalCode(ownerID, DEMO_AN_PATH2, sig); in HWTEST_F()
163 EXPECT_EQ(ownerID, retOwnerID); in HWTEST_F()
178 std::string ownerID = ""; in HWTEST_F() local
179 int ret = LocalCodeSignKit::SignLocalCode(ownerID, DEMO_AN_PATH2, sig); in HWTEST_F()
198 std::string ownerID = "AppName123"; in HWTEST_F() local
199 int ret = LocalCodeSignKit::SignLocalCode(ownerID, DEMO_AN_PATH2 + "invalid", sig); in HWTEST_F()
213 std::string ownerID = "AppName123"; in HWTEST_F() local
214 int ret = LocalCodeSignKit::SignLocalCode(ownerID, DEMO_AN_PATH2, sig); in HWTEST_F()
220 * @tc.desc: sign local code failed with ownerID excee
244 std::string ownerID = "AppName123"; HWTEST_F() local
[all...]
H A Dlocal_code_sign_utils_test.cpp58 std::string ownerID = ""; in HWTEST_F() local
65 int ret = PKCS7Generator::GenerateSignature(ownerID, LocalSignKey::GetInstance(), DEFAULT_HASH_ALGORITHM.c_str(), in HWTEST_F()
80 std::string ownerID = "AppName123"; in HWTEST_F() local
87 int ret = PKCS7Generator::GenerateSignature(ownerID, LocalSignKey::GetInstance(), DEFAULT_HASH_ALGORITHM.c_str(), in HWTEST_F()
H A Dlocal_code_sign_utils_mock_test.cpp63 std::string ownerID = ""; in HWTEST_F() local
71 int ret = PKCS7Generator::GenerateSignature(ownerID, LocalSignKey::GetInstance(), DEFAULT_HASH_ALGORITHM.c_str(), in HWTEST_F()
76 ret = PKCS7Generator::GenerateSignature(ownerID, LocalSignKey::GetInstance(), DEFAULT_HASH_ALGORITHM.c_str(), in HWTEST_F()
81 ret = PKCS7Generator::GenerateSignature(ownerID, LocalSignKey::GetInstance(), DEFAULT_HASH_ALGORITHM.c_str(), in HWTEST_F()
86 ret = PKCS7Generator::GenerateSignature(ownerID, LocalSignKey::GetInstance(), DEFAULT_HASH_ALGORITHM.c_str(), in HWTEST_F()
H A Dmulti_thread_local_sign_test.cpp105 std::string ownerID = "AppName123"; in LocalCodeSignAndEnforceWithOwnerID() local
106 int ret = LocalCodeSignKit::SignLocalCode(ownerID, DEMO_WITHOWNER_ID, sig); in LocalCodeSignAndEnforceWithOwnerID()
H A Dcode_sign_utils_test.cpp365 std::string ownerID; in HWTEST_F() local
368 int ret = CodeSignUtils::ParseOwnerIdFromSignature(buffer, ownerID); in HWTEST_F()
/base/security/code_signature/utils/src/
H A Dsigner_info.cpp38 const std::string SignerInfo::OWNERID_OID_SHORT_NAME = "ownerID";
41 bool SignerInfo::InitSignerInfo(const std::string &ownerID, X509 *cert, const EVP_MD *md, in InitSignerInfo() argument
86 if (!AddAttrsToSignerInfo(ownerID, contentData)) { in InitSignerInfo()
99 bool SignerInfo::AddAttrsToSignerInfo(const std::string &ownerID, const ByteBuffer &contentData) in AddAttrsToSignerInfo() argument
101 if (!carrySigningTime_ && ownerID.empty()) { in AddAttrsToSignerInfo()
110 if (!ownerID.empty()) { in AddAttrsToSignerInfo()
111 AddOwnerID(ownerID); in AddAttrsToSignerInfo()
228 int SignerInfo::AddOwnerID(const std::string &ownerID) in AddOwnerID() argument
232 ASN1_STRING_set(ownerIDAsn1, ownerID.c_str(), ownerID in AddOwnerID()
243 ParseOwnerIdFromSignature(const ByteBuffer &sigbuffer, std::string &ownerID) ParseOwnerIdFromSignature() argument
[all...]
H A Dpkcs7_generator.cpp27 int32_t PKCS7Generator::GenerateSignature(const std::string &ownerID, SignKey &key, const char *hashAlg, in GenerateSignature() argument
53 if (!signerInfo.InitSignerInfo(ownerID, cert, md, contentData)) { in GenerateSignature()
/base/security/code_signature/utils/include/
H A Dsigner_info.h36 static int ParseOwnerIdFromSignature(const ByteBuffer &sigbuffer, std::string &ownerID);
37 bool InitSignerInfo(const std::string &ownerID, X509 *cert, const EVP_MD *md, const ByteBuffer &contentData,
42 int AddOwnerID(const std::string &ownerID);
45 bool AddAttrsToSignerInfo(const std::string &ownerID, const ByteBuffer &contentData);
H A Dcs_hisysevent.h50 inline void ReportInvalidOwner(const std::string &fileInfo, const std::string &ownerID, in ReportInvalidOwner() argument
55 "FILE_INFO", fileInfo, "OWNER_ID", ownerID, "PARSED_OWNER_ID", parsedOwnerID); in ReportInvalidOwner()
H A Dpkcs7_generator.h30 static int32_t GenerateSignature(const std::string& ownerID, SignKey &key, const char *hashAlg,
/base/security/code_signature/interfaces/innerkits/local_code_sign/src/
H A Dlocal_code_sign_kit.cpp33 int32_t LocalCodeSignKit::SignLocalCode(const std::string &ownerID, const std::string &filePath, ByteBuffer &signature) in SignLocalCode() argument
35 return LocalCodeSignClient::GetInstance().SignLocalCode(ownerID, filePath, signature); in SignLocalCode()
H A Dlocal_code_sign_proxy.cpp51 int32_t LocalCodeSignProxy::SignLocalCode(const std::string &ownerID, const std::string &filePath, in SignLocalCode() argument
70 if (!ownerID.empty()) { in SignLocalCode()
71 if (!data.WriteString(ownerID)) { in SignLocalCode()
72 LOG_ERROR("Write ownerID string failed."); in SignLocalCode()
H A Dlocal_code_sign_client.cpp163 int32_t LocalCodeSignClient::SignLocalCode(const std::string &ownerID, const std::string &path, ByteBuffer &signature) in SignLocalCode() argument
171 int32_t ret = localCodeSignProxy_->SignLocalCode(ownerID, path, signature); in SignLocalCode()
/base/security/code_signature/services/local_code_sign/src/
H A Dlocal_code_sign_service.cpp114 int32_t LocalCodeSignService::SignLocalCode(const std::string &ownerID, const std::string &filePath, in SignLocalCode() argument
117 if (ownerID.length() > MAX_OWNER_ID_LEN) { in SignLocalCode()
118 LOG_ERROR("ownerID len %{public}zu should not exceed %{public}u", ownerID.length(), MAX_OWNER_ID_LEN); in SignLocalCode()
131 return PKCS7Generator::GenerateSignature(ownerID, LocalSignKey::GetInstance(), DEFAULT_HASH_ALGORITHM.c_str(), in SignLocalCode()
H A Dlocal_code_sign_stub.cpp101 std::string ownerID; in SignLocalCodeInner() local
103 ownerID = data.ReadString(); in SignLocalCodeInner()
107 int32_t result = SignLocalCode(ownerID, filePath, signature); in SignLocalCodeInner()
/base/security/code_signature/interfaces/innerkits/local_code_sign/include/
H A Dlocal_code_sign_interface.h33 virtual int32_t SignLocalCode(const std::string &ownerID, const std::string &filePath, ByteBuffer &signature) = 0;
H A Dlocal_code_sign_kit.h47 * @param ownerID owner ID written to the signature
52 static int32_t SignLocalCode(const std::string &ownerID, const std::string &filePath, ByteBuffer &signature);
H A Dlocal_code_sign_proxy.h32 int32_t SignLocalCode(const std::string &ownerID, const std::string &filePath, ByteBuffer &signature) override;
H A Dlocal_code_sign_client.h40 int32_t SignLocalCode(const std::string &ownerID, const std::string &path, ByteBuffer &signature);
/base/security/code_signature/services/local_code_sign/include/
H A Dlocal_code_sign_service.h37 int32_t SignLocalCode(const std::string &ownerID, const std::string &filePath, ByteBuffer &signature) override;
/base/security/code_signature/interfaces/innerkits/code_sign_utils/include/
H A Dcode_sign_utils.h63 * @brief Enforce code signature for a hap with ownerID
92 * @param ownerID string to abtain owner ID from the signature file
95 static int ParseOwnerIdFromSignature(const ByteBuffer &sigbuffer, std::string &ownerID);
/base/security/code_signature/interfaces/innerkits/code_sign_utils/src/
H A Dcode_sign_utils.cpp171 int CodeSignUtils::ParseOwnerIdFromSignature(const ByteBuffer &sigbuffer, std::string &ownerID)
173 return SignerInfo::ParseOwnerIdFromSignature(sigbuffer, ownerID);

Completed in 8 milliseconds