diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-03-02 02:01:27 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-03-02 02:01:27 +0800 |
commit | 1cd06b6bfb6edc61ddadcf0bfee555cb4b7c60ad (patch) | |
tree | 6a1f1dff0208a23c2e26133b49697760f919b9b1 /camel/camel-sasl-cram-md5.c | |
parent | 89ec4e5af666be612fe572082e539ebe7ae0efb3 (diff) | |
download | gsoc2013-evolution-1cd06b6bfb6edc61ddadcf0bfee555cb4b7c60ad.tar gsoc2013-evolution-1cd06b6bfb6edc61ddadcf0bfee555cb4b7c60ad.tar.gz gsoc2013-evolution-1cd06b6bfb6edc61ddadcf0bfee555cb4b7c60ad.tar.bz2 gsoc2013-evolution-1cd06b6bfb6edc61ddadcf0bfee555cb4b7c60ad.tar.lz gsoc2013-evolution-1cd06b6bfb6edc61ddadcf0bfee555cb4b7c60ad.tar.xz gsoc2013-evolution-1cd06b6bfb6edc61ddadcf0bfee555cb4b7c60ad.tar.zst gsoc2013-evolution-1cd06b6bfb6edc61ddadcf0bfee555cb4b7c60ad.zip |
Don't base64 encode the data, leave that up to the provider to do if it
2001-03-01 Jeffrey Stedfast <fejj@ximian.com>
* camel-sasl-anonymous.c (anon_challenge): Don't base64 encode the
data, leave that up to the provider to do if it needs to. Also
save on some memory allocations and stuff.
* camel-sasl-cram-md5.c (cram_md5_challenge): Same here.
svn path=/trunk/; revision=8454
Diffstat (limited to 'camel/camel-sasl-cram-md5.c')
-rw-r--r-- | camel/camel-sasl-cram-md5.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/camel/camel-sasl-cram-md5.c b/camel/camel-sasl-cram-md5.c index 66d42aca92..863a2ed39f 100644 --- a/camel/camel-sasl-cram-md5.c +++ b/camel/camel-sasl-cram-md5.c @@ -115,8 +115,8 @@ cram_md5_challenge (CamelSasl *sasl, const char *token, CamelException *ex) { CamelSaslCramMd5 *sasl_cram = CAMEL_SASL_CRAM_MD5 (sasl); struct _CamelSaslCramMd5Private *priv = sasl_cram->priv; - char *timestamp, *passwd, *buf, *enc; guchar digest[16], md5asc[33], *s, *p; + char *timestamp, *passwd, *buf; GByteArray *ret = NULL; guchar ipad[64]; guchar opad[64]; @@ -163,12 +163,10 @@ cram_md5_challenge (CamelSasl *sasl, const char *token, CamelException *ex) sprintf (p, "%.2x", *s); buf = g_strdup_printf ("%s %s", sasl_cram->username, md5asc); - enc = base64_encode_simple (buf, strlen (buf)); - g_free (buf); ret = g_byte_array_new (); - g_byte_array_append (ret, enc, strlen (enc)); - g_free (enc); + g_byte_array_append (ret, buf, strlen (buf)); + g_free (buf); break; case STATE_FINAL: |