MCPcopy Create free account
hub / github.com/erans/pgsqlite / parse_ssl_request

Method parse_ssl_request

src/protocol/parser.rs:221–234  ·  view source on GitHub ↗
(&self, cursor: &mut Cursor<&[u8]>)

Source from the content-addressed store, hash-verified

219 }
220
221 async fn parse_ssl_request(&self, cursor: &mut Cursor<&[u8]>) -> Result<FrontendMessage, ParseError> {
222 // SSL request has a specific format: 8 bytes total
223 let length = cursor.read_u32::<BigEndian>()?;
224 if length != 8 {
225 return Err(ParseError::ProtocolViolation("Invalid SSL request length".to_string()));
226 }
227
228 let ssl_code = cursor.read_u32::<BigEndian>()?;
229 if ssl_code != 80877103 { // Magic SSL request code
230 return Err(ParseError::ProtocolViolation("Invalid SSL request code".to_string()));
231 }
232
233 Ok(FrontendMessage::SslRequest)
234 }
235
236 async fn parse_parse(&self, cursor: &mut Cursor<&[u8]>, _length: u32) -> Result<FrontendMessage, ParseError> {
237 let statement_name = self.read_cstring(cursor).await?;

Callers 1

parse_messageMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected