diff options
Diffstat (limited to 'src/include/libpq/sasl.h')
-rw-r--r-- | src/include/libpq/sasl.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/include/libpq/sasl.h b/src/include/libpq/sasl.h index 7a1f970ccae..0e8fa848304 100644 --- a/src/include/libpq/sasl.h +++ b/src/include/libpq/sasl.h @@ -27,7 +27,15 @@ #define PG_SASL_EXCHANGE_FAILURE 2 /* - * Backend SASL mechanism callbacks. + * Maximum accepted size of SASL messages. + * + * The messages that the server or libpq generate are much smaller than this, + * but have some headroom. + */ +#define PG_MAX_SASL_MESSAGE_LENGTH 1024 + +/* + * Backend SASL mechanism callbacks and metadata. * * To implement a backend mechanism, declare a pg_be_sasl_mech struct with * appropriate callback implementations. Then pass the mechanism to @@ -127,6 +135,9 @@ typedef struct pg_be_sasl_mech const char *input, int inputlen, char **output, int *outputlen, const char **logdetail); + + /* The maximum size allowed for client SASLResponses. */ + int max_message_length; } pg_be_sasl_mech; /* Common implementation for auth.c */ |