Commit 79869083 authored by Kyle Nekritz's avatar Kyle Nekritz Committed by Facebook Github Bot

Add AsyncSocketExceptionType for early data rejection.

Summary: To be used to signal that data that was sent as TLS 1.3 early data was lost. This needs its own exception type as it requires special handling (ie it should usually be retried immediately).

Reviewed By: siyengar

Differential Revision: D5869914

fbshipit-source-id: ca0d8ef19cb991e9d6ffe0f8c99abfb03b748ce6
parent b83cd9e3
...@@ -40,7 +40,8 @@ class AsyncSocketException : public std::runtime_error { ...@@ -40,7 +40,8 @@ class AsyncSocketException : public std::runtime_error {
SSL_ERROR = 12, SSL_ERROR = 12,
COULD_NOT_BIND = 13, COULD_NOT_BIND = 13,
SASL_HANDSHAKE_TIMEOUT = 14, SASL_HANDSHAKE_TIMEOUT = 14,
NETWORK_ERROR = 15 NETWORK_ERROR = 15,
EARLY_DATA_REJECTED = 16,
}; };
AsyncSocketException(AsyncSocketExceptionType type, AsyncSocketException(AsyncSocketExceptionType type,
...@@ -100,6 +101,8 @@ class AsyncSocketException : public std::runtime_error { ...@@ -100,6 +101,8 @@ class AsyncSocketException : public std::runtime_error {
return "SASL handshake timeout"; return "SASL handshake timeout";
case NETWORK_ERROR: case NETWORK_ERROR:
return "Network error"; return "Network error";
case EARLY_DATA_REJECTED:
return "Early data rejected";
default: default:
return "(Invalid exception type)"; return "(Invalid exception type)";
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment