mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-14 08:52:56 +00:00
Fix EncryptionResponse message in pq_proto.rs
Positive EncryptionResponse should set 'S' byte, not 'Y'. With that fix it is possible to connect to proxy with SSL enabled and read deciphered notice text. But after the first query everything stucks.
This commit is contained in:
@@ -652,7 +652,7 @@ impl<'a> BeMessage<'a> {
|
||||
}
|
||||
|
||||
BeMessage::EncryptionResponse(should_negotiate) => {
|
||||
let response = if *should_negotiate { b'Y' } else { b'N' };
|
||||
let response = if *should_negotiate { b'S' } else { b'N' };
|
||||
buf.put_u8(response);
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ fn ssl() {
|
||||
client_sock.write_u32::<BigEndian>(80877103).unwrap();
|
||||
|
||||
let ssl_response = client_sock.read_u8().unwrap();
|
||||
assert_eq!(b'Y', ssl_response);
|
||||
assert_eq!(b'S', ssl_response);
|
||||
|
||||
let mut cfg = rustls::ClientConfig::new();
|
||||
cfg.root_store.add(&CERT).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user