Changeset 5198:9cfb5ac98e26

Show
Ignore:
Timestamp:
2007-08-27 11:07:42 (17 months ago)
Author:
Brendan Cully <brendan@…>
Branch:
HEAD
Message:

Update auth_cram for new MD5 code (untested).

Files:
2 modified

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r5193 r5198  
     12007-08-27 10:13 -0700  Brendan Cully  <brendan@kublai.com>  (4ade2517703a) 
     2 
     3        * Makefile.am, configure.ac, hcache.c, md5.c, md5.h, md5c.c, 
     4        pgppubring.c, pop_auth.c: Replace RFC md5 implementation with GPL 
     5        version from coreutils 
     6 
     72007-08-16 09:32 -0700  Brendan Cully  <brendan@kublai.com>  (d096219907e7) 
     8 
     9        * curs_lib.c: Check for lost tty if getch returns error (closes #1220) 
     10        Great thanks to Vincent Lefevre for tracking this one down. 
     11 
     122007-08-15 20:09 -0700  Michael Vrable  <mvrable@cs.ucsd.edu>  (acd71f2f2555) 
     13 
     14        * rfc3676.c: Fix RFC 3676 (format=flowed text) handling. 
     15 
     16        The old code would consider a line containing "> " to be flowed, but 
     17        since this is a quoted and space-stuffed line containing no 
     18        additional text, by my reading of RFC 3676 it should be fixed. 
     19 
     20        Clean up the handling of format=flowed text. Fix the test to 
     21        determine whether a line is fixed--if a line ends in a space only 
     22        because the last character is a space from space-stuffing, consider 
     23        the line to be a fixed line. This makes the test for ((buf_len - 
     24        buf_off) <= 0) later no longer necessary. 
     25 
     26        Also simplify the code by removing checks for curline being non- 
     27        null; it is allocated at the start of the function and never 
     28        reallocated to size zero, so it should never be a null pointer. 
     29 
     302007-08-08 10:49 -0700  Kyle Wheeler  (6d3e90261321) 
     31 
     32        * makedoc.c: Trim whitespace in definition lists for man pages (closes 
     33        #2941). 
     34 
     352007-08-02 22:30 -0700  Brendan Cully  <brendan@kublai.com>  (aefdab8fad80) 
     36 
     37        * init.h: Clarify the documentation for $use_envelope_from 
     38        (closes #2936). Thanks to Vincent Lefevre for the suggestions. 
     39 
    1402007-07-25 11:16 -0700  Vincent Lefevre  <vincent@vinc17.org>  (6bc60516fffa) 
    241 
  • imap/auth_cram.c

    r4463 r5198  
    135135  unsigned char* response) 
    136136{ 
    137   MD5_CTX ctx; 
     137  struct md5_ctx ctx; 
    138138  unsigned char ipad[MD5_BLOCK_LEN], opad[MD5_BLOCK_LEN]; 
    139139  unsigned char secret[MD5_BLOCK_LEN+1]; 
     
    149149  if (secret_len > MD5_BLOCK_LEN) 
    150150  { 
    151     MD5Init (&ctx); 
    152     MD5Update (&ctx, (unsigned char*) password, secret_len); 
    153     MD5Final (hash_passwd, &ctx); 
     151    md5_buffer (password, secret_len, hash_passwd); 
    154152    strfcpy ((char*) secret, (char*) hash_passwd, MD5_DIGEST_LEN); 
    155153    secret_len = MD5_DIGEST_LEN; 
     
    170168 
    171169  /* inner hash: challenge and ipadded secret */ 
    172   MD5Init (&ctx); 
    173   MD5Update (&ctx, ipad, MD5_BLOCK_LEN); 
    174   MD5Update (&ctx, (unsigned char*) challenge, chal_len); 
    175   MD5Final (response, &ctx); 
     170  md5_init_ctx (&ctx); 
     171  md5_process_bytes (ipad, MD5_BLOCK_LEN, &ctx); 
     172  md5_process_bytes (challenge, chal_len, &ctx); 
     173  md5_finish_ctx (&ctx, response); 
    176174 
    177175  /* outer hash: inner hash and opadded secret */ 
    178   MD5Init (&ctx); 
    179   MD5Update (&ctx, opad, MD5_BLOCK_LEN); 
    180   MD5Update (&ctx, response, MD5_DIGEST_LEN); 
    181   MD5Final (response, &ctx); 
     176  md5_init_ctx (&ctx); 
     177  md5_process_bytes (opad, MD5_BLOCK_LEN, &ctx); 
     178  md5_process_bytes (response, MD5_DIGEST_LEN, &ctx); 
     179  md5_finish_ctx (&ctx, response); 
    182180}