[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU gsasl branch, master, updated. gsasl-1-7-1-19-g292c026
From: |
Simon Josefsson |
Subject: |
[SCM] GNU gsasl branch, master, updated. gsasl-1-7-1-19-g292c026 |
Date: |
Tue, 27 Mar 2012 08:50:16 +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=292c02698d6c64f5e1ef597c64802db06c86efe0
The branch, master has been updated
via 292c02698d6c64f5e1ef597c64802db06c86efe0 (commit)
via 105f70ccae1278a57c6c695a9ec5b8aed4c55d10 (commit)
via af34c4e13bf9495db7b8f59ba0bb58e3ceb74572 (commit)
from 01213eae08e5b736781d0e14f6d10a7e35e1e3c8 (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 292c02698d6c64f5e1ef597c64802db06c86efe0
Author: Simon Josefsson <address@hidden>
Date: Tue Mar 27 10:49:56 2012 +0200
Silence compiler warnings.
commit 105f70ccae1278a57c6c695a9ec5b8aed4c55d10
Author: Simon Josefsson <address@hidden>
Date: Tue Mar 27 10:44:35 2012 +0200
Add make.
commit af34c4e13bf9495db7b8f59ba0bb58e3ceb74572
Author: Simon Josefsson <address@hidden>
Date: Tue Mar 27 02:04:09 2012 +0200
Improve OPENID20 implementation.
-----------------------------------------------------------------------
Summary of changes:
README-alpha | 2 +-
lib/openid20/server.c | 42 ++++++++++++++++++++++++++++++++++++++++++
lib/src/error.c | 6 ++++--
lib/src/gsasl.h | 4 ++++
lib/src/internal.h | 1 +
lib/src/property.c | 4 ++++
lib/src/xfinish.c | 1 +
src/gsasl.c | 6 ------
8 files changed, 57 insertions(+), 9 deletions(-)
diff --git a/README-alpha b/README-alpha
index 7a34734..d828cbd 100644
--- a/README-alpha
+++ b/README-alpha
@@ -31,7 +31,7 @@ system, and the instructions for installing them differ.
Here are
some hints:
gNewSense/Debian/Ubuntu:
-sudo apt-get install git-core autoconf automake libtool gettext cvs
+sudo apt-get install git-core autoconf automake libtool gettext cvs make
sudo apt-get install texinfo texlive texlive-generic-recommended
texlive-extra-utils
sudo apt-get install help2man gtk-doc-tools valgrind
sudo apt-get install dia libgnutls-dev gengetopt gperf
diff --git a/lib/openid20/server.c b/lib/openid20/server.c
index 2b3275a..ca37b0d 100644
--- a/lib/openid20/server.c
+++ b/lib/openid20/server.c
@@ -69,6 +69,48 @@ _gsasl_openid20_server_step (Gsasl_session * sctx,
switch (state->step)
{
+ case 0:
+ {
+ const char *p;
+ char *authzid;
+ size_t headerlen;
+
+ if (input_len == 0)
+ return GSASL_NEEDS_MORE;
+
+ res = _gsasl_parse_gs2_header (input, input_len,
+ &authzid, &headerlen);
+ if (res != GSASL_OK)
+ return res;
+
+ if (authzid)
+ {
+ gsasl_property_set (sctx, GSASL_AUTHZID, authzid);
+ free (authzid);
+ }
+
+ input += headerlen;
+ input_len -= headerlen;
+
+ gsasl_property_set_raw (sctx, GSASL_OPENID20_AUTH_IDENTIFIER,
+ input, input_len);
+
+ p = gsasl_property_get (sctx, GSASL_OPENID20_REDIRECT_URL);
+ if (!p || !*p)
+ return GSASL_NO_OPENID20_REDIRECT_URL;
+
+ *output_len = strlen (p);
+ *output = malloc (*output_len);
+ if (!*output)
+ return GSASL_MALLOC_ERROR;
+
+ memcpy (*output, p, *output_len);
+
+ res = GSASL_NEEDS_MORE;
+ state->step++;
+ break;
+ }
+
default:
break;
}
diff --git a/lib/src/error.c b/lib/src/error.c
index 725d91a..bdd6c28 100644
--- a/lib/src/error.c
+++ b/lib/src/error.c
@@ -201,11 +201,13 @@ static struct
ERR (GSASL_NO_CB_TLS_UNIQUE,
N_("Authentication failed because a tls-unique CB was not provided.")),
ERR (GSASL_NO_SAML20_IDP_IDENTIFIER,
- N_("Callback failed to provide SAML20 user identifier.")),
+ N_("Callback failed to provide SAML20 IdP identifier.")),
ERR (GSASL_NO_SAML20_REDIRECT_URL,
N_("Callback failed to provide SAML20 redirect URL.")),
ERR (GSASL_NO_OPENID20_AUTH_IDENTIFIER,
- N_("Callback failed to provide OPENID20 authentication identifier."))
+ N_("Callback failed to provide OPENID20 authentication identifier.")),
+ ERR (GSASL_NO_OPENID20_REDIRECT_URL,
+ N_("Callback failed to provide OPENID20 redirect URL."))
};
/* *INDENT-ON* */
diff --git a/lib/src/gsasl.h b/lib/src/gsasl.h
index 7099bf3..30a3ccc 100644
--- a/lib/src/gsasl.h
+++ b/lib/src/gsasl.h
@@ -140,6 +140,8 @@ extern "C"
* @GSASL_NO_SAML20_REDIRECT_URL: Could not get required redirect URL.
* @GSASL_NO_OPENID20_AUTH_IDENTIFIER: Could not get required OpenID
* authentication identifier.
+ * @GSASL_NO_OPENID20_REDIRECT_URL: Could not get required OpenID
+ * redirect URL.
* @GSASL_GSSAPI_RELEASE_BUFFER_ERROR: GSS-API library call error.
* @GSASL_GSSAPI_IMPORT_NAME_ERROR: GSS-API library call error.
* @GSASL_GSSAPI_INIT_SEC_CONTEXT_ERROR: GSS-API library call error.
@@ -193,6 +195,7 @@ extern "C"
GSASL_NO_SAML20_IDP_IDENTIFIER = 66,
GSASL_NO_SAML20_REDIRECT_URL = 67,
GSASL_NO_OPENID20_AUTH_IDENTIFIER = 68,
+ GSASL_NO_OPENID20_REDIRECT_URL = 69,
/* Mechanism specific errors. */
GSASL_GSSAPI_RELEASE_BUFFER_ERROR = 37,
GSASL_GSSAPI_IMPORT_NAME_ERROR = 38,
@@ -344,6 +347,7 @@ extern "C"
GSASL_SAML20_IDP_IDENTIFIER = 19,
GSASL_SAML20_REDIRECT_URL = 20,
GSASL_OPENID20_AUTH_IDENTIFIER = 21,
+ GSASL_OPENID20_REDIRECT_URL = 22,
/* Client callbacks. */
GSASL_SAML20_AUTHENTICATE_IN_BROWSER = 250,
/* Server validation callback properties. */
diff --git a/lib/src/internal.h b/lib/src/internal.h
index c98a06d..2f3d044 100644
--- a/lib/src/internal.h
+++ b/lib/src/internal.h
@@ -105,6 +105,7 @@ struct Gsasl_session
char *saml20_idp_identifier;
char *saml20_redirect_url;
char *openid20_auth_identifier;
+ char *openid20_redirect_url;
/* If you add anything here, remember to change change
gsasl_finish() in xfinish.c and map() in property.c. */
diff --git a/lib/src/property.c b/lib/src/property.c
index 40e3053..68fa908 100644
--- a/lib/src/property.c
+++ b/lib/src/property.c
@@ -116,6 +116,10 @@ map (Gsasl_session * sctx, Gsasl_property prop)
p = &sctx->openid20_auth_identifier;
break;
+ case GSASL_OPENID20_REDIRECT_URL:
+ p = &sctx->openid20_redirect_url;
+ break;
+
/* If you add anything here, remember to change change
gsasl_finish() in xfinish.c and Gsasl_session in
internal.h. */
diff --git a/lib/src/xfinish.c b/lib/src/xfinish.c
index e9901e9..fc8b69a 100644
--- a/lib/src/xfinish.c
+++ b/lib/src/xfinish.c
@@ -67,6 +67,7 @@ gsasl_finish (Gsasl_session * sctx)
free (sctx->saml20_idp_identifier);
free (sctx->saml20_redirect_url);
free (sctx->openid20_auth_identifier);
+ free (sctx->openid20_redirect_url);
/* If you add anything here, remember to change change
gsasl_finish() in xfinish.c and Gsasl_session in internal.h. */
diff --git a/src/gsasl.c b/src/gsasl.c
index e214c27..1b943e7 100644
--- a/src/gsasl.c
+++ b/src/gsasl.c
@@ -449,9 +449,6 @@ main (int argc, char *argv[])
if (args_info.connect_given || args_info.inputs_num > 0)
{
- struct sockaddr connect_addr;
- struct sockaddr *saddr = &connect_addr;
- size_t saddrlen = sizeof (*saddr);
struct addrinfo hints;
struct addrinfo *ai0, *ai;
@@ -490,9 +487,6 @@ main (int argc, char *argv[])
if (sockfd < 0)
error (EXIT_FAILURE, errno, "socket");
- saddr = ai->ai_addr;
- saddrlen = ai->ai_addrlen;
-
freeaddrinfo (ai);
}
hooks/post-receive
--
GNU gsasl
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU gsasl branch, master, updated. gsasl-1-7-1-19-g292c026,
Simon Josefsson <=