[Top][All Lists]
[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 04:12:40 +0100 |
Update of /home/cvs/gsasl/lib/digest-md5
In directory dopio:/tmp/cvs-serv31413
Modified Files:
Makefile.am parser.c
Added Files:
validate.c
Log Message:
Move validate functions to separate file.
--- /home/cvs/gsasl/lib/digest-md5/Makefile.am 2004/12/19 02:07:45 1.15
+++ /home/cvs/gsasl/lib/digest-md5/Makefile.am 2004/12/19 03:12:40 1.16
@@ -26,7 +26,9 @@
shared.h shared.c \
session.h session.c \
getsubopt.c \
- tokens.h parser.h parser.c
+ tokens.h \
+ validate.h validate.c \
+ parser.h parser.c
if CLIENT
libgsasl_digest_md5_la_SOURCES += client.c
--- /home/cvs/gsasl/lib/digest-md5/parser.c 2004/12/19 03:08:06 1.7
+++ /home/cvs/gsasl/lib/digest-md5/parser.c 2004/12/19 03:12:40 1.8
@@ -639,30 +639,3 @@
return rc;
}
-
-int
-digest_md5_validate (digest_md5_challenge *c, digest_md5_response *r)
-{
- if (!c->nonce || r->nonce)
- return -1;
-
- if (strcmp (c->nonce, r->nonce) != 0)
- return -1;
-
- if (r->nc != 1)
- return -1;
-
- if (c->utf8 != r->utf8)
- return -1;
-
- if (!((c->qops ? c->qops : DIGEST_MD5_QOP_AUTH) &
- (r->qop ? r->qop : DIGEST_MD5_QOP_AUTH)))
- return -1;
-
- if ((r->qop & DIGEST_MD5_QOP_AUTH) && !(c->ciphers & r->cipher))
- return -1;
-
- /* FIXME: Check more? */
-
- return 0;
-}
--- /home/cvs/gsasl/lib/digest-md5/validate.c 2004/12/19 03:12:40 NONE
+++ /home/cvs/gsasl/lib/digest-md5/validate.c 2004/12/19 03:12:40 1.1
/* validate.c --- Validate consistency of DIGEST-MD5 tokens.
* Copyright (C) 2004 Simon Josefsson
*
* This file is part of GNU SASL Library.
*
* GNU SASL Library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* GNU SASL Library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GNU SASL Library; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307 USA
*
*/
#if HAVE_CONFIG_H
# include "config.h"
#endif
/* Get prototypes. */
#include "validate.h"
int
digest_md5_validate (digest_md5_challenge *c, digest_md5_response *r)
{
if (!c->nonce || r->nonce)
return -1;
if (strcmp (c->nonce, r->nonce) != 0)
return -1;
if (r->nc != 1)
return -1;
if (c->utf8 != r->utf8)
return -1;
if (!((c->qops ? c->qops : DIGEST_MD5_QOP_AUTH) &
(r->qop ? r->qop : DIGEST_MD5_QOP_AUTH)))
return -1;
if ((r->qop & DIGEST_MD5_QOP_AUTH) && !(c->ciphers & r->cipher))
return -1;
/* FIXME: Check more? */
return 0;
}
- CVS gsasl/lib/digest-md5, (continued)
- CVS gsasl/lib/digest-md5, gsasl-commit, 2004/12/18
- CVS gsasl/lib/digest-md5, gsasl-commit, 2004/12/18
- CVS gsasl/lib/digest-md5, gsasl-commit, 2004/12/18
- CVS gsasl/lib/digest-md5, gsasl-commit, 2004/12/18
- CVS gsasl/lib/digest-md5, gsasl-commit, 2004/12/18
- CVS gsasl/lib/digest-md5, gsasl-commit, 2004/12/18
- CVS gsasl/lib/digest-md5, gsasl-commit, 2004/12/18
- CVS gsasl/lib/digest-md5, gsasl-commit, 2004/12/18
- CVS gsasl/lib/digest-md5, gsasl-commit, 2004/12/18
- CVS gsasl/lib/digest-md5, gsasl-commit, 2004/12/18
- CVS gsasl/lib/digest-md5,
gsasl-commit <=
- CVS gsasl/lib/digest-md5, gsasl-commit, 2004/12/18
- CVS gsasl/lib/digest-md5, gsasl-commit, 2004/12/18
- CVS gsasl/lib/digest-md5, gsasl-commit, 2004/12/18
- CVS gsasl/lib/digest-md5, gsasl-commit, 2004/12/18
- CVS gsasl/lib/digest-md5, gsasl-commit, 2004/12/18
- CVS gsasl/lib/digest-md5, gsasl-commit, 2004/12/18
- CVS gsasl/lib/digest-md5, gsasl-commit, 2004/12/19
- CVS gsasl/lib/digest-md5, gsasl-commit, 2004/12/19
- CVS gsasl/lib/digest-md5, gsasl-commit, 2004/12/19
- CVS gsasl/lib/digest-md5, gsasl-commit, 2004/12/19