*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/be-secure.c,v 1.16 2002/11/07 18:45:51 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/be-secure.c,v 1.17 2002/12/12 22:42:39 momjian Exp $
*
* Since the server static private key ($DataDir/server.key)
* will normally be stored unencrypted so that the database
case SSL_ERROR_WANT_READ:
break;
case SSL_ERROR_SYSCALL:
- elog(ERROR, "SSL SYSCALL error: %s", strerror(errno));
+ if (n == -1)
+ elog(ERROR, "SSL SYSCALL error: %s", strerror(errno));
+ else
+ strerror(errno));
break;
case SSL_ERROR_SSL:
elog(ERROR, "SSL error: %s", SSLerrmessage());
case SSL_ERROR_WANT_WRITE:
break;
case SSL_ERROR_SYSCALL:
- elog(ERROR, "SSL SYSCALL error: %s", strerror(errno));
+ if (n == -1)
+ elog(ERROR, "SSL SYSCALL error: %s", strerror(errno));
+ else
+ strerror(errno));
break;
case SSL_ERROR_SSL:
elog(ERROR, "SSL error: %s", SSLerrmessage());
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-secure.c,v 1.16 2002/11/07 18:45:51 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-secure.c,v 1.17 2002/12/12 22:42:39 momjian Exp $
*
* NOTES
* The client *requires* a valid server certificate. Since
case SSL_ERROR_WANT_READ:
break;
case SSL_ERROR_SYSCALL:
- printfPQExpBuffer(&conn->errorMessage,
+ if (n == -1)
+ printfPQExpBuffer(&conn->errorMessage,
libpq_gettext("SSL SYSCALL error: %s\n"),
SOCK_STRERROR(SOCK_ERRNO));
break;
case SSL_ERROR_WANT_WRITE:
break;
case SSL_ERROR_SYSCALL:
- printfPQExpBuffer(&conn->errorMessage,
+ if (n == -1)
+ printfPQExpBuffer(&conn->errorMessage,
libpq_gettext("SSL SYSCALL error: %s\n"),
SOCK_STRERROR(SOCK_ERRNO));
break;