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

Comparing:
ircd-hybrid/trunk/src/s_serv.c (file contents), Revision 3335 by michael, Thu Apr 17 18:55:31 2014 UTC vs.
ircd-hybrid/branches/8.2.x/src/server.c (file contents), Revision 3377 by michael, Thu Apr 24 16:15:51 2014 UTC

# Line 40 | Line 40
40   #include "numeric.h"
41   #include "packet.h"
42   #include "conf.h"
43 < #include "s_serv.h"
43 > #include "server.h"
44   #include "log.h"
45 < #include "s_user.h"
45 > #include "user.h"
46   #include "send.h"
47   #include "memory.h"
48   #include "channel.h"
# Line 874 | Line 874 | ssl_server_handshake(fde_t *fd, struct C
874    if ((cert = SSL_get_peer_certificate(client_p->localClient->fd.ssl)))
875    {
876      int res = SSL_get_verify_result(client_p->localClient->fd.ssl);
877 <    char buf[EVP_MAX_MD_SIZE * 2 + 1] = { '\0' };
878 <    unsigned char md[EVP_MAX_MD_SIZE] = { '\0' };
877 >    char buf[EVP_MAX_MD_SIZE * 2 + 1] = "";
878 >    unsigned char md[EVP_MAX_MD_SIZE] = "";
879  
880      if (res == X509_V_OK || res == X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN ||
881          res == X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE ||
882          res == X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT)
883      {
884 <      unsigned int i = 0, n = 0;
884 >      unsigned int n = 0;
885  
886        if (X509_digest(cert, EVP_sha256(), md, &n))
887        {
888 <        for (; i < n; ++i)
888 >        for (unsigned int i = 0; i < n; ++i)
889            snprintf(buf + 2 * i, 3, "%02X", md[i]);
890          client_p->certfp = xstrdup(buf);
891        }

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)