Searched refs:mdCtx (Results 1 – 6 of 6) sorted by relevance
/base/security/appverify/interfaces/innerkits/appverify_lite/src/ |
D | app_verify_hap.c | 50 mbedtls_md_context_t *mdCtx = APPV_MALLOC(sizeof(mbedtls_md_context_t)); in ComputeBlockHash() local 51 P_NULL_RETURN_WTTH_LOG(mdCtx); in ComputeBlockHash() 54 mbedtls_md_init(mdCtx); in ComputeBlockHash() 56 ret = mbedtls_md_setup(mdCtx, mdInfo, 0); in ComputeBlockHash() 62 ret = mbedtls_md_starts(mdCtx); in ComputeBlockHash() 69 ret = mbedtls_md_update(mdCtx, chunkContentPrefix, HAP_DIGEST_PRIFIX_LEN); in ComputeBlockHash() 72 ret = mbedtls_md_update(mdCtx, (unsigned char *)block + pos, readLen); in ComputeBlockHash() 78 ret = mbedtls_md_finish(mdCtx, outbuf); in ComputeBlockHash() 84 mbedtls_md_free(mdCtx); in ComputeBlockHash() 86 APPV_FREE(mdCtx); in ComputeBlockHash() [all …]
|
/base/security/crypto_framework/plugin/openssl_plugin/crypto_operation/signature/src/ |
D | dsa_openssl.c | 35 EVP_MD_CTX *mdCtx; member 47 EVP_MD_CTX *mdCtx; member 134 if (impl->mdCtx != NULL) { in DestroyDsaSign() 135 Openssl_EVP_MD_CTX_free(impl->mdCtx); in DestroyDsaSign() 136 impl->mdCtx = NULL; in DestroyDsaSign() 154 if (impl->mdCtx != NULL) { in DestroyDsaVerify() 155 Openssl_EVP_MD_CTX_free(impl->mdCtx); in DestroyDsaVerify() 156 impl->mdCtx = NULL; in DestroyDsaVerify() 195 …if (Openssl_EVP_DigestSignInit(impl->mdCtx, NULL, impl->digestAlg, NULL, pKey) != HCF_OPENSSL_SUCC… in EngineDsaSignInit() 249 …if (Openssl_EVP_DigestVerifyInit(impl->mdCtx, NULL, impl->digestAlg, NULL, pKey) != HCF_OPENSSL_SU… in EngineDsaVerifyInit() [all …]
|
D | sm2_openssl.c | 101 static HcfResult SetSM2Id(EVP_MD_CTX *mdCtx, EVP_PKEY *pKey, char *userId) in SetSM2Id() argument 115 Openssl_EVP_MD_CTX_set_pkey_ctx(mdCtx, pKeyCtx); in SetSM2Id()
|
/base/update/updater/services/package/pkg_verify/ |
D | openssl_util.cpp | 163 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/ |
D | hap_verify_openssl_utils.cpp | 258 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() argument 317 if (EVP_DigestFinal_ex(mdCtx, digest, &digestLen) <= 0) { in VerifyPkcs7AuthAttributes() 328 if (!EVP_VerifyInit_ex(mdCtx, EVP_get_digestbynid(mdType), nullptr)) { in VerifyPkcs7AuthAttributes() [all …]
|
/base/security/appverify/interfaces/innerkits/appverify/include/util/ |
D | hap_verify_openssl_utils.h | 82 …static bool VerifyPkcs7AuthAttributes(const PKCS7_SIGNER_INFO* signInfo, EVP_MD_CTX* mdCtx, int32_…
|