summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorValery Febvre <vfebvre at easter-eggs.com>2004-04-07 11:00:57 +0000
committerValery Febvre <vfebvre at easter-eggs.com>2004-04-07 11:00:57 +0000
commitd28f1cc0d5e6691948dd96bc703d57ade18f5d00 (patch)
treeeda3e33eb704c7be22d15a3b3e2fe590b280fdb1
parentc2c5801a663198579c5ea04fda99e4c8c655ce8f (diff)
downloadlasso-d28f1cc0d5e6691948dd96bc703d57ade18f5d00.tar.gz
lasso-d28f1cc0d5e6691948dd96bc703d57ade18f5d00.tar.xz
lasso-d28f1cc0d5e6691948dd96bc703d57ade18f5d00.zip
*** empty log message ***
-rw-r--r--lasso/Attic/protocols/single_sign_on_and_federation.c14
-rw-r--r--lasso/Attic/protocols/single_sign_on_and_federation.h14
-rw-r--r--python/protocols/py_single_sign_on_and_federation.c14
-rw-r--r--python/protocols/py_single_sign_on_and_federation.h8
-rw-r--r--python/wrap_objs.c14
-rw-r--r--python/wrap_objs.h2
6 files changed, 41 insertions, 25 deletions
diff --git a/lasso/Attic/protocols/single_sign_on_and_federation.c b/lasso/Attic/protocols/single_sign_on_and_federation.c
index 39e45c36..f76865be 100644
--- a/lasso/Attic/protocols/single_sign_on_and_federation.c
+++ b/lasso/Attic/protocols/single_sign_on_and_federation.c
@@ -172,7 +172,7 @@ lasso_authn_request_build_full(const xmlChar *requestID,
return (request);
}
-LassoAuthnRequest *
+lassoAuthnRequest *
lasso_authn_request_build(const xmlChar *providerID,
const xmlChar *nameIDPolicy,
const xmlChar *forceAuthn,
@@ -187,9 +187,9 @@ lasso_authn_request_build(const xmlChar *providerID,
GPtrArray *idpList,
const xmlChar *consent)
{
- LassoAuthnRequest *lareq;
+ lassoAuthnRequest *lareq;
- lareq = g_malloc(sizeof(LassoAuthnRequest));
+ lareq = g_malloc(sizeof(lassoAuthnRequest));
lareq->node = lasso_authn_request_build_full(NULL,
NULL,
NULL,
@@ -214,7 +214,7 @@ lasso_authn_request_build(const xmlChar *providerID,
/* AuthnResponse */
/*****************************************************************************/
-LassoAuthnResponse *
+lassoAuthnResponse *
lasso_authn_response_create(xmlChar *query,
gboolean verifySignature,
const xmlChar *public_key,
@@ -225,12 +225,12 @@ lasso_authn_response_create(xmlChar *query,
GPtrArray *authenticationMethods,
xmlChar *authnContextComparison)
{
- LassoAuthnResponse *lares;
+ lassoAuthnResponse *lares;
GData *gd;
gboolean forceAuthn = FALSE;
gint proxyCount = 0;
- lares = g_malloc(sizeof(LassoAuthnResponse));
+ lares = g_malloc(sizeof(lassoAuthnResponse));
lares->request_query = query;
if (verifySignature == TRUE) {
@@ -297,7 +297,7 @@ lasso_authn_response_create(xmlChar *query,
}
gint
-lasso_authn_response_build(LassoAuthnResponse *lares,
+lasso_authn_response_build(lassoAuthnResponse *lares,
const xmlChar *providerID,
gboolean authentication_result,
GPtrArray *nameIdentifiers)
diff --git a/lasso/Attic/protocols/single_sign_on_and_federation.h b/lasso/Attic/protocols/single_sign_on_and_federation.h
index 99eede85..16f0bad6 100644
--- a/lasso/Attic/protocols/single_sign_on_and_federation.h
+++ b/lasso/Attic/protocols/single_sign_on_and_federation.h
@@ -32,15 +32,15 @@ extern "C" {
#include <lasso/lasso.h>
-typedef struct _LassoAuthnRequest LassoAuthnRequest;
+typedef struct _lassoAuthnRequest lassoAuthnRequest;
-struct _LassoAuthnRequest {
+struct _lassoAuthnRequest {
LassoNode *node;
};
-typedef struct _LassoAuthnResponse LassoAuthnResponse;
+typedef struct _lassoAuthnResponse lassoAuthnResponse;
-struct _LassoAuthnResponse {
+struct _lassoAuthnResponse {
LassoNode *node;
xmlChar *request_query;
LassoNode *request_node;
@@ -48,7 +48,7 @@ struct _LassoAuthnResponse {
const xmlChar *private_key;
};
-LassoAuthnRequest *lasso_authn_request_build(const xmlChar *providerID,
+lassoAuthnRequest *lasso_authn_request_build(const xmlChar *providerID,
const xmlChar *nameIDPolicy,
const xmlChar *forceAuthn,
const xmlChar *isPassive,
@@ -62,7 +62,7 @@ LassoAuthnRequest *lasso_authn_request_build(const xmlChar *providerID,
GPtrArray *idpList,
const xmlChar *consent);
-LassoAuthnResponse *lasso_authn_response_create(xmlChar *query,
+lassoAuthnResponse *lasso_authn_response_create(xmlChar *query,
gboolean verifySignature,
const xmlChar *public_key,
const xmlChar *private_key,
@@ -72,7 +72,7 @@ LassoAuthnResponse *lasso_authn_response_create(xmlChar *query,
GPtrArray *authenticationMethods,
xmlChar *authnContextComparison);
-gint lasso_authn_response_build(LassoAuthnResponse *lares,
+gint lasso_authn_response_build(lassoAuthnResponse *lares,
const xmlChar *providerID,
gboolean authentication_result,
GPtrArray *nameIdentifiers);
diff --git a/python/protocols/py_single_sign_on_and_federation.c b/python/protocols/py_single_sign_on_and_federation.c
index 719e079c..04c90c80 100644
--- a/python/protocols/py_single_sign_on_and_federation.c
+++ b/python/protocols/py_single_sign_on_and_federation.c
@@ -27,7 +27,7 @@
#include "../xml/py_xml.h"
#include "py_single_sign_on_and_federation.h"
-PyObject *wrap_LassoAuthnRequest(LassoAuthnRequest *request) {
+PyObject *lassoAuthnRequest_wrap(lassoAuthnRequest *request) {
PyObject *ret;
if (request == NULL) {
@@ -35,17 +35,17 @@ PyObject *wrap_LassoAuthnRequest(LassoAuthnRequest *request) {
return (Py_None);
}
ret = PyCObject_FromVoidPtrAndDesc((void *) request,
- (char *) "LassoAuthnRequest *", NULL);
+ (char *) "lassoAuthnRequest *", NULL);
return (ret);
}
/******************************************************************************/
-/* LassoAuthnRequest */
+/* lassoAuthnRequest */
/******************************************************************************/
PyObject *authn_request_getattr(PyObject *self, PyObject *args) {
PyObject *lareq_obj;
- LassoAuthnRequest *lareq;
+ lassoAuthnRequest *lareq;
const char *attr;
if (CheckArgs(args, "OS:authn_request_get_attr")) {
@@ -54,7 +54,7 @@ PyObject *authn_request_getattr(PyObject *self, PyObject *args) {
}
else return NULL;
- lareq = LassoAuthnRequest_get(lareq_obj);
+ lareq = lassoAuthnRequest_get(lareq_obj);
if (!strcmp(attr, "__members__"))
return Py_BuildValue("[s]", "node");
@@ -84,7 +84,7 @@ PyObject *authn_request_build(PyObject *self, PyObject *args) {
GPtrArray *idpList = NULL;
const xmlChar *consent;
- LassoAuthnRequest *request;
+ lassoAuthnRequest *request;
if(!PyArg_ParseTuple(args, (char *) "ssssssOOssiOs:build_authn_request",
&providerID, &nameIDPolicy, &forceAuthn, &isPassive,
@@ -108,5 +108,5 @@ PyObject *authn_request_build(PyObject *self, PyObject *args) {
NULL,
consent);
- return (wrap_LassoAuthnRequest(request));
+ return (lassoAuthnRequest_wrap(request));
}
diff --git a/python/protocols/py_single_sign_on_and_federation.h b/python/protocols/py_single_sign_on_and_federation.h
index d8acb324..bfd79d5f 100644
--- a/python/protocols/py_single_sign_on_and_federation.h
+++ b/python/protocols/py_single_sign_on_and_federation.h
@@ -29,11 +29,11 @@
typedef struct {
PyObject_HEAD
- LassoAuthnRequest *obj;
-} LassoAuthnRequest_object;
+ lassoAuthnRequest *obj;
+} lassoAuthnRequest_object;
-#define LassoAuthnRequest_get(v) (((v) == Py_None) ? NULL : (((LassoAuthnRequest_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj))
-PyObject *LassoAuthnRequest_wrap(LassoAuthnRequest *request);
+#define lassoAuthnRequest_get(v) (((v) == Py_None) ? NULL : (((lassoAuthnRequest_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj))
+PyObject *lassoAuthnRequest_wrap(lassoAuthnRequest *request);
PyObject *authn_request_getattr(PyObject *self, PyObject *args);
PyObject *authn_request_build(PyObject *self, PyObject *args);
diff --git a/python/wrap_objs.c b/python/wrap_objs.c
index b195efb8..e3a71840 100644
--- a/python/wrap_objs.c
+++ b/python/wrap_objs.c
@@ -19,6 +19,20 @@ xmlChar **PythonStringList_get(PyObject *list_obj) {
return list;
}
+GPtrArray *PythonStringList2_get(PyObject *list_obj) {
+ int i;
+ GPtrArray *list = NULL;
+
+ if (list_obj == Py_None) return NULL;
+
+ /* convert Python list into a GLib GPtrArray */
+ list = g_ptr_array_new();
+ for (i=0; i<PyList_Size(list_obj); i++)
+ g_ptr_array_add(list, PyString_AsString(PyList_GetItem(list_obj, i)));
+
+ return list;
+}
+
/*****************************************************************************/
/* Functions to wrap C objects -> Python objects */
/*****************************************************************************/
diff --git a/python/wrap_objs.h b/python/wrap_objs.h
index 2812bb71..a74dfe86 100644
--- a/python/wrap_objs.h
+++ b/python/wrap_objs.h
@@ -47,7 +47,9 @@ typedef struct {
/* Functions to wrap Python objects -> C objects */
#define PythonFile_get(v) (((v) == Py_None) ? NULL : (PyFile_Check(v) ? (PyFile_AsFile(v)) : stdout))
+
xmlChar **PythonStringList_get(PyObject *list_obj);
+GPtrArray *PythonStringList2_get(PyObject *list_obj);
PyObject *wrap_int(int val);
PyObject *wrap_charPtr(char *str);