gsasl-commit
[Top][All Lists]
Advanced

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

CVS gsasl/lib/digest-md5


From: gsasl-commit
Subject: CVS gsasl/lib/digest-md5
Date: Sun, 19 Dec 2004 18:42:04 +0100

Update of /home/cvs/gsasl/lib/digest-md5
In directory dopio:/tmp/cvs-serv2222

Modified Files:
        server.c digesthmac.h digesthmac.c client.c 
Log Message:
Fix API.


--- /home/cvs/gsasl/lib/digest-md5/server.c     2004/12/19 17:33:25     1.17
+++ /home/cvs/gsasl/lib/digest-md5/server.c     2004/12/19 17:42:03     1.18
@@ -668,7 +668,7 @@
        /* verify response */
        res = digest_md5_hmac (output + outlen, secret,
                               nonce, nc, cnonce, state->qop, authzid,
-                              digesturi, A2_PRE,
+                              digesturi, 0,
                               state->cipher, NULL, NULL, NULL, NULL);
        if (res)
          goto done;
@@ -692,7 +692,7 @@
 
        res = digest_md5_hmac (output + outlen, secret,
                               nonce, nc, cnonce, state->qop, authzid,
-                              digesturi, COLON,
+                              digesturi, 1,
                               state->cipher,
                               state->kic, state->kis, state->kcc, state->kcs);
        if (res)
--- /home/cvs/gsasl/lib/digest-md5/digesthmac.h 2004/12/19 17:31:51     1.1
+++ /home/cvs/gsasl/lib/digest-md5/digesthmac.h 2004/12/19 17:42:03     1.2
@@ -31,7 +31,7 @@
 extern int digest_md5_hmac (char *output, char secret[DIGEST_MD5_LENGTH],
                            char *nonce, unsigned long nc, char *cnonce,
                            digest_md5_qop qop, char *authzid, char *digesturi,
-                           const char *a2string, digest_md5_cipher cipher,
+                           int rspauth, digest_md5_cipher cipher,
                            char *kic, char *kis, char *kcc, char *kcs);
 
 #endif /* DIGEST_MD5_DIGESTHMAC_H */
--- /home/cvs/gsasl/lib/digest-md5/digesthmac.c 2004/12/19 17:31:51     1.1
+++ /home/cvs/gsasl/lib/digest-md5/digesthmac.c 2004/12/19 17:42:03     1.2
@@ -72,18 +72,19 @@
    nonce.  QOP is the quality of protection to use.  AUTHZID is a zero
    terminated string with the authorization identity.  DIGESTURI is a
    zero terminated string with the server principal (e.g.,
-   imap/mail.example.org).  A2STRING is a zero terminated string that
-   should either be "AUTHENTICATE:" or ":".  CIPHER is the cipher to
-   use.  KIC, KIS, KCC, KCS are either NULL, or points to 16 byte
-   arrays that will hold the computed keys on output.  Returns 0 on
-   success. */
+   imap/mail.example.org).  RSPAUTH is a boolean which indicate
+   whether to compute a value for the RSPAUTH response or the "real"
+   authentication.  CIPHER is the cipher to use.  KIC, KIS, KCC, KCS
+   are either NULL, or points to 16 byte arrays that will hold the
+   computed keys on output.  Returns 0 on success. */
 int
 digest_md5_hmac (char *output, char secret[MD5LEN], char *nonce,
                 unsigned long nc, char *cnonce, digest_md5_qop qop,
-                char *authzid, char *digesturi, const char *a2string,
+                char *authzid, char *digesturi, int rspauth,
                 digest_md5_cipher cipher,
                 char *kic, char *kis, char *kcc, char *kcs)
 {
+  const char *a2string = rspauth ? COLON : A2_PRE;
   char nchex[9];
   char a1hexhash[2 * MD5LEN];
   char a2hexhash[2 * MD5LEN];
--- /home/cvs/gsasl/lib/digest-md5/client.c     2004/12/19 17:38:18     1.15
+++ /home/cvs/gsasl/lib/digest-md5/client.c     2004/12/19 17:42:03     1.16
@@ -212,7 +212,7 @@
                              state->response.qop,
                              state->response.authzid,
                              state->response.digesturi,
-                             A2_PRE,
+                             0,
                              state->response.cipher,
                              state->kic, state->kis,
                              state->kcc, state->kcs);
@@ -246,7 +246,7 @@
                               state->response.nonce, state->response.nc,
                               state->response.cnonce, state->response.qop,
                               state->response.authzid,
-                              state->response.digesturi, COLON,
+                              state->response.digesturi, 1,
                               state->response.cipher, NULL, NULL, NULL, NULL);
        if (res != GSASL_OK)
          break;





reply via email to

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