ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid-7.2/src/s_misc.c
(Generate patch)

Comparing ircd-hybrid-7.2/src/s_misc.c (file contents):
Revision 34 by lusky, Sun Oct 2 21:05:51 2005 UTC vs.
Revision 967 by michael, Sun Aug 2 18:05:28 2009 UTC

# Line 136 | Line 136 | small_file_date(time_t lclock)
136  
137   #ifdef HAVE_LIBCRYPTO
138   char *
139 < ssl_get_cipher(SSL *ssl)
139 > ssl_get_cipher(const SSL *ssl)
140   {
141 <  static char buffer[128];
142 <  const char *name = NULL;
143 <  int bits;
144 <
145 <  switch (ssl->session->ssl_version)
146 <  {
147 <    case SSL2_VERSION:
148 <      name = "SSLv2";
149 <      break;
150 <
151 <    case SSL3_VERSION:
152 <      name = "SSLv3";
153 <      break;
154 <
155 <    case TLS1_VERSION:
156 <      name = "TLSv1";
157 <      break;
158 <
159 <    default:
160 <      name = "UNKNOWN";
161 <  }
141 >  static char buffer[IRCD_BUFSIZE / 4];
142 >  int bits = 0;
143  
144    SSL_CIPHER_get_bits(SSL_get_current_cipher(ssl), &bits);
145  
146 <  snprintf(buffer, sizeof(buffer), "%s %s-%d",
147 <           name, SSL_get_cipher(ssl), bits);
146 >  snprintf(buffer, sizeof(buffer), "%s %s-%d", SSL_get_version(ssl),
147 >           SSL_get_cipher(ssl), bits);
148    
149    return buffer;
150   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines