diff options
| author | Valery Febvre <vfebvre at easter-eggs.com> | 2004-07-12 12:34:56 +0000 |
|---|---|---|
| committer | Valery Febvre <vfebvre at easter-eggs.com> | 2004-07-12 12:34:56 +0000 |
| commit | 6aafa90361f99d5149e582454f91295b4f40b72c (patch) | |
| tree | 29174b272bba4b9cd6a8327804be330c7bfd2cc9 | |
| parent | 5617d58e474199f1fef484f34179189070d9f08a (diff) | |
| download | lasso-6aafa90361f99d5149e582454f91295b4f40b72c.tar.gz lasso-6aafa90361f99d5149e582454f91295b4f40b72c.tar.xz lasso-6aafa90361f99d5149e582454f91295b4f40b72c.zip | |
*** empty log message ***
| -rw-r--r-- | lasso/id-ff/login.c | 20 | ||||
| -rw-r--r-- | lasso/id-ff/profile_context.c | 13 | ||||
| -rw-r--r-- | lasso/id-ff/profile_context.h | 2 | ||||
| -rw-r--r-- | lasso/xml/xml.c | 2 | ||||
| -rw-r--r-- | python/examples/login.py | 14 | ||||
| -rw-r--r-- | python/lasso.py | 26 |
6 files changed, 39 insertions, 38 deletions
diff --git a/lasso/id-ff/login.c b/lasso/id-ff/login.c index 021e97cf..af83d2ca 100644 --- a/lasso/id-ff/login.c +++ b/lasso/id-ff/login.c @@ -1,4 +1,4 @@ -/* $Id$ + /* $Id$ * * Lasso - A free implementation of the Liberty Alliance specifications. * @@ -322,15 +322,15 @@ lasso_login_dump(LassoLogin *login) g_free(str); } -/* if (login->assertionArtifact != NULL) { */ -/* LASSO_NODE_GET_CLASS(node)->new_child(node, "assertionArtifact", login->assertionArtifact, FALSE); */ -/* } */ -/* if (login->response_dump != NULL) { */ -/* LASSO_NODE_GET_CLASS(node)->new_child(node, "response_dump", login->response_dump, FALSE); */ -/* } */ -/* if (login->msg_relayState != NULL) { */ -/* LASSO_NODE_GET_CLASS(node)->new_child(node, "msg_relayState", login->msg_relayState, FALSE); */ -/* } */ + if (login->assertionArtifact != NULL) { + LASSO_NODE_GET_CLASS(node)->new_child(node, "assertionArtifact", login->assertionArtifact, FALSE); + } + if (login->response_dump != NULL) { + LASSO_NODE_GET_CLASS(node)->new_child(node, "response_dump", login->response_dump, FALSE); + } + if (login->msg_relayState != NULL) { + LASSO_NODE_GET_CLASS(node)->new_child(node, "msg_relayState", login->msg_relayState, FALSE); + } dump = lasso_node_export(node); lasso_node_destroy(node); diff --git a/lasso/id-ff/profile_context.c b/lasso/id-ff/profile_context.c index a20f3625..e3062f65 100644 --- a/lasso/id-ff/profile_context.c +++ b/lasso/id-ff/profile_context.c @@ -66,17 +66,18 @@ lasso_profile_context_dump(LassoProfileContext *ctx, ctx->remote_providerID, FALSE); } -/* if (ctx->msg_url != NULL) { */ + if (ctx->msg_url != NULL) { /* doc = xmlNewDoc("1.0"); */ /* data = xmlNewNode(NULL, "data"); */ /* xmlNewNs(data, lassoLibHRef, NULL); */ /* cdata = xmlNewCDataBlock(doc, ctx->msg_url, strlen(ctx->msg_url)); */ /* xmlAddChild(data, cdata); */ /* xmlAddChild(LASSO_NODE_GET_CLASS(node)->get_xmlNode(node), data); */ -/* } */ -/* if (ctx->msg_body != NULL) { */ -/* LASSO_NODE_GET_CLASS(node)->new_child(node, "msg_body", lasso_str_escape(ctx->msg_body), FALSE); */ -/* } */ + LASSO_NODE_GET_CLASS(node)->new_child(node, "msg_url", lasso_str_escape(ctx->msg_url), FALSE); + } + if (ctx->msg_body != NULL) { + LASSO_NODE_GET_CLASS(node)->new_child(node, "msg_body", lasso_str_escape(ctx->msg_body), FALSE); + } dump = lasso_node_export(node); lasso_node_destroy(node); @@ -99,7 +100,7 @@ lasso_profile_context_set_remote_providerID(LassoProfileContext *ctx, void lasso_profile_context_set_response_status(LassoProfileContext *ctx, - const xmlChar *statusCodeValue) + const gchar *statusCodeValue) { LassoNode *status, *status_code; diff --git a/lasso/id-ff/profile_context.h b/lasso/id-ff/profile_context.h index 399dbb93..1458254e 100644 --- a/lasso/id-ff/profile_context.h +++ b/lasso/id-ff/profile_context.h @@ -104,7 +104,7 @@ LASSO_EXPORT gint lasso_profile_context_set_remote_providerID(La gchar *providerID); LASSO_EXPORT void lasso_profile_context_set_response_status (LassoProfileContext *ctx, - const xmlChar *statusCodeValue); + const gchar *statusCodeValue); #ifdef __cplusplus } diff --git a/lasso/xml/xml.c b/lasso/xml/xml.c index 547df3e3..b33fa1f4 100644 --- a/lasso/xml/xml.c +++ b/lasso/xml/xml.c @@ -1095,7 +1095,7 @@ lasso_node_impl_new_child(LassoNode *node, xmlNodeSetContent(old_child, content); } else { - xmlNewChild(node->private->node, NULL, name, content); + xmlNewTextChild(node->private->node, NULL, name, content); } } diff --git a/python/examples/login.py b/python/examples/login.py index 527ff4cc..337b0391 100644 --- a/python/examples/login.py +++ b/python/examples/login.py @@ -14,7 +14,7 @@ lasso.init() #################### server = lasso.Server.new("../../examples/sp.xml", "../../examples/rsapub.pem", "../../examples/rsakey.pem", "../../examples/rsacert.pem", - lasso.SignatureMethodRsaSha1) + lasso.signatureMethodRsaSha1) server.add_provider("../../examples/idp.xml", None, None) @@ -38,7 +38,7 @@ print "message url =", splogin.msg_url ##################### server = lasso.Server.new("../../examples/idp.xml", None, "../../examples/rsakey.pem", "../../examples/rootcert.pem", - lasso.SignatureMethodRsaSha1) + lasso.signatureMethodRsaSha1) server.add_provider("../../examples/sp.xml", "../../examples/rsapub.pem", "../../examples/rsacert.pem") @@ -49,7 +49,7 @@ idplogin = lasso.Login.new(server, None) # get query part in msg_url authn_request_msg = string.split(splogin.msg_url, '?')[1] ret = idplogin.init_from_authn_request_msg(authn_request_msg, - lasso.HttpMethodRedirect); + lasso.httpMethodRedirect); print "ProtocolProfile =", idplogin.protocolProfile @@ -60,7 +60,7 @@ if idplogin.protocolProfile == 1: ret = idplogin.build_artifact_msg(1, lasso.samlAuthenticationMethodPassword, "", - lasso.HttpMethodRedirect) + lasso.httpMethodRedirect) print "ret = %d, msg_url = %s" % (ret, idplogin.msg_url) #################### @@ -68,7 +68,7 @@ if idplogin.protocolProfile == 1: #################### server = lasso.Server.new("../../examples/sp.xml", "../../examples/rsapub.pem", "../../examples/rsakey.pem", "../../examples/rsacert.pem", - lasso.SignatureMethodRsaSha1) + lasso.signatureMethodRsaSha1) server.add_provider("../../examples/idp.xml", None, None) @@ -77,7 +77,7 @@ splogin = lasso.Login.new(server, None) response_msg = string.split(idplogin.msg_url, '?')[1] ret = splogin.init_request(response_msg, - lasso.HttpMethodRedirect, + lasso.httpMethodRedirect, "https://identity-provider:2003/liberty-alliance/metadata") ret = splogin.build_request_msg() @@ -88,7 +88,7 @@ print "ret = %d, msg_url = %s, msg_body = %s" % (ret, splogin.msg_url, splogin.m ##################### server = lasso.Server.new("../../examples/idp.xml", None, "../../examples/rsakey.pem", "../../examples/rootcert.pem", - lasso.SignatureMethodRsaSha1) + lasso.signatureMethodRsaSha1) server.add_provider("../../examples/sp.xml", "../../examples/rsapub.pem", "../../examples/rsacert.pem") diff --git a/python/lasso.py b/python/lasso.py index e126bfe6..51d85650 100644 --- a/python/lasso.py +++ b/python/lasso.py @@ -788,20 +788,20 @@ class AuthenticationStatement(Node): ################################################################################ # environs : high level classes ################################################################################ -SignatureMethodRsaSha1 = 1 -SignatureMethodDsaSha1 = 2 +signatureMethodRsaSha1 = 1 +signatureMethodDsaSha1 = 2 -HttpMethodGet = 1 -HttpMethodPost = 2 -HttpMethodRedirect = 3 -HttpMethodSoap = 4 +httpMethodGet = 1 +httpMethodPost = 2 +httpMethodRedirect = 3 +httpMethodSoap = 4 -MessageTypeNone = 0 -MessageTypeAuthnRequest = 1 -MessageTypeAuthnResponse = 2 -MessageTypeRequest = 3 -MessageTypeResponse = 4 -MessageTypeArtifact = 5 +messageTypeNone = 0 +messageTypeAuthnRequest = 1 +messageTypeAuthnResponse = 2 +messageTypeRequest = 3 +messageTypeResponse = 4 +messageTypeArtifact = 5 class Server: """\brief Short desc @@ -849,7 +849,7 @@ class Login: if ret is None: raise AttributeError, name if name == "request": - if lassomod.login_getattr(self, "request_type") == MessageTypeAuthnRequest: + if lassomod.login_getattr(self, "request_type") == messageTypeAuthnRequest: ret = AuthnRequest(None, _obj=ret) # TODO if name == "response": |
