Home
last modified time | relevance | path

Searched refs:mdCtx (Results 1 - 7 of 7) sorted by relevance

/base/security/appverify/interfaces/innerkits/appverify_lite/src/
H A Dapp_verify_hap.c49 mbedtls_md_context_t *mdCtx = APPV_MALLOC(sizeof(mbedtls_md_context_t)); in ComputeBlockHash() local
50 P_NULL_RETURN_WTTH_LOG(mdCtx); in ComputeBlockHash()
53 mbedtls_md_init(mdCtx); in ComputeBlockHash()
55 int32_t ret = mbedtls_md_setup(mdCtx, mdInfo, 0); in ComputeBlockHash()
61 ret = mbedtls_md_starts(mdCtx); in ComputeBlockHash()
68 ret = mbedtls_md_update(mdCtx, chunkContentPrefix, HAP_DIGEST_PRIFIX_LEN); in ComputeBlockHash()
71 ret = mbedtls_md_update(mdCtx, (unsigned char *)block + pos, readLen); in ComputeBlockHash()
77 ret = mbedtls_md_finish(mdCtx, outbuf); in ComputeBlockHash()
83 mbedtls_md_free(mdCtx); in ComputeBlockHash()
85 APPV_FREE(mdCtx); in ComputeBlockHash()
123 mbedtls_md_context_t *mdCtx = APPV_MALLOC(sizeof(mbedtls_md_context_t)); ComputeDigestsWithOptionalBlock() local
159 HapUpdateDigistHead( int32_t digestAlgorithm, mbedtls_md_context_t *mdCtx, const mbedtls_md_info_t *mdInfo, int32_t readLen, size_t *hlen) HapUpdateDigistHead() argument
187 UpdateSmallBlock(int32_t readLen, const int32_t fp, mbedtls_md_context_t *mdCtx) UpdateSmallBlock() argument
211 mbedtls_md_context_t *mdCtx = APPV_MALLOC(sizeof(mbedtls_md_context_t)); ComputerFileHash() local
[all...]
/base/security/crypto_framework/plugin/openssl_plugin/crypto_operation/signature/src/
H A Dsm2_openssl.c41 EVP_MD_CTX *mdCtx; member
53 EVP_MD_CTX *mdCtx; member
91 if (impl->mdCtx != NULL) { in DestroySm2Sign()
92 OpensslEvpPkeyCtxFree(OpensslEvpMdCtxGetPkeyCtx(impl->mdCtx)); in DestroySm2Sign()
93 OpensslEvpMdCtxFree(impl->mdCtx); in DestroySm2Sign()
94 impl->mdCtx = NULL; in DestroySm2Sign()
113 if (impl->mdCtx != NULL) { in DestroySm2Verify()
114 OpensslEvpPkeyCtxFree(OpensslEvpMdCtxGetPkeyCtx(impl->mdCtx)); in DestroySm2Verify()
115 OpensslEvpMdCtxFree(impl->mdCtx); in DestroySm2Verify()
116 impl->mdCtx in DestroySm2Verify()
122 SetUserIdFromBlob(HcfBlob userId, EVP_MD_CTX *mdCtx) SetUserIdFromBlob() argument
150 SetSM2Id(EVP_MD_CTX *mdCtx, EVP_PKEY *pKey, HcfBlob userId) SetSM2Id() argument
[all...]
H A Ded25519_openssl.c37 EVP_MD_CTX *mdCtx; member
45 EVP_MD_CTX *mdCtx; member
71 if (impl->mdCtx != NULL) { in DestroyEd25519Sign()
72 OpensslEvpMdCtxFree(impl->mdCtx); in DestroyEd25519Sign()
73 impl->mdCtx = NULL; in DestroyEd25519Sign()
89 if (impl->mdCtx != NULL) { in DestroyEd25519Verify()
90 OpensslEvpMdCtxFree(impl->mdCtx); in DestroyEd25519Verify()
91 impl->mdCtx = NULL; in DestroyEd25519Verify()
115 if (OpensslEvpDigestSignInit(impl->mdCtx, NULL, NULL, NULL, in EngineSignInit()
152 if (OpensslEvpDigestSign(impl->mdCtx, NUL in EngineSignDoFinal()
[all...]
H A Ddsa_openssl.c35 EVP_MD_CTX *mdCtx; member
47 EVP_MD_CTX *mdCtx; member
134 if (impl->mdCtx != NULL) { in DestroyDsaSign()
135 OpensslEvpMdCtxFree(impl->mdCtx); in DestroyDsaSign()
136 impl->mdCtx = NULL; in DestroyDsaSign()
154 if (impl->mdCtx != NULL) { in DestroyDsaVerify()
155 OpensslEvpMdCtxFree(impl->mdCtx); in DestroyDsaVerify()
156 impl->mdCtx = NULL; in DestroyDsaVerify()
200 if (OpensslEvpDigestSignInit(impl->mdCtx, NULL, impl->digestAlg, NULL, pKey) != HCF_OPENSSL_SUCCESS) { in EngineDsaSignInit()
254 if (OpensslEvpDigestVerifyInit(impl->mdCtx, NUL in EngineDsaVerifyInit()
[all...]
/base/update/updater/services/package/pkg_verify/
H A Dopenssl_util.cpp163 EVP_MD_CTX *mdCtx = EVP_MD_CTX_create(); in VerifyDigestByPubKey() local
164 if (mdCtx == nullptr) { in VerifyDigestByPubKey()
170 if (EVP_DigestVerifyInit(mdCtx, &pkeyCtx, EVP_get_digestbynid(nid), nullptr, pubKey) != 1) { in VerifyDigestByPubKey()
172 EVP_MD_CTX_destroy(mdCtx); in VerifyDigestByPubKey()
176 if (EVP_DigestVerifyUpdate(mdCtx, digestData.data(), digestData.size()) != 1) { in VerifyDigestByPubKey()
178 EVP_MD_CTX_destroy(mdCtx); in VerifyDigestByPubKey()
183 int ret = EVP_DigestVerifyFinal(mdCtx, signature.data(), signature.size()); in VerifyDigestByPubKey()
186 EVP_MD_CTX_destroy(mdCtx); in VerifyDigestByPubKey()
191 EVP_MD_CTX_destroy(mdCtx); in VerifyDigestByPubKey()
/base/security/appverify/interfaces/innerkits/appverify/src/util/
H A Dhap_verify_openssl_utils.cpp258 const EVP_MD_CTX* mdCtx = FindMdCtxInBio(p7Bio, mdType); in VerifyShaWithRsaPss() local
264 if (!EVP_MD_CTX_copy_ex(mdCtxTmp, mdCtx)) { in VerifyShaWithRsaPss()
295 EVP_MD_CTX* mdCtx = nullptr; in FindMdCtxInBio() local
297 BIO_get_md_ctx(p7Bio, &mdCtx); in FindMdCtxInBio()
298 if (mdCtx == nullptr) { in FindMdCtxInBio()
302 if ((EVP_MD_CTX_type(mdCtx) == mdType) || (EVP_MD_pkey_type(EVP_MD_CTX_md(mdCtx)) == mdType)) { in FindMdCtxInBio()
307 return mdCtx; in FindMdCtxInBio()
311 const PKCS7_SIGNER_INFO* signInfo, EVP_MD_CTX* mdCtx, int32_t mdType) in VerifyPkcs7AuthAttributes()
317 if (EVP_DigestFinal_ex(mdCtx, diges in VerifyPkcs7AuthAttributes()
310 VerifyPkcs7AuthAttributes( const PKCS7_SIGNER_INFO* signInfo, EVP_MD_CTX* mdCtx, int32_t mdType) VerifyPkcs7AuthAttributes() argument
[all...]
/base/security/appverify/interfaces/innerkits/appverify/include/util/
H A Dhap_verify_openssl_utils.h82 static bool VerifyPkcs7AuthAttributes(const PKCS7_SIGNER_INFO* signInfo, EVP_MD_CTX* mdCtx, int32_t mdType);

Completed in 5 milliseconds