mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Separate SSL error messages with "; ".
This commit is contained in:
parent
550c39e714
commit
debec8216f
@ -1,3 +1,7 @@
|
|||||||
|
2005-07-04 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
|
* openssl.c (openssl_errstr): Separate error messages with "; ".
|
||||||
|
|
||||||
2005-07-03 Hrvoje Niksic <hniksic@xemacs.org>
|
2005-07-03 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
* ftp.c (getftp): Ditto.
|
* ftp.c (getftp): Ditto.
|
||||||
|
@ -287,9 +287,8 @@ openssl_peek (int fd, char *buf, int bufsize, void *ctx)
|
|||||||
static const char *
|
static const char *
|
||||||
openssl_errstr (int fd, void *ctx)
|
openssl_errstr (int fd, void *ctx)
|
||||||
{
|
{
|
||||||
/* Unfortunately we cannot use ERR_error_string's internal buf
|
/* Unfortunately we cannot use ERR_error_string's internal buffer
|
||||||
because we must be prepared to printing more than one error in
|
because we must be prepared to print more than one error. */
|
||||||
succession. */
|
|
||||||
static char errbuf[512];
|
static char errbuf[512];
|
||||||
char *p = errbuf, *end = errbuf + sizeof errbuf;
|
char *p = errbuf, *end = errbuf + sizeof errbuf;
|
||||||
unsigned long err;
|
unsigned long err;
|
||||||
@ -299,16 +298,18 @@ openssl_errstr (int fd, void *ctx)
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* Iterate over OpenSSL's error stack and print errors to ERRBUF,
|
/* Iterate over OpenSSL's error stack and print errors to ERRBUF,
|
||||||
each followed by '\n', while being careful not to overrun
|
separated by "; ", while being careful not to overrun ERRBUF. */
|
||||||
ERRBUF. */
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
ERR_error_string_n (err, p, end - p);
|
ERR_error_string_n (err, p, end - p);
|
||||||
p = strchr (p, '\0');
|
p = strchr (p, '\0');
|
||||||
if (p < end)
|
err = ERR_get_error ();
|
||||||
*p++ = '\n';
|
if (err == 0)
|
||||||
|
break;
|
||||||
|
if (p < end) *p++ = ';';
|
||||||
|
if (p < end) *p++ = ' ';
|
||||||
}
|
}
|
||||||
while ((err = ERR_get_error ()) != 0);
|
while (p < end);
|
||||||
|
|
||||||
if (p < end)
|
if (p < end)
|
||||||
*p++ = '\0';
|
*p++ = '\0';
|
||||||
|
Loading…
Reference in New Issue
Block a user