[svn-commits] pabelanger: branch 1.6.2 r295440 - in /branches/1.6.2: include/asterisk/ res/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Nov 18 11:51:39 CST 2010
Author: pabelanger
Date: Thu Nov 18 11:51:34 2010
New Revision: 295440
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=295440
Log:
Fix compiler warnings when using openssl-dev 1.0.0+
Review: https://reviewboard.asterisk.org/r/1016/
Modified:
branches/1.6.2/include/asterisk/jabber.h
branches/1.6.2/res/res_jabber.c
Modified: branches/1.6.2/include/asterisk/jabber.h
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/include/asterisk/jabber.h?view=diff&rev=295440&r1=295439&r2=295440
==============================================================================
--- branches/1.6.2/include/asterisk/jabber.h (original)
+++ branches/1.6.2/include/asterisk/jabber.h Thu Nov 18 11:51:34 2010
@@ -153,7 +153,7 @@
#ifdef HAVE_OPENSSL
SSL_CTX *ssl_context;
SSL *ssl_session;
- SSL_METHOD *ssl_method;
+ const SSL_METHOD *ssl_method;
unsigned int stream_flags;
#endif /* HAVE_OPENSSL */
enum aji_state state;
Modified: branches/1.6.2/res/res_jabber.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/res/res_jabber.c?view=diff&rev=295440&r1=295439&r2=295440
==============================================================================
--- branches/1.6.2/res/res_jabber.c (original)
+++ branches/1.6.2/res/res_jabber.c Thu Nov 18 11:51:34 2010
@@ -618,40 +618,45 @@
{
int ret;
int sock;
-
- ast_debug(1, "Starting TLS handshake\n");
+
+ ast_debug(1, "Starting TLS handshake\n");
/* Choose an SSL/TLS protocol version, create SSL_CTX */
client->ssl_method = SSLv3_method();
- client->ssl_context = SSL_CTX_new(client->ssl_method);
- if (!client->ssl_context)
+ client->ssl_context = SSL_CTX_new((SSL_METHOD *) client->ssl_method);
+ if (!client->ssl_context) {
return IKS_NET_TLSFAIL;
+ }
/* Create new SSL session */
client->ssl_session = SSL_new(client->ssl_context);
- if (!client->ssl_session)
+ if (!client->ssl_session) {
return IKS_NET_TLSFAIL;
+ }
/* Enforce TLS on our XMPP connection */
sock = iks_fd(client->p);
ret = SSL_set_fd(client->ssl_session, sock);
- if (!ret)
+ if (!ret) {
return IKS_NET_TLSFAIL;
+ }
/* Perform SSL handshake */
ret = SSL_connect(client->ssl_session);
- if (!ret)
+ if (!ret) {
return IKS_NET_TLSFAIL;
+ }
client->stream_flags &= (~TRY_SECURE);
client->stream_flags |= SECURE;
/* Sent over the established TLS connection */
ret = aji_send_header(client, client->jid->server);
- if (ret != IKS_OK)
+ if (ret != IKS_OK) {
return IKS_NET_TLSFAIL;
-
- ast_debug(1, "TLS started with server\n");
+ }
+
+ ast_debug(1, "TLS started with server\n");
return IKS_OK;
}
More information about the svn-commits
mailing list