/[svn]/ircd-hybrid-7.2/src/s_misc.c
ViewVC logotype

Diff of /ircd-hybrid-7.2/src/s_misc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 34 by lusky, Sun Oct 2 21:05:51 2005 UTC revision 967 by michael, Sun Aug 2 18:05:28 2009 UTC
# Line 136  small_file_date(time_t lclock) Line 136  small_file_date(time_t lclock)
136    
137  #ifdef HAVE_LIBCRYPTO  #ifdef HAVE_LIBCRYPTO
138  char *  char *
139  ssl_get_cipher(SSL *ssl)  ssl_get_cipher(const SSL *ssl)
140  {  {
141    static char buffer[128];    static char buffer[IRCD_BUFSIZE / 4];
142    const char *name = NULL;    int bits = 0;
   int bits;  
   
   switch (ssl->session->ssl_version)  
   {  
     case SSL2_VERSION:  
       name = "SSLv2";  
       break;  
   
     case SSL3_VERSION:  
       name = "SSLv3";  
       break;  
   
     case TLS1_VERSION:  
       name = "TLSv1";  
       break;  
   
     default:  
       name = "UNKNOWN";  
   }  
143    
144    SSL_CIPHER_get_bits(SSL_get_current_cipher(ssl), &bits);    SSL_CIPHER_get_bits(SSL_get_current_cipher(ssl), &bits);
145    
146    snprintf(buffer, sizeof(buffer), "%s %s-%d",    snprintf(buffer, sizeof(buffer), "%s %s-%d", SSL_get_version(ssl),
147             name, SSL_get_cipher(ssl), bits);             SSL_get_cipher(ssl), bits);
148        
149    return buffer;    return buffer;
150  }  }

Legend:
Removed from v.34  
changed lines
  Added in v.967

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28