Home
last modified time | relevance | path

Searched refs:mdctx (Results 1 – 10 of 10) sorted by relevance

/third_party/libwebsockets/lib/tls/openssl/
Dlws-genhash.c39 ctx->mdctx = EVP_MD_CTX_create(); in lws_genhash_init()
40 if (!ctx->mdctx) in lws_genhash_init()
63 if (EVP_DigestInit_ex(ctx->mdctx, ctx->evp_type, NULL) != 1) { in lws_genhash_init()
64 EVP_MD_CTX_destroy(ctx->mdctx); in lws_genhash_init()
78 return EVP_DigestUpdate(ctx->mdctx, in, len) != 1; in lws_genhash_update()
87 if (!ctx->mdctx) in lws_genhash_destroy()
91 ret = EVP_DigestFinal_ex(ctx->mdctx, result, &len) != 1; in lws_genhash_destroy()
95 EVP_MD_CTX_destroy(ctx->mdctx); in lws_genhash_destroy()
96 ctx->mdctx = NULL; in lws_genhash_destroy()
Dlws-genrsa.c335 EVP_MD_CTX *mdctx = NULL; local
363 mdctx = EVP_MD_CTX_create();
364 if (!mdctx)
367 if (EVP_DigestSignInit(mdctx, NULL, md, NULL,
377 if (EVP_DigestSignUpdate(mdctx, in, (unsigned int)EVP_MD_size(md))) {
382 if (EVP_DigestSignFinal(mdctx, sig, &sig_len)) {
387 EVP_MD_CTX_free(mdctx);
398 if (mdctx)
399 EVP_MD_CTX_free(mdctx);
Dopenssl-client.c727 EVP_MD_CTX *mdctx; local
773 mdctx = EVP_MD_CTX_create();
774 if (!mdctx)
777 if (EVP_DigestInit_ex(mdctx, EVP_sha256(), NULL) != 1) {
778 EVP_MD_CTX_destroy(mdctx);
784 EVP_DigestUpdate(mdctx, &info->ssl_client_options_set,
789 EVP_DigestUpdate(mdctx, &info->ssl_client_options_clear,
794 EVP_DigestUpdate(mdctx, cipher_list, strlen(cipher_list));
798 EVP_DigestUpdate(mdctx, info->client_tls_1_3_plus_cipher_list,
804 EVP_DigestUpdate(mdctx, &c, 1);
[all …]
Dlws-genec.c479 EVP_MD_CTX *mdctx = NULL;
487 mdctx = EVP_MD_CTX_create();
488 if (!mdctx)
491 if (EVP_DigestSignInit(mdctx, NULL, md, NULL,
497 if (EVP_DigestSignUpdate(mdctx, in, EVP_MD_size(md))) {
502 if (EVP_DigestSignFinal(mdctx, sig, &sig_len)) {
508 EVP_MD_CTX_free(mdctx);
512 if (mdctx)
513 EVP_MD_CTX_free(mdctx);
/third_party/openssl/ssl/
Dtls13_enc.c509 EVP_MD_CTX *mdctx = NULL; in tls13_change_cipher_state() local
557 mdctx = EVP_MD_CTX_new(); in tls13_change_cipher_state()
558 if (mdctx == NULL) { in tls13_change_cipher_state()
565 if (md == NULL || !EVP_DigestInit_ex(mdctx, md, NULL) in tls13_change_cipher_state()
566 || !EVP_DigestUpdate(mdctx, hdata, handlen) in tls13_change_cipher_state()
567 || !EVP_DigestFinal_ex(mdctx, hashval, &hashlenui)) { in tls13_change_cipher_state()
570 EVP_MD_CTX_free(mdctx); in tls13_change_cipher_state()
574 EVP_MD_CTX_free(mdctx); in tls13_change_cipher_state()
/third_party/openssl/doc/man3/
DEVP_DigestInit.pod379 EVP_MD_CTX *mdctx;
397 mdctx = EVP_MD_CTX_new();
398 EVP_DigestInit_ex(mdctx, md, NULL);
399 EVP_DigestUpdate(mdctx, mess1, strlen(mess1));
400 EVP_DigestUpdate(mdctx, mess2, strlen(mess2));
401 EVP_DigestFinal_ex(mdctx, md_value, &md_len);
402 EVP_MD_CTX_free(mdctx);
/third_party/openssl/test/
Devp_extra_test.c1797 EVP_MD_CTX *mdctx = NULL; in test_custom_md_meth() local
1820 mdctx = EVP_MD_CTX_new(); in test_custom_md_meth()
1821 if (!TEST_ptr(mdctx) in test_custom_md_meth()
1827 || !TEST_true(EVP_DigestInit_ex(mdctx, tmp, NULL)) in test_custom_md_meth()
1828 || !TEST_true(EVP_DigestInit_ex(mdctx, EVP_sha256(), NULL)) in test_custom_md_meth()
1829 || !TEST_true(EVP_DigestUpdate(mdctx, mess, strlen(mess))) in test_custom_md_meth()
1830 || !TEST_true(EVP_DigestFinal_ex(mdctx, md_value, &md_len)) in test_custom_md_meth()
1837 EVP_MD_CTX_free(mdctx); in test_custom_md_meth()
/third_party/libwebsockets/include/libwebsockets/
Dlws-genhash.h66 EVP_MD_CTX *mdctx; member
/third_party/curl/lib/vtls/
Dopenssl.c4456 EVP_MD_CTX *mdctx; in ossl_sha256sum() local
4460 mdctx = EVP_MD_CTX_create(); in ossl_sha256sum()
4461 if(!mdctx) in ossl_sha256sum()
4463 EVP_DigestInit(mdctx, EVP_sha256()); in ossl_sha256sum()
4464 EVP_DigestUpdate(mdctx, tmp, tmplen); in ossl_sha256sum()
4465 EVP_DigestFinal_ex(mdctx, sha256sum, &len); in ossl_sha256sum()
4466 EVP_MD_CTX_destroy(mdctx); in ossl_sha256sum()
/third_party/node/src/
Dnode_crypto.cc4671 EVPMDPointer&& mdctx, in Node_SignFinal() argument
4678 if (!EVP_DigestFinal_ex(mdctx.get(), m, &m_len)) in Node_SignFinal()
4691 EVP_MD_CTX_md(mdctx.get())) > 0 && in Node_SignFinal()
4732 EVPMDPointer mdctx = std::move(mdctx_); in SignFinal() local
4738 Node_SignFinal(env(), std::move(mdctx), pkey, padding, salt_len); in SignFinal()
4828 EVPMDPointer mdctx(EVP_MD_CTX_new()); in SignOneShot() local
4829 if (!mdctx || in SignOneShot()
4830 !EVP_DigestSignInit(mdctx.get(), &pkctx, md, nullptr, key.get())) { in SignOneShot()
4840 if (!EVP_DigestSign(mdctx.get(), nullptr, &sig_len, input, data.length())) in SignOneShot()
4844 if (!EVP_DigestSign(mdctx.get(), in SignOneShot()
[all …]