Home
last modified time | relevance | path

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

/openssl/crypto/engine/
H A Deng_openssl.c451 OSSL_HMAC_PKEY_CTX *hctx; in ossl_hmac_init() local
453 if ((hctx = OPENSSL_zalloc(sizeof(*hctx))) == NULL) in ossl_hmac_init()
456 hctx->ctx = HMAC_CTX_new(); in ossl_hmac_init()
457 if (hctx->ctx == NULL) { in ossl_hmac_init()
458 OPENSSL_free(hctx); in ossl_hmac_init()
499 if (hctx) { in ossl_hmac_cleanup()
501 OPENSSL_clear_free(hctx->ktmp.data, hctx->ktmp.length); in ossl_hmac_cleanup()
502 OPENSSL_free(hctx); in ossl_hmac_cleanup()
511 if (!hctx->ktmp.data) in ossl_hmac_keygen()
570 hctx->md = p2; in ossl_hmac_ctrl()
[all …]
/openssl/providers/implementations/kdfs/
H A Dpbkdf2.c387 HMAC_CTX *hctx_tpl = NULL, *hctx = NULL; in pbkdf2_derive() local
425 hctx = HMAC_CTX_new(); in pbkdf2_derive()
426 if (hctx == NULL) in pbkdf2_derive()
441 if (!HMAC_CTX_copy(hctx, hctx_tpl)) in pbkdf2_derive()
443 if (!HMAC_Update(hctx, salt, saltlen) in pbkdf2_derive()
444 || !HMAC_Update(hctx, itmp, 4) in pbkdf2_derive()
445 || !HMAC_Final(hctx, digtmp, NULL)) in pbkdf2_derive()
449 if (!HMAC_CTX_copy(hctx, hctx_tpl)) in pbkdf2_derive()
451 if (!HMAC_Update(hctx, digtmp, mdlen) in pbkdf2_derive()
452 || !HMAC_Final(hctx, digtmp, NULL)) in pbkdf2_derive()
[all …]
/openssl/doc/man3/
H A DSSL_CTX_set_tlsext_ticket_key_cb.pod16 EVP_CIPHER_CTX *ctx, EVP_MAC_CTX *hctx, int enc));
25 EVP_CIPHER_CTX *ctx, HMAC_CTX *hctx, int enc));
51 Before the callback function is started I<ctx> and I<hctx> have been
59 I<iv>, and set the cipher context I<ctx> and the hash context I<hctx>.
93 This indicates that the I<ctx> and I<hctx> have been set and the session can
101 This indicates that the I<ctx> and I<hctx> have been set and the session can
122 Before this callback function is started I<hctx> will have been
125 The I<hctx> key material can be set using L<HMAC_Init_ex(3)>.
159 EVP_MAC_CTX *hctx, int enc)
191 if (EVP_MAC_CTX_set_params(hctx, params) == 0)
[all …]
/openssl/ssl/statem/
H A Dextensions_srvr.c728 EVP_MD_CTX *hctx; in tls_parse_ctos_cookie() local
761 hctx = EVP_MD_CTX_create(); in tls_parse_ctos_cookie()
766 if (hctx == NULL || pkey == NULL) { in tls_parse_ctos_cookie()
767 EVP_MD_CTX_free(hctx); in tls_parse_ctos_cookie()
776 || EVP_DigestSign(hctx, hmac, &hmaclen, data, in tls_parse_ctos_cookie()
779 EVP_MD_CTX_free(hctx); in tls_parse_ctos_cookie()
785 EVP_MD_CTX_free(hctx); in tls_parse_ctos_cookie()
1783 EVP_MD_CTX *hctx; in tls_construct_stoc_cookie() local
1861 hctx = EVP_MD_CTX_create(); in tls_construct_stoc_cookie()
1866 if (hctx == NULL || pkey == NULL) { in tls_construct_stoc_cookie()
[all …]
H A Dstatem_srvr.c3930 SSL_HMAC *hctx = NULL; in construct_stateless_ticket() local
3966 hctx = ssl_hmac_new(tctx); in construct_stateless_ticket()
3967 if (hctx == NULL) { in construct_stateless_ticket()
4018 ssl_hmac_get0_EVP_MAC_CTX(hctx), in construct_stateless_ticket()
4024 ssl_hmac_get0_HMAC_CTX(hctx), 1); in construct_stateless_ticket()
4045 ssl_hmac_free(hctx); in construct_stateless_ticket()
4072 || !ssl_hmac_init(hctx, tctx->ext.secure->tick_hmac_key, in construct_stateless_ticket()
4105 || !ssl_hmac_update(hctx, in construct_stateless_ticket()
4109 || !ssl_hmac_final(hctx, macdata1, &hlen, EVP_MAX_MD_SIZE) in construct_stateless_ticket()
4127 ssl_hmac_free(hctx); in construct_stateless_ticket()
/openssl/crypto/hpke/
H A Dhpke.c141 static int hpke_aead_dec(OSSL_HPKE_CTX *hctx, const unsigned char *iv, in hpke_aead_dec() argument
151 taglen = hctx->aead_info->taglen; in hpke_aead_dec()
160 if (EVP_DecryptInit_ex(ctx, hctx->aead_ciph, NULL, NULL, NULL) != 1) { in hpke_aead_dec()
165 hctx->noncelen, NULL) != 1) { in hpke_aead_dec()
170 if (EVP_DecryptInit_ex(ctx, NULL, NULL, hctx->key, iv) != 1) { in hpke_aead_dec()
217 static int hpke_aead_enc(OSSL_HPKE_CTX *hctx, const unsigned char *iv, in hpke_aead_enc() argument
228 taglen = hctx->aead_info->taglen; in hpke_aead_enc()
241 if (EVP_EncryptInit_ex(ctx, hctx->aead_ciph, NULL, NULL, NULL) != 1) { in hpke_aead_enc()
246 hctx->noncelen, NULL) != 1) { in hpke_aead_enc()
251 if (EVP_EncryptInit_ex(ctx, NULL, NULL, hctx->key, iv) != 1) { in hpke_aead_enc()
/openssl/ssl/
H A Dt1_lib.c2380 SSL_HMAC *hctx = NULL; in tls_decrypt_ticket() local
2411 hctx = ssl_hmac_new(tctx); in tls_decrypt_ticket()
2412 if (hctx == NULL) { in tls_decrypt_ticket()
2435 ssl_hmac_get0_EVP_MAC_CTX(hctx), in tls_decrypt_ticket()
2442 ctx, ssl_hmac_get0_HMAC_CTX(hctx), 0); in tls_decrypt_ticket()
2467 || ssl_hmac_init(hctx, tctx->ext.secure->tick_hmac_key, in tls_decrypt_ticket()
2485 mlen = ssl_hmac_size(hctx); in tls_decrypt_ticket()
2504 if (ssl_hmac_update(hctx, etick, eticklen) <= 0 in tls_decrypt_ticket()
2505 || ssl_hmac_final(hctx, tick_hmac, NULL, sizeof(tick_hmac)) <= 0) { in tls_decrypt_ticket()
2568 ssl_hmac_free(hctx); in tls_decrypt_ticket()
H A Dssl_local.h996 EVP_CIPHER_CTX *ectx, HMAC_CTX *hctx, int enc);
1000 EVP_CIPHER_CTX *ectx, EVP_MAC_CTX *hctx,
/openssl/test/helpers/
H A Dhandshake.c328 EVP_MAC_CTX *hctx, int enc) in broken_session_ticket_cb() argument
336 EVP_MAC_CTX *hctx, int enc) in do_not_call_session_ticket_cb() argument
/openssl/test/
H A Dsslapitest.c8266 HMAC_CTX *hctx, int enc) in tick_key_cb() argument
8293 || !HMAC_Init_ex(hctx, tick_hmac_key, sizeof(tick_hmac_key), sha256, in tick_key_cb()
8308 EVP_CIPHER_CTX *ctx, EVP_MAC_CTX *hctx, int enc) in tick_key_evp_cb() argument
8332 || !EVP_MAC_init(hctx, tick_hmac_key, sizeof(tick_hmac_key), in tick_key_evp_cb()

Completed in 79 milliseconds