diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-03-26 00:22:51 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-04-13 17:16:20 +0700 |
commit | a575400e49d34228b3fed4f365a01b1ad03c3e1c (patch) | |
tree | e321e65398e4eb219b048b0e301ac8631e096108 /crypto/src/tls/DtlsReplayWindow.cs | |
parent | RFC 9146: TODOs for API changes when possible (diff) | |
download | BouncyCastle.NET-ed25519-a575400e49d34228b3fed4f365a01b1ad03c3e1c.tar.xz |
RFC 9146: Add simple record callback for testing purposes
Diffstat (limited to 'crypto/src/tls/DtlsReplayWindow.cs')
-rw-r--r-- | crypto/src/tls/DtlsReplayWindow.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/src/tls/DtlsReplayWindow.cs b/crypto/src/tls/DtlsReplayWindow.cs index a08114c2a..5267c5934 100644 --- a/crypto/src/tls/DtlsReplayWindow.cs +++ b/crypto/src/tls/DtlsReplayWindow.cs @@ -42,7 +42,9 @@ namespace Org.BouncyCastle.Tls /// <summary>Report that a received record with the given sequence number passed authentication checks. /// </summary> /// <param name="seq">the 48-bit DTLSPlainText.sequence_number field of an authenticated record.</param> - internal void ReportAuthenticated(long seq) + /// <param name="isLatestConfirmed">indicates whether <paramref name="seq"/> is now the latest confirmed + /// sequence number.</param> + internal void ReportAuthenticated(long seq, out bool isLatestConfirmed) { if ((seq & ValidSeqMask) != seq) throw new ArgumentException("out of range", "seq"); @@ -54,6 +56,7 @@ namespace Org.BouncyCastle.Tls { m_bitmap |= (1UL << (int)diff); } + isLatestConfirmed = false; } else { @@ -68,6 +71,7 @@ namespace Org.BouncyCastle.Tls m_bitmap |= 1UL; } m_latestConfirmedSeq = seq; + isLatestConfirmed = true; } } |