Changeset 6486

Show
Ignore:
Timestamp:
08/13/08 14:04:56 (3 months ago)
Author:
emostar
Message:

Add our own MD5 function so we don't need to rely upon openssl
fixes #1642

Location:
trunk/licq
Files:
2 added
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/licq/src/icqpacket.cpp

    r6467 r6486  
    2424#endif 
    2525 
    26 #include <openssl/md5.h> 
     26#include "licq_md5.h" 
    2727 
    2828#include <boost/scoped_array.hpp> 
     
    837837  toHash += szPass; 
    838838  toHash += "AOL Instant Messenger (SM)"; 
    839   unsigned char szDigest[MD5_DIGEST_LENGTH]; 
    840   MD5((const unsigned char *)toHash.c_str(), toHash.size(), szDigest); 
     839  std::string digest = md5(toHash); 
    841840 
    842841  unsigned int uinlen = strlen(szUin); 
    843842 
    844   m_nSize += uinlen + MD5_DIGEST_LENGTH + 70; 
     843  m_nSize += uinlen + digest.size() + 70; 
    845844  InitBuffer(); 
    846845 
    847846  buffer->PackTLV(0x0001, uinlen, szUin); 
    848   buffer->PackTLV(0x0025, MD5_DIGEST_LENGTH, reinterpret_cast<char *>(szDigest)); 
     847  buffer->PackTLV(0x0025, digest.size(), digest.c_str()); 
    849848 
    850849  buffer->PackTLV(0x0003, 0x0008, "ICQBasic"); 
  • trunk/licq/src/Makefile.am

    r6396 r6486  
    2020     hebrev.c icqcolor.cpp fifo.cpp  protoplugind.cpp gpg.cpp \ 
    2121     occupationcodes.c homepagecodes.c interestcodes.c \ 
    22      organizationcodes.c backgroundcodes.c providers.c rtf.cc 
     22     organizationcodes.c backgroundcodes.c providers.c rtf.cc md5.cpp 
    2323 
    2424licq_LDADD = @SOCKS_LIBS@