diff --git a/src/client.rs b/src/client.rs index 23392b7..63dc905 100644 --- a/src/client.rs +++ b/src/client.rs @@ -346,6 +346,14 @@ where // Client is requesting to cancel a running query (plain text connection). CANCEL_REQUEST_CODE => Ok((ClientConnectionType::CancelQuery, bytes)), + // Client is requesting a GSS encoded connection + GSSENC_REQUEST_CODE => { + error_response_terminal(stream, "").await?; + Err(Error::ProtocolSyncError( + "PGCat does not support GSSAPI encoding".into(), + )) + }, + // Something else, probably something is wrong and it's not our fault, // e.g. badly implemented Postgres client. _ => Err(Error::ProtocolSyncError(format!( diff --git a/src/constants.rs b/src/constants.rs index 0900d7c..d9ed6e7 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -11,6 +11,9 @@ pub const SSL_REQUEST_CODE: i32 = 80877103; // CancelRequest: the cancel request code. pub const CANCEL_REQUEST_CODE: i32 = 80877102; +// GSSENCRequest: used to indicate we wants GSS connection +pub const GSSENC_REQUEST_CODE: i32 = 80877104; + // AuthenticationMD5Password pub const MD5_ENCRYPTED_PASSWORD: i32 = 5;