Lines Matching refs:srt_gen
25 QUIC_SRT_GEN *srt_gen; in ossl_quic_srt_gen_new() local
28 if ((srt_gen = OPENSSL_zalloc(sizeof(*srt_gen))) == NULL) in ossl_quic_srt_gen_new()
31 if ((srt_gen->mac = EVP_MAC_fetch(libctx, "HMAC", propq)) == NULL) in ossl_quic_srt_gen_new()
34 if ((srt_gen->mac_ctx = EVP_MAC_CTX_new(srt_gen->mac)) == NULL) in ossl_quic_srt_gen_new()
43 if (!EVP_MAC_init(srt_gen->mac_ctx, key, key_len, params)) in ossl_quic_srt_gen_new()
46 return srt_gen; in ossl_quic_srt_gen_new()
49 ossl_quic_srt_gen_free(srt_gen); in ossl_quic_srt_gen_new()
53 void ossl_quic_srt_gen_free(QUIC_SRT_GEN *srt_gen) in ossl_quic_srt_gen_free() argument
55 if (srt_gen == NULL) in ossl_quic_srt_gen_free()
58 EVP_MAC_CTX_free(srt_gen->mac_ctx); in ossl_quic_srt_gen_free()
59 EVP_MAC_free(srt_gen->mac); in ossl_quic_srt_gen_free()
60 OPENSSL_free(srt_gen); in ossl_quic_srt_gen_free()
63 int ossl_quic_srt_gen_calculate_token(QUIC_SRT_GEN *srt_gen, in ossl_quic_srt_gen_calculate_token() argument
70 if (!EVP_MAC_init(srt_gen->mac_ctx, NULL, 0, NULL)) in ossl_quic_srt_gen_calculate_token()
73 if (!EVP_MAC_update(srt_gen->mac_ctx, (const unsigned char *)dcid->id, in ossl_quic_srt_gen_calculate_token()
77 if (!EVP_MAC_final(srt_gen->mac_ctx, mac, &outl, sizeof(mac)) in ossl_quic_srt_gen_calculate_token()