Home
last modified time | relevance | path

Searched refs:ByteBuffer (Results 1 – 25 of 44) sorted by relevance

12

/ohos5.0/base/security/code_signature/test/unittest/
H A Dcert_chain_verifier_test.cpp115 static ByteBuffer g_issuerCert;
116 static ByteBuffer g_signingCert;
117 static ByteBuffer g_interCA;
118 static ByteBuffer g_invalidCert;
119 static ByteBuffer g_rootCA;
156 static void FormattedCertChain(const std::vector<ByteBuffer> &certChain, ByteBuffer &buffer) in FormattedCertChain()
270 std::vector<ByteBuffer> certs;
288 std::vector<ByteBuffer> certs;
306 std::vector<ByteBuffer> certs;
323 ByteBuffer challenge;
[all …]
H A Dsign_and_enforce_test.cpp87 static PKCS7 *LoadPKCS7Data(ByteBuffer &pkcs7Data) in LoadPKCS7Data()
118 static bool ModifyPkcs7SignerwithTargetFunc(ByteBuffer &src, ByteBuffer &dst, in ModifyPkcs7SignerwithTargetFunc()
163 ByteBuffer sig;
165 ByteBuffer empty;
178 ByteBuffer sig;
192 ByteBuffer sig;
207 ByteBuffer sig;
209 ByteBuffer wrongSig;
223 ByteBuffer sig;
225 ByteBuffer wrongSig;
[all …]
H A Denable_verity_test.cpp160 ByteBuffer data; in CopyData()
221 ByteBuffer tmp; in CheckEnableSuccess()
321 ByteBuffer &rootHash) in FillOptional()
333 ByteBuffer signature; in EnableExpandedTamperFile()
334 ByteBuffer rootHash; in EnableExpandedTamperFile()
353 ByteBuffer tmp; in EnableExpandedTamperFile()
469 ByteBuffer rootHash;
497 ByteBuffer rootHash;
539 ByteBuffer rootHash;
572 ByteBuffer rootHash;
[all …]
H A Dlocal_code_sign_test.cpp59 ByteBuffer cert;
74 ByteBuffer cert;
87 ByteBuffer sig;
108 ByteBuffer sig;
121 ByteBuffer sig;
190 ByteBuffer sig;
212 ByteBuffer sig;
232 ByteBuffer sig;
248 ByteBuffer sig;
262 ByteBuffer sig;
H A Dlocal_code_sign_utils_test.cpp56 ByteBuffer digest;
64 ByteBuffer signature;
78 ByteBuffer digest;
86 ByteBuffer signature;
100 ByteBuffer digest;
/ohos5.0/base/security/code_signature/utils/include/
H A Dcert_utils.h31 bool FormattedCertChain(const HksCertChain *certChain, ByteBuffer &buffer);
32 bool GetCertChainFormBuffer(const ByteBuffer &certChainBuffer,
33 ByteBuffer &signCert, ByteBuffer &issuer, std::vector<ByteBuffer> &chain);
34 int32_t VerifyAttestCertChain(const HksCertChain *certChain, const ByteBuffer &challenge);
35 bool GetSigningCertFromCerChain(const HksCertChain *certChain, ByteBuffer cert);
36 std::unique_ptr<ByteBuffer> GetRandomChallenge();
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 &co…
39 bool AddSignatureInSignerInfo(const ByteBuffer &signature);
45 bool AddAttrsToSignerInfo(const std::string &ownerID, const ByteBuffer &contentData);
46 bool ComputeDigest(const ByteBuffer &data, ByteBuffer &digest);
52 std::unique_ptr<ByteBuffer> unsignedData_ = nullptr;
H A Dsign_key.h28 virtual const ByteBuffer *GetSignCert() = 0;
29 std::vector<ByteBuffer> GetCarriedCerts() in GetCarriedCerts()
31 std::vector<ByteBuffer> certs; in GetCarriedCerts()
34 virtual bool Sign(const ByteBuffer &data, ByteBuffer &ret) = 0;
H A Dhuks_attest_verifier.h25 bool GetVerifiedCert(const ByteBuffer &buffer, const ByteBuffer &challenge, ByteBuffer &cert);
26 bool VerifyCertAndExtension(X509 *signCert, X509 *issuerCert, const ByteBuffer &challenge);
/ohos5.0/base/security/code_signature/services/local_code_sign/include/
H A Dlocal_sign_key.h35 const ByteBuffer *GetSignCert() override;
36 bool Sign(const ByteBuffer &data, ByteBuffer &ret) override;
38 void SetChallenge(const ByteBuffer &challenge);
40 int32_t GetFormattedCertChain(ByteBuffer &buffer);
57 ByteBuffer *cert_ = nullptr;
59 std::unique_ptr<ByteBuffer> challenge_ = nullptr;
H A Dlocal_code_sign_service.h36 int32_t InitLocalCertificate(const ByteBuffer &challenge, ByteBuffer &cert) override;
37 …int32_t SignLocalCode(const std::string &ownerID, const std::string &filePath, ByteBuffer &signatu…
/ohos5.0/base/security/code_signature/utils/src/
H A Dcert_utils.cpp91 bool FormattedCertChain(const HksCertChain *certChain, ByteBuffer &buffer) in FormattedCertChain()
129 ByteBuffer &ret) in CheckSizeAndCopy()
142 bool GetCertChainFormBuffer(const ByteBuffer &certChainBuffer, in GetCertChainFormBuffer()
143 ByteBuffer &signCert, ByteBuffer &issuer, std::vector<ByteBuffer> &chain) in GetCertChainFormBuffer()
168 ByteBuffer cert; in GetCertChainFormBuffer()
180 std::unique_ptr<ByteBuffer> GetRandomChallenge() in GetRandomChallenge()
182 std::unique_ptr<ByteBuffer> challenge = std::make_unique<ByteBuffer>(CHALLENGE_LEN); in GetRandomChallenge()
H A Dhuks_attest_verifier.cpp170 static bool CompareTargetValue(int nid, uint8_t *data, int size, const ByteBuffer &challenge) in CompareTargetValue()
184 static bool ParseASN1Sequence(uint8_t *data, int size, const ByteBuffer &challenge) in ParseASN1Sequence()
215 static bool VerifyExtension(X509 *cert, const ByteBuffer &challenge) in VerifyExtension()
250 static void ShowCertInfo(const std::vector<ByteBuffer> &certChainBuffer, in ShowCertInfo()
251 const ByteBuffer &issuerBuffer, const ByteBuffer &certBuffer) in ShowCertInfo()
271 bool VerifyCertAndExtension(X509 *signCert, X509 *issuerCert, const ByteBuffer &challenge) in VerifyCertAndExtension()
286 static bool VerifyIntermediateCASubject(const std::vector<ByteBuffer> &certChainBuffer) in VerifyIntermediateCASubject()
334 bool GetVerifiedCert(const ByteBuffer &buffer, const ByteBuffer &challenge, ByteBuffer &certBuffer) in GetVerifiedCert()
336 std::vector<ByteBuffer> certChainBuffer; in GetVerifiedCert()
337 ByteBuffer issuerBuffer; in GetVerifiedCert()
H A Dpkcs7_generator.cpp28 const ByteBuffer &contentData, ByteBuffer &out) in GenerateSignature()
34 const ByteBuffer *certBuffer = key.GetSignCert(); in GenerateSignature()
84 ByteBuffer unsignedData; in SignData()
88 ByteBuffer rawSignature; in SignData()
H A Dsigner_info.cpp42 const ByteBuffer &contentData, bool carrySigningTime) in InitSignerInfo()
99 bool SignerInfo::AddAttrsToSignerInfo(const std::string &ownerID, const ByteBuffer &contentData) in AddAttrsToSignerInfo()
102 unsignedData_ = std::make_unique<ByteBuffer>(); in AddAttrsToSignerInfo()
124 ByteBuffer digest; in AddAttrsToSignerInfo()
159 bool SignerInfo::AddSignatureInSignerInfo(const ByteBuffer &signature) in AddSignatureInSignerInfo()
178 bool SignerInfo::ComputeDigest(const ByteBuffer &data, ByteBuffer &digest) in ComputeDigest()
243 int SignerInfo::ParseOwnerIdFromSignature(const ByteBuffer &sigbuffer, std::string &ownerID) in ParseOwnerIdFromSignature()
/ohos5.0/base/security/code_signature/interfaces/innerkits/common/include/
H A Dbyte_buffer.h30 class ByteBuffer {
32 ByteBuffer(): data(nullptr), size(0) in ByteBuffer() function
36 ByteBuffer(uint32_t bufferSize): data(nullptr), size(0) in ByteBuffer() function
41 ByteBuffer(const ByteBuffer &other): data(nullptr), size(0) in ByteBuffer() function
46 ~ByteBuffer() in ~ByteBuffer()
/ohos5.0/base/security/code_signature/interfaces/innerkits/local_code_sign/include/
H A Dlocal_code_sign_proxy.h31 int32_t InitLocalCertificate(const ByteBuffer &challenge, ByteBuffer &cert) override;
32 …int32_t SignLocalCode(const std::string &ownerID, const std::string &filePath, ByteBuffer &signatu…
35 int32_t ReadResultFromReply(MessageParcel &reply, ByteBuffer &buffer);
H A Dlocal_code_sign_kit.h37 static int32_t InitLocalCertificate(ByteBuffer &cert);
44 static int32_t SignLocalCode(const std::string &filePath, ByteBuffer &signature);
52 …32_t SignLocalCode(const std::string &ownerID, const std::string &filePath, ByteBuffer &signature);
H A Dlocal_code_sign_interface.h32 virtual int32_t InitLocalCertificate(const ByteBuffer &challenge, ByteBuffer &cert) = 0;
33 … SignLocalCode(const std::string &ownerID, const std::string &filePath, ByteBuffer &signature) = 0;
/ohos5.0/foundation/graphic/graphic_3d/lume/LumeEngine/src/io/
H A Dmemory_file.h30 using ByteBuffer = BASE_NS::vector<uint8_t>;
36 explicit MemoryFileStorage(ByteBuffer&& buffer) : buffer_(BASE_NS::move(buffer)) {} in MemoryFileStorage()
38 const ByteBuffer& GetStorage() const in GetStorage()
56 ByteBuffer buffer_;
/ohos5.0/base/security/code_signature/
H A DREADME_zh.md46 | int32_t EnforceCodeSignForFile(const std::string &path, const ByteBuffer &signature); | 对文件使能代码签名…
48 | int ParseOwnerIdFromSignature(const ByteBuffer &sigbuffer, std::string &ownerID); | 从签名中解析OwnerId…
49 | int32_t EnableKeyInProfile(const std::string &bundleName, const ByteBuffer &profileBuffer); | 信任开…
51 | int32_t InitLocalCertificate(ByteBuffer &cert); | 初始化本地签名证书 |
52 | int32_t SignLocalCode(const std::string &filePath, ByteBuffer &signature); | 本地代码签名 |
53 | int32_t SignLocalCode(const std::string &ownerID, const std::string &filePath, ByteBuffer &signat…
/ohos5.0/base/security/code_signature/services/local_code_sign/src/
H A Dlocal_sign_key.cpp82 void LocalSignKey::SetChallenge(const ByteBuffer &challenge) in SetChallenge()
89 challenge_ = std::make_unique<ByteBuffer>(len); in SetChallenge()
121 const ByteBuffer *LocalSignKey::GetSignCert() in GetSignCert()
130 cert_ = new (std::nothrow) ByteBuffer(); in GetSignCert()
180 int32_t LocalSignKey::GetFormattedCertChain(ByteBuffer &buffer) in GetFormattedCertChain()
245 bool LocalSignKey::Sign(const ByteBuffer &data, ByteBuffer &signature) in Sign()
H A Dlocal_code_sign_service.cpp103 int32_t LocalCodeSignService::InitLocalCertificate(const ByteBuffer &challenge, ByteBuffer &certCha… in InitLocalCertificate()
115 ByteBuffer &signature) in SignLocalCode()
121 ByteBuffer digest; in SignLocalCode()
/ohos5.0/base/security/code_signature/interfaces/innerkits/local_code_sign/src/
H A Dlocal_code_sign_kit.cpp23 int32_t LocalCodeSignKit::InitLocalCertificate(ByteBuffer &cert) in InitLocalCertificate()
28 int32_t LocalCodeSignKit::SignLocalCode(const std::string &filePath, ByteBuffer &signature) in SignLocalCode()
33 …nKit::SignLocalCode(const std::string &ownerID, const std::string &filePath, ByteBuffer &signature) in SignLocalCode()
H A Dlocal_code_sign_proxy.cpp26 int32_t LocalCodeSignProxy::InitLocalCertificate(const ByteBuffer &challenge, ByteBuffer &cert) in InitLocalCertificate()
52 ByteBuffer &signature) in SignLocalCode()
83 int32_t LocalCodeSignProxy::ReadResultFromReply(MessageParcel &reply, ByteBuffer &buffer) in ReadResultFromReply()

12