/third_party/mbedtls/library/ |
D | md.c | 241 if (ctx->md_ctx != NULL) { in mbedtls_md_free() 244 psa_hash_abort(ctx->md_ctx); in mbedtls_md_free() 250 mbedtls_md5_free(ctx->md_ctx); in mbedtls_md_free() 255 mbedtls_ripemd160_free(ctx->md_ctx); in mbedtls_md_free() 260 mbedtls_sha1_free(ctx->md_ctx); in mbedtls_md_free() 265 mbedtls_sha256_free(ctx->md_ctx); in mbedtls_md_free() 270 mbedtls_sha256_free(ctx->md_ctx); in mbedtls_md_free() 275 mbedtls_sha512_free(ctx->md_ctx); in mbedtls_md_free() 280 mbedtls_sha512_free(ctx->md_ctx); in mbedtls_md_free() 287 mbedtls_free(ctx->md_ctx); in mbedtls_md_free() [all …]
|
D | hmac_drbg.c | 59 size_t md_len = mbedtls_md_get_size(ctx->md_ctx.md_info); in mbedtls_hmac_drbg_update() 67 if ((ret = mbedtls_md_hmac_reset(&ctx->md_ctx)) != 0) { in mbedtls_hmac_drbg_update() 70 if ((ret = mbedtls_md_hmac_update(&ctx->md_ctx, in mbedtls_hmac_drbg_update() 74 if ((ret = mbedtls_md_hmac_update(&ctx->md_ctx, in mbedtls_hmac_drbg_update() 79 if ((ret = mbedtls_md_hmac_update(&ctx->md_ctx, in mbedtls_hmac_drbg_update() 84 if ((ret = mbedtls_md_hmac_finish(&ctx->md_ctx, K)) != 0) { in mbedtls_hmac_drbg_update() 89 if ((ret = mbedtls_md_hmac_starts(&ctx->md_ctx, K, md_len)) != 0) { in mbedtls_hmac_drbg_update() 92 if ((ret = mbedtls_md_hmac_update(&ctx->md_ctx, in mbedtls_hmac_drbg_update() 96 if ((ret = mbedtls_md_hmac_finish(&ctx->md_ctx, ctx->V)) != 0) { in mbedtls_hmac_drbg_update() 115 if ((ret = mbedtls_md_setup(&ctx->md_ctx, md_info, 1)) != 0) { in mbedtls_hmac_drbg_seed_buf() [all …]
|
D | pkcs12.c | 241 mbedtls_md_context_t md_ctx; in calculate_hashes() local 247 mbedtls_md_init(&md_ctx); in calculate_hashes() 249 if ((ret = mbedtls_md_setup(&md_ctx, md_info, 0)) != 0) { in calculate_hashes() 253 if ((ret = mbedtls_md_starts(&md_ctx)) != 0) { in calculate_hashes() 257 if ((ret = mbedtls_md_update(&md_ctx, diversifier, v)) != 0) { in calculate_hashes() 262 if ((ret = mbedtls_md_update(&md_ctx, salt_block, v)) != 0) { in calculate_hashes() 268 if ((ret = mbedtls_md_update(&md_ctx, pwd_block, v)) != 0) { in calculate_hashes() 273 if ((ret = mbedtls_md_finish(&md_ctx, hash_output)) != 0) { in calculate_hashes() 286 mbedtls_md_free(&md_ctx); in calculate_hashes()
|
D | rsa.c | 1095 mbedtls_md_context_t md_ctx; in mgf_mask() local 1097 mbedtls_md_init(&md_ctx); in mgf_mask() 1103 mbedtls_md_init(&md_ctx); in mgf_mask() 1104 if ((ret = mbedtls_md_setup(&md_ctx, md_info, 0)) != 0) { in mgf_mask() 1131 if ((ret = mbedtls_md_starts(&md_ctx)) != 0) { in mgf_mask() 1134 if ((ret = mbedtls_md_update(&md_ctx, src, slen)) != 0) { in mgf_mask() 1137 if ((ret = mbedtls_md_update(&md_ctx, counter, 4)) != 0) { in mgf_mask() 1140 if ((ret = mbedtls_md_finish(&md_ctx, mask)) != 0) { in mgf_mask() 1171 mbedtls_md_free(&md_ctx); in mgf_mask() 1198 mbedtls_md_context_t md_ctx; in hash_mprime() local [all …]
|
D | pkcs5.c | 334 mbedtls_md_context_t md_ctx; in mbedtls_pkcs5_pbkdf2_hmac_ext() local 343 mbedtls_md_init(&md_ctx); in mbedtls_pkcs5_pbkdf2_hmac_ext() 345 if ((ret = mbedtls_md_setup(&md_ctx, md_info, 1)) != 0) { in mbedtls_pkcs5_pbkdf2_hmac_ext() 348 ret = pkcs5_pbkdf2_hmac(&md_ctx, password, plen, salt, slen, in mbedtls_pkcs5_pbkdf2_hmac_ext() 351 mbedtls_md_free(&md_ctx); in mbedtls_pkcs5_pbkdf2_hmac_ext()
|
/third_party/node/deps/openssl/openssl/crypto/hmac/ |
D | hmac.c | 61 if (!EVP_DigestInit_ex(ctx->md_ctx, md, impl) in HMAC_Init_ex() 62 || !EVP_DigestUpdate(ctx->md_ctx, key, len) in HMAC_Init_ex() 63 || !EVP_DigestFinal_ex(ctx->md_ctx, keytmp, in HMAC_Init_ex() 90 if (!EVP_MD_CTX_copy_ex(ctx->md_ctx, ctx->i_ctx)) in HMAC_Init_ex() 114 return EVP_DigestUpdate(ctx->md_ctx, data, len); in HMAC_Update() 125 if (!EVP_DigestFinal_ex(ctx->md_ctx, buf, &i)) in HMAC_Final() 127 if (!EVP_MD_CTX_copy_ex(ctx->md_ctx, ctx->o_ctx)) in HMAC_Final() 129 if (!EVP_DigestUpdate(ctx->md_ctx, buf, i)) in HMAC_Final() 131 if (!EVP_DigestFinal_ex(ctx->md_ctx, md, len)) in HMAC_Final() 162 EVP_MD_CTX_reset(ctx->md_ctx); in hmac_ctx_cleanup() [all …]
|
/third_party/openssl/crypto/hmac/ |
D | hmac.c | 61 if (!EVP_DigestInit_ex(ctx->md_ctx, md, impl) in HMAC_Init_ex() 62 || !EVP_DigestUpdate(ctx->md_ctx, key, len) in HMAC_Init_ex() 63 || !EVP_DigestFinal_ex(ctx->md_ctx, keytmp, in HMAC_Init_ex() 90 if (!EVP_MD_CTX_copy_ex(ctx->md_ctx, ctx->i_ctx)) in HMAC_Init_ex() 114 return EVP_DigestUpdate(ctx->md_ctx, data, len); in HMAC_Update() 125 if (!EVP_DigestFinal_ex(ctx->md_ctx, buf, &i)) in HMAC_Final() 127 if (!EVP_MD_CTX_copy_ex(ctx->md_ctx, ctx->o_ctx)) in HMAC_Final() 129 if (!EVP_DigestUpdate(ctx->md_ctx, buf, i)) in HMAC_Final() 131 if (!EVP_DigestFinal_ex(ctx->md_ctx, md, len)) in HMAC_Final() 162 EVP_MD_CTX_reset(ctx->md_ctx); in hmac_ctx_cleanup() [all …]
|
/third_party/mbedtls/programs/aes/ |
D | crypt_and_hash.c | 90 mbedtls_md_context_t md_ctx; in main() local 101 mbedtls_md_init(&md_ctx); in main() 175 if (mbedtls_md_setup(&md_ctx, md_info, 1) != 0) { in main() 249 if (mbedtls_md_starts(&md_ctx) != 0) { in main() 253 if (mbedtls_md_update(&md_ctx, buffer, 8) != 0) { in main() 257 if (mbedtls_md_update(&md_ctx, (unsigned char *) p, strlen(p)) in main() 262 if (mbedtls_md_finish(&md_ctx, digest) != 0) { in main() 285 if (mbedtls_md_starts(&md_ctx) != 0) { in main() 290 if (mbedtls_md_update(&md_ctx, digest, 32) != 0) { in main() 295 if (mbedtls_md_update(&md_ctx, key, keylen) != 0) { in main() [all …]
|
/third_party/fsverity-utils/lib/ |
D | hash_algs.c | 22 EVP_MD_CTX *md_ctx; member 31 ret = EVP_DigestInit_ex(ctx->md_ctx, ctx->md, NULL); in openssl_digest_init() 41 ret = EVP_DigestUpdate(ctx->md_ctx, data, size); in openssl_digest_update() 50 ret = EVP_DigestFinal_ex(ctx->md_ctx, digest, NULL); in openssl_digest_final() 63 EVP_MD_CTX_destroy(ctx->md_ctx); in openssl_digest_ctx_free() 86 ctx->md_ctx = EVP_MD_CTX_create(); in openssl_digest_ctx_create() 87 if (!ctx->md_ctx) { in openssl_digest_ctx_create() 99 EVP_MD_CTX_destroy(ctx->md_ctx); in openssl_digest_ctx_create()
|
D | sign_digest.c | 124 EVP_MD_CTX md_ctx; in sign_pkcs7() local 130 EVP_MD_CTX_init(&md_ctx); in sign_pkcs7() 146 if (!EVP_DigestSignInit(&md_ctx, NULL, md, NULL, pkey)) { in sign_pkcs7() 158 if (!EVP_DigestSign(&md_ctx, sig, &sig_len, data_to_sign, data_size)) { in sign_pkcs7() 216 EVP_MD_CTX_cleanup(&md_ctx); in sign_pkcs7()
|
/third_party/node/deps/openssl/openssl/ssl/ |
D | s3_cbc.c | 186 EVP_MD_CTX *md_ctx = NULL; in ssl3_cbc_digest_record() local 482 md_ctx = EVP_MD_CTX_new(); in ssl3_cbc_digest_record() 483 if (md_ctx == NULL) in ssl3_cbc_digest_record() 486 if (EVP_DigestInit_ex(md_ctx, md, NULL /* engine */ ) <= 0) in ssl3_cbc_digest_record() 492 if (EVP_DigestUpdate(md_ctx, mac_secret, mac_secret_length) <= 0 in ssl3_cbc_digest_record() 493 || EVP_DigestUpdate(md_ctx, hmac_pad, sslv3_pad_length) <= 0 in ssl3_cbc_digest_record() 494 || EVP_DigestUpdate(md_ctx, mac_out, md_size) <= 0) in ssl3_cbc_digest_record() 501 if (EVP_DigestUpdate(md_ctx, hmac_pad, md_block_size) <= 0 in ssl3_cbc_digest_record() 502 || EVP_DigestUpdate(md_ctx, mac_out, md_size) <= 0) in ssl3_cbc_digest_record() 505 ret = EVP_DigestFinal(md_ctx, md_out, &md_out_size_u); in ssl3_cbc_digest_record() [all …]
|
/third_party/openssl/ssl/ |
D | s3_cbc.c | 186 EVP_MD_CTX *md_ctx = NULL; in ssl3_cbc_digest_record() local 482 md_ctx = EVP_MD_CTX_new(); in ssl3_cbc_digest_record() 483 if (md_ctx == NULL) in ssl3_cbc_digest_record() 486 if (EVP_DigestInit_ex(md_ctx, md, NULL /* engine */ ) <= 0) in ssl3_cbc_digest_record() 492 if (EVP_DigestUpdate(md_ctx, mac_secret, mac_secret_length) <= 0 in ssl3_cbc_digest_record() 493 || EVP_DigestUpdate(md_ctx, hmac_pad, sslv3_pad_length) <= 0 in ssl3_cbc_digest_record() 494 || EVP_DigestUpdate(md_ctx, mac_out, md_size) <= 0) in ssl3_cbc_digest_record() 501 if (EVP_DigestUpdate(md_ctx, hmac_pad, md_block_size) <= 0 in ssl3_cbc_digest_record() 502 || EVP_DigestUpdate(md_ctx, mac_out, md_size) <= 0) in ssl3_cbc_digest_record() 505 ret = EVP_DigestFinal(md_ctx, md_out, &md_out_size_u); in ssl3_cbc_digest_record() [all …]
|
/third_party/rust/crates/rust-openssl/openssl/src/ |
D | sign.rs | 115 md_ctx: *mut ffi::EVP_MD_CTX, field 127 EVP_MD_CTX_free(self.md_ctx); in drop() 191 md_ctx: ctx, in new_intern() 273 self.md_ctx, in update() 298 self.md_ctx, in len_intern() 311 self.md_ctx, in len_intern() 333 self.md_ctx, in sign() 372 self.md_ctx, in sign_oneshot() 409 md_ctx: *mut ffi::EVP_MD_CTX, field 421 EVP_MD_CTX_free(self.md_ctx); in drop() [all …]
|
/third_party/openssl/test/ |
D | evp_extra_test.c | 1264 EVP_MD_CTX *md_ctx = NULL, *md_ctx_verify = NULL; in test_EVP_DigestSignInit() local 1286 if (!TEST_int_gt(BIO_get_md_ctx(mdbio, &md_ctx), 0)) in test_EVP_DigestSignInit() 1289 if (!TEST_ptr(a_md_ctx = md_ctx = EVP_MD_CTX_new()) in test_EVP_DigestSignInit() 1315 if (!TEST_true(EVP_DigestSignInit(md_ctx, NULL, md, NULL, pkey))) in test_EVP_DigestSignInit() 1318 if (reinit && !TEST_true(EVP_DigestSignInit(md_ctx, NULL, NULL, NULL, NULL))) in test_EVP_DigestSignInit() 1325 if (!TEST_true(EVP_DigestSignUpdate(md_ctx, kMsg, sizeof(kMsg)))) in test_EVP_DigestSignInit() 1331 if (!TEST_true(EVP_DigestSign(md_ctx, NULL, &sig_len, kMsg, in test_EVP_DigestSignInit() 1337 if (!TEST_false(EVP_DigestSign(md_ctx, sig, &shortsig_len, kMsg, in test_EVP_DigestSignInit() 1347 if (!TEST_true(EVP_DigestSign(md_ctx, sig, &sig_len, kMsg, in test_EVP_DigestSignInit() 1352 if (!TEST_true(EVP_DigestSignFinal(md_ctx, NULL, &sig_len)) in test_EVP_DigestSignInit() [all …]
|
D | acvp_test.c | 92 EVP_MD_CTX *md_ctx = NULL; in sig_gen() local 99 || !TEST_ptr(md_ctx = EVP_MD_CTX_new()) in sig_gen() 100 || !TEST_int_eq(EVP_DigestSignInit_ex(md_ctx, NULL, digest_name, libctx, in sig_gen() 102 || !TEST_int_gt(EVP_DigestSign(md_ctx, sig, &sig_len, msg, msg_len), 0)) in sig_gen() 110 EVP_MD_CTX_free(md_ctx); in sig_gen() 277 EVP_MD_CTX *md_ctx = NULL; in ecdsa_sigver_test() local 297 && TEST_ptr(md_ctx = EVP_MD_CTX_new()) in ecdsa_sigver_test() 298 && TEST_true(EVP_DigestVerifyInit_ex(md_ctx, NULL, tst->digest_alg, in ecdsa_sigver_test() 300 && TEST_int_eq(EVP_DigestVerify(md_ctx, sig, sig_len, in ecdsa_sigver_test() 308 EVP_MD_CTX_free(md_ctx); in ecdsa_sigver_test() [all …]
|
/third_party/mbedtls/programs/hash/ |
D | generic_sum.c | 168 mbedtls_md_context_t md_ctx; in main() local 170 mbedtls_md_init(&md_ctx); in main() 197 if (mbedtls_md_setup(&md_ctx, md_info, 0)) { in main() 217 mbedtls_md_free(&md_ctx); in main()
|
/third_party/openssl/crypto/ts/ |
D | ts_rsp_verify.c | 425 EVP_MD_CTX *md_ctx = NULL; in ts_compute_imprint() local 459 md_ctx = EVP_MD_CTX_new(); in ts_compute_imprint() 460 if (md_ctx == NULL) { in ts_compute_imprint() 464 if (!EVP_DigestInit(md_ctx, md)) in ts_compute_imprint() 469 if (!EVP_DigestUpdate(md_ctx, buffer, length)) in ts_compute_imprint() 472 if (!EVP_DigestFinal(md_ctx, *imprint, NULL)) in ts_compute_imprint() 474 EVP_MD_CTX_free(md_ctx); in ts_compute_imprint() 478 EVP_MD_CTX_free(md_ctx); in ts_compute_imprint()
|
/third_party/node/deps/openssl/openssl/crypto/ts/ |
D | ts_rsp_verify.c | 425 EVP_MD_CTX *md_ctx = NULL; in ts_compute_imprint() local 459 md_ctx = EVP_MD_CTX_new(); in ts_compute_imprint() 460 if (md_ctx == NULL) { in ts_compute_imprint() 464 if (!EVP_DigestInit(md_ctx, md)) in ts_compute_imprint() 469 if (!EVP_DigestUpdate(md_ctx, buffer, length)) in ts_compute_imprint() 472 if (!EVP_DigestFinal(md_ctx, *imprint, NULL)) in ts_compute_imprint() 474 EVP_MD_CTX_free(md_ctx); in ts_compute_imprint() 478 EVP_MD_CTX_free(md_ctx); in ts_compute_imprint()
|
/third_party/openssl/doc/man7/ |
D | EVP_SIGNATURE-ED25519.pod | 73 EVP_MD_CTX *md_ctx = EVP_MD_CTX_new(); 75 EVP_DigestSignInit(md_ctx, NULL, NULL, NULL, ed_key); 77 EVP_DigestSign(md_ctx, NULL, &sig_len, msg, msg_len); 80 EVP_DigestSign(md_ctx, sig, &sig_len, msg, msg_len); 83 EVP_MD_CTX_free(md_ctx);
|
/third_party/node/deps/openssl/openssl/ssl/record/ |
D | ssl3_record.c | 1375 EVP_MD_CTX *md_ctx = EVP_MD_CTX_new(); in n_ssl3_mac() local 1377 if (md_ctx == NULL) in n_ssl3_mac() 1383 if (EVP_MD_CTX_copy_ex(md_ctx, hash) <= 0 in n_ssl3_mac() 1384 || EVP_DigestUpdate(md_ctx, mac_sec, md_size) <= 0 in n_ssl3_mac() 1385 || EVP_DigestUpdate(md_ctx, ssl3_pad_1, npad) <= 0 in n_ssl3_mac() 1386 || EVP_DigestUpdate(md_ctx, seq, 8) <= 0 in n_ssl3_mac() 1387 || EVP_DigestUpdate(md_ctx, &rec_char, 1) <= 0 in n_ssl3_mac() 1388 || EVP_DigestUpdate(md_ctx, md, 2) <= 0 in n_ssl3_mac() 1389 || EVP_DigestUpdate(md_ctx, rec->input, rec->length) <= 0 in n_ssl3_mac() 1390 || EVP_DigestFinal_ex(md_ctx, md, NULL) <= 0 in n_ssl3_mac() [all …]
|
/third_party/openssl/ssl/record/ |
D | ssl3_record.c | 1375 EVP_MD_CTX *md_ctx = EVP_MD_CTX_new(); in n_ssl3_mac() local 1377 if (md_ctx == NULL) in n_ssl3_mac() 1383 if (EVP_MD_CTX_copy_ex(md_ctx, hash) <= 0 in n_ssl3_mac() 1384 || EVP_DigestUpdate(md_ctx, mac_sec, md_size) <= 0 in n_ssl3_mac() 1385 || EVP_DigestUpdate(md_ctx, ssl3_pad_1, npad) <= 0 in n_ssl3_mac() 1386 || EVP_DigestUpdate(md_ctx, seq, 8) <= 0 in n_ssl3_mac() 1387 || EVP_DigestUpdate(md_ctx, &rec_char, 1) <= 0 in n_ssl3_mac() 1388 || EVP_DigestUpdate(md_ctx, md, 2) <= 0 in n_ssl3_mac() 1389 || EVP_DigestUpdate(md_ctx, rec->input, rec->length) <= 0 in n_ssl3_mac() 1390 || EVP_DigestFinal_ex(md_ctx, md, NULL) <= 0 in n_ssl3_mac() [all …]
|
/third_party/openssl/crypto/x509/ |
D | x509_cmp.c | 320 EVP_MD_CTX *md_ctx = EVP_MD_CTX_new(); in X509_NAME_hash_old() local 324 if (md5 == NULL || md_ctx == NULL) in X509_NAME_hash_old() 329 if (EVP_DigestInit_ex(md_ctx, md5, NULL) in X509_NAME_hash_old() 330 && EVP_DigestUpdate(md_ctx, x->bytes->data, x->bytes->length) in X509_NAME_hash_old() 331 && EVP_DigestFinal_ex(md_ctx, md, NULL)) in X509_NAME_hash_old() 337 EVP_MD_CTX_free(md_ctx); in X509_NAME_hash_old()
|
/third_party/node/deps/openssl/openssl/crypto/x509/ |
D | x509_cmp.c | 320 EVP_MD_CTX *md_ctx = EVP_MD_CTX_new(); in X509_NAME_hash_old() local 324 if (md5 == NULL || md_ctx == NULL) in X509_NAME_hash_old() 329 if (EVP_DigestInit_ex(md_ctx, md5, NULL) in X509_NAME_hash_old() 330 && EVP_DigestUpdate(md_ctx, x->bytes->data, x->bytes->length) in X509_NAME_hash_old() 331 && EVP_DigestFinal_ex(md_ctx, md, NULL)) in X509_NAME_hash_old() 337 EVP_MD_CTX_free(md_ctx); in X509_NAME_hash_old()
|
/third_party/openssl/apps/ |
D | ts.c | 510 EVP_MD_CTX *md_ctx = NULL; in create_digest() local 520 md_ctx = EVP_MD_CTX_new(); in create_digest() 521 if (md_ctx == NULL) in create_digest() 524 if (!EVP_DigestInit(md_ctx, md)) in create_digest() 527 if (!EVP_DigestUpdate(md_ctx, buffer, length)) in create_digest() 530 if (!EVP_DigestFinal(md_ctx, *md_value, NULL)) in create_digest() 547 EVP_MD_CTX_free(md_ctx); in create_digest()
|
/third_party/node/deps/openssl/openssl/apps/ |
D | ts.c | 510 EVP_MD_CTX *md_ctx = NULL; in create_digest() local 520 md_ctx = EVP_MD_CTX_new(); in create_digest() 521 if (md_ctx == NULL) in create_digest() 524 if (!EVP_DigestInit(md_ctx, md)) in create_digest() 527 if (!EVP_DigestUpdate(md_ctx, buffer, length)) in create_digest() 530 if (!EVP_DigestFinal(md_ctx, *md_value, NULL)) in create_digest() 547 EVP_MD_CTX_free(md_ctx); in create_digest()
|