mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +03:00
Add tests for errors during SSL or GSSAPI handshake
These test that libpq correctly falls back to a plaintext connection on handshake error, in the "prefer" modes. Reviewed-by: Michael Paquier Discussion: https://www.postgresql.org/message-id/CAOYmi%2Bnwvu21mJ4DYKUa98HdfM_KZJi7B1MhyXtnsyOO-PB6Ww%40mail.gmail.com
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "libpq/pqformat.h"
|
||||
#include "miscadmin.h"
|
||||
#include "pgstat.h"
|
||||
#include "utils/injection_point.h"
|
||||
#include "utils/memutils.h"
|
||||
|
||||
|
||||
@@ -499,6 +500,8 @@ secure_open_gssapi(Port *port)
|
||||
minor;
|
||||
gss_cred_id_t delegated_creds;
|
||||
|
||||
INJECTION_POINT("backend-gssapi-startup");
|
||||
|
||||
/*
|
||||
* Allocate subsidiary Port data for GSSAPI operations.
|
||||
*/
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "libpq/libpq.h"
|
||||
#include "miscadmin.h"
|
||||
#include "tcop/tcopprot.h"
|
||||
#include "utils/injection_point.h"
|
||||
#include "utils/wait_event.h"
|
||||
|
||||
char *ssl_library;
|
||||
@@ -129,6 +130,8 @@ secure_open_server(Port *port)
|
||||
}
|
||||
Assert(pq_buffer_remaining_data() == 0);
|
||||
|
||||
INJECTION_POINT("backend-ssl-startup");
|
||||
|
||||
r = be_tls_open_server(port);
|
||||
|
||||
if (port->raw_buf_remaining > 0)
|
||||
|
||||
Reference in New Issue
Block a user