Home
last modified time | relevance | path

Searched refs:md_ctx (Results 1 – 18 of 18) sorted by relevance

/openssl/ssl/record/methods/
H A Dssl3_meth.c41 rl->md_ctx = EVP_MD_CTX_new(); in ssl3_set_crypto_state()
42 if (rl->md_ctx == NULL) { in ssl3_set_crypto_state()
229 hash = rl->md_ctx; in ssl3_mac()
280 EVP_MD_CTX *md_ctx = EVP_MD_CTX_new(); in ssl3_mac() local
282 if (md_ctx == NULL) in ssl3_mac()
288 if (EVP_MD_CTX_copy_ex(md_ctx, hash) <= 0 in ssl3_mac()
291 || EVP_DigestUpdate(md_ctx, seq, 8) <= 0 in ssl3_mac()
293 || EVP_DigestUpdate(md_ctx, md, 2) <= 0 in ssl3_mac()
296 || EVP_MD_CTX_copy_ex(md_ctx, hash) <= 0 in ssl3_mac()
301 EVP_MD_CTX_free(md_ctx); in ssl3_mac()
[all …]
H A Dssl3_cbc.c154 EVP_MD_CTX *md_ctx = NULL; in ssl3_cbc_digest_record() local
455 md_ctx = EVP_MD_CTX_new(); in ssl3_cbc_digest_record()
456 if (md_ctx == NULL) in ssl3_cbc_digest_record()
459 if (EVP_DigestInit_ex(md_ctx, md, NULL /* engine */) <= 0) in ssl3_cbc_digest_record()
465 if (EVP_DigestUpdate(md_ctx, mac_secret, mac_secret_length) <= 0 in ssl3_cbc_digest_record()
466 || EVP_DigestUpdate(md_ctx, hmac_pad, sslv3_pad_length) <= 0 in ssl3_cbc_digest_record()
467 || EVP_DigestUpdate(md_ctx, mac_out, md_size) <= 0) in ssl3_cbc_digest_record()
474 if (EVP_DigestUpdate(md_ctx, hmac_pad, md_block_size) <= 0 in ssl3_cbc_digest_record()
475 || EVP_DigestUpdate(md_ctx, mac_out, md_size) <= 0) in ssl3_cbc_digest_record()
478 ret = EVP_DigestFinal(md_ctx, md_out, &md_out_size_u); in ssl3_cbc_digest_record()
[all …]
H A Dtls1_meth.c43 rl->md_ctx = EVP_MD_CTX_new(); in tls1_set_crypto_state()
44 if (rl->md_ctx == NULL) { in tls1_set_crypto_state()
77 || EVP_DigestSignInit_ex(rl->md_ctx, NULL, EVP_MD_get0_name(md), in tls1_set_crypto_state()
185 if (EVP_MD_CTX_get0_md(rl->md_ctx)) { in tls1_cipher()
186 int n = EVP_MD_CTX_get_size(rl->md_ctx); in tls1_cipher()
475 hash = rl->md_ctx; in tls1_mac()
H A Ddtls_meth.c149 if (rl->md_ctx != NULL) { in dtls_process_record()
150 const EVP_MD *tmpmd = EVP_MD_CTX_get0_md(rl->md_ctx); in dtls_process_record()
162 if (rl->use_etm && rl->md_ctx != NULL) { in dtls_process_record()
218 && (EVP_MD_CTX_get0_md(rl->md_ctx) != NULL)) { in dtls_process_record()
H A Dtls_common.c771 if (rl->md_ctx != NULL) { in tls_get_more_records()
772 const EVP_MD *tmpmd = EVP_MD_CTX_get0_md(rl->md_ctx); in tls_get_more_records()
788 if (rl->use_etm && rl->md_ctx != NULL) { in tls_get_more_records()
883 && EVP_MD_CTX_get0_md(rl->md_ctx) != NULL) { in tls_get_more_records()
1455 EVP_MD_CTX_free(rl->md_ctx); in tls_int_free()
1761 if (rl->md_ctx != NULL && EVP_MD_CTX_get0_md(rl->md_ctx) != NULL) { in tls_write_records_default()
1762 mac_size = EVP_MD_CTX_get_size(rl->md_ctx); in tls_write_records_default()
H A Drecmethod_local.h303 EVP_MD_CTX *md_ctx; member
/openssl/crypto/hmac/
H A Dhmac.c126 return EVP_DigestUpdate(ctx->md_ctx, data, len); in HMAC_Update()
142 if (!EVP_DigestFinal_ex(ctx->md_ctx, buf, &i)) in HMAC_Final()
146 if (!EVP_DigestUpdate(ctx->md_ctx, buf, i)) in HMAC_Final()
148 if (!EVP_DigestFinal_ex(ctx->md_ctx, md, len)) in HMAC_Final()
179 EVP_MD_CTX_reset(ctx->md_ctx); in hmac_ctx_cleanup()
193 EVP_MD_CTX_free(ctx->md_ctx); in HMAC_CTX_free()
208 if (ctx->md_ctx == NULL) in hmac_ctx_alloc_mds()
209 ctx->md_ctx = EVP_MD_CTX_new(); in hmac_ctx_alloc_mds()
210 if (ctx->md_ctx == NULL) in hmac_ctx_alloc_mds()
233 if (!EVP_MD_CTX_copy_ex(dctx->md_ctx, sctx->md_ctx)) in HMAC_CTX_copy()
[all …]
H A Dhmac_local.h22 EVP_MD_CTX *md_ctx; member
H A Dhmac_s390x.c172 if (!EVP_DigestInit_ex(ctx->md_ctx, ctx->md, impl) in s390x_HMAC_init()
173 || !EVP_DigestUpdate(ctx->md_ctx, key, key_len) in s390x_HMAC_init()
174 || !EVP_DigestFinal_ex(ctx->md_ctx, key_param, in s390x_HMAC_init()
/openssl/crypto/ts/
H A Dts_rsp_verify.c425 EVP_MD_CTX *md_ctx = NULL; in ts_compute_imprint() local
457 md_ctx = EVP_MD_CTX_new(); in ts_compute_imprint()
458 if (md_ctx == NULL) { in ts_compute_imprint()
462 if (!EVP_DigestInit(md_ctx, md)) in ts_compute_imprint()
467 if (!EVP_DigestUpdate(md_ctx, buffer, length)) in ts_compute_imprint()
470 if (!EVP_DigestFinal(md_ctx, *imprint, NULL)) in ts_compute_imprint()
472 EVP_MD_CTX_free(md_ctx); in ts_compute_imprint()
476 EVP_MD_CTX_free(md_ctx); in ts_compute_imprint()
/openssl/test/
H A Devp_extra_test.c1884 EVP_MD_CTX *md_ctx = NULL; in test_EVP_DigestVerifyInit() local
1889 if (!TEST_ptr(md_ctx = EVP_MD_CTX_new()) in test_EVP_DigestVerifyInit()
1908 EVP_MD_CTX_free(md_ctx); in test_EVP_DigestVerifyInit()
1970 EVP_MD_CTX *md_ctx = NULL; in test_EVP_Digest() local
1975 if (!TEST_ptr(md_ctx = EVP_MD_CTX_new())) in test_EVP_Digest()
2011 EVP_MD_CTX_free(md_ctx); in test_EVP_Digest()
2020 EVP_MD_CTX *md_ctx = NULL; in test_EVP_md_null() local
2042 EVP_MD_CTX_free(md_ctx); in test_EVP_md_null()
2381 EVP_MD_CTX *md_ctx = NULL; in test_EVP_SM2() local
2431 EVP_MD_CTX_set_pkey_ctx(md_ctx, sctx); in test_EVP_SM2()
[all …]
H A Dacvp_test.c100 EVP_MD_CTX *md_ctx = NULL; in sig_gen() local
108 || !TEST_ptr(md_ctx = EVP_MD_CTX_new()) in sig_gen()
119 EVP_MD_CTX_free(md_ctx); in sig_gen()
305 EVP_MD_CTX *md_ctx = NULL; in ecdsa_sigver_test() local
326 || !TEST_ptr(md_ctx = EVP_MD_CTX_new()) in ecdsa_sigver_test()
329 || !TEST_ptr(pkey_ctx = EVP_MD_CTX_get_pkey_ctx(md_ctx)) in ecdsa_sigver_test()
331 || !TEST_int_eq(EVP_DigestVerify(md_ctx, sig, sig_len, in ecdsa_sigver_test()
345 EVP_MD_CTX_free(md_ctx); in ecdsa_sigver_test()
1452 EVP_MD_CTX *md_ctx = NULL; in rsa_sigver_test() local
1474 || !TEST_ptr(md_ctx = EVP_MD_CTX_new()) in rsa_sigver_test()
[all …]
/openssl/crypto/x509/
H A Dx509_cmp.c321 EVP_MD_CTX *md_ctx = EVP_MD_CTX_new(); in X509_NAME_hash_old() local
325 if (md5 == NULL || md_ctx == NULL) in X509_NAME_hash_old()
332 if (EVP_DigestInit_ex(md_ctx, md5, NULL) in X509_NAME_hash_old()
333 && EVP_DigestUpdate(md_ctx, x->bytes->data, x->bytes->length) in X509_NAME_hash_old()
334 && EVP_DigestFinal_ex(md_ctx, md, NULL)) in X509_NAME_hash_old()
340 EVP_MD_CTX_free(md_ctx); in X509_NAME_hash_old()
/openssl/doc/man7/
H A DEVP_SIGNATURE-ED25519.pod145 EVP_MD_CTX *md_ctx = EVP_MD_CTX_new();
155 EVP_DigestSignInit_ex(md_ctx, NULL, NULL, NULL, NULL, ed_key, params);
157 EVP_DigestSign(md_ctx, NULL, &sig_len, msg, msg_len);
160 EVP_DigestSign(md_ctx, sig, &sig_len, msg, msg_len);
163 EVP_MD_CTX_free(md_ctx);
H A Dossl-guide-migration.pod601 EVP_MD_CTX md_ctx;
604 EVP_MD_CTX_init(&md_ctx);
608 EVP_MD_CTX *md_ctx;
610 md_ctx = EVP_MD_CTX_new();
613 EVP_MD_CTX_free(md_ctx);
/openssl/apps/
H A Dts.c513 EVP_MD_CTX *md_ctx = NULL; in create_digest() local
523 md_ctx = EVP_MD_CTX_new(); in create_digest()
524 if (md_ctx == NULL) in create_digest()
527 if (!EVP_DigestInit(md_ctx, md)) in create_digest()
530 if (!EVP_DigestUpdate(md_ctx, buffer, length)) in create_digest()
533 if (!EVP_DigestFinal(md_ctx, *md_value, NULL)) in create_digest()
553 EVP_MD_CTX_free(md_ctx); in create_digest()
/openssl/ssl/statem/
H A Dstatem_clnt.c2407 EVP_MD_CTX *md_ctx = NULL; in tls_process_key_exchange() local
2499 md_ctx = EVP_MD_CTX_new(); in tls_process_key_exchange()
2500 if (md_ctx == NULL) { in tls_process_key_exchange()
2505 if (EVP_DigestVerifyInit_ex(md_ctx, &pctx, in tls_process_key_exchange()
2527 rv = EVP_DigestVerify(md_ctx, PACKET_data(&signature), in tls_process_key_exchange()
2534 EVP_MD_CTX_free(md_ctx); in tls_process_key_exchange()
2535 md_ctx = NULL; in tls_process_key_exchange()
2556 EVP_MD_CTX_free(md_ctx); in tls_process_key_exchange()
H A Dstatem_srvr.c2527 EVP_MD_CTX *md_ctx = EVP_MD_CTX_new(); in tls_construct_server_key_exchange() local
2539 if (md_ctx == NULL) { in tls_construct_server_key_exchange()
2779 if (EVP_DigestSignInit_ex(md_ctx, &pctx, in tls_construct_server_key_exchange()
2801 if (EVP_DigestSign(md_ctx, NULL, &siglen, tbs, tbslen) <=0 in tls_construct_server_key_exchange()
2803 || EVP_DigestSign(md_ctx, sigbytes1, &siglen, tbs, tbslen) <= 0 in tls_construct_server_key_exchange()
2817 EVP_MD_CTX_free(md_ctx); in tls_construct_server_key_exchange()

Completed in 88 milliseconds