Skip to content

Commit 3a4b3ac

Browse files
committed
Remove inappropriate inclusions of OpenSSL internal header e_os.h,
as well as unnecessary (and incorrect on Windows) assignments to errno/SOCK_ERRNO.
1 parent 11c4f2d commit 3a4b3ac

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/backend/libpq/be-secure.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $Header: /cvsroot/pgsql/src/backend/libpq/be-secure.c,v 1.15 2002/09/26 04:41:54 momjian Exp $
14+
* $Header: /cvsroot/pgsql/src/backend/libpq/be-secure.c,v 1.16 2002/11/07 18:45:51 tgl Exp $
1515
*
1616
* Since the server static private key ($DataDir/server.key)
1717
* will normally be stored unencrypted so that the database
@@ -105,7 +105,6 @@
105105

106106
#ifdef USE_SSL
107107
#include <openssl/ssl.h>
108-
#include <openssl/e_os.h>
109108
#include <openssl/dh.h>
110109
#endif
111110

@@ -289,7 +288,6 @@ secure_read(Port *port, void *ptr, size_t len)
289288
case SSL_ERROR_WANT_READ:
290289
break;
291290
case SSL_ERROR_SYSCALL:
292-
errno = get_last_socket_error();
293291
elog(ERROR, "SSL SYSCALL error: %s", strerror(errno));
294292
break;
295293
case SSL_ERROR_SSL:
@@ -339,7 +337,6 @@ secure_write(Port *port, const void *ptr, size_t len)
339337
case SSL_ERROR_WANT_WRITE:
340338
break;
341339
case SSL_ERROR_SYSCALL:
342-
errno = get_last_socket_error();
343340
elog(ERROR, "SSL SYSCALL error: %s", strerror(errno));
344341
break;
345342
case SSL_ERROR_SSL:

src/interfaces/libpq/fe-secure.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-secure.c,v 1.15 2002/09/26 05:37:58 momjian Exp $
14+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-secure.c,v 1.16 2002/11/07 18:45:51 tgl Exp $
1515
*
1616
* NOTES
1717
* The client *requires* a valid server certificate. Since
@@ -117,7 +117,7 @@
117117

118118
#ifdef USE_SSL
119119
#include <openssl/ssl.h>
120-
#include <openssl/e_os.h>
120+
#include <openssl/dh.h>
121121
#endif /* USE_SSL */
122122

123123

@@ -270,7 +270,6 @@ pqsecure_read(PGconn *conn, void *ptr, size_t len)
270270
case SSL_ERROR_WANT_READ:
271271
break;
272272
case SSL_ERROR_SYSCALL:
273-
SOCK_ERRNO = get_last_socket_error();
274273
printfPQExpBuffer(&conn->errorMessage,
275274
libpq_gettext("SSL SYSCALL error: %s\n"),
276275
SOCK_STRERROR(SOCK_ERRNO));
@@ -316,7 +315,6 @@ pqsecure_write(PGconn *conn, const void *ptr, size_t len)
316315
case SSL_ERROR_WANT_WRITE:
317316
break;
318317
case SSL_ERROR_SYSCALL:
319-
SOCK_ERRNO = get_last_socket_error();
320318
printfPQExpBuffer(&conn->errorMessage,
321319
libpq_gettext("SSL SYSCALL error: %s\n"),
322320
SOCK_STRERROR(SOCK_ERRNO));

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy