/external/boringssl/src/crypto/fipsmodule/hmac/ |
D | hmac.c | 87 EVP_MD_CTX_init(&ctx->md_ctx); in HMAC_CTX_init() 101 EVP_MD_CTX_cleanup(&ctx->md_ctx); in HMAC_CTX_cleanup() 136 if (!EVP_DigestInit_ex(&ctx->md_ctx, md, impl) || in HMAC_Init_ex() 137 !EVP_DigestUpdate(&ctx->md_ctx, key, key_len) || in HMAC_Init_ex() 138 !EVP_DigestFinal_ex(&ctx->md_ctx, key_block, &key_block_len)) { in HMAC_Init_ex() 170 if (!EVP_MD_CTX_copy_ex(&ctx->md_ctx, &ctx->i_ctx)) { in HMAC_Init_ex() 178 return EVP_DigestUpdate(&ctx->md_ctx, data, data_len); in HMAC_Update() 187 if (!EVP_DigestFinal_ex(&ctx->md_ctx, buf, &i) || in HMAC_Final() 188 !EVP_MD_CTX_copy_ex(&ctx->md_ctx, &ctx->o_ctx) || in HMAC_Final() 189 !EVP_DigestUpdate(&ctx->md_ctx, buf, i) || in HMAC_Final() [all …]
|
/external/fsverity-utils/ |
D | hash_algs.c | 26 EVP_MD_CTX *md_ctx; member 34 if (EVP_DigestInit_ex(ctx->md_ctx, ctx->md, NULL) != 1) in openssl_digest_init() 44 if (EVP_DigestUpdate(ctx->md_ctx, data, size) != 1) in openssl_digest_update() 53 if (EVP_DigestFinal_ex(ctx->md_ctx, digest, NULL) != 1) in openssl_digest_final() 67 EVP_MD_CTX_destroy(ctx->md_ctx); in openssl_digest_ctx_free() 87 ctx->md_ctx = EVP_MD_CTX_create(); in openssl_digest_ctx_create() 88 if (!ctx->md_ctx) in openssl_digest_ctx_create()
|
D | sign.c | 120 EVP_MD_CTX md_ctx; in sign_pkcs7() local 126 EVP_MD_CTX_init(&md_ctx); in sign_pkcs7() 140 if (!EVP_DigestSignInit(&md_ctx, NULL, md, NULL, pkey)) { in sign_pkcs7() 147 if (!EVP_DigestSign(&md_ctx, sig, &sig_len, data_to_sign, data_size)) { in sign_pkcs7() 206 EVP_MD_CTX_cleanup(&md_ctx); in sign_pkcs7()
|
/external/boringssl/src/crypto/evp/ |
D | evp_extra_test.cc | 379 bssl::ScopedEVP_MD_CTX md_ctx; in TEST() local 381 EVP_DigestSignInit(md_ctx.get(), NULL, EVP_sha256(), NULL, pkey.get())); in TEST() 382 ASSERT_TRUE(EVP_DigestSignUpdate(md_ctx.get(), kMsg, sizeof(kMsg))); in TEST() 386 ASSERT_TRUE(EVP_DigestSignFinal(md_ctx.get(), NULL, &sig_len)); in TEST() 393 ASSERT_TRUE(EVP_DigestSignFinal(md_ctx.get(), sig.data(), &sig_len)); in TEST() 397 md_ctx.Reset(); in TEST() 399 EVP_DigestVerifyInit(md_ctx.get(), NULL, EVP_sha256(), NULL, pkey.get())); in TEST() 400 ASSERT_TRUE(EVP_DigestVerifyUpdate(md_ctx.get(), kMsg, sizeof(kMsg))); in TEST() 401 ASSERT_TRUE(EVP_DigestVerifyFinal(md_ctx.get(), sig.data(), sig_len)); in TEST() 406 bssl::ScopedEVP_MD_CTX md_ctx; in TEST() local [all …]
|
/external/u-boot/tools/ |
D | mxsimage.c | 178 EVP_MD_CTX *md_ctx; member 311 EVP_MD_CTX *md_ctx = ictx->md_ctx; in sb_encrypt_sb_header() local 317 EVP_DigestUpdate(md_ctx, sb_header_ptr, sizeof(*sb_header)); in sb_encrypt_sb_header() 322 EVP_MD_CTX *md_ctx = ictx->md_ctx; in sb_encrypt_sb_sections_header() local 334 EVP_DigestUpdate(md_ctx, sb_sections_header_ptr, size); in sb_encrypt_sb_sections_header() 342 EVP_MD_CTX *md_ctx = ictx->md_ctx; in sb_encrypt_key_dictionary_key() local 346 EVP_DigestUpdate(md_ctx, &ictx->sb_dict_key, sizeof(ictx->sb_dict_key)); in sb_encrypt_key_dictionary_key() 351 EVP_MD_CTX *md_ctx = ictx->md_ctx; in sb_decrypt_key_dictionary_key() local 353 EVP_DigestUpdate(md_ctx, &ictx->sb_dict_key, sizeof(ictx->sb_dict_key)); in sb_decrypt_key_dictionary_key() 361 EVP_MD_CTX *md_ctx = ictx->md_ctx; in sb_encrypt_tag() local [all …]
|
/external/grpc-grpc/src/core/lib/security/credentials/jwt/ |
D | json_token.cc | 253 EVP_MD_CTX* md_ctx = nullptr; in compute_and_encode_signature() local 259 md_ctx = EVP_MD_CTX_create(); in compute_and_encode_signature() 260 if (md_ctx == nullptr) { in compute_and_encode_signature() 265 if (EVP_DigestSignInit(md_ctx, nullptr, md, nullptr, key) != 1) { in compute_and_encode_signature() 269 if (EVP_DigestSignUpdate(md_ctx, to_sign, strlen(to_sign)) != 1) { in compute_and_encode_signature() 273 if (EVP_DigestSignFinal(md_ctx, nullptr, &sig_len) != 1) { in compute_and_encode_signature() 278 if (EVP_DigestSignFinal(md_ctx, sig, &sig_len) != 1) { in compute_and_encode_signature() 286 if (md_ctx != nullptr) EVP_MD_CTX_destroy(md_ctx); in compute_and_encode_signature()
|
D | jwt_verifier.cc | 603 EVP_MD_CTX* md_ctx = EVP_MD_CTX_create(); in verify_jwt_signature() local 608 if (md_ctx == nullptr) { in verify_jwt_signature() 612 if (EVP_DigestVerifyInit(md_ctx, nullptr, md, nullptr, key) != 1) { in verify_jwt_signature() 616 if (EVP_DigestVerifyUpdate(md_ctx, GRPC_SLICE_START_PTR(signed_data), in verify_jwt_signature() 621 if (EVP_DigestVerifyFinal(md_ctx, GRPC_SLICE_START_PTR(signature), in verify_jwt_signature() 629 EVP_MD_CTX_destroy(md_ctx); in verify_jwt_signature()
|
/external/boringssl/src/crypto/cipher_extra/ |
D | tls_cbc.c | 471 EVP_MD_CTX md_ctx; in EVP_tls_cbc_digest_record() local 472 EVP_MD_CTX_init(&md_ctx); in EVP_tls_cbc_digest_record() 473 if (!EVP_DigestInit_ex(&md_ctx, md, NULL /* engine */)) { in EVP_tls_cbc_digest_record() 474 EVP_MD_CTX_cleanup(&md_ctx); in EVP_tls_cbc_digest_record() 483 EVP_DigestUpdate(&md_ctx, hmac_pad, md_block_size); in EVP_tls_cbc_digest_record() 484 EVP_DigestUpdate(&md_ctx, mac_out, md_size); in EVP_tls_cbc_digest_record() 486 EVP_DigestFinal(&md_ctx, md_out, &md_out_size_u); in EVP_tls_cbc_digest_record() 488 EVP_MD_CTX_cleanup(&md_ctx); in EVP_tls_cbc_digest_record()
|
/external/tensorflow/tensorflow/core/platform/cloud/ |
D | oauth_client_test.cc | 157 auto md_ctx = EVP_MD_CTX_create(); in TEST() local 160 ASSERT_EQ(1, EVP_DigestVerifyInit(md_ctx, nullptr, md, nullptr, key)); in TEST() 161 ASSERT_EQ(1, EVP_DigestVerifyUpdate(md_ctx, header_dot_claim.c_str(), in TEST() 165 md_ctx, in TEST() 172 EVP_MD_CTX_destroy(md_ctx); in TEST()
|
D | oauth_client.cc | 103 std::unique_ptr<EVP_MD_CTX, std::function<void(EVP_MD_CTX*)>> md_ctx( in CreateSignature() local 105 if (!md_ctx) { in CreateSignature() 113 if (EVP_DigestSignInit(md_ctx.get(), nullptr, md, nullptr, key.get()) != 1) { in CreateSignature() 116 if (EVP_DigestSignUpdate(md_ctx.get(), to_sign.data(), to_sign.size()) != 1) { in CreateSignature() 120 if (EVP_DigestSignFinal(md_ctx.get(), nullptr, &sig_len) != 1) { in CreateSignature() 124 if (EVP_DigestSignFinal(md_ctx.get(), sig.get(), &sig_len) != 1) { in CreateSignature()
|
/external/boringssl/src/crypto/fipsmodule/digest/ |
D | digests.c | 251 static void md5_sha1_init(EVP_MD_CTX *md_ctx) { in md5_sha1_init() argument 252 MD5_SHA1_CTX *ctx = md_ctx->md_data; in md5_sha1_init() 256 static void md5_sha1_update(EVP_MD_CTX *md_ctx, const void *data, in md5_sha1_update() argument 258 MD5_SHA1_CTX *ctx = md_ctx->md_data; in md5_sha1_update() 263 static void md5_sha1_final(EVP_MD_CTX *md_ctx, uint8_t *out) { in md5_sha1_final() argument 264 MD5_SHA1_CTX *ctx = md_ctx->md_data; in md5_sha1_final()
|
/external/grpc-grpc/test/core/security/ |
D | json_token_test.cc | 332 EVP_MD_CTX* md_ctx = EVP_MD_CTX_create(); in check_jwt_signature() local 339 GPR_ASSERT(md_ctx != nullptr); in check_jwt_signature() 344 EVP_DigestVerifyInit(md_ctx, nullptr, EVP_sha256(), nullptr, key) == 1); in check_jwt_signature() 345 GPR_ASSERT(EVP_DigestVerifyUpdate(md_ctx, signed_data, signed_data_size) == in check_jwt_signature() 347 GPR_ASSERT(EVP_DigestVerifyFinal(md_ctx, GRPC_SLICE_START_PTR(sig), in check_jwt_signature() 352 if (md_ctx != nullptr) EVP_MD_CTX_destroy(md_ctx); in check_jwt_signature()
|
/external/boringssl/src/crypto/x509/ |
D | x509_cmp.c | 249 EVP_MD_CTX md_ctx; in X509_NAME_hash_old() local 255 EVP_MD_CTX_init(&md_ctx); in X509_NAME_hash_old() 257 if (EVP_DigestInit_ex(&md_ctx, EVP_md5(), NULL) in X509_NAME_hash_old() 258 && EVP_DigestUpdate(&md_ctx, x->bytes->data, x->bytes->length) in X509_NAME_hash_old() 259 && EVP_DigestFinal_ex(&md_ctx, md, NULL)) in X509_NAME_hash_old() 263 EVP_MD_CTX_cleanup(&md_ctx); in X509_NAME_hash_old()
|
D | x509_test.cc | 1137 static bool SignatureRoundTrips(EVP_MD_CTX *md_ctx, EVP_PKEY *pkey) { in SignatureRoundTrips() argument 1140 if (!cert || !X509_sign_ctx(cert.get(), md_ctx)) { in SignatureRoundTrips() 1153 bssl::ScopedEVP_MD_CTX md_ctx; in TEST() local 1155 EVP_DigestSignInit(md_ctx.get(), NULL, EVP_sha256(), NULL, pkey.get())); in TEST() 1156 ASSERT_TRUE(SignatureRoundTrips(md_ctx.get(), pkey.get())); in TEST() 1159 md_ctx.Reset(); in TEST() 1161 ASSERT_TRUE(EVP_DigestSignInit(md_ctx.get(), &pkey_ctx, EVP_sha256(), NULL, in TEST() 1165 ASSERT_TRUE(SignatureRoundTrips(md_ctx.get(), pkey.get())); in TEST() 1177 bssl::ScopedEVP_MD_CTX md_ctx; in TEST() local 1179 EVP_DigestSignInit(md_ctx.get(), nullptr, nullptr, nullptr, priv.get())); in TEST() [all …]
|
/external/nos/test/system-test-harness/src/ |
D | avb_tests.cc | 181 EVP_MD_CTX md_ctx; in SignChallenge() local 182 EVP_MD_CTX_init(&md_ctx); in SignChallenge() 184 if (!EVP_DigestSignInit(&md_ctx, &pkey_ctx, EVP_sha256(), NULL, pkey)) in SignChallenge() 188 if (!EVP_DigestSignUpdate(&md_ctx, (uint8_t *)message, sizeof(*message))) in SignChallenge() 190 EVP_DigestSignFinal(&md_ctx, NULL, &siglen); in SignChallenge() 197 int code = EVP_DigestSignFinal(&md_ctx, signature, &siglen); in SignChallenge() 203 EVP_MD_CTX_cleanup(&md_ctx); in SignChallenge()
|
/external/boringssl/src/include/openssl/ |
D | hmac.h | 160 EVP_MD_CTX md_ctx; member
|
/external/wpa_supplicant_8/src/common/ |
D | dpp.c | 4503 EVP_MD_CTX *md_ctx = NULL; in dpp_build_conf_obj_dpp() local 4602 md_ctx = EVP_MD_CTX_create(); in dpp_build_conf_obj_dpp() 4603 if (!md_ctx) in dpp_build_conf_obj_dpp() 4607 if (EVP_DigestSignInit(md_ctx, NULL, sign_md, NULL, in dpp_build_conf_obj_dpp() 4613 if (EVP_DigestSignUpdate(md_ctx, signed1, signed1_len) != 1 || in dpp_build_conf_obj_dpp() 4614 EVP_DigestSignUpdate(md_ctx, dot, 1) != 1 || in dpp_build_conf_obj_dpp() 4615 EVP_DigestSignUpdate(md_ctx, signed2, signed2_len) != 1) { in dpp_build_conf_obj_dpp() 4620 if (EVP_DigestSignFinal(md_ctx, NULL, &signature_len) != 1) { in dpp_build_conf_obj_dpp() 4628 if (EVP_DigestSignFinal(md_ctx, signature, &signature_len) != 1) { in dpp_build_conf_obj_dpp() 4687 EVP_MD_CTX_destroy(md_ctx); in dpp_build_conf_obj_dpp() [all …]
|