RSSC: remove old malloc not needed anymore.
[citadel.git] / citadel / md5.c
index 2e600d363ac1eb4dfadc6780dfd6879af17c4b64..9d0b4421e7e90fb83092942a268de4d6474285a5 100644 (file)
@@ -150,7 +150,7 @@ void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
     MD5Transform(ctx->buf, (cit_uint32_t *) ctx->in);
     byteReverse((unsigned char *) ctx->buf, 4);
     memcpy(digest, ctx->buf, 16);
-    memset(ctx, 0, sizeof(ctx));       /* In case it's sensitive */
+    memset(ctx, 0, sizeof(struct MD5Context)); /* In case it's sensitive */
 }
 
 #ifndef ASM_MD5
@@ -343,9 +343,7 @@ char *make_apop_string(char *realpass, char *nonce, char *buffer, size_t n)
    int i;
    
    MD5Init(&ctx);
-/*   scr_printf("MD5@@: Adding nonce: %s\n", nonce); */
    MD5Update(&ctx, (u_char*)nonce, strlen(nonce));
-/*   scr_printf("MD5@@: Adding password %s\n", realpass); */
    MD5Update(&ctx, (u_char*)realpass, strlen(realpass));
    MD5Final(rawdigest, &ctx);
    for (i=0; i<MD5_DIGEST_LEN; i++)
@@ -354,7 +352,6 @@ char *make_apop_string(char *realpass, char *nonce, char *buffer, size_t n)
       buffer[i*2] = tolower(buffer[i*2]);
       buffer[(i*2)+1] = tolower(buffer[(i*2)+1]);
    }
-/*   scr_printf("MD5@@: Result is %s\n", buffer); */
    return buffer;
 }