From 3a4de205b0177815e5e4836839104642bcb9edfc Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Mon, 7 Sep 2020 17:45:45 +0700 Subject: [PATCH] add the AEAD_LIMIT_REACHED error code --- internal/qerr/error_codes.go | 3 +++ qlog/types.go | 2 ++ 2 files changed, 5 insertions(+) diff --git a/internal/qerr/error_codes.go b/internal/qerr/error_codes.go index 4bfb7220f..87d4d6f5c 100644 --- a/internal/qerr/error_codes.go +++ b/internal/qerr/error_codes.go @@ -26,6 +26,7 @@ const ( ApplicationError ErrorCode = 0xc CryptoBufferExceeded ErrorCode = 0xd KeyUpdateError ErrorCode = 0xe + AEADLimitReached ErrorCode = 0xf ) func (e ErrorCode) isCryptoError() bool { @@ -80,6 +81,8 @@ func (e ErrorCode) String() string { return "CRYPTO_BUFFER_EXCEEDED" case KeyUpdateError: return "KEY_UPDATE_ERROR" + case AEADLimitReached: + return "AEAD_LIMIT_REACHED" default: if e.isCryptoError() { return "CRYPTO_ERROR" diff --git a/qlog/types.go b/qlog/types.go index 1dca4d5b3..a5c9a492c 100644 --- a/qlog/types.go +++ b/qlog/types.go @@ -211,6 +211,8 @@ func (e transportError) String() string { return "crypto_buffer_exceeded" case qerr.KeyUpdateError: return "key_update_error" + case qerr.AEADLimitReached: + return "aead_limit_reached" default: return "" }