summaryrefslogtreecommitdiff
path: root/vio/viossl.c
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-12-01 22:24:58 +0100
committerSergei Golubchik <sergii@pisem.net>2014-12-01 22:24:58 +0100
commitba076763ec904f9547a90ec4408498b491b839e2 (patch)
treefa4855060272d6468ad5db6070b35066bbf09d03 /vio/viossl.c
parent4e9e04b28b1b65a40aaf3a5e1b5dd4f8a41e6792 (diff)
downloadmariadb-git-ba076763ec904f9547a90ec4408498b491b839e2.tar.gz
remove ssl debugging report_errors() function that was sometimes destroying the state
Diffstat (limited to 'vio/viossl.c')
-rw-r--r--vio/viossl.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/vio/viossl.c b/vio/viossl.c
index 2bee31f66ab..0bc2c263336 100644
--- a/vio/viossl.c
+++ b/vio/viossl.c
@@ -40,41 +40,6 @@
#define SSL_errno(X,Y) ERR_get_error()
#endif
-#ifndef DBUG_OFF
-
-static void
-report_errors(SSL* ssl)
-{
- unsigned long l;
- const char *file;
- const char *data;
- int line, flags;
- char buf[512];
-
- DBUG_ENTER("report_errors");
-
- while ((l= ERR_get_error_line_data(&file,&line,&data,&flags)))
- {
- DBUG_PRINT("error", ("OpenSSL: %s:%s:%d:%s\n", ERR_error_string(l,buf),
- file,line,(flags&ERR_TXT_STRING)?data:"")) ;
- }
-
- if (ssl)
- {
-#ifndef DBUG_OFF
- ulong error= SSL_errno(ssl, l);
- DBUG_PRINT("error", ("error: %s (%lu)",
- ERR_error_string(error, buf), error));
-#endif
- }
-
- DBUG_PRINT("info", ("socket_errno: %d", socket_errno));
- DBUG_VOID_RETURN;
-}
-
-#endif
-
-
/**
Obtain the equivalent system error status for the last SSL I/O operation.
@@ -157,9 +122,6 @@ static my_bool ssl_should_retry(Vio *vio, int ret, enum enum_vio_io_event *event
*event= VIO_IO_EVENT_WRITE;
break;
default:
-#ifndef DBUG_OFF
- report_errors(ssl);
-#endif
should_retry= FALSE;
ssl_set_sys_error(ssl_error);
break;
@@ -195,10 +157,6 @@ size_t vio_ssl_read(Vio *vio, uchar *buf, size_t size)
}
}
-#ifndef DBUG_OFF
- if (ret < 0)
- report_errors((SSL*) vio->ssl_arg);
-#endif
DBUG_PRINT("exit", ("%d", (int) ret));
DBUG_RETURN(ret < 0 ? -1 : ret);
@@ -233,10 +191,6 @@ size_t vio_ssl_write(Vio *vio, const uchar *buf, size_t size)
}
}
-#ifndef DBUG_OFF
- if (ret < 0)
- report_errors((SSL*) vio->ssl_arg);
-#endif
DBUG_RETURN(ret < 0 ? -1 : ret);
}