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
697069af
Commit
697069af
authored
May 04, 2006
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix warnings
parent
15babe14
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
30 deletions
+32
-30
vio/viossl.c
vio/viossl.c
+31
-29
vio/viosslfactories.c
vio/viosslfactories.c
+1
-1
No files found.
vio/viossl.c
View file @
697069af
...
...
@@ -56,8 +56,10 @@ report_errors(SSL* ssl)
unsigned
long
l
;
const
char
*
file
;
const
char
*
data
;
int
line
,
flags
;
int
line
,
flags
;
#ifndef DBUG_OFF
char
buf
[
512
];
#endif
DBUG_ENTER
(
"report_errors"
);
...
...
@@ -67,15 +69,11 @@ report_errors(SSL* ssl)
file
,
line
,(
flags
&
ERR_TXT_STRING
)
?
data
:
""
))
;
}
#ifdef HAVE_YASSL
/*
The above calls to ERR_* doesn't return any messages when we
are using yaSSL since error is stored in the SSL object we used.
*/
if
(
ssl
)
DBUG_PRINT
(
"error"
,
(
"yaSSL: %s"
,
ERR_error_string
(
SSL_get_error
(
ssl
,
l
),
buf
)));
#endif
DBUG_PRINT
(
"info"
,
(
"errno: %d"
,
socket_errno
));
DBUG_PRINT
(
"error"
,
(
"error: %s"
,
ERR_error_string
(
SSL_get_error
(
ssl
,
l
),
buf
)));
DBUG_PRINT
(
"info"
,
(
"socket_errno: %d"
,
socket_errno
));
DBUG_VOID_RETURN
;
}
...
...
@@ -87,12 +85,11 @@ int vio_ssl_read(Vio *vio, gptr buf, int size)
DBUG_PRINT
(
"enter"
,
(
"sd: %d, buf: 0x%p, size: %d, ssl_: 0x%p"
,
vio
->
sd
,
buf
,
size
,
vio
->
ssl_arg
));
if
((
r
=
SSL_read
((
SSL
*
)
vio
->
ssl_arg
,
buf
,
size
))
<
0
)
{
int
err
=
SSL_get_error
((
SSL
*
)
vio
->
ssl_arg
,
r
);
DBUG_PRINT
(
"error"
,(
"SSL_read(): %d SSL_get_error(): %d"
,
r
,
err
));
r
=
SSL_read
((
SSL
*
)
vio
->
ssl_arg
,
buf
,
size
);
#ifndef DBUG_OFF
if
(
r
<
0
)
report_errors
((
SSL
*
)
vio
->
ssl_arg
);
}
#endif
DBUG_PRINT
(
"exit"
,
(
"%d"
,
r
));
DBUG_RETURN
(
r
);
}
...
...
@@ -104,8 +101,11 @@ int vio_ssl_write(Vio *vio, const gptr buf, int size)
DBUG_ENTER
(
"vio_ssl_write"
);
DBUG_PRINT
(
"enter"
,
(
"sd: %d, buf: 0x%p, size: %d"
,
vio
->
sd
,
buf
,
size
));
if
((
r
=
SSL_write
((
SSL
*
)
vio
->
ssl_arg
,
buf
,
size
))
<
0
)
r
=
SSL_write
((
SSL
*
)
vio
->
ssl_arg
,
buf
,
size
);
#ifndef DBUG_OFF
if
(
r
<
0
)
report_errors
((
SSL
*
)
vio
->
ssl_arg
);
#endif
DBUG_PRINT
(
"exit"
,
(
"%d"
,
r
));
DBUG_RETURN
(
r
);
}
...
...
@@ -142,7 +142,6 @@ int vio_ssl_close(Vio *vio)
int
sslaccept
(
struct
st_VioSSLFd
*
ptr
,
Vio
*
vio
,
long
timeout
)
{
SSL
*
ssl
;
X509
*
client_cert
;
my_bool
unused
;
my_bool
net_blocking
;
enum
enum_vio_type
old_type
;
...
...
@@ -183,6 +182,7 @@ int sslaccept(struct st_VioSSLFd *ptr, Vio *vio, long timeout)
#ifndef DBUG_OFF
{
char
buf
[
1024
];
X509
*
client_cert
;
DBUG_PRINT
(
"info"
,(
"cipher_name= '%s'"
,
SSL_get_cipher_name
(
ssl
)));
if
((
client_cert
=
SSL_get_peer_certificate
(
ssl
)))
...
...
@@ -217,7 +217,6 @@ int sslaccept(struct st_VioSSLFd *ptr, Vio *vio, long timeout)
int
sslconnect
(
struct
st_VioSSLFd
*
ptr
,
Vio
*
vio
,
long
timeout
)
{
SSL
*
ssl
;
X509
*
server_cert
;
my_bool
unused
;
my_bool
net_blocking
;
enum
enum_vio_type
old_type
;
...
...
@@ -255,6 +254,8 @@ int sslconnect(struct st_VioSSLFd *ptr, Vio *vio, long timeout)
DBUG_RETURN
(
1
);
}
#ifndef DBUG_OFF
{
X509
*
server_cert
;
DBUG_PRINT
(
"info"
,(
"cipher_name: '%s'"
,
SSL_get_cipher_name
(
ssl
)));
if
((
server_cert
=
SSL_get_peer_certificate
(
ssl
)))
...
...
@@ -269,6 +270,7 @@ int sslconnect(struct st_VioSSLFd *ptr, Vio *vio, long timeout)
}
else
DBUG_PRINT
(
"info"
,(
"Server does not have certificate."
));
}
#endif
DBUG_RETURN
(
0
);
...
...
vio/viosslfactories.c
View file @
697069af
...
...
@@ -339,7 +339,7 @@ new_VioSSLAcceptorFd(const char *key_file, const char *cert_file,
Use the ssl_fd pointer
*/
SSL_CTX_set_session_id_context
(
ssl_fd
->
ssl_context
,
ssl_fd
,
(
const
unsigned
char
*
)
ssl_fd
,
sizeof
(
ssl_fd
));
return
ssl_fd
;
...
...
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