Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
ba076763
Commit
ba076763
authored
Dec 01, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove ssl debugging report_errors() function that was sometimes destroying the state
parent
4e9e04b2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
73 deletions
+0
-73
vio/viossl.c
vio/viossl.c
+0
-46
vio/viosslfactories.c
vio/viosslfactories.c
+0
-27
No files found.
vio/viossl.c
View file @
ba076763
...
...
@@ -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
);
}
...
...
vio/viosslfactories.c
View file @
ba076763
...
...
@@ -51,27 +51,6 @@ static DH *get_dh512(void)
}
static
void
report_errors
()
{
unsigned
long
l
;
const
char
*
file
;
const
char
*
data
;
int
line
,
flags
;
DBUG_ENTER
(
"report_errors"
);
while
((
l
=
ERR_get_error_line_data
(
&
file
,
&
line
,
&
data
,
&
flags
))
!=
0
)
{
#ifndef DBUG_OFF
/* Avoid warning */
char
buf
[
200
];
DBUG_PRINT
(
"error"
,
(
"OpenSSL: %s:%s:%d:%s
\n
"
,
ERR_error_string
(
l
,
buf
),
file
,
line
,(
flags
&
ERR_TXT_STRING
)
?
data
:
""
))
;
#endif
}
DBUG_VOID_RETURN
;
}
static
const
char
*
ssl_error_string
[]
=
{
...
...
@@ -198,7 +177,6 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
{
*
error
=
SSL_INITERR_MEMFAIL
;
DBUG_PRINT
(
"error"
,
(
"%s"
,
sslGetErrString
(
*
error
)));
report_errors
();
my_free
(
ssl_fd
);
DBUG_RETURN
(
0
);
}
...
...
@@ -215,7 +193,6 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
{
*
error
=
SSL_INITERR_CIPHERS
;
DBUG_PRINT
(
"error"
,
(
"%s"
,
sslGetErrString
(
*
error
)));
report_errors
();
SSL_CTX_free
(
ssl_fd
->
ssl_context
);
my_free
(
ssl_fd
);
DBUG_RETURN
(
0
);
...
...
@@ -232,7 +209,6 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
*
error
=
SSL_INITERR_BAD_PATHS
;
DBUG_PRINT
(
"error"
,
(
"SSL_CTX_load_verify_locations failed : %s"
,
sslGetErrString
(
*
error
)));
report_errors
();
SSL_CTX_free
(
ssl_fd
->
ssl_context
);
my_free
(
ssl_fd
);
DBUG_RETURN
(
0
);
...
...
@@ -243,7 +219,6 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
{
*
error
=
SSL_INITERR_BAD_PATHS
;
DBUG_PRINT
(
"error"
,
(
"%s"
,
sslGetErrString
(
*
error
)));
report_errors
();
SSL_CTX_free
(
ssl_fd
->
ssl_context
);
my_free
(
ssl_fd
);
DBUG_RETURN
(
0
);
...
...
@@ -266,7 +241,6 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
DBUG_PRINT
(
"warning"
,
(
"X509_STORE_load_locations for CRL failed"
));
*
error
=
SSL_INITERR_BAD_PATHS
;
DBUG_PRINT
(
"error"
,
(
"%s"
,
sslGetErrString
(
*
error
)));
report_errors
();
SSL_CTX_free
(
ssl_fd
->
ssl_context
);
my_free
(
ssl_fd
);
DBUG_RETURN
(
0
);
...
...
@@ -277,7 +251,6 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
if
(
vio_set_cert_stuff
(
ssl_fd
->
ssl_context
,
cert_file
,
key_file
,
error
))
{
DBUG_PRINT
(
"error"
,
(
"vio_set_cert_stuff failed"
));
report_errors
();
SSL_CTX_free
(
ssl_fd
->
ssl_context
);
my_free
(
ssl_fd
);
DBUG_RETURN
(
0
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment