[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS gsasl/lib/plain
From: |
gsasl-commit |
Subject: |
CVS gsasl/lib/plain |
Date: |
Mon, 14 Feb 2005 14:27:13 +0100 |
Update of /home/cvs/gsasl/lib/plain
In directory dopio:/tmp/cvs-serv18148
Modified Files:
server.c
Log Message:
Align unassigned code point usage in preparation, as per -06.
--- /home/cvs/gsasl/lib/plain/server.c 2004/12/27 02:13:01 1.21
+++ /home/cvs/gsasl/lib/plain/server.c 2005/02/14 13:27:12 1.22
@@ -1,5 +1,5 @@
/* server.c --- SASL mechanism PLAIN as defined in RFC 2595, server side.
- * Copyright (C) 2002, 2003, 2004 Simon Josefsson
+ * Copyright (C) 2002, 2003, 2004, 2005 Simon Josefsson
*
* This file is part of GNU SASL Library.
*
@@ -73,21 +73,23 @@
return GSASL_MECHANISM_PARSE_ERROR;
}
- /* Remember authzid, authid, and password. Authid and password need
- to be prepared. */
- {
- gsasl_property_set (sctx, GSASL_AUTHZID, authzidptr);
+ /* Store authzid. */
+ gsasl_property_set (sctx, GSASL_AUTHZID, authzidptr);
- /* FIXME: Specification is unclear on whether unassigned code
- points are allowed or not. We don't allow them. */
- res = gsasl_saslprep (authidptr, 0, &authidprep, NULL);
+ /* Store authid, after preparing it... */
+ {
+ res = gsasl_saslprep (authidptr, GSASL_ALLOW_UNASSIGNED,
+ &authidprep, NULL);
if (res != GSASL_OK)
return res;
gsasl_property_set (sctx, GSASL_AUTHID, authidprep);
free (authidprep);
+ }
+ /* Store passwd, after preparing it... */
+ {
/* Need to zero terminate password... */
passwdz = malloc (input_len - (passwordptr - input) + 1);
if (passwdz == NULL)
@@ -95,9 +97,8 @@
memcpy (passwdz, passwordptr, input_len - (passwordptr - input));
passwdz[input_len - (passwordptr - input)] = '\0';
- /* FIXME: Specification is unclear on whether unassigned code
- points are allowed or not. We don't allow them. */
- res = gsasl_saslprep (passwdz, 0, &passprep, NULL);
+ res = gsasl_saslprep (passwdz, GSASL_ALLOW_UNASSIGNED,
+ &passprep, NULL);
free (passwdz);
if (res != GSASL_OK)
return res;
@@ -121,8 +122,7 @@
return GSASL_NO_PASSWORD;
}
- /* FIXME: Specification is unclear on whether unassigned code
- points are allowed or not. We don't allow them. */
+ /* Unassigned code points are not permitted. */
res = gsasl_saslprep (key, 0, &normkey, NULL);
if (res != GSASL_OK)
{
- CVS gsasl/lib/plain,
gsasl-commit <=