gsasl-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU gsasl branch, master, updated. gsasl-1-2-76-g3a73ac8


From: Simon Josefsson
Subject: [SCM] GNU gsasl branch, master, updated. gsasl-1-2-76-g3a73ac8
Date: Fri, 11 Sep 2009 07:32:44 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gsasl".

http://git.savannah.gnu.org/cgit/gsasl.git/commit/?id=3a73ac881e37f34112be1a641c4bae72633d914f

The branch, master has been updated
       via  3a73ac881e37f34112be1a641c4bae72633d914f (commit)
      from  3f5017a39bbeb5a9f85e6b9ddf2f7e1ac41cd69e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3a73ac881e37f34112be1a641c4bae72633d914f
Author: Simon Josefsson <address@hidden>
Date:   Fri Sep 11 09:32:38 2009 +0200

    SCRAM: Base64 decode salt.

-----------------------------------------------------------------------

Summary of changes:
 lib/scram/client.c  |    9 ++++++++-
 lib/scram/parser.c  |    2 --
 lib/scram/printer.c |    2 --
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/lib/scram/client.c b/lib/scram/client.c
index 08aa52b..3aa2c74 100644
--- a/lib/scram/client.c
+++ b/lib/scram/client.c
@@ -238,10 +238,17 @@ _gsasl_scram_sha1_client_step (Gsasl_session * sctx,
          else if ((p = gsasl_property_get (sctx, GSASL_PASSWORD)) != NULL)
            {
              Gc_rc err;
+             char *salt;
+             size_t saltlen;
+
+             rc = gsasl_base64_from (state->sf.salt, strlen (state->sf.salt),
+                                     &salt, &saltlen);
+             if (rc != 0)
+               return rc;
 
              /* SaltedPassword := Hi(password, salt) */
              err = gc_pbkdf2_sha1 (p, strlen (p),
-                                   state->sf.salt, strlen (state->sf.salt),
+                                   salt, saltlen,
                                    state->sf.iter, saltedpassword, 20);
              if (err != GC_OK)
                return GSASL_MALLOC_ERROR;
diff --git a/lib/scram/parser.c b/lib/scram/parser.c
index 7ddd173..c3d0f2b 100644
--- a/lib/scram/parser.c
+++ b/lib/scram/parser.c
@@ -208,8 +208,6 @@ scram_parse_server_first (const char *str,
     memcpy (sf->salt, str, len);
     sf->salt[len] = '\0';
 
-    /* FIXME base64 decode salt */
-
     str = p;
   }
 
diff --git a/lib/scram/printer.c b/lib/scram/printer.c
index f8ceee7..dd59cc1 100644
--- a/lib/scram/printer.c
+++ b/lib/scram/printer.c
@@ -106,8 +106,6 @@ scram_print_server_first (struct scram_server_first *sf, 
char **out)
   if (!scram_valid_server_first (sf))
     return -1;
 
-  /* FIXME base64 salt here */
-
   n = asprintf (out, "r=%s,s=%s,i=%d",
                sf->nonce, sf->salt, sf->iter);
   if (n <= 0 || *out == NULL)


hooks/post-receive
-- 
GNU gsasl




reply via email to

[Prev in Thread] Current Thread [Next in Thread]