/third_party/mbedtls/library/ |
D | md.c | 240 if( ctx->md_ctx != NULL ) in mbedtls_md_free() 246 mbedtls_md5_free( ctx->md_ctx ); in mbedtls_md_free() 251 mbedtls_ripemd160_free( ctx->md_ctx ); in mbedtls_md_free() 256 mbedtls_sha1_free( ctx->md_ctx ); in mbedtls_md_free() 261 mbedtls_sha256_free( ctx->md_ctx ); in mbedtls_md_free() 266 mbedtls_sha256_free( ctx->md_ctx ); in mbedtls_md_free() 271 mbedtls_sha512_free( ctx->md_ctx ); in mbedtls_md_free() 276 mbedtls_sha512_free( ctx->md_ctx ); in mbedtls_md_free() 283 mbedtls_free( ctx->md_ctx ); in mbedtls_md_free() 310 mbedtls_md5_clone( dst->md_ctx, src->md_ctx ); in mbedtls_md_clone() [all …]
|
D | hmac_drbg.c | 66 size_t md_len = mbedtls_md_get_size( ctx->md_ctx.md_info ); in mbedtls_hmac_drbg_update() 75 if( ( ret = mbedtls_md_hmac_reset( &ctx->md_ctx ) ) != 0 ) in mbedtls_hmac_drbg_update() 77 if( ( ret = mbedtls_md_hmac_update( &ctx->md_ctx, in mbedtls_hmac_drbg_update() 80 if( ( ret = mbedtls_md_hmac_update( &ctx->md_ctx, in mbedtls_hmac_drbg_update() 85 if( ( ret = mbedtls_md_hmac_update( &ctx->md_ctx, in mbedtls_hmac_drbg_update() 89 if( ( ret = mbedtls_md_hmac_finish( &ctx->md_ctx, K ) ) != 0 ) in mbedtls_hmac_drbg_update() 93 if( ( ret = mbedtls_md_hmac_starts( &ctx->md_ctx, K, md_len ) ) != 0 ) in mbedtls_hmac_drbg_update() 95 if( ( ret = mbedtls_md_hmac_update( &ctx->md_ctx, in mbedtls_hmac_drbg_update() 98 if( ( ret = mbedtls_md_hmac_finish( &ctx->md_ctx, ctx->V ) ) != 0 ) in mbedtls_hmac_drbg_update() 116 if( ( ret = mbedtls_md_setup( &ctx->md_ctx, md_info, 1 ) ) != 0 ) in mbedtls_hmac_drbg_seed_buf() [all …]
|
D | pkcs12.c | 231 mbedtls_md_context_t md_ctx; in mbedtls_pkcs12_derivation() local 250 mbedtls_md_init( &md_ctx ); in mbedtls_pkcs12_derivation() 252 if( ( ret = mbedtls_md_setup( &md_ctx, md_info, 0 ) ) != 0 ) in mbedtls_pkcs12_derivation() 277 if( ( ret = mbedtls_md_starts( &md_ctx ) ) != 0 ) in mbedtls_pkcs12_derivation() 280 if( ( ret = mbedtls_md_update( &md_ctx, diversifier, v ) ) != 0 ) in mbedtls_pkcs12_derivation() 285 if( ( ret = mbedtls_md_update( &md_ctx, salt_block, v )) != 0 ) in mbedtls_pkcs12_derivation() 291 if( ( ret = mbedtls_md_update( &md_ctx, pwd_block, v )) != 0 ) in mbedtls_pkcs12_derivation() 295 if( ( ret = mbedtls_md_finish( &md_ctx, hash_output ) ) != 0 ) in mbedtls_pkcs12_derivation() 354 mbedtls_md_free( &md_ctx ); in mbedtls_pkcs12_derivation()
|
D | rsa.c | 1102 size_t slen, mbedtls_md_context_t *md_ctx ) in mgf_mask() argument 1114 hlen = mbedtls_md_get_size( md_ctx->md_info ); in mgf_mask() 1125 if( ( ret = mbedtls_md_starts( md_ctx ) ) != 0 ) in mgf_mask() 1127 if( ( ret = mbedtls_md_update( md_ctx, src, slen ) ) != 0 ) in mgf_mask() 1129 if( ( ret = mbedtls_md_update( md_ctx, counter, 4 ) ) != 0 ) in mgf_mask() 1131 if( ( ret = mbedtls_md_finish( md_ctx, mask ) ) != 0 ) in mgf_mask() 1166 mbedtls_md_context_t md_ctx; in mbedtls_rsa_rsaes_oaep_encrypt() local 1206 mbedtls_md_init( &md_ctx ); in mbedtls_rsa_rsaes_oaep_encrypt() 1207 if( ( ret = mbedtls_md_setup( &md_ctx, md_info, 0 ) ) != 0 ) in mbedtls_rsa_rsaes_oaep_encrypt() 1212 &md_ctx ) ) != 0 ) in mbedtls_rsa_rsaes_oaep_encrypt() [all …]
|
D | pkcs5.c | 123 mbedtls_md_context_t md_ctx; in mbedtls_pkcs5_pbes2() local 185 mbedtls_md_init( &md_ctx ); in mbedtls_pkcs5_pbes2() 190 if( ( ret = mbedtls_md_setup( &md_ctx, md_info, 1 ) ) != 0 ) in mbedtls_pkcs5_pbes2() 193 if( ( ret = mbedtls_pkcs5_pbkdf2_hmac( &md_ctx, pwd, pwdlen, salt.p, salt.len, in mbedtls_pkcs5_pbes2() 211 mbedtls_md_free( &md_ctx ); in mbedtls_pkcs5_pbes2()
|
D | ssl_tls.c | 474 mbedtls_md_context_t md_ctx; in tls_prf_generic() local 477 mbedtls_md_init( &md_ctx ); in tls_prf_generic() 500 if ( ( ret = mbedtls_md_setup( &md_ctx, md_info, 1 ) ) != 0 ) in tls_prf_generic() 503 ret = mbedtls_md_hmac_starts( &md_ctx, secret, slen ); in tls_prf_generic() 506 ret = mbedtls_md_hmac_update( &md_ctx, tmp + md_len, nb ); in tls_prf_generic() 509 ret = mbedtls_md_hmac_finish( &md_ctx, tmp ); in tls_prf_generic() 515 ret = mbedtls_md_hmac_reset ( &md_ctx ); in tls_prf_generic() 518 ret = mbedtls_md_hmac_update( &md_ctx, tmp, md_len + nb ); in tls_prf_generic() 521 ret = mbedtls_md_hmac_finish( &md_ctx, h_i ); in tls_prf_generic() 525 ret = mbedtls_md_hmac_reset ( &md_ctx ); in tls_prf_generic() [all …]
|
/third_party/openssl/crypto/hmac/ |
D | hmac.c | 61 if (!EVP_DigestInit_ex(ctx->md_ctx, md, impl) in HMAC_Init_ex() 62 || !EVP_DigestUpdate(ctx->md_ctx, key, len) in HMAC_Init_ex() 63 || !EVP_DigestFinal_ex(ctx->md_ctx, keytmp, in HMAC_Init_ex() 90 if (!EVP_MD_CTX_copy_ex(ctx->md_ctx, ctx->i_ctx)) in HMAC_Init_ex() 114 return EVP_DigestUpdate(ctx->md_ctx, data, len); in HMAC_Update() 125 if (!EVP_DigestFinal_ex(ctx->md_ctx, buf, &i)) in HMAC_Final() 127 if (!EVP_MD_CTX_copy_ex(ctx->md_ctx, ctx->o_ctx)) in HMAC_Final() 129 if (!EVP_DigestUpdate(ctx->md_ctx, buf, i)) in HMAC_Final() 131 if (!EVP_DigestFinal_ex(ctx->md_ctx, md, len)) in HMAC_Final() 162 EVP_MD_CTX_reset(ctx->md_ctx); in hmac_ctx_cleanup() [all …]
|
D | hmac_local.h | 18 EVP_MD_CTX *md_ctx; member
|
/third_party/mbedtls/programs/aes/ |
D | crypt_and_hash.c | 100 mbedtls_md_context_t md_ctx; in main() local 111 mbedtls_md_init( &md_ctx ); in main() 196 if( mbedtls_md_setup( &md_ctx, md_info, 1 ) != 0 ) in main() 280 if( mbedtls_md_starts( &md_ctx ) != 0 ) in main() 285 if( mbedtls_md_update( &md_ctx, buffer, 8 ) != 0 ) in main() 290 if( mbedtls_md_update( &md_ctx, ( unsigned char * ) p, strlen( p ) ) in main() 296 if( mbedtls_md_finish( &md_ctx, digest ) != 0 ) in main() 322 if( mbedtls_md_starts( &md_ctx ) != 0 ) in main() 328 if( mbedtls_md_update( &md_ctx, digest, 32 ) != 0 ) in main() 334 if( mbedtls_md_update( &md_ctx, key, keylen ) != 0 ) in main() [all …]
|
/third_party/fsverity-utils/lib/ |
D | hash_algs.c | 22 EVP_MD_CTX *md_ctx; member 31 ret = EVP_DigestInit_ex(ctx->md_ctx, ctx->md, NULL); in openssl_digest_init() 41 ret = EVP_DigestUpdate(ctx->md_ctx, data, size); in openssl_digest_update() 50 ret = EVP_DigestFinal_ex(ctx->md_ctx, digest, NULL); in openssl_digest_final() 63 EVP_MD_CTX_destroy(ctx->md_ctx); in openssl_digest_ctx_free() 86 ctx->md_ctx = EVP_MD_CTX_create(); in openssl_digest_ctx_create() 87 if (!ctx->md_ctx) { in openssl_digest_ctx_create() 99 EVP_MD_CTX_destroy(ctx->md_ctx); in openssl_digest_ctx_create()
|
D | sign_digest.c | 124 EVP_MD_CTX md_ctx; in sign_pkcs7() local 130 EVP_MD_CTX_init(&md_ctx); in sign_pkcs7() 146 if (!EVP_DigestSignInit(&md_ctx, NULL, md, NULL, pkey)) { in sign_pkcs7() 158 if (!EVP_DigestSign(&md_ctx, sig, &sig_len, data_to_sign, data_size)) { in sign_pkcs7() 216 EVP_MD_CTX_cleanup(&md_ctx); in sign_pkcs7()
|
/third_party/openssl/ssl/ |
D | s3_cbc.c | 186 EVP_MD_CTX *md_ctx = NULL; in ssl3_cbc_digest_record() local 482 md_ctx = EVP_MD_CTX_new(); in ssl3_cbc_digest_record() 483 if (md_ctx == NULL) in ssl3_cbc_digest_record() 486 if (EVP_DigestInit_ex(md_ctx, md, NULL /* engine */ ) <= 0) in ssl3_cbc_digest_record() 492 if (EVP_DigestUpdate(md_ctx, mac_secret, mac_secret_length) <= 0 in ssl3_cbc_digest_record() 493 || EVP_DigestUpdate(md_ctx, hmac_pad, sslv3_pad_length) <= 0 in ssl3_cbc_digest_record() 494 || EVP_DigestUpdate(md_ctx, mac_out, md_size) <= 0) in ssl3_cbc_digest_record() 501 if (EVP_DigestUpdate(md_ctx, hmac_pad, md_block_size) <= 0 in ssl3_cbc_digest_record() 502 || EVP_DigestUpdate(md_ctx, mac_out, md_size) <= 0) in ssl3_cbc_digest_record() 505 ret = EVP_DigestFinal(md_ctx, md_out, &md_out_size_u); in ssl3_cbc_digest_record() [all …]
|
/third_party/rust/crates/rust-openssl/openssl/src/ |
D | sign.rs | 115 md_ctx: *mut ffi::EVP_MD_CTX, field 127 EVP_MD_CTX_free(self.md_ctx); in drop() 191 md_ctx: ctx, in new_intern() 273 self.md_ctx, in update() 298 self.md_ctx, in len_intern() 311 self.md_ctx, in len_intern() 333 self.md_ctx, in sign() 372 self.md_ctx, in sign_oneshot() 409 md_ctx: *mut ffi::EVP_MD_CTX, field 421 EVP_MD_CTX_free(self.md_ctx); in drop() [all …]
|
D | lib.rs | 163 pub mod md_ctx; module
|
/third_party/openssl/test/ |
D | evp_extra_test.c | 1241 EVP_MD_CTX *md_ctx = NULL, *md_ctx_verify = NULL; in test_EVP_DigestSignInit() local 1263 if (!TEST_int_gt(BIO_get_md_ctx(mdbio, &md_ctx), 0)) in test_EVP_DigestSignInit() 1266 if (!TEST_ptr(a_md_ctx = md_ctx = EVP_MD_CTX_new()) in test_EVP_DigestSignInit() 1292 if (!TEST_true(EVP_DigestSignInit(md_ctx, NULL, md, NULL, pkey))) in test_EVP_DigestSignInit() 1295 if (reinit && !TEST_true(EVP_DigestSignInit(md_ctx, NULL, NULL, NULL, NULL))) in test_EVP_DigestSignInit() 1302 if (!TEST_true(EVP_DigestSignUpdate(md_ctx, kMsg, sizeof(kMsg)))) in test_EVP_DigestSignInit() 1308 if (!TEST_true(EVP_DigestSign(md_ctx, NULL, &sig_len, kMsg, in test_EVP_DigestSignInit() 1314 if (!TEST_false(EVP_DigestSign(md_ctx, sig, &shortsig_len, kMsg, in test_EVP_DigestSignInit() 1324 if (!TEST_true(EVP_DigestSign(md_ctx, sig, &sig_len, kMsg, in test_EVP_DigestSignInit() 1329 if (!TEST_true(EVP_DigestSignFinal(md_ctx, NULL, &sig_len)) in test_EVP_DigestSignInit() [all …]
|
D | acvp_test.c | 92 EVP_MD_CTX *md_ctx = NULL; in sig_gen() local 99 || !TEST_ptr(md_ctx = EVP_MD_CTX_new()) in sig_gen() 100 || !TEST_int_eq(EVP_DigestSignInit_ex(md_ctx, NULL, digest_name, libctx, in sig_gen() 102 || !TEST_int_gt(EVP_DigestSign(md_ctx, sig, &sig_len, msg, msg_len), 0)) in sig_gen() 110 EVP_MD_CTX_free(md_ctx); in sig_gen() 277 EVP_MD_CTX *md_ctx = NULL; in ecdsa_sigver_test() local 297 && TEST_ptr(md_ctx = EVP_MD_CTX_new()) in ecdsa_sigver_test() 298 && TEST_true(EVP_DigestVerifyInit_ex(md_ctx, NULL, tst->digest_alg, in ecdsa_sigver_test() 300 && TEST_int_eq(EVP_DigestVerify(md_ctx, sig, sig_len, in ecdsa_sigver_test() 308 EVP_MD_CTX_free(md_ctx); in ecdsa_sigver_test() [all …]
|
/third_party/mbedtls/programs/hash/ |
D | generic_sum.c | 175 mbedtls_md_context_t md_ctx; in main() local 177 mbedtls_md_init( &md_ctx ); in main() 212 if( mbedtls_md_setup( &md_ctx, md_info, 0 ) ) in main() 232 mbedtls_md_free( &md_ctx ); in main()
|
/third_party/openssl/crypto/ts/ |
D | ts_rsp_verify.c | 425 EVP_MD_CTX *md_ctx = NULL; in ts_compute_imprint() local 459 md_ctx = EVP_MD_CTX_new(); in ts_compute_imprint() 460 if (md_ctx == NULL) { in ts_compute_imprint() 464 if (!EVP_DigestInit(md_ctx, md)) in ts_compute_imprint() 469 if (!EVP_DigestUpdate(md_ctx, buffer, length)) in ts_compute_imprint() 472 if (!EVP_DigestFinal(md_ctx, *imprint, NULL)) in ts_compute_imprint() 474 EVP_MD_CTX_free(md_ctx); in ts_compute_imprint() 478 EVP_MD_CTX_free(md_ctx); in ts_compute_imprint()
|
/third_party/openssl/doc/man7/ |
D | EVP_SIGNATURE-ED25519.pod | 73 EVP_MD_CTX *md_ctx = EVP_MD_CTX_new(); 75 EVP_DigestSignInit(md_ctx, NULL, NULL, NULL, ed_key); 77 EVP_DigestSign(md_ctx, NULL, &sig_len, msg, msg_len); 80 EVP_DigestSign(md_ctx, sig, &sig_len, msg, msg_len); 83 EVP_MD_CTX_free(md_ctx);
|
/third_party/openssl/ssl/record/ |
D | ssl3_record.c | 1365 EVP_MD_CTX *md_ctx = EVP_MD_CTX_new(); in n_ssl3_mac() local 1367 if (md_ctx == NULL) in n_ssl3_mac() 1373 if (EVP_MD_CTX_copy_ex(md_ctx, hash) <= 0 in n_ssl3_mac() 1374 || EVP_DigestUpdate(md_ctx, mac_sec, md_size) <= 0 in n_ssl3_mac() 1375 || EVP_DigestUpdate(md_ctx, ssl3_pad_1, npad) <= 0 in n_ssl3_mac() 1376 || EVP_DigestUpdate(md_ctx, seq, 8) <= 0 in n_ssl3_mac() 1377 || EVP_DigestUpdate(md_ctx, &rec_char, 1) <= 0 in n_ssl3_mac() 1378 || EVP_DigestUpdate(md_ctx, md, 2) <= 0 in n_ssl3_mac() 1379 || EVP_DigestUpdate(md_ctx, rec->input, rec->length) <= 0 in n_ssl3_mac() 1380 || EVP_DigestFinal_ex(md_ctx, md, NULL) <= 0 in n_ssl3_mac() [all …]
|
/third_party/openssl/crypto/x509/ |
D | x509_cmp.c | 320 EVP_MD_CTX *md_ctx = EVP_MD_CTX_new(); in X509_NAME_hash_old() local 324 if (md5 == NULL || md_ctx == NULL) in X509_NAME_hash_old() 329 if (EVP_DigestInit_ex(md_ctx, md5, NULL) in X509_NAME_hash_old() 330 && EVP_DigestUpdate(md_ctx, x->bytes->data, x->bytes->length) in X509_NAME_hash_old() 331 && EVP_DigestFinal_ex(md_ctx, md, NULL)) in X509_NAME_hash_old() 337 EVP_MD_CTX_free(md_ctx); in X509_NAME_hash_old()
|
/third_party/openssl/apps/ |
D | ts.c | 510 EVP_MD_CTX *md_ctx = NULL; in create_digest() local 520 md_ctx = EVP_MD_CTX_new(); in create_digest() 521 if (md_ctx == NULL) in create_digest() 524 if (!EVP_DigestInit(md_ctx, md)) in create_digest() 527 if (!EVP_DigestUpdate(md_ctx, buffer, length)) in create_digest() 530 if (!EVP_DigestFinal(md_ctx, *md_value, NULL)) in create_digest() 547 EVP_MD_CTX_free(md_ctx); in create_digest()
|
/third_party/mbedtls/include/mbedtls/ |
D | hmac_drbg.h | 90 mbedtls_md_context_t MBEDTLS_PRIVATE(md_ctx); /*!< HMAC context (inc. K) */
|
D | md.h | 103 void *MBEDTLS_PRIVATE(md_ctx);
|
/third_party/mbedtls/tests/suites/ |
D | test_suite_md.function | 207 TEST_ASSERT ( ctx.md_ctx != NULL ); 256 TEST_ASSERT ( ctx.md_ctx != NULL ); 328 TEST_ASSERT ( ctx.md_ctx != NULL );
|