Home
last modified time | relevance | path

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

/openssl/providers/implementations/signature/
H A Dsm2_sig.c84 EVP_MD_CTX *mdctx; member
202 EVP_MD_CTX_free(ctx->mdctx); in free_md()
204 ctx->mdctx = NULL; in free_md()
221 if (ctx->mdctx == NULL) { in sm2sig_digest_signverify_init()
223 if (ctx->mdctx == NULL) in sm2sig_digest_signverify_init()
361 dstctx->mdctx = NULL; in sm2sig_dupctx()
378 if (srcctx->mdctx != NULL) { in sm2sig_dupctx()
380 if (dstctx->mdctx == NULL in sm2sig_dupctx()
381 || !EVP_MD_CTX_copy_ex(dstctx->mdctx, srcctx->mdctx)) in sm2sig_dupctx()
514 if (psm2ctx->mdctx == NULL) in sm2sig_get_ctx_md_params()
[all …]
H A Ddsa_sig.c106 EVP_MD_CTX *mdctx; member
232 ctx->mdctx = NULL; in dsa_setup_md()
528 if (pdsactx->mdctx == NULL) { in dsa_digest_signverify_init()
541 pdsactx->mdctx = NULL; in dsa_digest_signverify_init()
618 EVP_MD_CTX_free(ctx->mdctx); in dsa_freectx()
650 if (srcctx->mdctx != NULL) { in dsa_dupctx()
652 if (dstctx->mdctx == NULL in dsa_dupctx()
653 || !EVP_MD_CTX_copy_ex(dstctx->mdctx, srcctx->mdctx)) in dsa_dupctx()
802 if (pdsactx->mdctx == NULL) in dsa_get_ctx_md_params()
822 if (pdsactx->mdctx == NULL) in dsa_set_ctx_md_params()
[all …]
H A Decdsa_sig.c103 EVP_MD_CTX *mdctx; member
236 EVP_MD_CTX_free(ctx->mdctx); in ecdsa_setup_md()
251 ctx->mdctx = NULL; in ecdsa_setup_md()
384 if (ctx->mdctx == NULL) in ecdsa_sign_message_final()
522 if (ctx->mdctx == NULL) { in ecdsa_digest_signverify_init()
533 ctx->mdctx = NULL; in ecdsa_digest_signverify_init()
651 || !EVP_MD_CTX_copy_ex(dstctx->mdctx, srcctx->mdctx)) in ecdsa_dupctx()
820 if (ctx->mdctx == NULL) in ecdsa_get_ctx_md_params()
840 if (ctx->mdctx == NULL) in ecdsa_set_ctx_md_params()
929 if (ctx->mdctx == NULL) { in ecdsa_sigalg_signverify_init()
[all …]
H A Drsa_sig.c126 EVP_MD_CTX *mdctx; member
451 ctx->mdctx = NULL; in rsa_setup_md()
857 if (prsactx->mdctx == NULL) in rsa_sign_message_final()
1139 if (prsactx->mdctx == NULL) in rsa_verify_message_final()
1223 prsactx->mdctx = NULL; in rsa_digest_signverify_init()
1350 dstctx->mdctx = NULL; in rsa_dupctx()
1366 if (srcctx->mdctx != NULL) { in rsa_dupctx()
1369 || !EVP_MD_CTX_copy_ex(dstctx->mdctx, srcctx->mdctx)) in rsa_dupctx()
1825 if (prsactx->mdctx == NULL) in rsa_get_ctx_md_params()
1845 if (prsactx->mdctx == NULL) in rsa_set_ctx_md_params()
[all …]
/openssl/providers/implementations/digests/
H A Dblake2_prov.c38 struct blake##variant##_md_data_st *mdctx = vctx; \
41 BLAKE##VARIANT##_CTX *ctx = &mdctx->ctx; \
50 && !OSSL_PARAM_set_uint(p, (unsigned int)mdctx->params.digest_length)) { \
61 struct blake##variant##_md_data_st *mdctx = vctx; \
64 BLAKE##VARIANT##_CTX *ctx = &mdctx->ctx; \
81 ossl_blake##variant##_param_set_digest_length(&mdctx->params, (uint8_t)size); \
89 struct blake##variant##_md_data_st *mdctx = ctx; \
90 uint8_t digest_length = mdctx->params.digest_length; \
92 ossl_blake##variant##_param_init(&mdctx->params); \
94 mdctx->params.digest_length = digest_length; \
[all …]
/openssl/crypto/bn/
H A Dbn_rand.c299 EVP_MD_CTX *mdctx = EVP_MD_CTX_new(); in ossl_bn_gen_dsa_nonce_fixed_top() local
317 if (mdctx == NULL) in ossl_bn_gen_dsa_nonce_fixed_top()
350 if (!EVP_DigestInit_ex(mdctx, md, NULL) in ossl_bn_gen_dsa_nonce_fixed_top()
351 || !EVP_DigestUpdate(mdctx, &i, sizeof(i)) in ossl_bn_gen_dsa_nonce_fixed_top()
352 || !EVP_DigestUpdate(mdctx, private_bytes, in ossl_bn_gen_dsa_nonce_fixed_top()
354 || !EVP_DigestUpdate(mdctx, message, message_len) in ossl_bn_gen_dsa_nonce_fixed_top()
355 || !EVP_DigestUpdate(mdctx, random_bytes, in ossl_bn_gen_dsa_nonce_fixed_top()
357 || !EVP_DigestFinal_ex(mdctx, digest, NULL)) in ossl_bn_gen_dsa_nonce_fixed_top()
388 EVP_MD_CTX_free(mdctx); in ossl_bn_gen_dsa_nonce_fixed_top()
/openssl/test/
H A Dp_test.c153 EVP_MD_CTX *mdctx = EVP_MD_CTX_new(); in p_get_params() local
183 && mdctx != NULL) { in p_get_params()
184 if (EVP_DigestInit_ex(mdctx, md4, NULL) in p_get_params()
185 && EVP_DigestUpdate(mdctx, (const unsigned char *)msg, in p_get_params()
187 && EVP_DigestFinal(mdctx, out, NULL)) in p_get_params()
190 EVP_MD_CTX_free(mdctx); in p_get_params()
H A Dalgorithmid_test.c116 EVP_MD_CTX *mdctx = NULL; in test_x509_sig_aid() local
152 if (!TEST_ptr(mdctx = EVP_MD_CTX_new()) in test_x509_sig_aid()
153 || !TEST_true(EVP_DigestVerifyInit_ex(mdctx, &pctx, in test_x509_sig_aid()
182 EVP_MD_CTX_free(mdctx); in test_x509_sig_aid()
H A Dtls-provider.c2646 EVP_MD_CTX *mdctx; member
2686 EVP_MD_CTX_free(ctx->mdctx); in xor_sig_setup_md()
2687 ctx->mdctx = NULL; in xor_sig_setup_md()
2699 ctx->mdctx = NULL; in xor_sig_setup_md()
2846 pxor_sigctx->mdctx = NULL; in xor_sig_digest_signverify_init()
2921 EVP_MD_CTX_free(ctx->mdctx); in xor_sig_freectx()
2924 ctx->mdctx = NULL; in xor_sig_freectx()
2944 dstctx->mdctx = NULL; in xor_sig_dupctx()
2955 if (srcctx->mdctx != NULL) { in xor_sig_dupctx()
2957 if (dstctx->mdctx == NULL in xor_sig_dupctx()
[all …]
H A Devp_extra_test.c1923 EVP_MD_CTX *mdctx = NULL; in test_siphash_digestsign() local
1959 EVP_MD_CTX_free(mdctx); in test_siphash_digestsign()
2788 if (!TEST_ptr(mdctx) in get_cmac_val()
2796 EVP_MD_CTX_free(mdctx); in get_cmac_val()
3128 if (!TEST_ptr(mdctx) in test_EVP_PKEY_CTX_get_set_params()
3156 EVP_MD_CTX_free(mdctx); in test_EVP_PKEY_CTX_get_set_params()
5213 if (!TEST_ptr(mdctx) in test_custom_md_meth()
5242 EVP_MD_CTX_free(mdctx); in test_custom_md_meth()
5898 EVP_MD_CTX *mdctx; in test_invalid_ctx_for_digest() local
5901 if (!TEST_ptr(mdctx)) in test_invalid_ctx_for_digest()
[all …]
H A Devp_extra_test2.c1326 EVP_MD_CTX *mdctx; in test_evp_md_ctx_dup() local
1331 ret = TEST_ptr(mdctx = EVP_MD_CTX_new()) in test_evp_md_ctx_dup()
1332 && TEST_ptr(copyctx = EVP_MD_CTX_dup(mdctx)); in test_evp_md_ctx_dup()
1334 EVP_MD_CTX_free(mdctx); in test_evp_md_ctx_dup()
1341 EVP_MD_CTX *mdctx = NULL; in test_evp_md_ctx_copy() local
1346 ret = TEST_ptr(mdctx = EVP_MD_CTX_new()) in test_evp_md_ctx_copy()
1348 && TEST_true(EVP_MD_CTX_copy_ex(copyctx, mdctx)); in test_evp_md_ctx_copy()
1350 EVP_MD_CTX_free(mdctx); in test_evp_md_ctx_copy()
H A Dthreadstest.c815 EVP_MD_CTX *mdctx = EVP_MD_CTX_new(); in thread_general_worker() local
839 if (!TEST_ptr(mdctx) in thread_general_worker()
847 if (!TEST_true(EVP_DigestInit_ex(mdctx, md, NULL)) in thread_general_worker()
848 || !TEST_true(EVP_DigestUpdate(mdctx, message, messlen)) in thread_general_worker()
849 || !TEST_true(EVP_DigestFinal(mdctx, out, &mdoutl))) in thread_general_worker()
872 EVP_MD_CTX_free(mdctx); in thread_general_worker()
/openssl/fuzz/
H A Dprovider.c551 EVP_MD_CTX *mdctx = NULL; in do_evp_md() local
553 if (!(mdctx = EVP_MD_CTX_new())) { in do_evp_md()
558 if (!EVP_MD_CTX_set_params(mdctx, params)) { in do_evp_md()
563 if (!EVP_DigestInit_ex2(mdctx, evp_md, NULL)) { in do_evp_md()
567 if (!EVP_DigestUpdate(mdctx, "Test", strlen("Test"))) { in do_evp_md()
571 if (!EVP_DigestFinal_ex(mdctx, md_value, &md_len)) { in do_evp_md()
577 EVP_MD_CTX_free(mdctx); in do_evp_md()
/openssl/ssl/
H A Dtls13_enc.c491 EVP_MD_CTX *mdctx = NULL; in tls13_change_cipher_state() local
551 mdctx = EVP_MD_CTX_new(); in tls13_change_cipher_state()
552 if (mdctx == NULL) { in tls13_change_cipher_state()
558 if (md == NULL || !EVP_DigestInit_ex(mdctx, md, NULL) in tls13_change_cipher_state()
559 || !EVP_DigestUpdate(mdctx, hdata, handlen) in tls13_change_cipher_state()
560 || !EVP_DigestFinal_ex(mdctx, hashval, &hashlenui)) { in tls13_change_cipher_state()
562 EVP_MD_CTX_free(mdctx); in tls13_change_cipher_state()
566 EVP_MD_CTX_free(mdctx); in tls13_change_cipher_state()
/openssl/providers/implementations/kdfs/
H A Dargon2.c652 EVP_MD_CTX *mdctx; in initial_hash() local
668 mdctx = EVP_MD_CTX_create(); in initial_hash()
669 if (mdctx == NULL || EVP_DigestInit_ex(mdctx, ctx->md, NULL) != 1) in initial_hash()
674 if (EVP_DigestUpdate(mdctx, &value, sizeof(value)) != 1) in initial_hash()
679 if (EVP_DigestUpdate(mdctx, ctx->pwd, ctx->pwdlen) != 1) in initial_hash()
689 if (EVP_DigestUpdate(mdctx, &value, sizeof(value)) != 1) in initial_hash()
697 if (EVP_DigestUpdate(mdctx, &value, sizeof(value)) != 1) in initial_hash()
710 if (EVP_DigestUpdate(mdctx, &value, sizeof(value)) != 1) in initial_hash()
714 if (EVP_DigestUpdate(mdctx, ctx->ad, ctx->adlen) != 1) in initial_hash()
718 if (EVP_DigestFinal_ex(mdctx, blockhash, &tmp) != 1) in initial_hash()
[all …]
H A Dtls1_prf.c86 static int tls1_prf_alg(EVP_MAC_CTX *mdctx, EVP_MAC_CTX *sha1ctx,
549 static int tls1_prf_alg(EVP_MAC_CTX *mdctx, EVP_MAC_CTX *sha1ctx, in tls1_prf_alg() argument
562 if (!tls1_prf_P_hash(mdctx, sec, L_S1, in tls1_prf_alg()
581 if (!tls1_prf_P_hash(mdctx, sec, slen, seed, seed_len, out, olen)) in tls1_prf_alg()
/openssl/doc/man3/
H A DEVP_DigestInit.pod745 EVP_MD_CTX *mdctx;
763 mdctx = EVP_MD_CTX_new();
764 if (mdctx == NULL) {
768 if (!EVP_DigestInit_ex2(mdctx, md, NULL)) {
770 EVP_MD_CTX_free(mdctx);
773 if (!EVP_DigestUpdate(mdctx, mess1, strlen(mess1))) {
775 EVP_MD_CTX_free(mdctx);
780 EVP_MD_CTX_free(mdctx);
783 if (!EVP_DigestFinal_ex(mdctx, md_value, &md_len)) {
785 EVP_MD_CTX_free(mdctx);
[all …]

Completed in 79 milliseconds