Cleaned up the ADC client test code.

Now works with ADCS (not very well tested, though)
This commit is contained in:
Jan Vidar Krey
2011-11-29 16:39:03 +01:00
parent 3a39a36fbb
commit 99e644597d
4 changed files with 105 additions and 21 deletions

View File

@@ -122,6 +122,11 @@ ssize_t net_con_ssl_handshake(struct net_connection* con, enum net_con_ssl_mode
if (ssl_mode == net_con_ssl_mode_server)
{
ssl = SSL_new(ssl_ctx);
if (!ssl)
{
LOG_ERROR("Unable to create new SSL stream\n");
return -1;
}
SSL_set_fd(ssl, con->sd);
net_con_set_ssl(con, ssl);
return net_con_ssl_accept(con);