/openssl/crypto/evp/ |
H A D | bio_ok.c | 437 int md_size; in sig_out() local 446 if (md_size <= 0) in sig_out() 461 ctx->buf_len += md_size; in sig_out() 467 ctx->buf_len += md_size; in sig_out() 483 int md_size; in sig_in() local 501 ctx->buf_off += md_size; in sig_in() 508 ctx->buf_off += md_size; in sig_in() 532 int md_size; in block_out() local 538 if (md_size <= 0) in block_out() 565 int md_size; in block_in() local [all …]
|
H A D | legacy_sha.c | 32 return fn##_init(EVP_MD_CTX_get0_md_data(ctx), tag, ctx->digest->md_size * 8); \ 41 return fn##_final(kctx, md, kctx->md_size); \ 46 return fn##_init(EVP_MD_CTX_get0_md_data(ctx), tag, ctx->digest->md_size * 8); \ 83 ctx->md_size = p1; in shake_ctrl()
|
/openssl/ssl/record/methods/ |
H A D | ssl3_cbc.c | 142 size_t md_size, md_block_size = 64; in ssl3_cbc_digest_record() local 179 md_size = 16; in ssl3_cbc_digest_record() 189 md_size = 20; in ssl3_cbc_digest_record() 196 md_size = 224 / 8; in ssl3_cbc_digest_record() 203 md_size = 32; in ssl3_cbc_digest_record() 210 md_size = 384 / 8; in ssl3_cbc_digest_record() 219 md_size = 64; in ssl3_cbc_digest_record() 234 || !ossl_assert(md_size <= EVP_MAX_MD_SIZE)) in ssl3_cbc_digest_record() 274 max_mac_bytes = len - md_size - 1; in ssl3_cbc_digest_record() 451 for (j = 0; j < md_size; j++) in ssl3_cbc_digest_record() [all …]
|
H A D | ssl3_meth.c | 224 size_t md_size; in ssl3_mac() local 234 md_size = t; in ssl3_mac() 235 npad = (48 / md_size) * md_size; in ssl3_mac() 259 memcpy(header + j, mac_sec, md_size); in ssl3_mac() 260 j += md_size; in ssl3_mac() 271 md, &md_size, in ssl3_mac() 274 mac_sec, md_size, 1) <= 0) in ssl3_mac() 289 || EVP_DigestUpdate(md_ctx, mac_sec, md_size) <= 0 in ssl3_mac() 297 || EVP_DigestUpdate(md_ctx, mac_sec, md_size) <= 0 in ssl3_mac() 299 || EVP_DigestUpdate(md_ctx, md, md_size) <= 0 in ssl3_mac()
|
H A D | tls1_meth.c | 469 size_t md_size; in tls1_mac() local 480 md_size = t; in tls1_mac() 530 || EVP_DigestSignFinal(mac_ctx, md, &md_size) <= 0) in tls1_mac() 547 BIO_dump_indent(trc_out, md, md_size, 4); in tls1_mac()
|
/openssl/crypto/dsa/ |
H A D | dsa_pmeth.c | 81 int ret, md_size; in pkey_dsa_sign() local 92 md_size = EVP_MD_get_size(dctx->md); in pkey_dsa_sign() 93 if (md_size <= 0) in pkey_dsa_sign() 95 if (tbslen != (size_t)md_size) in pkey_dsa_sign() 111 int ret, md_size; in pkey_dsa_verify() local 121 md_size = EVP_MD_get_size(dctx->md); in pkey_dsa_verify() 122 if (md_size <= 0) in pkey_dsa_verify() 124 if (tbslen != (size_t)md_size) in pkey_dsa_verify()
|
/openssl/crypto/rsa/ |
H A D | rsa_pmeth.c | 147 int md_size; in pkey_rsa_sign() local 150 md_size = EVP_MD_get_size(rctx->md); in pkey_rsa_sign() 151 if (md_size <= 0) { in pkey_rsa_sign() 156 if (tbslen != (size_t)md_size) { in pkey_rsa_sign() 276 int md_size; in pkey_rsa_verify() local 283 if (md_size <= 0) { in pkey_rsa_verify() 287 if (tbslen != (size_t)md_size) { in pkey_rsa_verify() 452 int md_size; in pkey_rsa_ctrl() local 503 if (md_size <= 0) { in pkey_rsa_ctrl() 886 md_size = EVP_MD_get_size(md); in pkey_pss_init() [all …]
|
H A D | rsa_ameth.c | 457 int md_size; in rsa_ctx_to_pss() local 461 md_size = EVP_MD_get_size(sigmd); in rsa_ctx_to_pss() 462 if (md_size <= 0) in rsa_ctx_to_pss() 469 saltlen = md_size; in rsa_ctx_to_pss() 479 saltlenMax = md_size; in rsa_ctx_to_pss() 482 saltlen = EVP_PKEY_get_size(pk) - md_size - 2; in rsa_ctx_to_pss() 726 int mdnid, saltlen, md_size; in rsa_sig_info_set() local 739 md_size = EVP_MD_get_size(md); in rsa_sig_info_set() 740 if (md_size <= 0) in rsa_sig_info_set() 749 && saltlen == md_size) in rsa_sig_info_set() [all …]
|
/openssl/crypto/x509/ |
H A D | x509_set.c | 215 int pknid, mdnid, md_size; in x509_sig_info_init() local 282 md_size = EVP_MD_get_size(md); in x509_sig_info_init() 283 if (md_size <= 0) in x509_sig_info_init() 285 siginf->secbits = md_size * 4; in x509_sig_info_init()
|
/openssl/providers/implementations/kdfs/ |
H A D | hmacdrbg_kdf.c | 186 int md_size; in hmac_drbg_kdf_set_ctx_params() local 224 md_size = EVP_MD_get_size(md); in hmac_drbg_kdf_set_ctx_params() 225 if (md_size <= 0) in hmac_drbg_kdf_set_ctx_params() 227 drbg->blocklen = (size_t)md_size; in hmac_drbg_kdf_set_ctx_params()
|
/openssl/providers/implementations/digests/ |
H A D | sha3_prov.c | 119 if (ctx->md_size == SIZE_MAX) { in keccak_final() 124 ret = ctx->meth.final(ctx, out, ctx->md_size); in keccak_final() 126 *outl = ctx->md_size; in keccak_final() 511 ctx->md_size = SIZE_MAX; \ 606 if (p != NULL && !OSSL_PARAM_set_size_t(p, ctx->md_size)) { in shake_get_ctx_params() 612 if (p != NULL && !OSSL_PARAM_set_size_t(p, ctx->md_size)) { in shake_get_ctx_params() 645 if (p != NULL && !OSSL_PARAM_get_size_t(p, &ctx->md_size)) { in shake_set_ctx_params()
|
/openssl/crypto/sm2/ |
H A D | sm2_sign.c | 156 const int md_size = EVP_MD_get_size(digest); in sm2_compute_msg_hash() local 163 if (md_size <= 0) { in sm2_compute_msg_hash() 172 z = OPENSSL_zalloc(md_size); in sm2_compute_msg_hash() 188 || !EVP_DigestUpdate(hash, z, md_size) in sm2_compute_msg_hash() 196 e = BN_bin2bn(z, md_size, NULL); in sm2_compute_msg_hash()
|
H A D | sm2_crypt.c | 91 const int md_size = EVP_MD_get_size(digest); in ossl_sm2_ciphertext_size() local 94 if (field_size == 0 || md_size <= 0) in ossl_sm2_ciphertext_size() 99 + ASN1_object_size(0, md_size, V_ASN1_OCTET_STRING) in ossl_sm2_ciphertext_size()
|
/openssl/test/ |
H A D | bad_dtls_test.c | 373 int md_size; in send_finished() local 385 md_size = EVP_MD_CTX_get_size(handshake_md); in send_finished() 386 if (md_size <= 0) in send_finished() 389 handshake_hash, md_size, in send_finished()
|
/openssl/providers/implementations/rands/ |
H A D | drbg_hmac.c | 416 int md_size; in drbg_hmac_set_ctx_params_locked() local 435 md_size = EVP_MD_get_size(md); in drbg_hmac_set_ctx_params_locked() 436 if (md_size <= 0) in drbg_hmac_set_ctx_params_locked() 438 hmac->blocklen = (size_t)md_size; in drbg_hmac_set_ctx_params_locked()
|
H A D | drbg_hash.c | 513 int md_size; in drbg_hash_set_ctx_params_locked() local 528 md_size = EVP_MD_get_size(md); in drbg_hash_set_ctx_params_locked() 529 if (md_size <= 0) in drbg_hash_set_ctx_params_locked() 531 hash->blocklen = md_size; in drbg_hash_set_ctx_params_locked()
|
/openssl/crypto/sha/ |
H A D | sha3.c | 35 ctx->md_size = bitlen / 8; in ossl_sha3_init() 48 ctx->md_size = mdlen / 8; in ossl_keccak_init()
|
/openssl/providers/implementations/signature/ |
H A D | sm2_sig.c | 321 int md_size; in sm2sig_digest_verify_final() local 326 md_size = EVP_MD_get_size(psm2ctx->md); in sm2sig_digest_verify_final() 327 if (md_size <= 0 || md_size > (int)sizeof(digest)) in sm2sig_digest_verify_final()
|
H A D | ecdsa_sig.c | 172 int md_nid, md_size; in ecdsa_setup_md() local 193 md_size = EVP_MD_get_size(md); in ecdsa_setup_md() 194 if (md_size <= 0) { in ecdsa_setup_md() 196 "%s has invalid md size %d", mdname, md_size); in ecdsa_setup_md() 253 ctx->mdsize = (size_t)md_size; in ecdsa_setup_md()
|
/openssl/providers/implementations/macs/ |
H A D | kmac_prov.c | 192 int md_size; in kmac_fetch_new() local 202 md_size = EVP_MD_get_size(ossl_prov_digest_md(&kctx->digest)); in kmac_fetch_new() 203 if (md_size <= 0) { in kmac_fetch_new() 207 kctx->out_len = (size_t)md_size; in kmac_fetch_new()
|
/openssl/include/internal/ |
H A D | sha3.h | 44 size_t md_size; /* output length, variable in XOF */ member
|
/openssl/crypto/store/ |
H A D | store_lib.c | 936 int md_size; in OSSL_STORE_SEARCH_by_key_fingerprint() local 941 md_size = EVP_MD_get_size(digest); in OSSL_STORE_SEARCH_by_key_fingerprint() 942 if (md_size <= 0) { in OSSL_STORE_SEARCH_by_key_fingerprint() 947 if (digest != NULL && len != (size_t)md_size) { in OSSL_STORE_SEARCH_by_key_fingerprint() 951 EVP_MD_get0_name(digest), md_size, len); in OSSL_STORE_SEARCH_by_key_fingerprint()
|
/openssl/crypto/ffc/ |
H A D | ffc_params_generate.c | 820 int md_size; in ossl_ffc_params_FIPS186_2_gen_verify() local 849 md_size = EVP_MD_get_size(md); in ossl_ffc_params_FIPS186_2_gen_verify() 850 if (md_size <= 0) in ossl_ffc_params_FIPS186_2_gen_verify() 853 N = md_size * 8; in ossl_ffc_params_FIPS186_2_gen_verify()
|
/openssl/crypto/ts/ |
H A D | ts_rsp_sign.c | 448 int i, md_size; in ts_RESP_check_request() local 473 md_size = EVP_MD_get_size(md); in ts_RESP_check_request() 474 if (md_size <= 0) in ts_RESP_check_request() 485 if (digest->length != md_size) { in ts_RESP_check_request()
|
/openssl/ssl/ |
H A D | tls13_enc.c | 250 int md_size; in tls13_generate_master_secret() local 252 md_size = EVP_MD_get_size(md); in tls13_generate_master_secret() 253 if (md_size <= 0) { in tls13_generate_master_secret() 257 *secret_size = (size_t)md_size; in tls13_generate_master_secret()
|