search for: md5_get_digest

Displaying 6 results from an estimated 6 matches for "md5_get_digest".

2004 Jul 20
0
[PATCH] fix MD5 code buglet
...0000000 +0400 +++ dovecot-1.0-test28/src/lib/md5.c 2004-07-20 15:44:56.000000000 +0400 @@ -267,7 +267,7 @@ void md5_final(struct md5_context *ctx, result[14] = ctx->d >> 16; result[15] = ctx->d >> 24; - memset(ctx, 0, sizeof(ctx)); + memset(ctx, 0, sizeof(*ctx)); } void md5_get_digest(const void *data, size_t size, unsigned char result[16]) -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: <http://dovecot.org/pipermail/dovecot/attachments/20040720/edfce...
2017 Nov 01
2
Bug: lmtp proxy does not quote local parts with spaces
...9;); - if (tab[2].value != NULL) tab[2].value++; + tab[2].value = strrchr(username, '@'); + if (tab[2].value != NULL) { + tab[1].value = t_strndup(username, tab[2].value - username); + tab[2].value++; + } else { + tab[1].value = username; + } var_expand(str, format, tab); md5_get_digest(str_data(str), str_len(str), md5); --- dovecot-2.2.33.2.original/src/lib-mail/message-address.c 2017-10-05 18:10:44.000000000 +0100 +++ dovecot-2.2.33.2/src/lib-mail/message-address.c 2017-10-31 10:12:50.185866755 +0000 @@ -540,7 +540,7 @@ if (*delimiter_string == '\0') return; - dom...
2017 Nov 03
1
Bug: lmtp proxy does not quote local parts with spaces
...9;@'); - if (tab[2].value != NULL) tab[2].value++; + tab[2].value = strrchr(username, '@'); + if (tab[2].value != NULL) { + tab[1].value = t_strdup_until(username, tab[2].value); + tab[2].value++; + } else { + tab[1].value = username; + } var_expand(str, format, tab); md5_get_digest(str_data(str), str_len(str), md5); --- dovecot-2.2.33.2/src/lib-mail/message-address.c 2017-10-05 18:10:44.000000000 +0100 +++ dovecot-2.2.33.2.reverse-domaincut/src/lib-mail/message-address.c 2017-11-02 16:00:30.926866755 +0000 @@ -540,7 +540,7 @@ if (*delimiter_string == '\0') return...
2017 Oct 26
2
Bug: lmtp proxy does not quote local parts with spaces
On 26/10/2017 18:38, Alexander Dalloz wrote: > Am 26.10.2017 um 12:20 schrieb David Zambonini: >> >> There seems to be a bug with RFC822 processing in ltmp proxying that >> doesn't >> quote local parts that, for example, contain spaces. > > Newer related RFCs are RFC 5321 and 5322. Typo, meant to say RFC2822, which they still supercede, not that the
2012 Sep 04
2
[PATCH] Generalize HMAC implementation
...uot; -#include "hmac-md5.h" -#include "safe-memset.h" - -void hmac_md5_init(struct hmac_md5_context *ctx, - const unsigned char *key, size_t key_len) -{ - int i; - unsigned char md5key[16]; - unsigned char k_ipad[64]; - unsigned char k_opad[64]; - - if (key_len > 64) { - md5_get_digest(key, key_len, md5key); - key = md5key; - key_len = 16; - } - - memcpy(k_ipad, key, key_len); - memset(k_ipad + key_len, 0, 64 - key_len); - memcpy(k_opad, k_ipad, 64); - - for (i = 0; i < 64; i++) { - k_ipad[i] ^= 0x36; - k_opad[i] ^= 0x5c; - } - - md5_init(&ctx->ctx); - md5_update(&a...
2004 Aug 09
1
[PATCH] RPA authentication mechanism
...d_c(buf, *str++); + } + + *size = buffer_get_used_size(buf); + return buffer_free_without_data(buf); +} + +const char *password_generate_rpa(const char *pw) +{ + unsigned char hash[16]; + unsigned char *ucs2be_pw; + size_t size; + + ucs2be_pw = ucs2be_str(unsafe_data_stack_pool, pw, &size); + + md5_get_digest(ucs2be_pw, size, hash); + + safe_memset(ucs2be_pw, 0, size); + + return binary_to_hex(hash, sizeof(hash)); +} -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: <http://dov...