diff options
author | Hugo Landau <hlandau@openssl.org> | 2023-07-12 20:12:07 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2023-07-21 08:43:52 +0200 |
commit | 41d39984e948322700a9b48ed6c6e8426bed3a9d (patch) | |
tree | 404179901295e9a004dfa3a71a0845dae7448e97 /include | |
parent | d49c6ca7b95902655e200b34876d5ad965428722 (diff) |
QUIC QTX: Add ciphertext size calculation function
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21458)
Diffstat (limited to 'include')
-rw-r--r-- | include/internal/quic_record_tx.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/internal/quic_record_tx.h b/include/internal/quic_record_tx.h index b4c9bb8d26..20fc5e268b 100644 --- a/include/internal/quic_record_tx.h +++ b/include/internal/quic_record_tx.h @@ -130,6 +130,16 @@ int ossl_qtx_calculate_plaintext_payload_len(OSSL_QTX *qtx, uint32_t enc_level, size_t ciphertext_len, size_t *plaintext_len); +/* + * Given the value plaintext_len represented a plaintext packet payload length + * in bytes, determines how many ciphertext bytes it will encrypt to. The value + * output does not include packet headers. Returns 0 if the specified EL is not + * provisioned. The result is written to *ciphertext_len. + */ +int ossl_qtx_calculate_ciphertext_payload_len(OSSL_QTX *qtx, uint32_t enc_level, + size_t plaintext_len, + size_t *ciphertext_len); + uint32_t ossl_qrl_get_suite_cipher_tag_len(uint32_t suite_id); |