diff options
author | Pauli <pauli@openssl.org> | 2023-07-18 11:37:14 +1000 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2023-08-04 11:55:45 +1000 |
commit | 50e76846bf2d431d431b0b026f63d0b708d6e960 (patch) | |
tree | 687511250ca436324270cb79e682ad029362cb8c /include | |
parent | afe4a7978d2cff7852b46e8f23218ec6c41b8bf0 (diff) |
quic conformance: 10.2.1 rate limiting
Implement the two requirements about limiting closing transmission size to
no more than thrice the received size.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21429)
Diffstat (limited to 'include')
-rw-r--r-- | include/internal/quic_txp.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/internal/quic_txp.h b/include/internal/quic_txp.h index 74590749fc..d5ca1c4361 100644 --- a/include/internal/quic_txp.h +++ b/include/internal/quic_txp.h @@ -56,7 +56,8 @@ typedef struct ossl_quic_tx_packetiser_args_st { * crypto[QUIC_PN_SPACE_APP] is the 1-RTT crypto stream. */ QUIC_SSTREAM *crypto[QUIC_PN_SPACE_NUM]; -} OSSL_QUIC_TX_PACKETISER_ARGS; + + } OSSL_QUIC_TX_PACKETISER_ARGS; typedef struct ossl_quic_tx_packetiser_st OSSL_QUIC_TX_PACKETISER; @@ -68,6 +69,14 @@ typedef void (ossl_quic_initial_token_free_fn)(const unsigned char *buf, void ossl_quic_tx_packetiser_free(OSSL_QUIC_TX_PACKETISER *txp); /* + * When in the closing state we need to maintain a count of received bytes + * so that we can limit the number of close connection frames we send. + * Refer RFC 9000 s. 10.2.1 Closing Connection State. + */ +void ossl_quic_tx_packetiser_record_received_closing_bytes( + OSSL_QUIC_TX_PACKETISER *txp, size_t n); + +/* * Generates a datagram by polling the various ELs to determine if they want to * generate any frames, and generating a datagram which coalesces packets for * any ELs which do. |