[asterisk-commits] oej: branch oej/juniper-tls-settings-1.8 r412304 - /team/oej/juniper-tls-sett...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Apr 12 00:44:48 CDT 2014


Author: oej
Date: Sat Apr 12 00:44:39 2014
New Revision: 412304

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=412304
Log:
Trying to get cipher names 

Modified:
    team/oej/juniper-tls-settings-1.8/main/tcptls.c

Modified: team/oej/juniper-tls-settings-1.8/main/tcptls.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/juniper-tls-settings-1.8/main/tcptls.c?view=diff&rev=412304&r1=412303&r2=412304
==============================================================================
--- team/oej/juniper-tls-settings-1.8/main/tcptls.c (original)
+++ team/oej/juniper-tls-settings-1.8/main/tcptls.c Sat Apr 12 00:44:39 2014
@@ -671,15 +671,28 @@
 	return 1;
 }
 
-int ast_ssl_get_cipher(struct ast_tls_config *cfg, char *buf, size_t buflen)
+int ast_ssl_get_session_cipher(struct struct ast_tcptls_session_instance *sess, char *buf, size_t buflen)
 {
 	char *tls_info;
+	if (!SSL_get_cipher_name(sess->ssl)) {
+		*buf = '\0';
+		return 0; 	/* False */
+	}
+	ast_copy_string(buf, SSL_get_cipher_name(sess->ssl), buflen);
+	return 1;
+}
+
+int ast_ssl_get_socket_cipher(struct ast_tls_config *cfg, char *buf, size_t buflen)
+{
+	char *tls_info;
+
 	if (!SSL_get_current_cipher(cfg->ssl_ctx)) {
 		return 0; 	/* False */
 	}
-	tls_info = SSL_CIPHER_description(SSL_get_current_cipher(cfg->ssl), buf, buflen);
+	SSL_CIPHER_description(SSL_get_current_cipher(cfg->ssl), buf, buflen);
 	return 1;
 }
+
 
 int ast_tls_read_conf(struct ast_tls_config *tls_cfg, struct ast_tcptls_session_args *tls_desc, const char *varname, const char *value)
 {




More information about the asterisk-commits mailing list