Lines Matching refs:md_ctx
1723 EVP_MD_CTX *md_ctx = NULL, *md_ctx_verify = NULL; in test_EVP_DigestSignInit() local
1745 if (!TEST_int_gt(BIO_get_md_ctx(mdbio, &md_ctx), 0)) in test_EVP_DigestSignInit()
1748 if (!TEST_ptr(a_md_ctx = md_ctx = EVP_MD_CTX_new()) in test_EVP_DigestSignInit()
1774 if (!TEST_true(EVP_DigestSignInit(md_ctx, NULL, md, NULL, pkey))) in test_EVP_DigestSignInit()
1777 if (reinit && !TEST_true(EVP_DigestSignInit(md_ctx, NULL, NULL, NULL, NULL))) in test_EVP_DigestSignInit()
1784 if (!TEST_true(EVP_DigestSignUpdate(md_ctx, kMsg, sizeof(kMsg)))) in test_EVP_DigestSignInit()
1790 if (!TEST_true(EVP_DigestSign(md_ctx, NULL, &sig_len, kMsg, in test_EVP_DigestSignInit()
1796 if (!TEST_false(EVP_DigestSign(md_ctx, sig, &shortsig_len, kMsg, in test_EVP_DigestSignInit()
1806 if (!TEST_true(EVP_DigestSign(md_ctx, sig, &sig_len, kMsg, in test_EVP_DigestSignInit()
1811 if (!TEST_true(EVP_DigestSignFinal(md_ctx, NULL, &sig_len)) in test_EVP_DigestSignInit()
1817 || !TEST_false(EVP_DigestSignFinal(md_ctx, sig, &shortsig_len)) in test_EVP_DigestSignInit()
1818 || !TEST_true(EVP_DigestSignFinal(md_ctx, sig, &sig_len))) in test_EVP_DigestSignInit()
1856 if (!TEST_true(EVP_DigestSignFinal(md_ctx, NULL, &sig2_len)) in test_EVP_DigestSignInit()
1858 || !TEST_true(EVP_DigestSignFinal(md_ctx, sig2, &sig2_len))) in test_EVP_DigestSignInit()
1884 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()
1893 if (!TEST_true(EVP_DigestVerifyInit(md_ctx, NULL, EVP_sha256(), NULL, pkey)) in test_EVP_DigestVerifyInit()
1894 || !TEST_true(EVP_DigestVerifyUpdate(md_ctx, kMsg, sizeof(kMsg))) in test_EVP_DigestVerifyInit()
1895 || !TEST_int_gt(EVP_DigestVerifyFinal(md_ctx, kSignature, in test_EVP_DigestVerifyInit()
1900 if (!TEST_true(EVP_DigestVerifyInit(md_ctx, NULL, NULL, NULL, NULL)) in test_EVP_DigestVerifyInit()
1901 || !TEST_true(EVP_DigestVerifyUpdate(md_ctx, kMsg, sizeof(kMsg))) in test_EVP_DigestVerifyInit()
1902 || !TEST_int_gt(EVP_DigestVerifyFinal(md_ctx, kSignature, 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()
1982 if (!TEST_true(EVP_DigestInit_ex(md_ctx, sha256, NULL)) in test_EVP_Digest()
1983 || !TEST_true(EVP_DigestUpdate(md_ctx, kMsg, sizeof(kMsg))) in test_EVP_Digest()
1984 || !TEST_true(EVP_DigestFinal(md_ctx, md, NULL)) in test_EVP_Digest()
1986 || !TEST_ptr_eq(EVP_MD_CTX_get0_md(md_ctx), NULL)) in test_EVP_Digest()
1989 if (!TEST_true(EVP_DigestInit_ex(md_ctx, sha256, NULL)) in test_EVP_Digest()
1990 || !TEST_true(EVP_DigestUpdate(md_ctx, kMsg, sizeof(kMsg))) in test_EVP_Digest()
1991 || !TEST_true(EVP_DigestFinal_ex(md_ctx, md, NULL)) in test_EVP_Digest()
1993 || !TEST_ptr(EVP_MD_CTX_get0_md(md_ctx)) in test_EVP_Digest()
1998 || !TEST_true(EVP_DigestInit_ex(md_ctx, NULL, NULL))) in test_EVP_Digest()
2001 if (!TEST_true(EVP_DigestInit_ex(md_ctx, shake256, NULL)) in test_EVP_Digest()
2002 || !TEST_true(EVP_DigestUpdate(md_ctx, kMsg, sizeof(kMsg))) in test_EVP_Digest()
2003 || !TEST_true(EVP_DigestFinalXOF(md_ctx, md, sizeof(md))) in test_EVP_Digest()
2005 || !TEST_ptr(EVP_MD_CTX_get0_md(md_ctx)) in test_EVP_Digest()
2006 || !TEST_true(EVP_DigestInit_ex(md_ctx, NULL, NULL))) 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
2029 || !TEST_ptr(md_ctx = EVP_MD_CTX_new())) in test_EVP_md_null()
2032 if (!TEST_true(EVP_DigestInit_ex(md_ctx, md_null, NULL)) in test_EVP_md_null()
2033 || !TEST_true(EVP_DigestUpdate(md_ctx, "test", 4)) in test_EVP_md_null()
2034 || !TEST_true(EVP_DigestFinal_ex(md_ctx, md_value, &md_len))) in test_EVP_md_null()
2042 EVP_MD_CTX_free(md_ctx); in test_EVP_md_null()
2381 EVP_MD_CTX *md_ctx = NULL; in test_EVP_SM2() local
2422 if (!TEST_ptr(md_ctx = EVP_MD_CTX_new())) in test_EVP_SM2()
2431 EVP_MD_CTX_set_pkey_ctx(md_ctx, sctx); in test_EVP_SM2()
2437 if (!TEST_true(EVP_DigestSignInit(md_ctx, NULL, check_md, NULL, pkey))) in test_EVP_SM2()
2443 if (!TEST_true(EVP_DigestSignUpdate(md_ctx, kMsg, sizeof(kMsg)))) in test_EVP_SM2()
2447 if (!TEST_true(EVP_DigestSignFinal(md_ctx, NULL, &sig_len))) in test_EVP_SM2()
2453 if (!TEST_true(EVP_DigestSignFinal(md_ctx, sig, &sig_len))) in test_EVP_SM2()
2565 EVP_MD_CTX_free(md_ctx); in test_EVP_SM2()