* Remove ending blanks

This commit is contained in:
Benjamin Dauvergne 2008-09-12 15:06:58 +00:00
parent 73d9c98f92
commit 9ed0670e48
746 changed files with 4200 additions and 4200 deletions

View File

@ -1,7 +1,7 @@
#! /usr/bin/env python
#
# Lasso - A free implementation of the Liberty Alliance specifications.
#
#
# Copyright (C) 2004-2007 Entr'ouvert
# http://lasso.entrouvert.org
#
@ -179,7 +179,7 @@ class Function:
return_owner = True
skip = False
errors = None
def __repr__(self):
return '<Function return_type:%s name:%s args:%r>' % (
self.return_type, self.name, self.args)
@ -502,7 +502,7 @@ def main():
java_binding = lang.Binding(binding)
java_binding.print_list_of_files();
if __name__ == '__main__':
main()

View File

@ -1,4 +1,4 @@
#ifndef G_HASHTABLE_H
#ifndef G_HASHTABLE_H
#define G_HASHTABLE_H 1
#if (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 14)

View File

@ -1,5 +1,5 @@
# Lasso - A free implementation of the Liberty Alliance specifications.
#
#
# Copyright (C) 2004-2007 Entr'ouvert
# http://lasso.entrouvert.org
#
@ -126,7 +126,7 @@ class Binding:
print p,
print
print
def is_int_type(self, type):
return type in ['gboolean','int','gint'] + self.binding_data.enums
@ -193,7 +193,7 @@ public abstract interface LassoConstants {
self.generate_JNI_functions(m, fd)
self.generate_JNI_footer(fd)
fd.close();
def generate_JNI_header(self, fd):
print >> fd, '''\
/* this file has been generated automatically; do not edit */
@ -295,7 +295,7 @@ protected static native void destroy(long cptr);
print >> fd, ' public static native void %s(GObject obj, %s[] value);' % (name,jtype)
name = '%s_add' % prefix
print >> fd, ' public static native void %s(GObject obj, %s value);' % (name,jtype)
if not m[2].get('elem_type') in ('xmlNode*',):
if not m[2].get('elem_type') in ('xmlNode*',):
name = '%s_remove' % prefix
print >> fd, ' public static native void %s(GObject obj, %s value);' % (name,jtype)
elif mtype == 'GHashTable*':
@ -324,8 +324,8 @@ protected static native void destroy(long cptr);
}
'''
print >>fd, '}'
# Wrappers
def generate_wrapper(self):
fd = open('com_entrouvert_lasso_LassoJNI.c', 'w')

View File

@ -9,8 +9,8 @@
#define LASSO_ROOT "com/entrouvert/lasso/"
#define check_exception (*env)->ExceptionCheck(env)
#define g_return_val_if_exception(value) if ((*env)->ExceptionCheck(env)) return (value);
#define g_return_if_exception() if ((*env)->ExceptionCheck(env)) return;
#define g_return_val_if_exception(value) if ((*env)->ExceptionCheck(env)) return (value);
#define g_return_if_exception() if ((*env)->ExceptionCheck(env)) return;
#define convert_jlong_to_gobject(value) ((GObject*)(ptrdiff_t)value)
#define g_error_if_fail(value) { if (!(value)) { g_on_error_query("LassoJNI"); } }
#define PTR_TO_JLONG(x) (jlong)((ptrdiff_t)x)
@ -173,12 +173,12 @@ static int nullWeakRef(JNIEnv *env, jweak weakRef) {
return weakRef && (*env)->IsSameObject(env, weakRef, NULL);
}
/** Return the shadow object associated with the gobject.
* If the weak global reference is dead, frees it.
* If the weak global reference is dead, frees it.
* If not shadow object is present, return NULL. */
static jobject
static jobject
get_shadow_object(JNIEnv *env, GObject *obj) {
jweak weakRef;
g_error_if_fail (obj && env);
weakRef = (jweak)g_object_get_qdata(obj, lasso_wrapper_key);
if (weakRef == NULL) {
@ -197,11 +197,11 @@ get_shadow_object(JNIEnv *env, GObject *obj) {
* Replacing a non NULL weak global reference by another one should not happend.
* It means that two java shadow object for the same GObject exist at the same time
*/
static void
static void
set_shadow_object(JNIEnv *env, GObject *obj, jobject shadow_object) {
jweak weakRef;
jweak old_weakRef;
g_error_if_fail(obj && env);
old_weakRef = (jweak)g_object_get_qdata(obj, lasso_wrapper_key);
@ -218,7 +218,7 @@ set_shadow_object(JNIEnv *env, GObject *obj, jobject shadow_object) {
}
}
/** Throw a new RuntimeException containing this message. */
static void
static void
exception(JNIEnv *env, char *message) {
jclass cls = (*env)->FindClass(env, "java/lang/RuntimeException");
if (cls != NULL) {
@ -338,7 +338,7 @@ out:
}
/* lasso objects handling impl */
static void
static void
create_class_name(char *dest, const char *typename) {
char *ret;
@ -346,8 +346,8 @@ create_class_name(char *dest, const char *typename) {
if (ret) {
typename = ret+5;
}
strncpy(dest+sizeof(LASSO_ROOT)-1, typename,50);
dest[sizeof(LASSO_ROOT)+49] = 0;
strncpy(dest+sizeof(LASSO_ROOT)-1, typename,50);
dest[sizeof(LASSO_ROOT)+49] = 0;
}
/** Convert the GObject obj to a java object encapsulating it.
* If obj is NULL, return NULL.
@ -375,7 +375,7 @@ gobject_to_jobject_aux(JNIEnv *env, GObject *obj, gboolean doRef, jobject *jobj)
/* Create the shadow object */
char clsName[sizeof(LASSO_ROOT)+50] = LASSO_ROOT;
const char *typename;
typename = G_OBJECT_TYPE_NAME(obj);
create_class_name(clsName, typename);
if (! new_object_with_gobject(env, obj, clsName, &self)) {
@ -410,7 +410,7 @@ static int
jobject_to_gobject(JNIEnv *env, jobject obj, GObject **gobj) {
jlong value;
GObject *gobject;
g_error_if_fail(env);
if (! obj) {
@ -444,7 +444,7 @@ jobject_to_gobject_for_list(JNIEnv *env, jobject obj, GObject **gobj) {
}
/* List handling */
static void
static void
free_glist(GList **list, GFunc free_function) {
g_return_if_fail(list);
if (*list) {
@ -519,9 +519,9 @@ error:
free_glist(&new, free_function);
return 0;
}
/** Remove a value obtained via the convert function on obj from *list.
/** Remove a value obtained via the convert function on obj from *list.
* It is searched inside *list using the compare function.
* If pointer is found, it is freed using the free_function.
* If pointer is found, it is freed using the free_function.
* Return 0 if an exception was throwed.
**/
static int
@ -559,7 +559,7 @@ remove_from_list_of_strings(JNIEnv *env, GList **list, jstring jstr) {
* Returns 1.
* Returns 0 and throws if anything fail.
*/
static int
static int
add_to_list(JNIEnv* env, GList** list, jobject obj, OutConverter convert) {
gpointer data;
@ -612,7 +612,7 @@ out:
return ret;
}
/** Fill a GHashTable with content of java array arr.
* Even indexed element coressponds to keys (jstring) and
* Even indexed element coressponds to keys (jstring) and
* odd indexed one to value (GObject).
* Returns 1.
* Returns 0 and thows an exception if anything fail.
@ -633,13 +633,13 @@ set_hash_of_objects(JNIEnv *env, GHashTable *hashtable, jobjectArray jarr)
for (i = 1; i < l; i += 2) {
jobject jobj;
GObject *gobj;
g_return_val_if_fail(get_array_element(env, jarr, i, &jobj), 0);
g_return_val_if_fail(jobject_to_gobject(env, jobj, &gobj), 0);
g_object_ref(gobj);
}
}
/** Remove old values, if hashtable is well initialized
/** Remove old values, if hashtable is well initialized
* it should unref objects automatically. */
g_hash_table_remove_all(hashtable);
/** Insert new values */
@ -670,7 +670,7 @@ set_hash_of_objects(JNIEnv *env, GHashTable *hashtable, jobjectArray jarr)
/** Insert a java String array, containing
* keys at odd indexes, and values at even indexes into an existing
* GHashTable. Old entries are lost, but hopefully deallocated by
* the hashtable free functions --- setted at creation, see GLib
* the hashtable free functions --- setted at creation, see GLib
* documentation.
*
* @param env the JNI context given by the JVM
@ -734,7 +734,7 @@ remove_from_hash(JNIEnv *env, GHashTable *hashtable, jstring jkey) {
}
/** Add a jobject to an hashtable */
static int
add_to_hash(JNIEnv *env, GHashTable *hashtable, jstring jkey, jobject jvalue, OutConverter convert, GFunc free_function)
add_to_hash(JNIEnv *env, GHashTable *hashtable, jstring jkey, jobject jvalue, OutConverter convert, GFunc free_function)
{
void *value = NULL;
char *key = NULL;
@ -754,8 +754,8 @@ error:
free_function(value, NULL);
return 0;
}
static int
get_hash_by_name(JNIEnv *env, GHashTable *hashtable, jstring jkey, Converter convert, jobject *jvalue)
static int
get_hash_by_name(JNIEnv *env, GHashTable *hashtable, jstring jkey, Converter convert, jobject *jvalue)
{
const char *key;
gpointer value;
@ -782,7 +782,7 @@ throw_by_name(JNIEnv *env, const char *name, const char *msg)
/* JNI Functions */
JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoJNI_init2(JNIEnv *env, jclass cls) {
lasso_wrapper_key = g_quark_from_static_string("JavaLasso::wrapper");
lasso_wrapper_key = g_quark_from_static_string("JavaLasso::wrapper");
}
JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoJNI_destroy(JNIEnv *env, jclass cls, jlong cptr) {
GObject *obj = (GObject*)(ptrdiff_t)cptr;
@ -791,7 +791,7 @@ JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoJNI_destroy(JNIEnv *env, j
}
JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoJNI_set_1shadow_1object(JNIEnv *env, jclass cls, jlong cptr, jobject shadow_object) {
GObject *gobj;
gobj = convert_jlong_to_gobject(cptr);
set_shadow_object(env, gobj, shadow_object);
}

View File

@ -1,5 +1,5 @@
# Lasso - A free implementation of the Liberty Alliance specifications.
#
#
# Copyright (C) 2004-2007 Entr'ouvert
# http://lasso.entrouvert.org
#
@ -100,10 +100,10 @@ class Binding:
def success(self):
self.ret('SUCCESS')
def declare_zval(self, name):
self.declare('zval*', zval(name))
def declare(self, type, name):
self.module('%s %s;' % (type, name))
@ -147,7 +147,7 @@ class Binding:
if options.get('nonull') == None and ret:
ret += '!'
return ret
def generate_parse_args(self, arg):
type, name, options = arg
ret = ''
@ -215,7 +215,7 @@ class Binding:
def method_epilogue(self, args = list()):
for arg in args:
type, name, options = arg
type, name, options = arg
type, name, options = arg
if type == 'gboolean' and type in ['int', 'gint'] + self.binding_data.enums and type in ('char*', 'gchar*','const char*','const gchar*'):
pass
@ -253,7 +253,7 @@ class Binding:
else:
par = '%s = %s;'
self.module(pat % (left, right))
def return_c_value(self, type, name, options = dict()):
if type is None:
return
@ -292,7 +292,7 @@ class Binding:
self.module('RETVAL_NULL();')
self.close()
#
def generate(self):
self.generate_php()
self.generate_module()
@ -411,7 +411,7 @@ class Binding:
def generate_module_minit_constants(self):
self.module('/* Constants (both enums and defines) */')
mapping = {
mapping = {
'i': 'REGISTER_LONG_CONSTANT("%(name)s", %(name)s, CONST_CS|CONST_PERSISTENT);',
's': 'REGISTER_STRING_CONSTANT("%(name)s", %(name)s, CONST_CS|CONST_PERSISTENT);',
'b': '''\
@ -437,7 +437,7 @@ class Binding:
def generate_module_rinit(self):
self.generate_module_dummy_function('PHP_RINIT(lasso)')
def generate_module_rshutdown(self):
self.generate_module_dummy_function('PHP_RSHUTDOWN(lasso)')

View File

@ -98,7 +98,7 @@ PHP_FUNCTION(lasso_get_object_typename)
}
/* List handling */
static void
static void
free_glist(GList **list, GFunc free_function) {
g_return_if_fail(list);
if (*list) {
@ -304,9 +304,9 @@ get_hashtable_from_array_of_objects(zval *array)
}
} else {
if (cvt_temp != NULL) {
g_hash_table_insert(result, (gpointer)index, g_object_ref(cvt_temp->obj));
g_hash_table_insert(result, (gpointer)index, g_object_ref(cvt_temp->obj));
} else {
g_hash_table_insert(result, (gpointer)index, NULL);
g_hash_table_insert(result, (gpointer)index, NULL);
}
}
}

View File

@ -1,5 +1,5 @@
# Lasso - A free implementation of the Liberty Alliance specifications.
#
#
# Copyright (C) 2004-2007 Entr'ouvert
# http://lasso.entrouvert.org
#

View File

@ -1,5 +1,5 @@
# Lasso - A free implementation of the Liberty Alliance specifications.
#
#
# Copyright (C) 2004-2007 Entr'ouvert
# http://lasso.entrouvert.org
#
@ -62,7 +62,7 @@ function cptrToPhp ($cptr) {
if (is_null($cptr) || !$cptr) return null;
$typename = lasso_get_object_typename($cptr);
$class_name = $typename . "NoInit";
$obj = new $class_name();
$obj = new $class_name();
if (! is_null($obj)) {
$obj->_cptr = $cptr;
return $obj;
@ -182,7 +182,7 @@ function lassoRegisterIdWsf2DstService($prefix, $href) {
mtype = m[0]
mname = utils.format_as_camelcase(m[1])
options = m[2]
# Getters
print >> self.fd, ' /**'
print >> self.fd, ' * @return %s' % self.get_docstring_return_type(mtype)

View File

@ -1,5 +1,5 @@
# Lasso - A free implementation of the Liberty Alliance specifications.
#
#
# Copyright (C) 2004-2007 Entr'ouvert
# http://lasso.entrouvert.org
#

View File

@ -1,5 +1,5 @@
# Lasso - A free implementation of the Liberty Alliance specifications.
#
#
# Copyright (C) 2004-2007 Entr'ouvert
# http://lasso.entrouvert.org
#

View File

@ -82,7 +82,7 @@ static void php_gobject_generic_destructor(zend_rsrc_list_entry *rsrc TSRMLS_DC)
}
/* List handling */
static void
static void
free_glist(GList **list, GFunc free_function) {
g_return_if_fail(list);
if (*list) {
@ -287,9 +287,9 @@ get_hashtable_from_array_of_objects(zval *array)
}
} else {
if (cvt_temp != NULL) {
g_hash_table_insert(result, (gpointer)index, g_object_ref(cvt_temp->obj));
g_hash_table_insert(result, (gpointer)index, g_object_ref(cvt_temp->obj));
} else {
g_hash_table_insert(result, (gpointer)index, NULL);
g_hash_table_insert(result, (gpointer)index, NULL);
}
}
}

View File

@ -1,5 +1,5 @@
# Lasso - A free implementation of the Liberty Alliance specifications.
#
#
# Copyright (C) 2004-2007 Entr'ouvert
# http://lasso.entrouvert.org
#
@ -33,7 +33,7 @@ class Binding:
def is_pygobject(self, t):
if t:
m = re.match(r'(?:const\s*)?(.*)',t) # Remove const modifier
t = m.group(1)
t = m.group(1)
return t not in ['char*', 'gchar*',
'GList*', 'GHashTable*',
'int', 'gint', 'gboolean', 'xmlNode*'] + self.binding_data.enums
@ -106,7 +106,7 @@ class frozendict(dict):
print >> fd, '''\
class Error(Exception):
code = None
@staticmethod
def raise_on_rc(rc):
global exceptions_dict
@ -270,7 +270,7 @@ if WSF_SUPPORT:
c_args.append('%s._cptr' % arg_name)
else:
c_args.append(arg_name)
c_args = ', '.join(c_args)
py_args = ', ' + ', '.join(py_args)
print >> fd, ' def __init__(self%s):' % py_args

View File

@ -5,19 +5,19 @@
# XmlTestRunner
#
# Copyright (C) 2004-2007 Entr'ouvert
#
#
# Authors: Frederic Peters <fpeters@entrouvert.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
#
# This program 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 General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

View File

@ -14,12 +14,12 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
#
# This program 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 General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

View File

@ -12,12 +12,12 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
#
# This program 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 General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -98,7 +98,7 @@ class IdWsf1TestCase(unittest.TestCase):
sp_login.request.nameIdPolicy = lasso.LIB_NAMEID_POLICY_TYPE_FEDERATED
sp_login.request.protocolProfile = lasso.LIB_PROTOCOL_PROFILE_BRWS_POST
sp_login.buildAuthnRequestMsg()
idp_login = lasso.Login(idp)
idp_login.processAuthnRequestMsg(sp_login.msgBody)
idp_login.validateRequestMsg(True, True)
@ -182,7 +182,7 @@ class DiscoveryModifyTestCase(IdWsf1TestCase):
# Process Modify
request_type = lasso.getRequestTypeFromSoapMsg(wsp_disco.msgBody)
self.failUnless(request_type == lasso.REQUEST_TYPE_DISCO_MODIFY)
self.failUnless(request_type == lasso.REQUEST_TYPE_DISCO_MODIFY)
idp_disco = lasso.Discovery(self.idp)
idp_disco.processModifyMsg(wsp_disco.msgBody)
idp_disco.setIdentityFromDump(idp_identity_dump)
@ -216,7 +216,7 @@ class DiscoveryRemoveTestCase(IdWsf1TestCase):
# Process Modify
request_type = lasso.getRequestTypeFromSoapMsg(wsp_disco.msgBody)
self.failUnless(request_type == lasso.REQUEST_TYPE_DISCO_MODIFY)
self.failUnless(request_type == lasso.REQUEST_TYPE_DISCO_MODIFY)
idp_disco = lasso.Discovery(self.idp)
idp_disco.processModifyMsg(wsp_disco.msgBody)
idp_disco.setIdentityFromDump(idp_identity_dump)
@ -274,7 +274,7 @@ class DataServiceModifyTestCase(IdWsf1TestCase):
wsc_service.buildRequestMsg()
request_type = lasso.getRequestTypeFromSoapMsg(wsc_service.msgBody)
self.failUnless(request_type == lasso.REQUEST_TYPE_DST_MODIFY)
self.failUnless(request_type == lasso.REQUEST_TYPE_DST_MODIFY)
self.wsp = self.get_wsp_server()
wsp_service = lasso.DataService(self.wsp)
@ -313,9 +313,9 @@ class DataServiceModifyTestCase(IdWsf1TestCase):
wsc_service = self.get_pp_service()
wsc_service.initModify(xpath, new_data)
wsc_service.buildRequestMsg()
request_type = lasso.getRequestTypeFromSoapMsg(wsc_service.msgBody)
self.failUnless(request_type == lasso.REQUEST_TYPE_DST_MODIFY)
self.failUnless(request_type == lasso.REQUEST_TYPE_DST_MODIFY)
self.wsp = self.get_wsp_server()
wsp_service = lasso.DataService(self.wsp)
@ -347,7 +347,7 @@ class DataServiceModifyTestCase(IdWsf1TestCase):
wsc_service.buildRequestMsg()
request_type = lasso.getRequestTypeFromSoapMsg(wsc_service.msgBody)
self.failUnless(request_type == lasso.REQUEST_TYPE_DST_MODIFY)
self.failUnless(request_type == lasso.REQUEST_TYPE_DST_MODIFY)
self.wsp = self.get_wsp_server()
wsp_service = lasso.DataService(self.wsp)

View File

@ -14,12 +14,12 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
#
# This program 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 General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -79,7 +79,7 @@ class IdWsf2TestCase(unittest.TestCase):
server.getProvider(server.providerIds[0]).setEncryptionMode(lasso.ENCRYPTION_MODE_NAMEID);
server.addProvider(lasso.PROVIDER_ROLE_SP, wsc_metadata, None, None)
self.idp_server_dump = server.dump()
return server
def idpRegisterSelf(self, idp_server):
@ -131,7 +131,7 @@ class IdWsf2TestCase(unittest.TestCase):
idp_identity_dump = idp_login.identity.dump()
if idp_login.isSessionDirty:
idp_session_dump = idp_login.session.dump()
sp_login = lasso.Login(sp)
query = idp_login.msgUrl.split('?')[1]
query = query.replace("%3D", "=")
@ -416,9 +416,9 @@ class MetadataAssociationAddTestCase(IdWsf2TestCase):
wsp_disco.setSessionFromDump(wsp_session_dump)
wsp_disco.initMetadataAssociationAdd(svcMDID)
wsp_disco.buildRequestMsg()
self.failUnless(wsp_disco.msgBody, 'missing msgBody')
def test05(self):
"""Process metadata association add request"""
idp = self.getIdpServer()
@ -436,7 +436,7 @@ class MetadataAssociationAddTestCase(IdWsf2TestCase):
wsp_disco.buildRequestMsg()
idp_disco = lasso.IdWsf2Discovery(idp)
try:
idp_disco.processMetadataAssociationAddMsg(wsp_disco.msgBody)
except lasso.Error, e:
@ -1217,7 +1217,7 @@ class DataServiceQueryTestCase(IdWsf2TestCase):
service, wsp = self.getProfileService()
lasso.registerIdWsf2DstService('pp2', 'urn:liberty:id-sis-pp:2005-05')
service.initQuery()
try:
service.addQueryItem('/pp2:PP/pp2:InformalName', 'name')
except lasso.Error, e:
@ -1230,7 +1230,7 @@ class DataServiceQueryTestCase(IdWsf2TestCase):
service.initQuery()
service.addQueryItem('/pp2:PP/pp2:InformalName', 'name')
service.buildRequestMsg()
self.failUnless(service.msgBody, 'missing msgBody')
def test05(self):
@ -1242,7 +1242,7 @@ class DataServiceQueryTestCase(IdWsf2TestCase):
service.addQueryItem('not existing attribute', 'not existing attribute')
service.addQueryItem('/pp2:PP/pp2:MsgContact', 'email')
service.buildRequestMsg()
self.failUnless(service.msgBody, 'missing msgBody')
def test06(self):
@ -1589,7 +1589,7 @@ class DataServiceQueryTestCase(IdWsf2TestCase):
service.processQueryResponseMsg(wsp_service.msgBody)
informal_name = service.getAttributeNode()
self.failUnlessEqual(informal_name, """<pp2:InformalName xmlns="urn:liberty:id-sis-pp:2005-05" xmlns:pp2="urn:liberty:id-sis-pp:2005-05">User name</pp2:InformalName>""", 'first attribute node is wrong')
def test21(self):
@ -1617,7 +1617,7 @@ class DataServiceQueryTestCase(IdWsf2TestCase):
service.processQueryResponseMsg(wsp_service.msgBody)
informal_name = service.getAttributeString('name')
self.failUnlessEqual(informal_name, 'User name', 'attribute string is wrong')
def test22(self):
@ -1645,7 +1645,7 @@ class DataServiceQueryTestCase(IdWsf2TestCase):
service.processQueryResponseMsg(wsp_service.msgBody)
email = service.getAttributeNode('email')
expected_result = """<pp2:MsgContact xmlns="urn:liberty:id-sis-pp:2005-05" xmlns:pp2="urn:liberty:id-sis-pp:2005-05">.*?<pp2:MsgAccount>Email account</pp2:MsgAccount>.*?<pp2:MsgProvider>Email server</pp2:MsgProvider>.*?</pp2:MsgContact>"""
import re

View File

@ -14,12 +14,12 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
#
# This program 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 General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -207,7 +207,7 @@ class LoginTestCase(unittest.TestCase):
self.failUnless('<action>do</action>' in extensionsList[0])
self.failUnless('<action2>do action 2</action2>' in extensionsList[0])
self.failUnless('<action3>do action 3</action3>' in extensionsList[0])
class LogoutTestCase(unittest.TestCase):
def test01(self):

View File

@ -14,12 +14,12 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
#
# This program 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 General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -68,13 +68,13 @@ if options.xmlMode:
print """<testsuites xmlns="http://check.sourceforge.net/ns">"""
print """ <title>Python Bindings</title>"""
print """ <datetime>%s</datetime>""" % time.strftime('%Y-%m-%d %H:%M:%S', time.localtime())
success = True
for testSuite in testSuites:
fp, pathname, description = imp.find_module(testSuite)
try:
try:
module = imp.load_module(testSuite, fp, pathname, description)
finally:
finally:
if fp:
fp.close()
if not module:

View File

@ -50,7 +50,7 @@ get_dict_from_hashtable_of_objects(GHashTable *value)
item_value = g_hash_table_lookup(value, keys->data);
if (item_value) {
item = PyGObjectPtr_New(G_OBJECT(item_value));
PyDict_SetItemString(dict, (char*)keys->data, item);
PyDict_SetItemString(dict, (char*)keys->data, item);
Py_DECREF(item);
} else {
PyErr_Warn(PyExc_RuntimeWarning, "hashtable contains a null value");
@ -108,12 +108,12 @@ free_list(GList **a_list, GFunc free_help) {
}
/** Remove all elements from a_hash and replace them with
* the key-values pairs from the python dict.
* the key-values pairs from the python dict.
* Increase reference of new values before removeing
* values from the hash, so if there are somme common
* values with RefCoun = 1 they won't be deallocated.
* */
static void
static void
set_hashtable_of_pygobject(GHashTable *a_hash, PyObject *dict) {
PyObject *key, *value;
int i;
@ -132,7 +132,7 @@ set_hashtable_of_pygobject(GHashTable *a_hash, PyObject *dict) {
while (PyDict_Next(dict, &i, &key, &value)) {
if (! PyString_Check(key) || ! PyObject_TypeCheck(value, &PyGObjectPtrType))
{
PyErr_SetString(PyExc_TypeError,
PyErr_SetString(PyExc_TypeError,
"value should be a dict,"
"with string keys"
"and GObjectPtr values");
@ -155,7 +155,7 @@ failure:
}
}
/** Set the GList* pointer, pointed by a_list, to a pointer on a new GList
/** Set the GList* pointer, pointed by a_list, to a pointer on a new GList
* created by converting the python seq into a GList of char*.
*/
static void
@ -170,7 +170,7 @@ set_list_of_strings(GList **a_list, PyObject *seq) {
for (i=0; i<l; i++) {
PyObject *pystr = PySequence_Fast_GET_ITEM(seq, i);
if (! PyString_Check(pystr)) {
PyErr_SetString(PyExc_TypeError,
PyErr_SetString(PyExc_TypeError,
"value should be a tuple of strings");
goto failure;
}
@ -183,7 +183,7 @@ failure:
free_list(&list, (GFunc)g_free);
}
/** Set the GList* pointer, pointed by a_list, to a pointer on a new GList
/** Set the GList* pointer, pointed by a_list, to a pointer on a new GList
* created by converting the python seq into a GList of xmlNode*.
*/
static void
@ -199,7 +199,7 @@ set_list_of_xml_nodes(GList **a_list, PyObject *seq) {
PyObject *item = PySequence_Fast_GET_ITEM(seq, i);
xmlNode *item_node;
if (! PyString_Check(item)) {
PyErr_SetString(PyExc_TypeError,
PyErr_SetString(PyExc_TypeError,
"value should be a tuple of strings");
goto failure;
}
@ -213,7 +213,7 @@ failure:
free_list(&list, (GFunc)xmlFreeNode);
}
/** Set the GList* pointer, pointed by a_list, to a pointer on a new GList
/** Set the GList* pointer, pointed by a_list, to a pointer on a new GList
* created by converting the python seq into a GList of GObject*.
*/
static void
@ -229,7 +229,7 @@ set_list_of_pygobject(GList **a_list, PyObject *seq) {
PyObject *item = PySequence_Fast_GET_ITEM(seq, i);
GObject *gobject;
if (! PyObject_TypeCheck(item, &PyGObjectPtrType)) {
PyErr_SetString(PyExc_TypeError,
PyErr_SetString(PyExc_TypeError,
"value should be a tuple of PyGobject");
goto failure;
}
@ -279,7 +279,7 @@ get_list_of_strings(const GList *a_list) {
PyTuple_SetItem(a_tuple, i, str);
i++;
} else {
PyErr_Warn(PyExc_RuntimeWarning,
PyErr_Warn(PyExc_RuntimeWarning,
"list contains a NULL value");
}
a_list = a_list->next;
@ -289,7 +289,7 @@ get_list_of_strings(const GList *a_list) {
return a_tuple;
failure:
PyErr_SetString(PyExc_TypeError, "Allocation problem in get_list_of_strings");
Py_XDECREF(a_tuple);
Py_XDECREF(a_tuple);
return noneRef();
}
@ -312,11 +312,11 @@ get_list_of_xml_nodes(const GList *a_list) {
PyTuple_SetItem(a_tuple, i, str);
i++;
} else {
PyErr_Warn(PyExc_RuntimeWarning,
PyErr_Warn(PyExc_RuntimeWarning,
"could not convert an xmlNode to a string");
}
} else {
PyErr_Warn(PyExc_RuntimeWarning,
PyErr_Warn(PyExc_RuntimeWarning,
"list contains a NULL value");
}
a_list = a_list->next;
@ -326,7 +326,7 @@ get_list_of_xml_nodes(const GList *a_list) {
return a_tuple;
failure:
PyErr_SetString(PyExc_TypeError, "Allocation problem in get_list_of_strings");
Py_XDECREF(a_tuple);
Py_XDECREF(a_tuple);
return noneRef();
}
@ -350,11 +350,11 @@ get_list_of_pygobject(const GList *a_list) {
PyTuple_SetItem(a_tuple, i, pygobject);
i++;
} else {
PyErr_Warn(PyExc_RuntimeWarning,
PyErr_Warn(PyExc_RuntimeWarning,
"could not convert a GObject to a PyGobject");
}
} else {
PyErr_Warn(PyExc_RuntimeWarning,
PyErr_Warn(PyExc_RuntimeWarning,
"list contains a NULL value");
}
a_list = a_list->next;
@ -364,7 +364,7 @@ get_list_of_pygobject(const GList *a_list) {
return a_tuple;
failure:
PyErr_SetString(PyExc_TypeError, "Allocation problem in get_list_of_strings");
Py_XDECREF(a_tuple);
Py_XDECREF(a_tuple);
return noneRef();
}
@ -390,7 +390,7 @@ PyGObjectPtr_dealloc(PyGObjectPtr *self)
static int
startswith(const char *string, const char *prefix)
{
return strncmp(string, prefix, strlen(prefix)) == 0;
return strncmp(string, prefix, strlen(prefix)) == 0;
}
static PyObject*
@ -438,7 +438,7 @@ static PyMemberDef PyGObjectPtr_members[] = {
{NULL}
};
static PyObject*
static PyObject*
PyGObjectPtr_get_refcount(PyGObjectPtr *self, G_GNUC_UNUSED void *closure)
{
PyObject *refcount;
@ -495,7 +495,7 @@ set_object_field(GObject **a_gobject_ptr, PyGObjectPtr *a_pygobject) {
g_object_unref(*a_gobject_ptr);
}
if ((PyObject*)a_pygobject == Py_None) {
*a_gobject_ptr = NULL;
*a_gobject_ptr = NULL;
} else {
*a_gobject_ptr = g_object_ref(a_pygobject->obj);
}

View File

@ -1,5 +1,5 @@
# Lasso - A free implementation of the Liberty Alliance specifications.
#
#
# Copyright (C) 2004-2007 Entr'ouvert
# http://lasso.entrouvert.org
#
@ -97,6 +97,6 @@ def group(list):
pile.append(t)
prev = x
return pile[0]

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

View File

@ -1,33 +1,33 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __LASSO_EXPORT_H__
#define __LASSO_EXPORT_H__
#define __LASSO_EXPORT_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
/* Now, the export orgy begins. The following we must do for the
* Windows platform with MSVC compiler. */
@ -37,16 +37,16 @@ extern "C" {
/* if we compile libxmlsec itself: */
# if defined(IN_LASSO)
# if !defined(LASSO_STATIC)
# define LASSO_EXPORT __declspec(dllexport)
# define LASSO_EXPORT __declspec(dllexport)
# else
# define LASSO_EXPORT extern
# endif
/* if a client program includes this file: */
# else
# if !defined(LASSO_STATIC)
# define LASSO_EXPORT __declspec(dllimport)
# define LASSO_EXPORT __declspec(dllimport)
# else
# define LASSO_EXPORT
# define LASSO_EXPORT
# endif
# endif
/* This holds on all other platforms/compilers, which are easier to

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -43,9 +43,9 @@
/**
* lasso_defederation_build_notification_msg:
* @defederation: a #LassoDefederation
*
*
* Builds the federation termination notification message.
*
*
* It gets the federation termination notification protocol profile and:
* <itemizedlist>
* <listitem><para>
@ -62,7 +62,7 @@
* object, sets @msg_body to NULL.
* </para></listitem>
* </itemizedlist>
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
gint
@ -97,9 +97,9 @@ lasso_defederation_build_notification_msg(LassoDefederation *defederation)
/* build the logout request message */
profile->msg_url = lasso_provider_get_metadata_one(
remote_provider, "SoapEndpoint");
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->private_key_file =
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->private_key_file =
profile->server->private_key;
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->certificate_file =
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->certificate_file =
profile->server->certificate;
profile->msg_body = lasso_node_export_to_soap(LASSO_NODE(profile->request));
return 0;
@ -136,7 +136,7 @@ lasso_defederation_build_notification_msg(LassoDefederation *defederation)
/**
* lasso_defederation_destroy:
* @defederation: a #LassoDefederation
*
*
* Destroys a #LassoDefederation object.
**/
void
@ -155,7 +155,7 @@ lasso_defederation_destroy(LassoDefederation *defederation)
* Sets a new federation termination notification to the remote provider id
* with the provider id of the requester (from the server object) and the name
* identifier of the federated principal.
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
gint
@ -238,7 +238,7 @@ lasso_defederation_init_notification(LassoDefederation *defederation, gchar *rem
profile->request = lasso_lib_federation_termination_notification_new_full(
LASSO_PROVIDER(profile->server)->ProviderID,
nameIdentifier,
profile->server->certificate ?
profile->server->certificate ?
LASSO_SIGNATURE_TYPE_WITHX509 : LASSO_SIGNATURE_TYPE_SIMPLE,
LASSO_SIGNATURE_METHOD_RSA_SHA1);
if (profile->msg_relayState) {
@ -253,7 +253,7 @@ lasso_defederation_init_notification(LassoDefederation *defederation, gchar *rem
nameIdentifier,
LASSO_SIGNATURE_TYPE_NONE,
0);
LASSO_LIB_FEDERATION_TERMINATION_NOTIFICATION(profile->request)->RelayState =
LASSO_LIB_FEDERATION_TERMINATION_NOTIFICATION(profile->request)->RelayState =
g_strdup(profile->msg_relayState);
}
@ -282,10 +282,10 @@ lasso_defederation_init_notification(LassoDefederation *defederation, gchar *rem
* lasso_defederation_process_notification_msg:
* @defederation: the federation termination object
* @notification_msg: the federation termination notification message
*
*
* Processes a lib:FederationTerminationNotification message. Rebuilds a
* request object from the message and optionally verifies its signature.
*
*
* Set the msg_nameIdentifier attribute with the NameIdentifier content of the
* notification object and optionally set the msg_relayState attribute with the
* RelayState content of the notification object.
@ -343,10 +343,10 @@ lasso_defederation_process_notification_msg(LassoDefederation *defederation, cha
/**
* lasso_defederation_validate_notification:
* @defederation: a #LassoDefederation
*
*
* Checks notification with regards to message status and principal
* federations; update them accordingly.
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
gint
@ -463,7 +463,7 @@ lasso_defederation_get_type()
/**
* lasso_defederation_new:
* @server: the #LassoServer
*
*
* Creates a new #LassoDefederation.
*
* Return value: a newly created #LassoDefederation object; or NULL if an error

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/id-ff/profile.h>
#include <lasso/xml/lib_federation_termination_notification.h>
@ -41,7 +41,7 @@ extern "C" {
#define LASSO_IS_DEFEDERATION_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_DEFEDERATION))
#define LASSO_DEFEDERATION_GET_CLASS(o) \
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_DEFEDERATION, LassoDefederationClass))
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_DEFEDERATION, LassoDefederationClass))
typedef struct _LassoDefederation LassoDefederation;
typedef struct _LassoDefederationClass LassoDefederationClass;

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/xml/xml.h>
#include <lasso/xml/saml_name_identifier.h>
@ -41,7 +41,7 @@ extern "C" {
#define LASSO_IS_FEDERATION_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_FEDERATION))
#define LASSO_FEDERATION_GET_CLASS(o) \
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_FEDERATION, LassoFederationClass))
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_FEDERATION, LassoFederationClass))
typedef struct _LassoFederation LassoFederation;
typedef struct _LassoFederationClass LassoFederationClass;

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -205,10 +205,10 @@ struct HelperStruct {
* type string */
static
void add_matching_resource_offering_to_list(char *name, LassoDiscoResourceOffering *offering,
struct HelperStruct *ctx)
struct HelperStruct *ctx)
{
if (ctx->service_type == NULL ||
( offering->ServiceInstance != NULL &&
( offering->ServiceInstance != NULL &&
offering->ServiceInstance->ServiceType != NULL &&
strcmp(offering->ServiceInstance->ServiceType, ctx->service_type) == 0)) {
lasso_list_add(ctx->list, offering);
@ -231,7 +231,7 @@ lasso_identity_get_offerings(LassoIdentity *identity, const char *service_type)
g_return_val_if_fail(LASSO_IS_IDENTITY(identity), NULL);
g_hash_table_foreach(identity->private_data->resource_offerings_map,
g_hash_table_foreach(identity->private_data->resource_offerings_map,
(GHFunc)add_matching_resource_offering_to_list, &ctx);
return ctx.list;
@ -321,7 +321,7 @@ get_xmlNode(LassoNode *node, G_GNUC_UNUSED gboolean lasso_dump)
(GHFunc)add_childnode_from_hashtable, xmlnode);
#ifdef LASSO_WSF_ENABLED
/* Resource Offerings */
g_hash_table_foreach(identity->private_data->resource_offerings_map,
g_hash_table_foreach(identity->private_data->resource_offerings_map,
(GHFunc)add_childnode_from_hashtable, xmlnode);
/* Service Metadatas IDs (svcMDID) */
@ -446,7 +446,7 @@ instance_init(LassoIdentity *identity)
#ifdef LASSO_WSF_ENABLED
identity->private_data->svcMDID = NULL;
identity->private_data->last_entry_id = 0;
identity->private_data->resource_offerings_map = g_hash_table_new_full(g_str_hash,
identity->private_data->resource_offerings_map = g_hash_table_new_full(g_str_hash,
g_str_equal, (GDestroyNotify)g_free, (GDestroyNotify)g_object_unref);
#endif
identity->federations = g_hash_table_new_full(g_str_hash, g_str_equal,

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/xml/xml.h>
#include <lasso/id-ff/federation.h>
@ -39,7 +39,7 @@ extern "C" {
#define LASSO_IS_IDENTITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_IDENTITY))
#define LASSO_IS_IDENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_IDENTITY))
#define LASSO_IDENTITY_GET_CLASS(o) \
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_IDENTITY, LassoIdentityClass))
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_IDENTITY, LassoIdentityClass))
typedef struct _LassoIdentity LassoIdentity;
typedef struct _LassoIdentityClass LassoIdentityClass;

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
gint lasso_identity_add_federation(LassoIdentity *identity, LassoFederation *federation);
gint lasso_identity_remove_federation(LassoIdentity *identity, const char *providerID);

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -84,10 +84,10 @@ lasso_lecp_build_authn_request_envelope_msg(LassoLecp *lecp)
LASSO_SAMLP_REQUEST_ABSTRACT(lecp->authnRequestEnvelope->AuthnRequest)->certificate_file =
LASSO_PROFILE(lecp)->server->certificate;
msg = lasso_node_get_xmlNode(LASSO_NODE(lecp->authnRequestEnvelope), FALSE);
/* msg is not SOAP but straight XML */
handler = xmlFindCharEncodingHandler("utf-8");
buf = xmlAllocOutputBuffer(handler);
buf = xmlAllocOutputBuffer(handler);
xmlNodeDumpOutput(buf, NULL, msg, 0, 0, "utf-8");
xmlOutputBufferFlush(buf);
@ -106,10 +106,10 @@ lasso_lecp_build_authn_request_envelope_msg(LassoLecp *lecp)
/**
* lasso_lecp_build_authn_request_msg:
* @lecp: a #LassoLecp
*
*
* Builds an authentication request. The data for the sending of the request are
* stored in @msg_url and @msg_body (SOAP POST).
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
int
@ -268,7 +268,7 @@ lasso_lecp_init_authn_request(LassoLecp *lecp, const char *remote_providerID)
*
* Processes received authentication request, checks it is signed correctly,
* checks if requested protocol profile is supported, etc.
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
int
@ -288,7 +288,7 @@ lasso_lecp_process_authn_request_msg(LassoLecp *lecp, const char *authn_request_
*
* Processes received enveloped authentication request, extracts the
* authentication request out of it.
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
int
@ -357,7 +357,7 @@ lasso_lecp_process_authn_request_envelope_msg(LassoLecp *lecp, const char *reque
*
* Processes received enveloped authentication response, extracts the
* authentication response out of it and stores it in @response.
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
int
@ -397,7 +397,7 @@ lasso_lecp_process_authn_response_envelope_msg(LassoLecp *lecp, const char *resp
* @lecp: a #LassoLecp
*
* Destroys a #LassoLecp object
*
*
**/
void
lasso_lecp_destroy(LassoLecp *lecp)
@ -417,7 +417,7 @@ static LassoNodeClass *parent_class = NULL;
static void
finalize(GObject *object)
{
{
G_OBJECT_CLASS(parent_class)->finalize(object);
}
@ -437,7 +437,7 @@ static void
class_init(LassoLecpClass *klass)
{
parent_class = g_type_class_peek_parent(klass);
G_OBJECT_CLASS(klass)->finalize = finalize;
}

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/xml/xml.h>
@ -41,7 +41,7 @@ extern "C" {
#define LASSO_LECP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_LECP, LassoLecpClass))
#define LASSO_IS_LECP(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_LECP))
#define LASSO_IS_LECP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_LECP))
#define LASSO_LECP_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_LECP, LassoLecpClass))
#define LASSO_LECP_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_LECP, LassoLecpClass))
typedef struct _LassoLecp LassoLecp;
typedef struct _LassoLecpClass LassoLecpClass;

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -52,30 +52,30 @@
* </itemizedlist>
* </para></listitem>
* </itemizedlist>
* </para>
* </para>
* <example>
* <title>Service Provider Login URL</title>
* <programlisting>
* LassoLogin *login;
*
*
* login = lasso_login_new(server);
* lasso_login_init_authn_request(login, "http://identity-provider-id/",
* LASSO_HTTP_METHOD_REDIRECT);
*
*
* // customize AuthnRequest
* request = LASSO_LIB_AUTHN_REQUEST(LASSO_PROFILE(login)->request);
* request->NameIDPolicy = strdup(LASSO_LIB_NAMEID_POLICY_TYPE_FEDERATED);
* request->ForceAuthn = TRUE;
* request->IsPassive = FALSE;
* request->ProtocolProfile = strdup(LASSO_LIB_PROTOCOL_PROFILE_BRWS_ART);
*
*
* lasso_login_build_authn_request_msg(login);
*
*
* // redirect user to identity provider
* printf("Location: %s\n\nRedirected to IdP\n", LASSO_PROFILE(login)->msg_url);
* </programlisting>
* </example>
*
*
* <example>
* <title>Service Provider Assertion Consumer Service URL</title>
* <programlisting>
@ -84,7 +84,7 @@
* char *artifact_msg = NULL, *lares = NULL, *lareq = NULL;
* char *name_identifier;
* lassoHttpMethod method;
*
*
* login = lasso_login_new(server);
* if (strcmp(request_method, "GET") == 0) {
* artifact_msg = getenv("QUERY_STRING");
@ -101,7 +101,7 @@
* }
* method = LASSO_HTTP_METHOD_POST;
* }
*
*
* if (artifact_msg) {
* lasso_login_init_request(login, artifact_msg, method);
* lasso_login_build_request_msg(login);
@ -112,15 +112,15 @@
* } else if (response_msg) {
* lasso_login_process_authn_response_msg(login, response_msg);
* }
*
*
* // looks up name_identifier in local file, database, whatever and gets back
* // two things: identity_dump and session_dump
* name_identifier = LASSO_PROFILE(login)->nameIdentifier
* lasso_profile_set_identity_from_dump(LASSO_PROFILE(login), identity_dump);
* lasso_profile_set_session_from_dump(LASSO_PROFILE(login), session_dump);
*
*
* lasso_login_accept_sso(login);
*
*
* if (lasso_profile_is_identity_dirty(LASSO_PROFILE(login))) {
* LassoIdentity *identity;
* char *identity_dump;
@ -128,7 +128,7 @@
* identity_dump = lasso_identity_dump(identity);
* // record identity_dump in file, database...
* }
*
*
* if (lasso_profile_is_session_dirty(LASSO_PROFILE(login))) {
* LassoSession *session;
* char *session_dump;
@ -136,12 +136,12 @@
* session_dump = lasso_session_dump(session);
* // record session_dump in file, database...
* }
*
*
* // redirect user anywhere
* printf("Location: %s\n\nRedirected to site root\n", login->msg_url);
* </programlisting>
* </example>
*/
*/
#include <xmlsec/base64.h>
@ -205,7 +205,7 @@ lasso_login_assertion_add_discovery(LassoLogin *login)
LassoSamlAttributeValue *attributeValue;
serviceInstance = lasso_server_get_service(profile->server, LASSO_DISCO_HREF);
if (LASSO_IS_DISCO_SERVICE_INSTANCE(serviceInstance) &&
if (LASSO_IS_DISCO_SERVICE_INSTANCE(serviceInstance) &&
login->private_data->resourceId) {
newServiceInstance = lasso_disco_service_instance_copy(serviceInstance);
@ -240,7 +240,7 @@ lasso_login_assertion_add_discovery(LassoLogin *login)
* @authenticationInstant: the time at which the authentication took place
* @notBefore: the earliest time instant at which the assertion is valid
* @notOnOrAfter: the time instant at which the assertion has expired
*
*
* Builds an assertion and stores it in profile session.
* @authenticationInstant, reauthenticateOnOrAfter, @notBefore and
* @notOnOrAfter may be NULL. If @authenticationInstant is NULL, the current
@ -280,7 +280,7 @@ lasso_login_build_assertion(LassoLogin *login,
federation = g_hash_table_lookup(profile->identity->federations,
profile->remote_providerID);
assertion = LASSO_SAML_ASSERTION(lasso_lib_assertion_new_full(
LASSO_PROVIDER(profile->server)->ProviderID,
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->RequestID,
@ -353,7 +353,7 @@ lasso_login_build_assertion(LassoLogin *login,
lasso_session_add_assertion(profile->session, profile->remote_providerID,
LASSO_NODE(assertion));
if (LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->MajorVersion == 1 &&
if (LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->MajorVersion == 1 &&
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->MinorVersion < 2) {
/* pre-id-ff 1.2, saml 1.0 */
@ -374,7 +374,7 @@ lasso_login_build_assertion(LassoLogin *login,
/* liberty-architecture-bindings-profiles-v1.1.pdf, page 24, line 729 */
ss->Subject->SubjectConfirmation->ConfirmationMethod = g_list_append(NULL,
g_strdup(LASSO_SAML_CONFIRMATION_METHOD_ARTIFACT01));
ss->Subject->SubjectConfirmation->SubjectConfirmationData =
ss->Subject->SubjectConfirmation->SubjectConfirmationData =
g_strdup(login->assertionArtifact);
if (nameIdentifier) {
@ -385,17 +385,17 @@ lasso_login_build_assertion(LassoLogin *login,
nameIdentifier->Format = NULL;
}
}
return 0;
}
/**
* lasso_login_must_ask_for_consent_private:
* @login: a #LassoLogin
*
* Evaluates if it is necessary to ask the consent of the Principal.
*
* Evaluates if it is necessary to ask the consent of the Principal.
* This method doesn't take the isPassive value into account.
*
*
* Return value: TRUE or FALSE
**/
static gboolean
@ -527,7 +527,7 @@ lasso_login_process_federation(LassoLogin *login, gboolean is_consent_obtained)
login->nameIDPolicy = g_strdup(LASSO_LIB_NAMEID_POLICY_TYPE_ONE_TIME);
return 0;
}
/* if protocolProfile is LASSO_LOGIN_PROTOCOL_PROFILE_BRWS_POST
* set StatusCode to FederationDoesNotExist in lib:AuthnResponse
*/
@ -546,7 +546,7 @@ lasso_login_process_federation(LassoLogin *login, gboolean is_consent_obtained)
lasso_identity_add_federation(LASSO_PROFILE(login)->identity, federation);
}
LASSO_PROFILE(login)->nameIdentifier =
LASSO_PROFILE(login)->nameIdentifier =
g_object_ref(LASSO_SAML_NAME_IDENTIFIER(federation->local_nameIdentifier));
return ret;
@ -569,7 +569,7 @@ lasso_login_process_response_status_and_assertion(LassoLogin *login)
response = LASSO_SAMLP_RESPONSE(LASSO_PROFILE(login)->response);
if (response->Status == NULL || ! LASSO_IS_SAMLP_STATUS(response->Status) ||
if (response->Status == NULL || ! LASSO_IS_SAMLP_STATUS(response->Status) ||
response->Status->StatusCode == NULL ||
response->Status->StatusCode->Value == NULL) {
return LASSO_PROFILE_ERROR_MISSING_STATUS_CODE;
@ -678,12 +678,12 @@ lasso_login_process_response_status_and_assertion(LassoLogin *login)
/**
* lasso_login_accept_sso:
* @login: a #LassoLogin
*
*
* Gets the assertion of the response and adds it into the session.
* Builds a federation with the 2 name identifiers of the assertion
* and adds it into the identity.
* If the session or the identity are NULL, they are created.
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
gint
@ -700,7 +700,7 @@ lasso_login_accept_sso(LassoLogin *login)
profile = LASSO_PROFILE(login);
if (profile->identity == NULL)
profile->identity = lasso_identity_new();
profile->identity = lasso_identity_new();
if (profile->session == NULL)
profile->session = lasso_session_new();
@ -778,7 +778,7 @@ lasso_login_build_assertion_artifact(LassoLogin *login)
* lasso_login_build_artifact_msg:
* @login: a #LassoLogin
* @http_method: the HTTP method to send the artifact (REDIRECT or POST)
*
*
* Builds a SAML artifact. Depending of the HTTP method, the data for the sending of
* the artifact are stored in @msg_url (REDIRECT) or @msg_url, @msg_body and
* @msg_relayState (POST).
@ -880,7 +880,7 @@ lasso_login_build_artifact_msg(LassoLogin *login, LassoHttpMethod http_method)
if (relayState == NULL) {
query = g_strdup_printf("SAMLart=%s", escaped_artifact);
} else {
query = g_strdup_printf("SAMLart=%s&RelayState=%s",
query = g_strdup_printf("SAMLart=%s&RelayState=%s",
escaped_artifact, relayState);
}
profile->msg_url = lasso_concat_url_query(url, query);
@ -917,14 +917,14 @@ lasso_login_build_artifact_msg(LassoLogin *login, LassoHttpMethod http_method)
/**
* lasso_login_build_authn_request_msg:
* @login: a #LassoLogin
*
*
* Converts profile authentication request (@request member) into a Liberty
* message, either an URL in HTTP-Redirect profile or an URL and a field value
* in Browser-POST (form) profile.
*
* The URL is set into the @msg_url member and the eventual field value (LAREQ)
* is set into the @msg_body member.
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
gint
@ -1017,9 +1017,9 @@ lasso_login_build_authn_request_msg(LassoLogin *login)
* snippets so it is not freed on destroy, so it is
* normal to not strdup() it; nevertheless it would
* probably be more clean not to to it this way */
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->private_key_file =
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->private_key_file =
profile->server->private_key;
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->certificate_file =
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->certificate_file =
profile->server->certificate;
}
lareq = lasso_node_export_to_base64(profile->request);
@ -1039,7 +1039,7 @@ lasso_login_build_authn_request_msg(LassoLogin *login)
/**
* lasso_login_build_authn_response_msg:
* @login: a #LassoLogin
*
*
* Converts profile authentication response (@response member) into a Liberty
* message.
*
@ -1090,9 +1090,9 @@ lasso_login_build_authn_response_msg(LassoLogin *login)
}
LASSO_SAMLP_RESPONSE_ABSTRACT(profile->response)->sign_method =
LASSO_SIGNATURE_METHOD_RSA_SHA1;
LASSO_SAMLP_RESPONSE_ABSTRACT(profile->response)->private_key_file =
LASSO_SAMLP_RESPONSE_ABSTRACT(profile->response)->private_key_file =
profile->server->private_key;
LASSO_SAMLP_RESPONSE_ABSTRACT(profile->response)->certificate_file =
LASSO_SAMLP_RESPONSE_ABSTRACT(profile->response)->certificate_file =
profile->server->certificate;
/* build an lib:AuthnResponse base64 encoded */
@ -1114,12 +1114,12 @@ lasso_login_build_authn_response_msg(LassoLogin *login)
/**
* lasso_login_build_request_msg:
* @login: a #LassoLogin
*
*
* Converts profile artifact request into a Liberty SOAP message.
*
* The URL is set into the @msg_url member and the SOAP message is set into the
* @msg_body member.
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
gint
@ -1144,7 +1144,7 @@ lasso_login_build_request_msg(LassoLogin *login)
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->private_key_file =
profile->server->private_key;
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->certificate_file =
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->certificate_file =
profile->server->certificate;
profile->msg_body = lasso_node_export_to_soap(profile->request);
@ -1161,13 +1161,13 @@ lasso_login_build_request_msg(LassoLogin *login)
* lasso_login_build_response_msg:
* @login: a #LassoLogin
* @remote_providerID: service provider ID
*
*
* Converts profile assertion response (@response member) into a Liberty SOAP
* messageresponse message.
*
* The URL is set into the @msg_url member and the SOAP message is set into the
* @msg_body member.
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
gint
@ -1186,7 +1186,7 @@ lasso_login_build_response_msg(LassoLogin *login, gchar *remote_providerID)
}
profile->response = lasso_samlp_response_new();
LASSO_SAMLP_RESPONSE_ABSTRACT(profile->response)->InResponseTo =
LASSO_SAMLP_RESPONSE_ABSTRACT(profile->response)->InResponseTo =
g_strdup(LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->RequestID);
if (LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->MajorVersion == 1 &&
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->MinorVersion == 0) {
@ -1195,13 +1195,13 @@ lasso_login_build_response_msg(LassoLogin *login, gchar *remote_providerID)
}
if (profile->server->certificate) {
LASSO_SAMLP_RESPONSE_ABSTRACT(profile->response)->sign_type =
LASSO_SAMLP_RESPONSE_ABSTRACT(profile->response)->sign_type =
LASSO_SIGNATURE_TYPE_WITHX509;
} else {
LASSO_SAMLP_RESPONSE_ABSTRACT(profile->response)->sign_type =
LASSO_SAMLP_RESPONSE_ABSTRACT(profile->response)->sign_type =
LASSO_SIGNATURE_TYPE_SIMPLE;
}
LASSO_SAMLP_RESPONSE_ABSTRACT(profile->response)->sign_method =
LASSO_SAMLP_RESPONSE_ABSTRACT(profile->response)->sign_method =
LASSO_SIGNATURE_METHOD_RSA_SHA1;
if (remote_providerID != NULL) {
@ -1256,7 +1256,7 @@ lasso_login_build_response_msg(LassoLogin *login, gchar *remote_providerID)
lasso_profile_set_response_status(profile, LASSO_SAML_STATUS_CODE_REQUEST_DENIED);
}
LASSO_SAMLP_RESPONSE_ABSTRACT(profile->response)->private_key_file =
LASSO_SAMLP_RESPONSE_ABSTRACT(profile->response)->private_key_file =
profile->server->private_key;
LASSO_SAMLP_RESPONSE_ABSTRACT(profile->response)->certificate_file =
profile->server->certificate;
@ -1268,7 +1268,7 @@ lasso_login_build_response_msg(LassoLogin *login, gchar *remote_providerID)
/**
* lasso_login_destroy:
* @login: a #LassoLogin
*
*
* Destroys a #LassoLogin object.
**/
void
@ -1373,7 +1373,7 @@ lasso_login_init_authn_request(LassoLogin *login, const gchar *remote_providerID
* (in redirect mode) or the form LAREQ field (in browser-post mode).
*
* Return value: 0 on success; or a negative value otherwise.
**/
**/
gint
lasso_login_init_request(LassoLogin *login, gchar *response_msg,
LassoHttpMethod response_http_method)
@ -1389,7 +1389,7 @@ lasso_login_init_request(LassoLogin *login, gchar *response_msg,
g_return_val_if_fail(LASSO_IS_LOGIN(login), LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
g_return_val_if_fail(response_msg != NULL, LASSO_PARAM_ERROR_INVALID_VALUE);
profile = LASSO_PROFILE(login);
IF_SAML2(profile) {
return lasso_saml20_login_init_request(login, response_msg,
@ -1458,7 +1458,7 @@ lasso_login_init_request(LassoLogin *login, gchar *response_msg,
request->sign_method = LASSO_SIGNATURE_METHOD_RSA_SHA1;
profile->request = LASSO_NODE(request);
return ret;
}
@ -1467,12 +1467,12 @@ lasso_login_init_request(LassoLogin *login, gchar *response_msg,
* @login: a #LassoLogin.
* @remote_providerID: the providerID of the remote service provider (may be
* NULL)
*
*
* Generates an authentication response without matching authentication
* request.
*
* If @remote_providerID is NULL, the first known provider is used.
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
gint
@ -1505,9 +1505,9 @@ lasso_login_init_idp_initiated_authn_request(LassoLogin *login,
/**
* lasso_login_must_ask_for_consent:
* @login: a #LassoLogin
*
*
* Evaluates if consent must be asked to the Principal to federate him.
*
*
* Return value: %TRUE if consent must be asked
**/
gboolean
@ -1530,9 +1530,9 @@ lasso_login_must_ask_for_consent(LassoLogin *login)
/**
* lasso_login_must_authenticate:
* @login: a #LassoLogin
*
*
* Evaluates if user must be authenticated.
*
*
* Return value: %TRUE if user must be authenticated
**/
gboolean
@ -1545,7 +1545,7 @@ lasso_login_must_authenticate(LassoLogin *login)
g_return_val_if_fail(LASSO_IS_LOGIN(login), LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
profile = LASSO_PROFILE(login);
IF_SAML2(profile) {
return lasso_saml20_login_must_authenticate(login);
}
@ -1606,7 +1606,7 @@ lasso_login_must_authenticate(LassoLogin *login)
*/
method = LASSO_LIB_AUTHN_CONTEXT_CLASS_REF_PASSWORD;
}
if (compa == 0) { /* exact */
if (strcmp(method, class_ref) == 0) {
matched = TRUE;
@ -1649,7 +1649,7 @@ lasso_login_must_authenticate(LassoLogin *login)
*
* Processes received authentication request, checks it is signed correctly,
* checks if requested protocol profile is supported, etc.
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
gint
@ -1680,11 +1680,11 @@ lasso_login_process_authn_request_msg(LassoLogin *login, const char *authn_reque
/* LibAuthnRequest already set by lasso_login_init_idp_initiated_authn_request() */
request = LASSO_LIB_AUTHN_REQUEST(profile->request);
/* verify that NameIDPolicy is 'any' */
if (request->NameIDPolicy == NULL)
return LASSO_LOGIN_ERROR_INVALID_NAMEIDPOLICY;
if (strcmp(request->NameIDPolicy, LASSO_LIB_NAMEID_POLICY_TYPE_ANY) != 0)
return LASSO_LOGIN_ERROR_INVALID_NAMEIDPOLICY;
} else {
@ -1694,7 +1694,7 @@ lasso_login_process_authn_request_msg(LassoLogin *login, const char *authn_reque
format == LASSO_MESSAGE_FORMAT_ERROR) {
return critical_error(LASSO_PROFILE_ERROR_INVALID_MSG);
}
profile->request = LASSO_NODE(request);
/* get remote ProviderID */
@ -1761,7 +1761,7 @@ lasso_login_process_authn_request_msg(LassoLogin *login, const char *authn_reque
profile->response = lasso_lib_authn_response_new(
LASSO_PROVIDER(profile->server)->ProviderID,
LASSO_LIB_AUTHN_REQUEST(profile->request));
if (LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->MajorVersion == 1 &&
if (LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->MajorVersion == 1 &&
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->MinorVersion < 2) {
/* pre-id-ff 1.2, move accordingly */
LASSO_SAMLP_RESPONSE_ABSTRACT(profile->response)->MajorVersion = 1;
@ -1778,7 +1778,7 @@ lasso_login_process_authn_request_msg(LassoLogin *login, const char *authn_reque
* @authn_response_msg: the authentication response received
*
* Processes received authentication response.
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
gint
@ -1797,7 +1797,7 @@ lasso_login_process_authn_response_msg(LassoLogin *login, gchar *authn_response_
IF_SAML2(profile) {
return lasso_saml20_login_process_authn_response_msg(login, authn_response_msg);
}
/* clean state */
if (profile->remote_providerID)
g_free(LASSO_PROFILE(login)->remote_providerID);
@ -1842,7 +1842,7 @@ lasso_login_process_authn_response_msg(LassoLogin *login, gchar *authn_response_
* @request_msg: the artifact request received
*
* Processes received artifact request.
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
gint
@ -1882,7 +1882,7 @@ lasso_login_process_request_msg(LassoLogin *login, gchar *request_msg)
* @response_msg: the assertion response received
*
* Processes received assertion response.
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
gint
@ -2059,7 +2059,7 @@ dispose(GObject *object)
static void
finalize(GObject *object)
{
{
LassoLogin *login = LASSO_LOGIN(object);
g_free(login->private_data);
login->private_data = NULL;
@ -2169,7 +2169,7 @@ lasso_login_new_from_dump(LassoServer *server, const gchar *dump)
login = g_object_new(LASSO_TYPE_LOGIN, NULL);
doc = xmlParseMemory(dump, strlen(dump));
init_from_xml(LASSO_NODE(login), xmlDocGetRootElement(doc));
init_from_xml(LASSO_NODE(login), xmlDocGetRootElement(doc));
LASSO_PROFILE(login)->server = g_object_ref(server);
xmlFreeDoc(doc);

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -28,7 +28,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/lasso_config.h>
@ -53,7 +53,7 @@ typedef void LassoDiscoResourceID;
#define LASSO_IS_LOGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_LOGIN))
#define LASSO_IS_LOGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_LOGIN))
#define LASSO_LOGIN_GET_CLASS(o) \
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_LOGIN, LassoLoginClass))
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_LOGIN, LassoLoginClass))
typedef struct _LassoLogin LassoLogin;
typedef struct _LassoLoginClass LassoLoginClass;

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <config.h>

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -48,7 +48,7 @@ static void check_soap_support(gchar *key, LassoProvider *provider, LassoProfile
/**
* lasso_logout_build_request_msg:
* @logout: a #LassoLogout
*
*
* Builds the logout request message.
*
* It gets the HTTP method retrieved to send the request and:
@ -68,7 +68,7 @@ static void check_soap_support(gchar *key, LassoProvider *provider, LassoProfile
* If private key and certificate are set in server object it will also signs
* the message (either with X509 if SOAP or with a simple signature for query
* strings).
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
gint
@ -104,9 +104,9 @@ lasso_logout_build_request_msg(LassoLogout *logout)
/* build the logout request message */
profile->msg_url = lasso_provider_get_metadata_one(
remote_provider, "SoapEndpoint");
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->private_key_file =
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->private_key_file =
profile->server->private_key;
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->certificate_file =
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->certificate_file =
profile->server->certificate;
profile->msg_body = lasso_node_export_to_soap(profile->request);
return 0;
@ -141,7 +141,7 @@ lasso_logout_build_request_msg(LassoLogout *logout)
/**
* lasso_logout_build_response_msg:
* @logout: a #LassoLogout
*
*
* Builds the logout response message.
*
* It gets the request message method and:
@ -161,7 +161,7 @@ lasso_logout_build_request_msg(LassoLogout *logout)
* If private key and certificate are set in server object it will also signs
* the message (either with X509 if SOAP or with a simple signature for query
* strings).
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
gint
@ -186,7 +186,7 @@ lasso_logout_build_response_msg(LassoLogout *logout)
LASSO_PROVIDER(profile->server)->ProviderID,
LASSO_SAML_STATUS_CODE_REQUEST_DENIED,
LASSO_LIB_LOGOUT_REQUEST(profile->request),
profile->server->certificate ?
profile->server->certificate ?
LASSO_SIGNATURE_TYPE_WITHX509 : LASSO_SIGNATURE_TYPE_SIMPLE,
LASSO_SIGNATURE_METHOD_RSA_SHA1);
}
@ -210,9 +210,9 @@ lasso_logout_build_response_msg(LassoLogout *logout)
/* build logout response message */
if (profile->http_request_method == LASSO_HTTP_METHOD_SOAP) {
profile->msg_url = NULL;
LASSO_SAMLP_RESPONSE_ABSTRACT(profile->response)->private_key_file =
LASSO_SAMLP_RESPONSE_ABSTRACT(profile->response)->private_key_file =
g_strdup(profile->server->private_key);
LASSO_SAMLP_RESPONSE_ABSTRACT(profile->response)->certificate_file =
LASSO_SAMLP_RESPONSE_ABSTRACT(profile->response)->certificate_file =
profile->server->certificate;
profile->msg_body = lasso_node_export_to_soap(profile->response);
return 0;
@ -264,7 +264,7 @@ lasso_logout_destroy(LassoLogout *logout)
/**
* lasso_logout_get_next_providerID:
* @logout: a #LassoLogout
*
*
* Returns the provider id from providerID_index in list of providerIDs in
* principal session with the exception of initial service provider ID.
*
@ -306,7 +306,7 @@ lasso_logout_get_next_providerID(LassoLogout *logout)
* corresponding of this HTTP request method.
*
* Initializes a new SLO request.
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
gint
@ -363,12 +363,12 @@ lasso_logout_init_request(LassoLogout *logout, char *remote_providerID,
if (LASSO_IS_SAML_ASSERTION(assertion_n) == FALSE) {
return critical_error(LASSO_PROFILE_ERROR_MISSING_ASSERTION);
}
assertion = LASSO_SAML_ASSERTION(assertion_n);
if (assertion->AuthenticationStatement && LASSO_IS_LIB_AUTHENTICATION_STATEMENT(
assertion->AuthenticationStatement)) {
LassoLibAuthenticationStatement *as =
LassoLibAuthenticationStatement *as =
LASSO_LIB_AUTHENTICATION_STATEMENT(assertion->AuthenticationStatement);
if (as->SessionIndex)
session_index = g_strdup(as->SessionIndex);
@ -462,7 +462,7 @@ lasso_logout_init_request(LassoLogout *logout, char *remote_providerID,
profile->request = lasso_lib_logout_request_new_full(
LASSO_PROVIDER(profile->server)->ProviderID,
nameIdentifier,
profile->server->certificate ?
profile->server->certificate ?
LASSO_SIGNATURE_TYPE_WITHX509 : LASSO_SIGNATURE_TYPE_SIMPLE,
LASSO_SIGNATURE_METHOD_RSA_SHA1);
} else { /* http_method == LASSO_HTTP_METHOD_REDIRECT */
@ -502,7 +502,7 @@ lasso_logout_init_request(LassoLogout *logout, char *remote_providerID,
* lasso_logout_process_request_msg:
* @logout: a #LassoLogout
* @request_msg: the logout request message
*
*
* Processes a SLO LogoutRequest message. Rebuilds a request object from the
* message and optionally verifies its signature.
*
@ -563,7 +563,7 @@ lasso_logout_process_request_msg(LassoLogout *logout, char *request_msg)
* lasso_logout_process_response_msg:
* @logout: a #LassoLogout
* @response_msg: the response message
*
*
* Parses the response message and builds the response object.
*
* Checks the status code value and if it is not success, then if the local
@ -573,7 +573,7 @@ lasso_logout_process_request_msg(LassoLogout *logout, char *request_msg)
*
* If it is a SOAP method or, IDP type and http method is Redirect/GET,
* then removes assertion.
*
*
* If local server is an Identity Provider and if there is no more assertion
* (Identity Provider has logged out every Service Providers), then restores
* the initial response.
@ -734,7 +734,7 @@ lasso_logout_process_response_msg(LassoLogout *logout, gchar *response_msg)
* can be a proxy. So we have to use the role of the initial remote
* provider instead.
*/
if (logout->initial_remote_providerID &&
if (logout->initial_remote_providerID &&
g_hash_table_size(profile->session->assertions) == 0) {
remote_provider = g_hash_table_lookup(profile->server->providers,
logout->initial_remote_providerID);
@ -763,9 +763,9 @@ lasso_logout_process_response_msg(LassoLogout *logout, gchar *response_msg)
/**
* lasso_logout_reset_providerID_index:
* @logout: a #LassoLogout
*
*
* Reset the providerID_index attribute (set to 0).
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
gint lasso_logout_reset_providerID_index(LassoLogout *logout)
@ -779,7 +779,7 @@ gint lasso_logout_reset_providerID_index(LassoLogout *logout)
/**
* lasso_logout_validate_request:
* @logout: a #LassoLogout
*
*
* <itemizedlist>
* <listitem><para>
* Sets the remote provider id
@ -851,7 +851,7 @@ lasso_logout_validate_request(LassoLogout *logout)
LASSO_PROVIDER(profile->server)->ProviderID,
LASSO_SAML_STATUS_CODE_SUCCESS,
LASSO_LIB_LOGOUT_REQUEST(profile->request),
profile->server->certificate ?
profile->server->certificate ?
LASSO_SIGNATURE_TYPE_WITHX509 : LASSO_SIGNATURE_TYPE_SIMPLE,
LASSO_SIGNATURE_METHOD_RSA_SHA1);
}
@ -869,7 +869,7 @@ lasso_logout_validate_request(LassoLogout *logout)
/* verify signature status */
if (profile->signature_status != 0) {
lasso_profile_set_response_status(profile,
lasso_profile_set_response_status(profile,
LASSO_LIB_STATUS_CODE_INVALID_SIGNATURE);
}
@ -1008,7 +1008,7 @@ check_soap_support(G_GNUC_UNUSED gchar *key, LassoProvider *provider, LassoProfi
if (supported_profiles)
return; /* provider support profile */
LASSO_LOGOUT(profile)->private_data->all_soap = FALSE;
}
@ -1049,7 +1049,7 @@ dispose(GObject *object)
static void
finalize(GObject *object)
{
{
LassoLogout *logout = LASSO_LOGOUT(object);
g_free(logout->private_data);
G_OBJECT_CLASS(parent_class)->finalize(object);
@ -1115,9 +1115,9 @@ lasso_logout_get_type()
/**
* lasso_logout_new:
* @server: the #LassoServer
*
*
* Creates a new #LassoLogout.
*
*
* Return value: a newly created #LassoLogout object; or NULL if an error
* occured
**/
@ -1154,7 +1154,7 @@ lasso_logout_new_from_dump(LassoServer *server, const char *dump)
logout = lasso_logout_new(g_object_ref(server));
doc = xmlParseMemory(dump, strlen(dump));
init_from_xml(LASSO_NODE(logout), xmlDocGetRootElement(doc));
init_from_xml(LASSO_NODE(logout), xmlDocGetRootElement(doc));
xmlFreeDoc(doc);
return logout;

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/id-ff/profile.h>
#include <lasso/xml/lib_logout_request.h>
@ -40,7 +40,7 @@ extern "C" {
#define LASSO_IS_LOGOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_LOGOUT))
#define LASSO_IS_LOGOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_LOGOUT))
#define LASSO_LOGOUT_GET_CLASS(o) \
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_LOGOUT, LassoLogoutClass))
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_LOGOUT, LassoLogoutClass))
typedef struct _LassoLogout LassoLogout;
typedef struct _LassoLogoutClass LassoLogoutClass;

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
struct _LassoLogoutPrivate

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -40,9 +40,9 @@
/**
* lasso_name_identifier_mapping_build_request_msg:
* @mapping: a #LassoNameIdentifierMapping
*
*
* Builds a name identifier mapping request message.
*
*
* <itemizedlist>
* <listitem><para>
* If it is a SOAP method, then it builds the request as a SOAP message,
@ -54,7 +54,7 @@
* string message, optionally signs it and sets @msg_url to that URL.
* </para></listitem>
* </itemizedlist>
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
gint
@ -91,9 +91,9 @@ lasso_name_identifier_mapping_build_request_msg(LassoNameIdentifierMapping *mapp
return critical_error(LASSO_PROFILE_ERROR_UNKNOWN_PROFILE_URL);
}
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->private_key_file =
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->private_key_file =
profile->server->private_key;
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->certificate_file =
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->certificate_file =
profile->server->certificate;
profile->msg_body = lasso_node_export_to_soap(profile->request);
if (profile->msg_body == NULL) {
@ -107,7 +107,7 @@ lasso_name_identifier_mapping_build_request_msg(LassoNameIdentifierMapping *mapp
/**
* lasso_name_identifier_mapping_build_response_msg:
* @mapping: a #LassoNameIdentifierMapping
*
*
* Builds a name identifier mapping response message.
*
* <itemizedlist>
@ -125,7 +125,7 @@ lasso_name_identifier_mapping_build_request_msg(LassoNameIdentifierMapping *mapp
* If private key and certificate are set in server object it will also signs
* the message (either with X509 if SOAP or with a simple signature for query
* strings).
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
gint
@ -176,7 +176,7 @@ lasso_name_identifier_mapping_build_response_msg(LassoNameIdentifierMapping *map
/**
* lasso_name_identifier_mapping_destroy:
* @mapping: a #LassoNameIdentifierMapping
*
*
* Destroys a #LassoNameIdentifierMapping object.
**/
void
@ -193,7 +193,7 @@ lasso_name_identifier_mapping_destroy(LassoNameIdentifierMapping *mapping)
* @remote_providerID: the providerID of the identity provider.
*
* Initializes a new lib:NameIdentifierMappingRequest request.
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
gint
@ -259,7 +259,7 @@ lasso_name_identifier_mapping_init_request(LassoNameIdentifierMapping *mapping,
LASSO_PROVIDER(profile->server)->ProviderID,
nameIdentifier,
targetNamespace,
profile->server->certificate ?
profile->server->certificate ?
LASSO_SIGNATURE_TYPE_WITHX509 : LASSO_SIGNATURE_TYPE_SIMPLE,
LASSO_SIGNATURE_METHOD_RSA_SHA1);
if (LASSO_IS_LIB_NAME_IDENTIFIER_MAPPING_REQUEST(profile->request) == FALSE) {
@ -281,7 +281,7 @@ lasso_name_identifier_mapping_init_request(LassoNameIdentifierMapping *mapping,
* lasso_name_identifier_mapping_process_request_msg:
* @mapping: a #LassoNameIdentifierMapping
* @request_msg: the name identifier mapping request message
*
*
* Processes a lib:NameIdentifierMappingRequest message. Rebuilds a request
* object from the message and optionally verifies its signature.
*
@ -340,7 +340,7 @@ lasso_name_identifier_mapping_process_request_msg(LassoNameIdentifierMapping *ma
* lasso_name_identifier_mapping_process_response_msg:
* @mapping: a #LassoNameIdentifierMapping
* @response_msg: the name identifier mapping response message
*
*
* Processes a lib:NameIdentifierMappingResponse message. Rebuilds a response
* object from the message and optionally verifies its signature.
*
@ -391,7 +391,7 @@ lasso_name_identifier_mapping_process_response_msg(LassoNameIdentifierMapping *m
return LASSO_PROFILE_ERROR_STATUS_NOT_SUCCESS;
}
/* Set the target name identifier */
if (LASSO_LIB_NAME_IDENTIFIER_MAPPING_REQUEST(profile->request)->NameIdentifier) {
mapping->targetNameIdentifier = g_strdup(LASSO_LIB_NAME_IDENTIFIER_MAPPING_REQUEST(
@ -410,9 +410,9 @@ lasso_name_identifier_mapping_process_response_msg(LassoNameIdentifierMapping *m
* @mapping: a #LassoNameIdentifierMapping
*
* Checks profile request with regards to message status and principal
* federations, update them accordingly and prepares a
* federations, update them accordingly and prepares a
* lib:NameIdentifierMappingResponse accordingly.
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
gint
@ -460,7 +460,7 @@ lasso_name_identifier_mapping_validate_request(LassoNameIdentifierMapping *mappi
LASSO_PROVIDER(profile->server)->ProviderID,
LASSO_SAML_STATUS_CODE_SUCCESS,
request,
profile->server->certificate ?
profile->server->certificate ?
LASSO_SIGNATURE_TYPE_WITHX509 : LASSO_SIGNATURE_TYPE_SIMPLE,
LASSO_SIGNATURE_METHOD_RSA_SHA1);

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/id-ff/profile.h>
@ -47,7 +47,7 @@ extern "C" {
(G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_NAME_IDENTIFIER_MAPPING))
#define LASSO_NAME_IDENTIFIER_MAPPING_GET_CLASS(o) \
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_NAME_IDENTIFIER_MAPPING, \
LassoNameIdentifierMappingClass))
LassoNameIdentifierMappingClass))
typedef struct _LassoNameIdentifierMapping LassoNameIdentifierMapping;
typedef struct _LassoNameIdentifierMappingClass LassoNameIdentifierMappingClass;
@ -84,7 +84,7 @@ LASSO_EXPORT gint lasso_name_identifier_mapping_init_request(
gchar *targetNamespace, gchar *remote_providerID);
LASSO_EXPORT gint lasso_name_identifier_mapping_process_request_msg(
LassoNameIdentifierMapping *mapping, gchar *request_msg);
LassoNameIdentifierMapping *mapping, gchar *request_msg);
LASSO_EXPORT gint lasso_name_identifier_mapping_process_response_msg(
LassoNameIdentifierMapping *mapping, gchar *response_msg);

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -39,9 +39,9 @@
/**
* lasso_name_registration_build_request_msg:
* @name_registration: a #LassoNameRegistration
*
*
* Builds a register name identifier request message.
*
*
* It gets the register name identifier protocol profile and:
* <itemizedlist>
* <listitem><para>
@ -57,7 +57,7 @@
* identifier object, sets @msg_body to NULL.
* </para></listitem>
* </itemizedlist>
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
gint
@ -87,9 +87,9 @@ lasso_name_registration_build_request_msg(LassoNameRegistration *name_registrati
if (profile->http_request_method == LASSO_HTTP_METHOD_SOAP) {
profile->msg_url = lasso_provider_get_metadata_one(
remote_provider, "SoapEndpoint");
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->private_key_file =
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->private_key_file =
profile->server->private_key;
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->certificate_file =
LASSO_SAMLP_REQUEST_ABSTRACT(profile->request)->certificate_file =
profile->server->certificate;
profile->msg_body = lasso_node_export_to_soap(profile->request);
return 0;
@ -125,7 +125,7 @@ lasso_name_registration_build_request_msg(LassoNameRegistration *name_registrati
/**
* lasso_name_registration_build_response_msg:
* @name_registration: a #LassoNameRegistration
*
*
* Builds the register name idendifier response message.
*
* It gets the request message method and:
@ -145,7 +145,7 @@ lasso_name_registration_build_request_msg(LassoNameRegistration *name_registrati
* If private key and certificate are set in server object it will also signs
* the message (either with X509 if SOAP or with a simple signature for query
* strings).
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
gint
@ -174,9 +174,9 @@ lasso_name_registration_build_response_msg(LassoNameRegistration *name_registrat
if (profile->http_request_method == LASSO_HTTP_METHOD_SOAP) {
profile->msg_url = NULL;
LASSO_SAMLP_RESPONSE_ABSTRACT(profile->response)->private_key_file =
LASSO_SAMLP_RESPONSE_ABSTRACT(profile->response)->private_key_file =
profile->server->private_key;
LASSO_SAMLP_RESPONSE_ABSTRACT(profile->response)->certificate_file =
LASSO_SAMLP_RESPONSE_ABSTRACT(profile->response)->certificate_file =
profile->server->certificate;
profile->msg_body = lasso_node_export_to_soap(profile->response);
return 0;
@ -210,7 +210,7 @@ lasso_name_registration_build_response_msg(LassoNameRegistration *name_registrat
/**
* lasso_name_registration_destroy:
* @name_registration: a #LassoNameRegistration
*
*
* Destroys a #LassoNameRegistration object.
**/
void
@ -230,7 +230,7 @@ lasso_name_registration_destroy(LassoNameRegistration *name_registration)
* Initializes a new lib:RegisterNameIdentifierRequest request; it sets
* @name_registration->nameIdentifier to the new name identifier and
* @name_registration->oldNameIdentifier to the old one.
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
gint
@ -299,7 +299,7 @@ lasso_name_registration_init_request(LassoNameRegistration *name_registration,
}
oldNameIdentifier = g_object_ref(federation->local_nameIdentifier);
spNameIdentifier = NULL;
if (federation->remote_nameIdentifier) {
spNameIdentifier = g_object_ref(federation->remote_nameIdentifier);
@ -337,13 +337,13 @@ lasso_name_registration_init_request(LassoNameRegistration *name_registration,
profile->request = lasso_lib_register_name_identifier_request_new_full(
LASSO_PROVIDER(profile->server)->ProviderID,
idpNameIdentifier, spNameIdentifier, oldNameIdentifier,
profile->server->certificate ?
profile->server->certificate ?
LASSO_SIGNATURE_TYPE_WITHX509 : LASSO_SIGNATURE_TYPE_SIMPLE,
LASSO_SIGNATURE_METHOD_RSA_SHA1);
if (profile->request == NULL) {
return critical_error(LASSO_PROFILE_ERROR_BUILDING_REQUEST_FAILED);
}
LASSO_LIB_REGISTER_NAME_IDENTIFIER_REQUEST(profile->request)->RelayState =
LASSO_LIB_REGISTER_NAME_IDENTIFIER_REQUEST(profile->request)->RelayState =
g_strdup(profile->msg_relayState);
if (lasso_provider_get_protocol_conformance(remote_provider) < LASSO_PROTOCOL_LIBERTY_1_2) {
@ -361,7 +361,7 @@ lasso_name_registration_init_request(LassoNameRegistration *name_registration,
* lasso_name_registration_process_request_msg:
* @name_registration: a #LassoNameRegistration
* @request_msg: the register name identifier request message
*
*
* Processes a lib:RegisterNameIdentifierRequest message. Rebuilds a request
* object from the message and optionally verifies its signature. Sets
* profile->nameIdentifier to local name identifier. If it changed (when this
@ -435,7 +435,7 @@ gint lasso_name_registration_process_request_msg(LassoNameRegistration *name_reg
* lasso_name_registration_process_response_msg:
* @name_registration: a #LassoNameRegistration
* @response_msg: the register name identifier response message
*
*
* Processes a lib:RegisterNameIdentifierResponse message. Rebuilds a response
* object from the message and optionally verifies its signature.
*
@ -544,9 +544,9 @@ lasso_name_registration_process_response_msg(LassoNameRegistration *name_registr
* @name_registration: a #LassoNameRegistration
*
* Checks profile request with regards to message status and principal
* federations, update them accordingly and prepares a
* federations, update them accordingly and prepares a
* lib:RegisterNameIdentifierResponse accordingly.
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
gint
@ -580,9 +580,9 @@ lasso_name_registration_validate_request(LassoNameRegistration *name_registratio
/* set register name identifier response */
profile->response = lasso_lib_register_name_identifier_response_new_full(
LASSO_PROVIDER(profile->server)->ProviderID,
LASSO_SAML_STATUS_CODE_SUCCESS,
LASSO_SAML_STATUS_CODE_SUCCESS,
LASSO_LIB_REGISTER_NAME_IDENTIFIER_REQUEST(profile->request),
profile->server->certificate ?
profile->server->certificate ?
LASSO_SIGNATURE_TYPE_WITHX509 : LASSO_SIGNATURE_TYPE_SIMPLE,
LASSO_SIGNATURE_METHOD_RSA_SHA1);
if (LASSO_IS_LIB_REGISTER_NAME_IDENTIFIER_RESPONSE(profile->response) == FALSE) {
@ -718,9 +718,9 @@ lasso_name_registration_get_type()
/**
* lasso_name_registration_new:
* @server: the #LassoServer
*
*
* Creates a new #LassoNameRegistration.
*
*
* Return value: a newly created #LassoNameRegistration object; or NULL if
* an error occured
**/
@ -758,7 +758,7 @@ lasso_name_registration_new_from_dump(LassoServer *server, const char *dump)
name_registration = lasso_name_registration_new(server);
doc = xmlParseMemory(dump, strlen(dump));
init_from_xml(LASSO_NODE(name_registration), xmlDocGetRootElement(doc));
init_from_xml(LASSO_NODE(name_registration), xmlDocGetRootElement(doc));
xmlFreeDoc(doc);
return name_registration;
@ -767,9 +767,9 @@ lasso_name_registration_new_from_dump(LassoServer *server, const char *dump)
/**
* lasso_name_registration_dump:
* @name_registration: a #LassoNameRegistration
*
*
* Dumps @name_registration content to an XML string.
*
*
* Return value: the dump string. It must be freed by the caller.
**/
gchar *

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/id-ff/profile.h>
@ -55,7 +55,7 @@ struct _LassoNameRegistration {
/*< public >*/
LassoSamlNameIdentifier *oldNameIdentifier;
/*< private >*/
void *private_data; /* reserved for future use */
};

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -150,7 +150,7 @@ lasso_profile_get_request_type_from_soap_msg(const gchar *soap)
if (strcmp((char*)ns->href, LASSO_DISCO_HREF) == 0) {
type = LASSO_REQUEST_TYPE_DISCO_MODIFY;
} else {
type = LASSO_REQUEST_TYPE_DST_MODIFY;
type = LASSO_REQUEST_TYPE_DST_MODIFY;
}
} else if (strcmp(name, "SASLRequest") == 0) {
type = LASSO_REQUEST_TYPE_SASL_REQUEST;
@ -322,7 +322,7 @@ lasso_profile_set_response_status(LassoProfile *profile, const char *statusCodeV
message(G_LOG_LEVEL_CRITICAL, "Failed to set status");
g_assert_not_reached();
}
}
void
lasso_profile_clean_msg_info(LassoProfile *profile)
@ -383,7 +383,7 @@ lasso_profile_set_session_from_dump(LassoProfile *profile, const gchar *dump)
profile->session = lasso_session_new_from_dump(dump);
if (profile->session == NULL)
return critical_error(LASSO_PROFILE_ERROR_BAD_SESSION_DUMP);
IF_SAML2(profile) {
lasso_saml20_profile_set_session_from_dump(profile);
}
@ -464,7 +464,7 @@ init_from_xml(LassoNode *node, xmlNode *xmlnode)
xmlNode *t;
parent_class->init_from_xml(node, xmlnode);
if (xmlnode == NULL)
return LASSO_XML_ERROR_OBJECT_CONSTRUCTION_FAILED;

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -28,7 +28,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/id-ff/identity.h>
#include <lasso/id-ff/server.h>
@ -44,7 +44,7 @@ extern "C" {
#define LASSO_IS_PROFILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_PROFILE))
#define LASSO_IS_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_PROFILE))
#define LASSO_PROFILE_GET_CLASS(o) \
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_PROFILE, LassoProfileClass))
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_PROFILE, LassoProfileClass))
typedef struct _LassoProfile LassoProfile;
typedef struct _LassoProfileClass LassoProfileClass;

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -28,7 +28,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/id-ff/profile.h>

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -243,7 +243,7 @@ gboolean
lasso_provider_accept_http_method(LassoProvider *provider, LassoProvider *remote_provider,
LassoMdProtocolType protocol_type, LassoHttpMethod http_method,
gboolean initiate_profile)
{
{
LassoProviderRole initiating_role;
char *protocol_profile;
@ -301,11 +301,11 @@ lasso_provider_has_protocol_profile(LassoProvider *provider,
LassoMdProtocolType protocol_type, const char *protocol_profile)
{
GList *supported;
g_return_val_if_fail(LASSO_IS_PROVIDER(provider), FALSE); /* Be conservative */
supported = lasso_provider_get_metadata_list(
provider, protocol_md_nodename[protocol_type]);
if (g_list_find_custom(supported, protocol_profile, (GCompareFunc)strcmp) == NULL)
return FALSE;
return TRUE;
@ -396,7 +396,7 @@ load_descriptor(xmlNode *xmlnode, GHashTable *descriptor, LassoProvider *provide
provider->private_data->signing_key_descriptor = xmlCopyNode(t, 1);
}
if (use && strcmp((char*)use, "encryption") == 0) {
provider->private_data->encryption_key_descriptor =
provider->private_data->encryption_key_descriptor =
xmlCopyNode(t, 1);
}
if (use) {
@ -460,7 +460,7 @@ init_from_xml(LassoNode *node, xmlNode *xmlnode)
xmlChar *s;
parent_class->init_from_xml(node, xmlnode);
if (xmlnode == NULL) {
return LASSO_XML_ERROR_OBJECT_CONSTRUCTION_FAILED;
}
@ -744,7 +744,7 @@ lasso_provider_load_metadata_from_doc(LassoProvider *provider, xmlDoc *doc)
g_return_val_if_fail(LASSO_IS_PROVIDER(provider), FALSE);
if (doc == NULL)
return FALSE;
node = xmlDocGetRootElement(doc);
if (node == NULL || node->ns == NULL) {
xmlFreeDoc(doc);
@ -867,7 +867,7 @@ lasso_provider_new_helper(LassoProviderRole role, const char *metadata,
lasso_provider_load_public_key(provider, LASSO_PUBLIC_KEY_ENCRYPTION);
provider->private_data->encryption_mode = LASSO_ENCRYPTION_MODE_NONE;
return provider;
}
/**
@ -1045,13 +1045,13 @@ lasso_provider_new_from_dump(const gchar *dump)
provider = g_object_new(LASSO_TYPE_PROVIDER, NULL);
doc = xmlParseMemory(dump, strlen(dump));
init_from_xml(LASSO_NODE(provider), xmlDocGetRootElement(doc));
init_from_xml(LASSO_NODE(provider), xmlDocGetRootElement(doc));
xmlFreeDoc(doc);
return provider;
}
int
int
lasso_provider_verify_signature(LassoProvider *provider,
const char *message, const char *id_attr_name, LassoMessageFormat format)
{

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/xml/xml.h>
#include <lasso/xml/xml_enc.h>
@ -40,7 +40,7 @@ extern "C" {
#define LASSO_IS_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_PROVIDER))
#define LASSO_IS_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_PROVIDER))
#define LASSO_PROVIDER_GET_CLASS(o) \
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_PROVIDER, LassoProviderClass))
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_PROVIDER, LassoProviderClass))
typedef struct _LassoProvider LassoProvider;
typedef struct _LassoProviderClass LassoProviderClass;
@ -169,7 +169,7 @@ struct _LassoProviderClass {
LASSO_EXPORT GType lasso_provider_get_type(void);
LASSO_EXPORT LassoProvider* lasso_provider_new(LassoProviderRole role, const char *metadata,
const char *public_key, const char *ca_cert_chain);
LASSO_EXPORT LassoProvider* lasso_provider_new_from_buffer(LassoProviderRole role,
LASSO_EXPORT LassoProvider* lasso_provider_new_from_buffer(LassoProviderRole role,
const char *metadata, const char *public_key, const char *ca_cert_chain);
LASSO_EXPORT gchar* lasso_provider_get_assertion_consumer_service_url(LassoProvider *provider,
const char *service_id);

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
/**
* LassoPublicKeyType:

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -52,7 +52,7 @@
static gint
lasso_server_add_provider_helper(LassoServer *server, LassoProviderRole role,
const gchar *metadata, const gchar *public_key, const gchar *ca_cert_chain,
LassoProvider *(*provider_constructor)(LassoProviderRole role,
LassoProvider *(*provider_constructor)(LassoProviderRole role,
const char *metadata, const char *public_key, const char *ca_cert_chain))
{
LassoProvider *provider;
@ -90,9 +90,9 @@ lasso_server_add_provider_helper(LassoServer *server, LassoProviderRole role,
* @metadata: path to the provider metadata file
* @public_key: provider public key file (may be a certificate) or NULL
* @ca_cert_chain: provider CA certificate chain file or NULL
*
*
* Creates a new #LassoProvider and makes it known to the @server
*
*
* Return value: 0 on success; a negative value if an error occured.
**/
gint
@ -110,9 +110,9 @@ lasso_server_add_provider(LassoServer *server, LassoProviderRole role,
* @metadata: a string buffer containg the metadata file for a new provider
* @public_key: provider public key file (may be a certificate) or NULL
* @ca_cert_chain: provider CA certificate chain file or NULL
*
*
* Creates a new #LassoProvider and makes it known to the @server
*
*
* Return value: 0 on success; a negative value if an error occured.
**/
gint
@ -128,9 +128,9 @@ lasso_server_add_provider_from_buffer(LassoServer *server, LassoProviderRole rol
* lasso_server_add_service:
* @server: a #LassoServer
* @service: a #LassoNode object implementing representing a service endpoint.
*
* Add a service to the registry of service of this #LassoServer object.
*
*
* Add a service to the registry of service of this #LassoServer object.
*
* Return value: 0 on success; a negative value if an error occured.
**/
gint
@ -467,7 +467,7 @@ init_from_xml(LassoNode *node, xmlNode *xmlnode)
t2 = t2->next;
}
}
#ifdef LASSO_WSF_ENABLED
/* Services */
if (strcmp((char*)t->name, "Services") == 0) {
@ -484,7 +484,7 @@ init_from_xml(LassoNode *node, xmlNode *xmlnode)
}
}
/* Service Metadatas (SvcMD) */
/* Service Metadatas (SvcMD) */
if (strcmp((char*)t->name, "SvcMDs") == 0) {
while (t2) {
LassoIdWsf2DiscoSvcMetadata *svcMD;
@ -694,7 +694,7 @@ static void
class_init(LassoServerClass *klass)
{
LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
parent_class = g_type_class_peek_parent(klass);
nclass->node_data = g_new0(LassoNodeClassData, 1);
lasso_node_class_set_nodename(nclass, "Server");
@ -738,9 +738,9 @@ lasso_server_get_type()
* @private_key: path to the the server private key file or NULL
* @private_key_password: password to private key if it is encrypted, or NULL
* @certificate: path to the server certificate file, or NULL
*
*
* Creates a new #LassoServer.
*
*
* Return value: a newly created #LassoServer object; or NULL if an error
* occured
**/

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/lasso_config.h>
@ -47,7 +47,7 @@ typedef void LassoDiscoServiceInstance;
#define LASSO_IS_SERVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_SERVER))
#define LASSO_IS_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_SERVER))
#define LASSO_SERVER_GET_CLASS(o) \
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_SERVER, LassoServerClass))
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_SERVER, LassoServerClass))
typedef struct _LassoServer LassoServer;
typedef struct _LassoServerClass LassoServerClass;

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
struct _LassoServerPrivate
{

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -126,7 +126,7 @@ lasso_session_add_assertion_with_id(LassoSession *session, const char *assertion
g_return_val_if_fail(assertionID != NULL, LASSO_PARAM_ERROR_INVALID_VALUE);
g_return_val_if_fail(assertion != NULL, LASSO_PARAM_ERROR_INVALID_VALUE);
g_hash_table_insert(session->private_data->assertions_by_id,
g_hash_table_insert(session->private_data->assertions_by_id,
g_strdup(assertionID),
xmlCopyNode(assertion, 1));
@ -420,7 +420,7 @@ lasso_session_get_endpoint_reference(LassoSession *session, const gchar *service
g_return_val_if_fail(LASSO_IS_SESSION(session), NULL);
g_return_val_if_fail(service_type != NULL, NULL);
epr = g_hash_table_lookup(session->private_data->eprs, service_type);
if (LASSO_IS_WSA_ENDPOINT_REFERENCE(epr)) {
return LASSO_WSA_ENDPOINT_REFERENCE(epr);
@ -495,7 +495,7 @@ xmlNode_to_base64(xmlNode *node) {
xmlCharEncodingHandlerPtr handler = NULL;
xmlChar *buffer = NULL;
xmlChar *ret = NULL;
handler = xmlFindCharEncodingHandler("utf-8");
if (! handler)
goto exit;
@ -661,7 +661,7 @@ init_from_xml(LassoNode *node, xmlNode *xmlnode)
if (content) {
assertion = base64_to_xmlNode(content);
if (assertion) {
lasso_session_add_assertion_with_id(session,
lasso_session_add_assertion_with_id(session,
(char*)value, assertion);
xmlFreeNode(assertion);
}
@ -683,7 +683,7 @@ init_from_xml(LassoNode *node, xmlNode *xmlnode)
}
}
#ifdef LASSO_WSF_ENABLED
#ifdef LASSO_WSF_ENABLED
/* Endpoint References */
if (strcmp((char*)t->name, "EndpointReferences") == 0) {
t2 = t->children;
@ -736,7 +736,7 @@ dispose(GObject *object)
g_hash_table_destroy(session->private_data->assertions_by_id);
session->private_data->assertions_by_id = NULL;
#ifdef LASSO_WSF_ENABLED
#ifdef LASSO_WSF_ENABLED
g_hash_table_destroy(session->private_data->eprs);
session->private_data->eprs = NULL;
#endif
@ -768,7 +768,7 @@ instance_init(LassoSession *session)
session->private_data->status = g_hash_table_new_full(g_str_hash, g_str_equal,
(GDestroyNotify)g_free,
(GDestroyNotify)lasso_node_destroy);
session->private_data->assertions_by_id =
session->private_data->assertions_by_id =
g_hash_table_new_full(g_str_hash, g_str_equal,
(GDestroyNotify)g_free,
(GDestroyNotify)xmlFree);

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/lasso_config.h>
#include <lasso/xml/xml.h>
@ -39,7 +39,7 @@ extern "C" {
#define LASSO_IS_SESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_SESSION))
#define LASSO_IS_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_SESSION))
#define LASSO_SESSION_GET_CLASS(o) \
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_SESSION, LassoSessionClass))
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_SESSION, LassoSessionClass))
typedef struct _LassoSession LassoSession;
typedef struct _LassoSessionClass LassoSessionClass;

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,12 +27,12 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/xml/lib_assertion.h>
#include <lasso/xml/samlp_status.h>
#include <lasso/id-ff/session.h>
#include <lasso/xml/xml.h>
#include <lasso/xml/xml.h>
struct _LassoSessionPrivate
{
@ -49,7 +49,7 @@ gint lasso_session_add_assertion(LassoSession *session,
const char *providerID, LassoNode *assertion);
gint lasso_session_add_status(LassoSession *session,
const char *providerID, LassoNode *status);
gint lasso_session_add_assertion_with_id(LassoSession *session,
gint lasso_session_add_assertion_with_id(LassoSession *session,
const char *assertionID, xmlNode *assertion);
LassoNode* lasso_session_get_assertion(

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -501,9 +501,9 @@ lasso_idwsf2_data_service_get_attribute_string(LassoIdWsf2DataService *service,
xmlNode *node;
xmlChar *xml_content;
gchar *content;
g_return_val_if_fail(LASSO_IS_IDWSF2_DATA_SERVICE(service), NULL);
node = lasso_idwsf2_data_service_get_attribute_node(service, item_id);
xml_content = xmlNodeGetContent(node);
content = g_strdup((gchar*)xml_content);
@ -919,7 +919,7 @@ dispose(GObject *object)
static void
finalize(GObject *object)
{
{
LassoIdWsf2DataService *service = LASSO_IDWSF2_DATA_SERVICE(object);
g_free(service->private_data);
service->private_data = NULL;
@ -947,7 +947,7 @@ static void
class_init(LassoIdWsf2DataServiceClass *klass)
{
parent_class = g_type_class_peek_parent(klass);
G_OBJECT_CLASS(klass)->dispose = dispose;
G_OBJECT_CLASS(klass)->finalize = finalize;
}

View File

@ -1,22 +1,22 @@
/* $Id: idwsf2_data_service.h 2736 2007-05-30 17:59:38Z dlaniel $
/* $Id: idwsf2_data_service.h 2736 2007-05-30 17:59:38Z dlaniel $
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -28,7 +28,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/id-wsf-2.0/profile.h>
#include <lasso/xml/xml.h>
@ -46,7 +46,7 @@ extern "C" {
#define LASSO_IS_IDWSF2_DATA_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
LASSO_TYPE_IDWSF2_DATA_SERVICE))
#define LASSO_IDWSF2_DATA_SERVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
LASSO_TYPE_IDWSF2_DATA_SERVICE, LassoIdWsf2DataServiceClass))
LASSO_TYPE_IDWSF2_DATA_SERVICE, LassoIdWsf2DataServiceClass))
typedef struct _LassoIdWsf2DataService LassoIdWsf2DataService;
typedef struct _LassoIdWsf2DataServiceClass LassoIdWsf2DataServiceClass;
@ -85,7 +85,7 @@ LASSO_EXPORT gint lasso_idwsf2_data_service_process_query_msg(LassoIdWsf2DataSer
const gchar *message);
LASSO_EXPORT gint lasso_idwsf2_data_service_parse_query_items(LassoIdWsf2DataService *service);
LASSO_EXPORT gint lasso_idwsf2_data_service_process_query_response_msg(
LassoIdWsf2DataService *service, const gchar *message);
@ -100,7 +100,7 @@ LASSO_EXPORT GList* lasso_idwsf2_data_service_get_attribute_strings(LassoIdWsf2D
LASSO_EXPORT gchar* lasso_idwsf2_data_service_get_attribute_string(LassoIdWsf2DataService *service,
const gchar *item_id);
LASSO_EXPORT gint lasso_idwsf2_data_service_init_redirect_user_for_consent(
LassoIdWsf2DataService *service, const gchar *redirect_url);
@ -112,7 +112,7 @@ LASSO_EXPORT gint lasso_idwsf2_data_service_add_modify_item(
LASSO_EXPORT gint lasso_idwsf2_data_service_process_modify_msg(LassoIdWsf2DataService *service,
const gchar *message);
LASSO_EXPORT gint lasso_idwsf2_data_service_parse_modify_items(LassoIdWsf2DataService *service);
LASSO_EXPORT gint lasso_idwsf2_data_service_process_modify_response_msg(

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -75,7 +75,7 @@ struct _LassoIdWsf2DiscoveryPrivate
/**
* lasso_discovery_destroy:
* @discovery: a LassoDiscovery
*
*
* Destroys LassoDiscovery objects created with lasso_discovery_new() or
* lasso_discovery_new_from_dump().
**/
@ -336,7 +336,7 @@ lasso_idwsf2_discovery_register_metadata(LassoIdWsf2Discovery *discovery)
g_return_val_if_fail(LASSO_IS_IDWSF2_DISCOVERY(discovery),
LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
/* verify if identity already exists else create it */
if (LASSO_PROFILE(profile)->identity == NULL) {
LASSO_PROFILE(profile)->identity = lasso_identity_new();
@ -436,7 +436,7 @@ lasso_idwsf2_discovery_init_query(LassoIdWsf2Discovery *discovery, G_GNUC_UNUSED
lasso_idwsf2_profile_init_soap_request(profile,
LASSO_PROFILE(profile)->request, LASSO_IDWSF2_DISCO_HREF);
epr = lasso_session_get_endpoint_reference(session, LASSO_IDWSF2_DISCO_HREF);
if (epr != NULL) {
LASSO_PROFILE(profile)->msg_url = g_strdup(epr->Address->content);
@ -483,7 +483,7 @@ lasso_idwsf2_discovery_process_query_msg(LassoIdWsf2Discovery *discovery, const
if (! LASSO_IS_IDWSF2_DISCO_QUERY(LASSO_PROFILE(profile)->request)) {
res = LASSO_PROFILE_ERROR_INVALID_SOAP_MSG;
}
return res;
}
@ -557,8 +557,8 @@ lasso_idwsf2_discovery_build_epr(LassoIdWsf2DiscoRequestedService *service,
metadata->any = g_list_append(metadata->any,
g_object_ref((GObject*)endpoint_context->Framework->data));
}
/* Identity token */
/* Identity token */
federation = lasso_identity_get_federation(identity, svcMD->ProviderID);
if (federation != NULL) {
assertion = LASSO_SAML2_ASSERTION(lasso_saml2_assertion_new());
@ -591,13 +591,13 @@ lasso_idwsf2_discovery_build_epr(LassoIdWsf2DiscoRequestedService *service,
sec_token = LASSO_IDWSF2_SEC_TOKEN(lasso_idwsf2_sec_token_new());
sec_token->any = LASSO_NODE(assertion);
security_context = LASSO_IDWSF2_DISCO_SECURITY_CONTEXT(
lasso_idwsf2_disco_security_context_new());
security_context->SecurityMechID = g_list_append(
security_context->SecurityMechID, g_strdup(LASSO_SECURITY_MECH_TLS_BEARER));
security_context->Token = g_list_append(security_context->Token, sec_token);
metadata->any = g_list_append(metadata->any, security_context);
}
@ -622,7 +622,7 @@ lasso_idwsf2_discovery_build_query_response_eprs(LassoIdWsf2Discovery *discovery
LassoWsAddrEndpointReference *epr;
LassoSoapEnvelope *envelope;
int res = 0;
if (! LASSO_IS_IDWSF2_DISCO_QUERY(LASSO_PROFILE(profile)->request)) {
res = LASSO_PROFILE_ERROR_MISSING_REQUEST;
} else if (! LASSO_IS_IDENTITY(identity)) {
@ -657,7 +657,7 @@ lasso_idwsf2_discovery_build_query_response_eprs(LassoIdWsf2Discovery *discovery
}
}
/* Set response status code */
/* Set response status code */
if (res == 0) {
response->Status = lasso_idwsf2_util_status_new();
response->Status->code = g_strdup(LASSO_DISCO_STATUS_CODE_OK);
@ -807,7 +807,7 @@ dispose(GObject *object)
static void
finalize(GObject *object)
{
{
LassoIdWsf2Discovery *discovery = LASSO_IDWSF2_DISCOVERY(object);
g_free(discovery->private_data);
discovery->private_data = NULL;

View File

@ -1,22 +1,22 @@
/* $Id: discovery.h,v 1.30 2006/02/21 09:51:49 Exp $
/* $Id: discovery.h,v 1.30 2006/02/21 09:51:49 Exp $
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -28,7 +28,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/id-wsf-2.0/profile.h>
#include <lasso/id-wsf-2.0/data_service.h>
@ -47,7 +47,7 @@ extern "C" {
#define LASSO_IS_IDWSF2_DISCOVERY_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_IDWSF2_DISCOVERY))
#define LASSO_IDWSF2_DISCOVERY_GET_CLASS(o) \
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_IDWSF2_DISCOVERY, LassoIdWsf2DiscoveryClass))
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_IDWSF2_DISCOVERY, LassoIdWsf2DiscoveryClass))
typedef struct _LassoIdWsf2Discovery LassoIdWsf2Discovery;
typedef struct _LassoIdWsf2DiscoveryClass LassoIdWsf2DiscoveryClass;
@ -87,13 +87,13 @@ LASSO_EXPORT gint lasso_idwsf2_discovery_process_metadata_register_msg(
LASSO_EXPORT gint lasso_idwsf2_discovery_process_metadata_register_response_msg(
LassoIdWsf2Discovery *discovery, const gchar *message);
LASSO_EXPORT gint lasso_idwsf2_discovery_init_metadata_association_add(
LassoIdWsf2Discovery *discovery, const gchar *svcMDID);
LASSO_EXPORT gint lasso_idwsf2_discovery_process_metadata_association_add_msg(
LassoIdWsf2Discovery *discovery, const gchar *message);
LASSO_EXPORT gint lasso_idwsf2_discovery_register_metadata(LassoIdWsf2Discovery *discovery);
LASSO_EXPORT gint lasso_idwsf2_discovery_process_metadata_association_add_response_msg(
@ -104,7 +104,7 @@ LASSO_EXPORT gint lasso_idwsf2_discovery_init_query(LassoIdWsf2Discovery *discov
LASSO_EXPORT gint lasso_idwsf2_discovery_add_requested_service_type(LassoIdWsf2Discovery *discovery,
const gchar *service_type);
LASSO_EXPORT gint lasso_idwsf2_discovery_process_query_msg(LassoIdWsf2Discovery *discovery,
const gchar *message);

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
LASSO_EXPORT gint lasso_identity_add_svc_md_id(LassoIdentity *identity, gchar *svcMDID);

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -106,7 +106,7 @@ lasso_idwsf2_profile_init_soap_request(LassoIdWsf2Profile *profile, LassoNode *r
envelope->Header->Other = g_list_append(envelope->Header->Other, wsse_security);
}
/* Add the given request in soap body */
envelope->Body->any = g_list_append(envelope->Body->any, request);

View File

@ -1,22 +1,22 @@
/* $Id: wsf_profile.h,v 1.13 2006/11/14 17:07:30 Exp $
/* $Id: wsf_profile.h,v 1.13 2006/11/14 17:07:30 Exp $
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/id-ff/profile.h>
#include <lasso/xml/soap_envelope.h>
@ -42,7 +42,7 @@ extern "C" {
#define LASSO_IS_IDWSF2_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
LASSO_TYPE_IDWSF2_PROFILE))
#define LASSO_IDWSF2_PROFILE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
LASSO_TYPE_IDWSF2_PROFILE, LassoIdWsf2ProfileClass))
LASSO_TYPE_IDWSF2_PROFILE, LassoIdWsf2ProfileClass))
typedef struct _LassoIdWsf2Profile LassoIdWsf2Profile;

View File

@ -1,22 +1,22 @@
/* $Id: server.h 2945 2006-11-19 20:07:46Z dlaniel $
/* $Id: server.h 2945 2006-11-19 20:07:46Z dlaniel $
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -29,13 +29,13 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/xml/id-wsf-2.0/disco_svc_metadata.h>
LASSO_EXPORT gint lasso_server_add_svc_metadata(LassoServer *server,
LassoIdWsf2DiscoSvcMetadata *metadata);
LASSO_EXPORT const GList OFTYPE(LassoIdWsf2DiscoSvcMetadata) *lasso_server_get_svc_metadatas(
LassoServer *server);

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/xml/saml-2.0/saml2_assertion.h>

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -51,7 +51,7 @@ lasso_sasl_cb_authname(void* context, int id, const char** result, unsigned* len
*result = g_strdup(account->login);
if (len) *len = strlen(account->login);
ret = SASL_OK;
}
}
return ret;
}
@ -286,7 +286,7 @@ lasso_authentication_init_request(LassoAuthentication *authentication,
sasl_callback_t* callback;
callback = lasso_sasl_callbacks;
callback->id = SASL_CB_AUTHNAME;
callback->proc = &lasso_sasl_cb_authname;
callback->context = account;
@ -334,7 +334,7 @@ lasso_authentication_process_request_msg(LassoAuthentication *authentication,
LassoSoapBindingCorrelation *correlation;
gchar *messageId;
int res = 0;
g_return_val_if_fail(LASSO_IS_AUTHENTICATION(authentication),
LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
g_return_val_if_fail(LASSO_IS_AUTHENTICATION(authentication),
@ -529,7 +529,7 @@ lasso_authentication_server_start(LassoAuthentication *authentication)
if (nbmech > 1 && request->Data != NULL) {
g_free(response->Status->code);
response->Status->code = g_strdup(LASSO_SA_STATUS_CODE_ABORT);
return res;
return res;
}
/* decode Data if not NULL */
@ -582,7 +582,7 @@ lasso_authentication_server_step(LassoAuthentication *authentication)
const char *out;
unsigned int outlen = 0;
xmlChar *outbase64, *inbase64;
g_return_val_if_fail(LASSO_IS_AUTHENTICATION(authentication),
LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
@ -682,7 +682,7 @@ dispose(GObject *object)
static void
finalize(GObject *object)
{
{
LassoAuthentication *authentication = LASSO_AUTHENTICATION(object);
g_free(authentication->private_data);
authentication->private_data = NULL;

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -28,7 +28,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <sasl/sasl.h>
@ -44,7 +44,7 @@ extern "C" {
#define LASSO_IS_AUTHENTICATION_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_AUTHENTICATION))
#define LASSO_AUTHENTICATION_GET_CLASS(o) \
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_AUTHENTICATION, LassoAuthenticationClass))
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_AUTHENTICATION, LassoAuthenticationClass))
typedef struct _LassoAuthentication LassoAuthentication;
typedef struct _LassoAuthenticationClass LassoAuthenticationClass;

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -29,28 +29,28 @@
* Following up on #LassoDiscovery first example, it created a @service object,
* this is a #LassoDataService instance. This example continues from that step
* and retrieves the name of the principal:
*
*
* <informalexample>
* <programlisting>
* char *soap_answer; // SOAP answer from data service
* xmlNode *principal_name; // libxml2 xmlNode with the principal name
*
*
* service = lasso_discovery_get_service(discovery);
* lasso_data_service_init_query(service, "/pp:PP/pp:InformalName", NULL);
* lasso_data_service_build_request_msg(service);
*
*
* // service must perform SOAP call to LASSO_WSF_PROFILE(service)->msg_url
* // the SOAP message is LASSO_WSF_PROFILE(service)->msg_body. The answer
* // is stored in char* soap_answer;
*
*
* lasso_data_service_process_query_response_msg(service, soap_answer);
* principal_name = lasso_data_service_get_answer(service, "/pp:PP/pp:InformalName");
*
*
* // app should probably then use xmlNodeGetContent libxml2 function to get
* // access to node content.
* </programlisting>
* </informalexample>
*
*
*/
#include "../utils.h"
@ -224,8 +224,8 @@ lasso_data_service_add_query_item(LassoDataService *service,
}
query = LASSO_DST_QUERY(LASSO_WSF_PROFILE(service)->request);
if (query->QueryItem && query->QueryItem->data &&
if (query->QueryItem && query->QueryItem->data &&
LASSO_DST_QUERY_ITEM(query->QueryItem->data)->itemID == NULL) {
/* XXX: all items must have itemID if there is more than one,
* perhaps we could generate an item id for those lacking it */
@ -269,7 +269,7 @@ lasso_data_service_process_query_msg(LassoDataService *service, const char *mess
if (doc == NULL) {
return critical_error(LASSO_PROFILE_ERROR_INVALID_MSG);
}
xmlnode = xmlSecFindNode(xmlDocGetRootElement(doc), xmlSecNodeSignature,
xmlSecDSigNs);
if (xmlnode) {
@ -403,7 +403,7 @@ lasso_data_service_build_response_msg(LassoDataService *service)
* lasso_data_service_get_answer:
* @service: a #LassoDataService
* @select: resource selection string (typically a XPath query)
*
*
* Returns the answer for the specified @select request.
*
* Return value: the node (libxml2 xmlNode*); or NULL if it was not found.
@ -476,7 +476,7 @@ lasso_data_service_get_answer(LassoDataService *service, const char *select)
* lasso_data_service_get_answer_for_item_id:
* @service: a #LassoDataService
* @item_id: query item identifier
*
*
* Returns the answer for the specified @item_id query item.
*
* Return value: the node (libxml2 xmlNode*); or NULL if it was not found.
@ -651,7 +651,7 @@ lasso_data_service_init_modify(LassoDataService *service, const gchar *select,
return LASSO_PROFILE_ERROR_MISSING_RESOURCE_OFFERING;
}
offering = service->private_data->offering;
if (offering->ServiceInstance == NULL
|| offering->ServiceInstance->ServiceType == NULL) {
return LASSO_PROFILE_ERROR_MISSING_SERVICE_TYPE;
@ -949,7 +949,7 @@ dispose(GObject *object)
static void
finalize(GObject *object)
{
{
LassoDataService *service = LASSO_DATA_SERVICE(object);
if (service->private_data->offering) {
lasso_node_destroy(LASSO_NODE(service->private_data->offering));
@ -977,7 +977,7 @@ static void
class_init(LassoDataServiceClass *klass)
{
parent_class = g_type_class_peek_parent(klass);
G_OBJECT_CLASS(klass)->dispose = dispose;
G_OBJECT_CLASS(klass)->finalize = finalize;
}
@ -1035,7 +1035,7 @@ lasso_data_service_new_full(LassoServer *server, LassoDiscoResourceOffering *off
LassoDataService *service = lasso_data_service_new(server);
g_return_val_if_fail(LASSO_IS_DISCO_RESOURCE_OFFERING(offering), NULL);
if (service == NULL) {
return NULL;
}

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -28,7 +28,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/id-wsf/wsf_profile.h>
#include <lasso/xml/disco_resource_id.h>
@ -50,7 +50,7 @@ extern "C" {
#define LASSO_IS_DATA_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
LASSO_TYPE_DATA_SERVICE))
#define LASSO_DATA_SERVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
LASSO_TYPE_DATA_SERVICE, LassoDataServiceClass))
LASSO_TYPE_DATA_SERVICE, LassoDataServiceClass))
typedef struct _LassoDataService LassoDataService;
typedef struct _LassoDataServiceClass LassoDataServiceClass;
@ -63,7 +63,7 @@ struct _LassoDataService {
LassoDiscoResourceID *resource_id;
LassoDiscoEncryptedResourceID *encrypted_resource_id;
xmlNode *resource_data;
gchar *provider_id;
gchar *abstract_description;

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -28,7 +28,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
void lasso_data_service_set_offering(LassoDataService *service,
LassoDiscoResourceOffering *offering);

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -38,23 +38,23 @@
* <programlisting>
* LassoServer *server; // initialized before
* char* session_dump; // initialized before
*
*
* LassoDiscovery *discovery; // discovery service
* char *soap_answer; // SOAP answer from disco service
* LassoProfileService *service; // instance to perform on requested service
*
*
* discovery = lasso_discovery_new(server);
* lasso_wsf_profile_set_session_from_dump(LASSO_WSF_PROFILE(discovery), session_dump);
* lasso_discovery_init_query(discovery);
* lasso_discovery_add_requested_service(discovery, LASSO_PP_HREF);
* lasso_discovery_build_request_msg(discovery);
*
*
* // service must perform SOAP call to LASSO_WSF_PROFILE(discovery)->msg_url
* // the SOAP message is LASSO_WSF_PROFILE(discovery)->msg_body. The answer
* // is stored in char* soap_answer;
*
*
* lasso_discovery_process_query_response_msg(discovery, soap_answer);
*
*
* service = lasso_discovery_get_service(discovery);
* </programlisting>
* </informalexample>
@ -124,7 +124,7 @@ lasso_discovery_build_credential(LassoDiscovery *discovery, const gchar *provide
LassoSamlSubjectConfirmation *subject_confirmation = NULL;
LassoDsKeyInfo *key_info = NULL;
GList *iter = NULL;
LassoProvider *our_provider =
LassoProvider *our_provider =
LASSO_PROVIDER(LASSO_WSF_PROFILE(discovery)->server);
g_return_val_if_fail(LASSO_IS_DISCOVERY(discovery), NULL);
@ -234,7 +234,7 @@ lasso_discovery_add_insert_entry(LassoDiscovery *discovery,
* @entryID: the idenitfier of a ResourceOffering to remove.
*
* Add a RemoveEntry to the current Modify message for a Discovery service,
* to remove the resource offering identified by entryID (returned in the
* to remove the resource offering identified by entryID (returned in the
* response to a Modify/InsertEntry message).
*
* Return value: 0
@ -911,14 +911,14 @@ lasso_discovery_process_query_response_msg(LassoDiscovery *discovery, const gcha
LassoDiscoQueryResponse *response;
int rc = 0;
g_return_val_if_fail(LASSO_IS_DISCOVERY(discovery),
g_return_val_if_fail(LASSO_IS_DISCOVERY(discovery),
LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
g_return_val_if_fail(message != NULL,
g_return_val_if_fail(message != NULL,
LASSO_PARAM_ERROR_INVALID_VALUE);
profile = LASSO_WSF_PROFILE(discovery);
rc = lasso_wsf_profile_process_soap_response_msg(profile, message);
if (rc)
if (rc)
goto exit;
response = LASSO_DISCO_QUERY_RESPONSE(profile->response);
if (strcmp(response->Status->code, LASSO_DISCO_STATUS_CODE_OK) != 0 &&
@ -942,7 +942,7 @@ lasso_discovery_process_query_response_msg(LassoDiscovery *discovery, const gcha
rc = LASSO_PROFILE_ERROR_SESSION_NOT_FOUND;
goto exit;
}
}
}
}
exit:
return rc;
@ -1092,8 +1092,8 @@ lasso_discovery_unregister_constructor_for_service_type(
g_return_if_fail(constructor);
old_constructor = lookup_registry(service_type);
if (old_constructor != constructor) {
message(G_LOG_LEVEL_WARNING,
"Mismatch of constructors when unregistering service type: %s",
message(G_LOG_LEVEL_WARNING,
"Mismatch of constructors when unregistering service type: %s",
service_type);
return;
}
@ -1200,7 +1200,7 @@ get_constructors_registry()
return registry;
}
static LassoWsfProfileConstructor
static LassoWsfProfileConstructor
lookup_registry(gchar const *service_type) {
gpointer *t;
@ -1293,7 +1293,7 @@ dispose(GObject *object)
static void
finalize(GObject *object)
{
{
LassoDiscovery *discovery = LASSO_DISCOVERY(object);
g_free(discovery->private_data);
discovery->private_data = NULL;
@ -1373,7 +1373,7 @@ lasso_discovery_new(LassoServer *server)
/**
* lasso_discovery_new_full:
* @server: the #LassoServer
* @offering: the
* @offering: the
*
* Creates a new #LassoDiscovery.
*

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -28,7 +28,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/xml/disco_insert_entry.h>
#include <lasso/xml/disco_modify.h>
@ -49,7 +49,7 @@ extern "C" {
#define LASSO_IS_DISCOVERY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_DISCOVERY))
#define LASSO_IS_DISCOVERY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_DISCOVERY))
#define LASSO_DISCOVERY_GET_CLASS(o) \
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_DISCOVERY, LassoDiscoveryClass))
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_DISCOVERY, LassoDiscoveryClass))
typedef struct _LassoDiscovery LassoDiscovery;
typedef struct _LassoDiscoveryClass LassoDiscoveryClass;

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/xml/disco_resource_offering.h>

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -28,7 +28,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/xml/is_interaction_request.h>
#include <lasso/xml/is_interaction_response.h>
@ -44,7 +44,7 @@ extern "C" {
#define LASSO_IS_INTERACTION_PROFILE_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
LASSO_TYPE_INTERACTION_PROFILE_SERVICE))
#define LASSO_INTERACTION_PROFILE_SERVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
LASSO_TYPE_INTERACTION_PROFILE_SERVICE, LassoInteractionProfileServiceClass))
LASSO_TYPE_INTERACTION_PROFILE_SERVICE, LassoInteractionProfileServiceClass))
typedef struct _LassoInteractionProfileService LassoInteractionProfileService;
typedef struct _LassoInteractionProfileServiceClass LassoInteractionProfileServiceClass;

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -55,11 +55,11 @@ lasso_personal_profile_service_get_email(LassoPersonalProfileService *service)
} else if (strcmp((char *)child->name, "MsgProvider") == 0) {
msgProvider = xmlNodeGetContent(child);
}
if (msgAccount != NULL && msgProvider != NULL) {
break;
}
child = child->next;
}
@ -97,7 +97,7 @@ lasso_personal_profile_service_get_type()
static GType this_type = 0;
if (!this_type) {
lasso_discovery_register_constructor_for_service_type(LASSO_PP_HREF,
lasso_discovery_register_constructor_for_service_type(LASSO_PP_HREF,
(LassoWsfProfileConstructor)lasso_personal_profile_service_new_full);
static const GTypeInfo this_info = {
sizeof(LassoPersonalProfileServiceClass),
@ -136,7 +136,7 @@ lasso_personal_profile_service_new_full(LassoServer *server, LassoDiscoResourceO
LassoPersonalProfileService *service = lasso_personal_profile_service_new(server);
g_return_val_if_fail(LASSO_IS_DISCO_RESOURCE_OFFERING(offering), NULL);
if (service == NULL) {
return NULL;
}

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -28,7 +28,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/id-wsf/data_service.h>
#include <lasso/xml/disco_resource_id.h>
@ -48,7 +48,7 @@ extern "C" {
#define LASSO_IS_PERSONAL_PROFILE_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
LASSO_TYPE_PERSONAL_PROFILE_SERVICE))
#define LASSO_PERSONAL_PROFILE_SERVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
LASSO_TYPE_PERSONAL_PROFILE_SERVICE, LassoPersonalProfileServiceClass))
LASSO_TYPE_PERSONAL_PROFILE_SERVICE, LassoPersonalProfileServiceClass))
typedef struct _LassoPersonalProfileService LassoPersonalProfileService;
typedef struct _LassoPersonalProfileServiceClass LassoPersonalProfileServiceClass;

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -29,7 +29,7 @@
* Return value: %TRUE if @security_mech_id is one of
* urn:liberty:security:2003-08:NULL:SAML,
* urn:liberty:security:2003-08:TLS:SAML or
* urn:liberty:security:2003-08:ClientTLS:SAML, FALSE otherwise.
* urn:liberty:security:2003-08:ClientTLS:SAML, FALSE otherwise.
*/
#include <glib.h>
@ -52,14 +52,14 @@ lasso_security_mech_id_is_saml_authentication(const gchar *security_mech_id)
return FALSE;
}
/**
/**
* lasso_security_mech_is_x509_authentication:
* @security_mech_id: the URI of an authentication mechanism
*
* Return value: %TRUE if @security_mech_id is one of
* urn:liberty:security:2003-08:NULL:X509,
* urn:liberty:security:2003-08:TLS:X509 or
* urn:liberty:security:2003-08:ClientTLS:X509, FALSE otherwise.
* urn:liberty:security:2003-08:ClientTLS:X509, FALSE otherwise.
*/
gboolean
lasso_security_mech_id_is_x509_authentication(const char *security_mech_id)
@ -74,7 +74,7 @@ lasso_security_mech_id_is_x509_authentication(const char *security_mech_id)
return FALSE;
}
/**
/**
* lasso_security_mech_is_null_authentication:
* @security_mech_id: the URI of an authentication mechanism
*
@ -94,17 +94,17 @@ lasso_security_mech_id_is_null_authentication(const char *security_mech_id)
return FALSE;
}
/**
/**
* lasso_security_mech_is_null_authentication:
* @security_mech_id: the URI of an authentication mechanism
*
* Return value: %TRUE if @security_mech_id is one of
* urn:liberty:security:2003-08:NULL:Bearer,
* urn:liberty:security:2003-08:TLS:Bearer or
* urn:liberty:security:2003-08:ClientTLS:Bearer,
* urn:liberty:security:2003-08:ClientTLS:Bearer,
* urn:liberty:security:2005-02:NULL:Bearer,
* urn:liberty:security:2005-02:TLS:Bearer or
* urn:liberty:security:2005-02:ClientTLS:Bearer,
* urn:liberty:security:2005-02:ClientTLS:Bearer,
* FALSE otherwise.
*/
gboolean

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -69,9 +69,9 @@ static struct XmlSnippet schema_snippets[] = {
{ "Server", SNIPPET_NODE_IN_CHILD, G_STRUCT_OFFSET(LassoWsfProfile, server) },
{ "Request", SNIPPET_NODE_IN_CHILD, G_STRUCT_OFFSET(LassoWsfProfile, request) },
{ "Response", SNIPPET_NODE_IN_CHILD, G_STRUCT_OFFSET(LassoWsfProfile, response) },
{ "SOAP-Request", SNIPPET_NODE_IN_CHILD,
{ "SOAP-Request", SNIPPET_NODE_IN_CHILD,
G_STRUCT_OFFSET(LassoWsfProfile, soap_envelope_request) },
{ "SOAP-Response", SNIPPET_NODE_IN_CHILD,
{ "SOAP-Response", SNIPPET_NODE_IN_CHILD,
G_STRUCT_OFFSET(LassoWsfProfile, soap_envelope_response) },
{ "MsgUrl", SNIPPET_CONTENT, G_STRUCT_OFFSET(LassoWsfProfile, msg_url) },
{ "MsgBody", SNIPPET_CONTENT, G_STRUCT_OFFSET(LassoWsfProfile, msg_body) },
@ -139,7 +139,7 @@ exit:
return rc;
}
/**
/**
* lasso_wsf_profile_comply_with_security_mechanism:
* @profile: a #LassoWsfProfile
*
@ -153,14 +153,14 @@ lasso_wsf_profile_comply_with_security_mechanism(LassoWsfProfile *profile)
{
char *sec_mech_id;
lasso_return_val_if_invalid_param(WSF_PROFILE, profile,
lasso_return_val_if_invalid_param(WSF_PROFILE, profile,
LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
sec_mech_id = profile->private_data->security_mech_id;
if (lasso_security_mech_id_is_saml_authentication(sec_mech_id)) {
return lasso_wsf_profile_comply_with_saml_authentication(profile);
}
if (sec_mech_id == NULL
if (sec_mech_id == NULL
|| lasso_security_mech_id_is_null_authentication(sec_mech_id)) {
return 0;
}
@ -215,14 +215,14 @@ lasso_wsf_profile_build_soap_envelope_internal(const char *refToMessageId, const
* @Deprecated: Since 2.2.1
*
* Return value: 0.
*/
*/
gint
lasso_wsf_profile_move_credentials(LassoWsfProfile *src, LassoWsfProfile *dest)
{
return 0;
}
/**
/**
* lasso_wsf_profile_add_credential:
* @profile: a #LassoWsfProfile
* @credential: an #xmlNode containing credential informations
@ -277,7 +277,7 @@ lasso_wsf_profile_get_description_auto(const LassoDiscoServiceInstance *si,
* lasso_wsf_profile_set_description_from_offering:
* @profile: a #LassoWsfProfile
* @offering: a #LassoDiscoResourceOffering containing descriptions
* @security_mech_id: an URL representing the wished security mechanism,
* @security_mech_id: an URL representing the wished security mechanism,
* if NULL take the first descriptions
*
* Setup the LassoWsfProfile for a given security mechanism.
@ -387,9 +387,9 @@ lasso_wsf_profile_set_description(LassoWsfProfile *profile, LassoDiscoDescriptio
lasso_assign_gobject(profile->private_data->description, description);
}
/**
/**
* lasso_wsf_profile_get_description:
* @profile: a #LassoWsfProfile
* @profile: a #LassoWsfProfile
*
* Returns the currently registered #LassoDiscoDescription, that permits to
* locate the endpoint and the security mechanism to use for the next ID-WSF
@ -427,7 +427,7 @@ lasso_wsf_profile_get_resource_offering(LassoWsfProfile *profile)
*
*/
void
lasso_wsf_profile_set_resource_offering(LassoWsfProfile *profile,
lasso_wsf_profile_set_resource_offering(LassoWsfProfile *profile,
LassoDiscoResourceOffering *offering)
{
lasso_assign_gobject(profile->private_data->offering, offering);
@ -619,7 +619,7 @@ lasso_wsf_profile_set_session_from_dump(LassoWsfProfile *profile, const gchar *
/**
* lasso_wsf_profile_init_soap_request:
* @profile: a #LassoWsfProfile to initialize for a SOAP request
* @profile: a #LassoWsfProfile to initialize for a SOAP request
* @request: a #LassoNode object containing the body for the SOAP request, can be NULL.
*
* Build the SOAP envelope for a request to and ID-WSF 1.0 web service and set
@ -647,7 +647,7 @@ lasso_wsf_profile_init_soap_request(LassoWsfProfile *profile, LassoNode *request
return lasso_wsf_profile_comply_with_security_mechanism(profile);
}
/**
/**
* lasso_wsf_profile_build_soap_request_msg:
* @profile: the #LassoWsfProfile object
*
@ -701,7 +701,7 @@ exit:
return rc;
}
/**
/**
* lasso_wsf_profile_build_soap_response_msg:
* @profile: the #LassoWsfProfile object
*
@ -719,7 +719,7 @@ lasso_wsf_profile_build_soap_response_msg(LassoWsfProfile *profile)
xmlOutputBuffer *buf;
xmlCharEncodingHandler *handler;
lasso_return_val_if_invalid_param(WSF_PROFILE, profile,
lasso_return_val_if_invalid_param(WSF_PROFILE, profile,
LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
envelope = profile->soap_envelope_response;
@ -780,12 +780,12 @@ lasso_wsf_profile_process_soap_request_msg(LassoWsfProfile *profile, const gchar
}
if (iter) {
correlation = LASSO_SOAP_BINDING_CORRELATION(iter->data);
}
}
goto_exit_if_fail (correlation != NULL && correlation->messageID != NULL,
LASSO_WSF_PROFILE_ERROR_MISSING_CORRELATION);
messageId = correlation->messageID;
/* Comply with security mechanism */
if (security_mech_id == NULL
if (security_mech_id == NULL
|| lasso_security_mech_id_is_null_authentication(security_mech_id)) {
rc = 0;
} else {
@ -807,12 +807,12 @@ exit:
return rc;
}
/**
/**
* lasso_wsf_profile_process_soap_response_msg:
* @profile: a #LassoWsfProfile object
* @message: the textual representaition of a SOAP message
*
* Parse a SOAP response from an ID-WSF 1.0 service,
* Parse a SOAP response from an ID-WSF 1.0 service,
* eventually signal a SOAP fault.
*
* Return value: 0 if the processing of this message was successful.
@ -825,9 +825,9 @@ lasso_wsf_profile_process_soap_response_msg(LassoWsfProfile *profile, const gcha
LassoSoapEnvelope *envelope = NULL;
gint rc = 0;
g_return_val_if_fail(LASSO_IS_WSF_PROFILE(profile),
g_return_val_if_fail(LASSO_IS_WSF_PROFILE(profile),
LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
g_return_val_if_fail(message != NULL,
g_return_val_if_fail(message != NULL,
LASSO_PARAM_ERROR_INVALID_VALUE);
doc = lasso_xml_parse_memory(message, strlen(message));
@ -912,7 +912,7 @@ dispose(GObject *object)
static void
finalize(GObject *object)
{
{
LassoWsfProfile *profile = LASSO_WSF_PROFILE(object);
g_free(profile->private_data);
profile->private_data = NULL;
@ -933,7 +933,7 @@ instance_init(LassoWsfProfile *profile)
profile->soap_envelope_response = NULL;
profile->msg_url = NULL;
profile->msg_body = NULL;
profile->private_data = g_new0(LassoWsfProfilePrivate, 1);
}
@ -976,11 +976,11 @@ lasso_wsf_profile_get_type()
return this_type;
}
/**
/**
* lasso_wsf_profile_init:
* @profile: the #LassoWsfProfile to initialize
* @server: a #LassoServer object to resolve provider IDs.
* @offering: a #LassoDiscoResourceOffering for the
* @offering: a #LassoDiscoResourceOffering for the
* targetted web service.
*
* Initialize a #LassoWsfProfile in order to handle or send
@ -989,11 +989,11 @@ lasso_wsf_profile_get_type()
* Return: 0 if initialization was successfull.
*/
gint
lasso_wsf_profile_init(LassoWsfProfile *profile,
LassoServer *server,
lasso_wsf_profile_init(LassoWsfProfile *profile,
LassoServer *server,
LassoDiscoResourceOffering *offering)
{
lasso_return_val_if_invalid_param(WSF_PROFILE, profile,
lasso_return_val_if_invalid_param(WSF_PROFILE, profile,
LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
/* FIXME: is a NULL server authorized ? */
lasso_assign_gobject(profile->server, server);
@ -1066,9 +1066,9 @@ add_signature_template(LassoServer *server, xmlDoc *doc, xmlNode *node, xmlNode
default:
rc = LASSO_DS_ERROR_SIGNATURE_TMPL_CREATION_FAILED;
goto exit;
}
/* Last steps... */
if (signature_ptr) {
*signature_ptr = signature;
@ -1119,8 +1119,8 @@ create_signature_context(LassoServer *server, xmlSecDSigCtx **ctx_ptr) {
goto_exit_if_fail(dsig_ctx->signKey != NULL, LASSO_DS_ERROR_PRIVATE_KEY_LOAD_FAILED);
/* Load the certificate chain if needed */
if (server->certificate) {
gint ret = xmlSecCryptoAppKeyCertLoad(dsig_ctx->signKey,
server->certificate,
gint ret = xmlSecCryptoAppKeyCertLoad(dsig_ctx->signKey,
server->certificate,
xmlSecKeyDataFormatPem);
goto_exit_if_fail(ret >= 0, LASSO_DS_ERROR_CERTIFICATE_LOAD_FAILED);
}
@ -1132,13 +1132,13 @@ exit:
xmlSecDSigCtxDestroy(dsig_ctx);
}
return rc;
}
static xmlChar *
make_id_ref(xmlChar *id) {
char *res = NULL;
res = g_strdup_printf("#%s", (char*)id);
return (xmlChar*)res;
}
@ -1194,19 +1194,19 @@ lasso_wsf_profile_add_saml_signature(LassoWsfProfile *wsf_profile, xmlDoc *doc)
const xmlChar* ids[] = {
(xmlChar*) "id",
(xmlChar*) "Id",
NULL
NULL
};
gint rc = 0, sec_ret = 0;
g_return_val_if_fail(LASSO_IS_WSF_PROFILE(wsf_profile),
g_return_val_if_fail(LASSO_IS_WSF_PROFILE(wsf_profile),
LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
g_return_val_if_fail(doc != NULL, LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
/* Lookup all referenced node and their Ids */
envelope = xmlDocGetRootElement(doc);
header = xmlSecSoap11GetHeader(envelope);
provider = xmlSecFindNode(header, (xmlChar*) "Provider",
(xmlChar*) LASSO_SOAP_BINDING_HREF);
correlation = xmlSecFindNode(header, (xmlChar*) "Correlation",
@ -1275,7 +1275,7 @@ lasso_wsf_profile_add_saml_signature(LassoWsfProfile *wsf_profile, xmlDoc *doc)
goto exit;
}
add_key_info_security_token_reference(doc, signature, assertion_id);
exit:
if (dsig_ctx) {
xmlSecDSigCtxDestroy(dsig_ctx);

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -28,7 +28,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/id-ff/server.h>
#include <lasso/id-ff/identity.h>
@ -49,7 +49,7 @@ extern "C" {
#define LASSO_IS_WSF_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
LASSO_TYPE_WSF_PROFILE))
#define LASSO_WSF_PROFILE_GET_CLASS(o) \
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_WSF_PROFILE, LassoWsfProfileClass))
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_WSF_PROFILE, LassoWsfProfileClass))
typedef struct _LassoWsfProfile LassoWsfProfile;
typedef struct _LassoWsfProfileClass LassoWsfProfileClass;
@ -116,7 +116,7 @@ G_GNUC_DEPRECATED LASSO_EXPORT LassoSoapBindingProvider* lasso_wsf_profile_set_p
LASSO_EXPORT LassoWsfProfile* lasso_wsf_profile_new(LassoServer *server);
LASSO_EXPORT LassoWsfProfile* lasso_wsf_profile_new_full(LassoServer *server,
LASSO_EXPORT LassoWsfProfile* lasso_wsf_profile_new_full(LassoServer *server,
LassoDiscoResourceOffering *offering);
G_GNUC_DEPRECATED LASSO_EXPORT gboolean lasso_wsf_profile_principal_is_online(
@ -125,9 +125,9 @@ G_GNUC_DEPRECATED LASSO_EXPORT gboolean lasso_wsf_profile_principal_is_online(
G_GNUC_DEPRECATED LASSO_EXPORT gint lasso_wsf_profile_add_credential(LassoWsfProfile *profile,
xmlNode *credential);
LASSO_EXPORT gint lasso_wsf_profile_set_description_from_offering(
LassoWsfProfile *profile,
const LassoDiscoResourceOffering *offering,
LASSO_EXPORT gint lasso_wsf_profile_set_description_from_offering(
LassoWsfProfile *profile,
const LassoDiscoResourceOffering *offering,
const char *security_mech_id);
LASSO_EXPORT void lasso_wsf_profile_set_description(LassoWsfProfile *profile,
@ -153,7 +153,7 @@ G_GNUC_DEPRECATED LASSO_EXPORT void lasso_wsf_profile_set_principal_online(
G_GNUC_DEPRECATED LASSO_EXPORT void lasso_wsf_profile_set_principal_offline(
LassoWsfProfile *profile);
LASSO_EXPORT gint lasso_wsf_profile_init(LassoWsfProfile *profile, LassoServer *server,
LASSO_EXPORT gint lasso_wsf_profile_init(LassoWsfProfile *profile, LassoServer *server,
LassoDiscoResourceOffering *offering);
#ifdef __cplusplus

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -28,7 +28,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/xml/soap_fault.h>

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -92,7 +92,7 @@ int lasso_init()
/* Load default crypto engine if we are supporting dynamic
* loading for xmlsec-crypto libraries. Use the crypto library
* name ("openssl", "nss", etc.) to load corresponding
* name ("openssl", "nss", etc.) to load corresponding
* xmlsec-crypto library.
*/
#ifdef XMLSEC_CRYPTO_DYNAMIC_LOADING
@ -121,9 +121,9 @@ int lasso_init()
/**
* lasso_shutdown:
*
*
* Clean ups Lasso library.
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
int lasso_shutdown()
@ -139,7 +139,7 @@ int lasso_shutdown()
/* Shutdown libxslt/libxml */
#ifndef XMLSEC_NO_XSLT
xsltCleanupGlobals();
xsltCleanupGlobals();
#endif /* XMLSEC_NO_XSLT */
/* Cleanup function for the XML library */
xmlCleanupParser();
@ -150,7 +150,7 @@ int lasso_shutdown()
return 0;
}
/**
/**
* lasso_check_version:
* @major: major version numbe
* @minor: minor version number
@ -162,7 +162,7 @@ int lasso_shutdown()
* Returns 1 if the loaded lasso library version is OK to use
* 0 if it is not; or a negative value if an error occurs.
**/
int
int
lasso_check_version(int major, int minor, int subminor, LassoCheckVersionMode mode)
{
if (mode == LASSO_CHECK_VERSION_NUMERIC) {
@ -190,7 +190,7 @@ lasso_check_version(int major, int minor, int subminor, LassoCheckVersionMode mo
}
if (mode == LASSO_CHECK_VERSIONABI_COMPATIBLE) {
if (minor < LASSO_VERSION_MINOR || (minor == LASSO_VERSION_MINOR &&
if (minor < LASSO_VERSION_MINOR || (minor == LASSO_VERSION_MINOR &&
subminor < LASSO_VERSION_SUBMINOR)) {
g_message("mode=abi compatible;expected minor version=%d;"
"real minor version=%d;expected subminor version=%d;"

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#if (defined _MSC_VER || defined MINGW32)
# include <windows.h>

View File

@ -1,22 +1,22 @@
/* $Id: assertion_query.c 3237 2007-05-30 17:17:45Z dlaniel $
/* $Id: assertion_query.c 3237 2007-05-30 17:17:45Z dlaniel $
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -146,7 +146,7 @@ lasso_assertion_query_init_request(LassoAssertionQuery *assertion_query,
* @assertion_query: a #LassoAssertionQuery
*
* Builds the Name Id Management request message.
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
gint
@ -189,7 +189,7 @@ lasso_assertion_query_build_request_msg(LassoAssertionQuery *assertion_query)
* lasso_assertion_query_process_request_msg:
* @assertion_query: a #LassoAssertionQuery
* @request_msg: the Assertion query or request message
*
*
* Processes a Assertion query or request message. Rebuilds a request object
* from the message and check its signature.
*
@ -208,7 +208,7 @@ lasso_assertion_query_process_request_msg(LassoAssertionQuery *assertion_query,
g_return_val_if_fail(LASSO_IS_ASSERTION_QUERY(assertion_query),
LASSO_PARAM_ERROR_INVALID_VALUE);
profile = LASSO_PROFILE(assertion_query);
profile->request = lasso_node_new_from_soap(request_msg);
@ -264,7 +264,7 @@ lasso_assertion_query_process_request_msg(LassoAssertionQuery *assertion_query,
/**
* lasso_assertion_query_validate_request:
* @assertion_query: a #LassoAssertionQuery
*
*
* Processes a Assertion query or request; caller must add assertions to the
* response afterwards.
*
@ -328,7 +328,7 @@ lasso_assertion_query_validate_request(LassoAssertionQuery *assertion_query)
/* verify signature status */
if (profile->signature_status != 0) {
/* XXX: which SAML2 Status Code ? */
lasso_saml20_profile_set_response_status(profile,
lasso_saml20_profile_set_response_status(profile,
LASSO_LIB_STATUS_CODE_INVALID_SIGNATURE);
return profile->signature_status;
}
@ -340,9 +340,9 @@ lasso_assertion_query_validate_request(LassoAssertionQuery *assertion_query)
/**
* lasso_assertion_query_build_response_msg:
* @assertion_query: a #LassoAssertionQuery
*
*
* Builds the Response message.
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
int
@ -367,7 +367,7 @@ lasso_assertion_query_build_response_msg(LassoAssertionQuery *assertion_query)
response->IssueInstant = lasso_get_current_time();
response->InResponseTo = g_strdup(
LASSO_SAMLP2_REQUEST_ABSTRACT(profile->request)->ID);
lasso_saml20_profile_set_response_status(profile,
lasso_saml20_profile_set_response_status(profile,
LASSO_SAML2_STATUS_CODE_REQUEST_DENIED);
response->sign_method = LASSO_SIGNATURE_METHOD_RSA_SHA1;
@ -403,7 +403,7 @@ lasso_assertion_query_build_response_msg(LassoAssertionQuery *assertion_query)
* lasso_assertion_query_process_response_msg:
* @assertion_query: a #LassoAssertionQuery
* @response_msg: the response message
*
*
* Parses the response message and builds the corresponding response object.
*
* Return value: 0 on success; or a negative value otherwise.
@ -522,7 +522,7 @@ dispose(GObject *object)
static void
finalize(GObject *object)
{
{
LassoAssertionQuery *profile = LASSO_ASSERTION_QUERY(object);
g_free(profile->private_data);
profile->private_data = NULL;
@ -567,7 +567,7 @@ lasso_assertion_query_get_type()
if (!this_type) {
static const GTypeInfo this_info = {
sizeof (LassoAssertionQueryClass),
NULL, NULL,
NULL, NULL,
(GClassInitFunc) class_init,
NULL, NULL,
sizeof(LassoAssertionQuery),
@ -584,7 +584,7 @@ lasso_assertion_query_get_type()
/**
* lasso_assertion_query_new:
* @server: the #LassoServer
*
*
* Creates a new #LassoAssertionQuery.
*
* Return value: a newly created #LassoAssertionQuery object; or NULL if
@ -606,7 +606,7 @@ lasso_assertion_query_new(LassoServer *server)
/**
* lasso_assertion_query_destroy:
* @assertion_query: a #LassoAssertionQuery
*
*
* Destroys a #LassoAssertionQuery object.
**/
void

View File

@ -1,22 +1,22 @@
/* $Id: assertion_query.h 3237 2007-05-30 17:17:45Z dlaniel $
/* $Id: assertion_query.h 3237 2007-05-30 17:17:45Z dlaniel $
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/id-ff/profile.h>
#include <lasso/xml/saml-2.0/samlp2_manage_name_id_request.h>
@ -45,7 +45,7 @@ extern "C" {
(G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_ASSERTION_QUERY))
#define LASSO_ASSERTION_QUERY_GET_CLASS(o) \
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_ASSERTION_QUERY, \
LassoAssertionQueryClass))
LassoAssertionQueryClass))
typedef struct _LassoAssertionQuery LassoAssertionQuery;
typedef struct _LassoAssertionQueryClass LassoAssertionQueryClass;

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -50,7 +50,7 @@
* @ecp: a #LassoEcp
*
* Destroys a #LassoEcp object
*
*
**/
void
lasso_ecp_destroy(LassoEcp *ecp)

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/xml/xml.h>
@ -38,7 +38,7 @@ extern "C" {
#define LASSO_ECP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_ECP, LassoEcpClass))
#define LASSO_IS_ECP(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_ECP))
#define LASSO_IS_ECP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_ECP))
#define LASSO_ECP_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_ECP, LassoEcpClass))
#define LASSO_ECP_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_ECP, LassoEcpClass))
typedef struct _LassoEcp LassoEcp;
typedef struct _LassoEcpClass LassoEcpClass;

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <config.h>

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
void lasso_saml20_federation_build_local_name_identifier(LassoFederation *federation,
const gchar *nameQualifier, const gchar *format, const gchar *content);

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -158,9 +158,9 @@ lasso_saml20_login_build_authn_request_msg(LassoLogin *login, LassoProvider *rem
} else {
/* POST, SOAP and Artifact-GET|POST */
if (must_sign) {
LASSO_SAMLP2_REQUEST_ABSTRACT(profile->request)->private_key_file =
LASSO_SAMLP2_REQUEST_ABSTRACT(profile->request)->private_key_file =
g_strdup(profile->server->private_key);
LASSO_SAMLP2_REQUEST_ABSTRACT(profile->request)->certificate_file =
LASSO_SAMLP2_REQUEST_ABSTRACT(profile->request)->certificate_file =
g_strdup(profile->server->certificate);
}
@ -511,13 +511,13 @@ lasso_saml20_login_validate_request_msg(LassoLogin *login, gboolean authenticati
if (profile->signature_status == 0 && authentication_result == TRUE) {
ret = lasso_saml20_login_process_federation(login, is_consent_obtained);
if (ret == LASSO_LOGIN_ERROR_FEDERATION_NOT_FOUND) {
lasso_saml20_profile_set_response_status(profile,
lasso_saml20_profile_set_response_status(profile,
LASSO_LIB_STATUS_CODE_FEDERATION_DOES_NOT_EXIST);
return ret;
}
/* Only possibility, consent not obtained. */
if (ret) {
lasso_saml20_profile_set_response_status(profile,
lasso_saml20_profile_set_response_status(profile,
LASSO_SAML2_STATUS_CODE_REQUEST_DENIED);
return ret;
}
@ -588,11 +588,11 @@ lasso_saml20_login_process_federation(LassoLogin *login, gboolean is_consent_obt
* specified, don't create a federation */
return 0;
}
if (federation && LASSO_SAMLP2_AUTHN_REQUEST(profile->request)->NameIDPolicy == NULL) {
LASSO_SAMLP2_AUTHN_REQUEST(profile->request)->NameIDPolicy = \
LASSO_SAMLP2_NAME_ID_POLICY(lasso_samlp2_name_id_policy_new());
LASSO_SAMLP2_AUTHN_REQUEST(profile->request)->NameIDPolicy->Format =
LASSO_SAMLP2_AUTHN_REQUEST(profile->request)->NameIDPolicy->Format =
g_strdup(LASSO_SAML2_NAME_IDENTIFIER_FORMAT_PERSISTENT);
}
@ -690,24 +690,24 @@ lasso_saml20_login_assertion_add_discovery(LassoLogin *login, LassoSaml2Assertio
metadata->any = g_list_append(metadata->any,
g_object_ref(endpoint_context->Framework->data));
}
/* Identity token */
assertion_identity_token = LASSO_SAML2_ASSERTION(lasso_saml2_assertion_new());
assertion_identity_token->Subject = g_object_ref(assertion->Subject);
sec_token = lasso_idwsf2_sec_token_new();
sec_token->any = LASSO_NODE(assertion_identity_token);
security_context = lasso_idwsf2_disco_security_context_new();
security_context->SecurityMechID = g_list_append(
security_context->SecurityMechID, g_strdup(LASSO_SECURITY_MECH_TLS_BEARER));
security_context->Token = g_list_append(security_context->Token, sec_token);
metadata->any = g_list_append(metadata->any, security_context);
/* End of metadata construction */
epr->Metadata = metadata;
/* Add the EPR to the assertion as a SAML attribute */
attributeValue = lasso_saml2_attribute_value_new();
attributeValue->any = g_list_append(attributeValue->any, epr);
@ -722,7 +722,7 @@ lasso_saml20_login_assertion_add_discovery(LassoLogin *login, LassoSaml2Assertio
assertion->AttributeStatement = g_list_append(assertion->AttributeStatement,
attributeStatement);
/* Free resources */
g_list_foreach(svcMDs, (GFunc)lasso_node_destroy, NULL);
g_list_free(svcMDs);
@ -790,7 +790,7 @@ lasso_saml20_login_build_assertion(LassoLogin *login,
lasso_saml2_subject_confirmation_new());
assertion->Subject->SubjectConfirmation->Method = g_strdup(
LASSO_SAML2_CONFIRMATION_METHOD_BEARER);
assertion->Subject->SubjectConfirmation->SubjectConfirmationData =
assertion->Subject->SubjectConfirmation->SubjectConfirmationData =
LASSO_SAML2_SUBJECT_CONFIRMATION_DATA(
lasso_saml2_subject_confirmation_data_new());
assertion->Subject->SubjectConfirmation->SubjectConfirmationData->NotBefore = g_strdup(
@ -808,7 +808,7 @@ lasso_saml20_login_build_assertion(LassoLogin *login,
LASSO_PROVIDER(profile->server)->ProviderID);
name_id->Format = g_strdup(name_id_policy->Format);
assertion->Subject->NameID = name_id;
} else if (federation == NULL ||
} else if (federation == NULL ||
(name_id_policy && strcmp(name_id_policy->Format,
LASSO_SAML2_NAME_IDENTIFIER_FORMAT_TRANSIENT) == 0)) {
/* transient -> don't use a federation */
@ -918,7 +918,7 @@ lasso_saml20_login_build_artifact_msg(LassoLogin *login, LassoHttpMethod http_me
url = lasso_saml20_login_get_assertion_consumer_service_url(login, remote_provider);
assertion = login->private_data->saml2_assertion;
if (LASSO_IS_SAML2_ASSERTION(assertion) == TRUE) {
assertion->Subject->SubjectConfirmation->SubjectConfirmationData->Recipient =
assertion->Subject->SubjectConfirmation->SubjectConfirmationData->Recipient =
g_strdup(url);
}
@ -983,7 +983,7 @@ lasso_saml20_login_build_request_msg(LassoLogin *login)
LASSO_SAMLP2_REQUEST_ABSTRACT(profile->request)->private_key_file =
g_strdup(profile->server->private_key);
LASSO_SAMLP2_REQUEST_ABSTRACT(profile->request)->certificate_file =
LASSO_SAMLP2_REQUEST_ABSTRACT(profile->request)->certificate_file =
g_strdup(profile->server->certificate);
profile->msg_body = lasso_node_export_to_soap(profile->request);
@ -1032,9 +1032,9 @@ lasso_saml20_login_build_response_msg(LassoLogin *login)
LASSO_SAMLP2_STATUS_RESPONSE(profile->response)->sign_method =
LASSO_SIGNATURE_METHOD_RSA_SHA1;
LASSO_SAMLP2_STATUS_RESPONSE(profile->response)->private_key_file =
LASSO_SAMLP2_STATUS_RESPONSE(profile->response)->private_key_file =
g_strdup(profile->server->private_key);
LASSO_SAMLP2_STATUS_RESPONSE(profile->response)->certificate_file =
LASSO_SAMLP2_STATUS_RESPONSE(profile->response)->certificate_file =
g_strdup(profile->server->certificate);
remote_provider = g_hash_table_lookup(LASSO_PROFILE(login)->server->providers,
@ -1187,7 +1187,7 @@ lasso_saml20_login_process_response_status_and_assertion(LassoLogin *login)
g_return_val_if_fail(LASSO_IS_LOGIN(login), LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
response = LASSO_SAMLP2_STATUS_RESPONSE(LASSO_PROFILE(login)->response);
if (response->Status == NULL || ! LASSO_IS_SAMLP2_STATUS(response->Status) ||
if (response->Status == NULL || ! LASSO_IS_SAMLP2_STATUS(response->Status) ||
response->Status->StatusCode == NULL ||
response->Status->StatusCode->Value == NULL) {
return LASSO_PROFILE_ERROR_MISSING_STATUS_CODE;
@ -1212,7 +1212,7 @@ lasso_saml20_login_process_response_status_and_assertion(LassoLogin *login)
}
}
}
return LASSO_LOGIN_ERROR_STATUS_NOT_SUCCESS;
}
@ -1437,9 +1437,9 @@ lasso_saml20_login_build_authn_response_msg(LassoLogin *login)
LASSO_SAMLP2_STATUS_RESPONSE(profile->response)->sign_method =
LASSO_SIGNATURE_METHOD_RSA_SHA1;
LASSO_SAMLP2_STATUS_RESPONSE(profile->response)->private_key_file =
LASSO_SAMLP2_STATUS_RESPONSE(profile->response)->private_key_file =
g_strdup(profile->server->private_key);
LASSO_SAMLP2_STATUS_RESPONSE(profile->response)->certificate_file =
LASSO_SAMLP2_STATUS_RESPONSE(profile->response)->certificate_file =
g_strdup(profile->server->certificate);
remote_provider = g_hash_table_lookup(profile->server->providers,
@ -1452,7 +1452,7 @@ lasso_saml20_login_build_authn_response_msg(LassoLogin *login)
if (profile->msg_url == NULL) {
return LASSO_PROFILE_ERROR_UNKNOWN_PROFILE_URL;
}
assertion = login->private_data->saml2_assertion;
if (LASSO_IS_SAML2_ASSERTION(assertion) == TRUE) {
assertion->Subject->SubjectConfirmation->SubjectConfirmationData->Recipient =

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/id-ff/login.h>

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -88,7 +88,7 @@ lasso_saml20_logout_init_request(LassoLogout *logout, LassoProvider *remote_prov
} else {
name_id_sp_name_qualifier = profile->remote_providerID;
}
federation = g_hash_table_lookup(profile->identity->federations,
name_id_sp_name_qualifier);
if (federation == NULL) {
@ -189,7 +189,7 @@ lasso_saml20_logout_build_request_msg(LassoLogout *logout, LassoProvider *remote
LASSO_SAMLP2_REQUEST_ABSTRACT(profile->request)->sign_method =
LASSO_SIGNATURE_METHOD_RSA_SHA1;
if (profile->server->certificate) {
LASSO_SAMLP2_REQUEST_ABSTRACT(profile->request)->sign_type =
LASSO_SAMLP2_REQUEST_ABSTRACT(profile->request)->sign_type =
LASSO_SIGNATURE_TYPE_WITHX509;
} else {
LASSO_SAMLP2_REQUEST_ABSTRACT(profile->request)->sign_type =
@ -197,7 +197,7 @@ lasso_saml20_logout_build_request_msg(LassoLogout *logout, LassoProvider *remote
}
LASSO_SAMLP2_REQUEST_ABSTRACT(profile->request)->private_key_file =
g_strdup(profile->server->private_key);
LASSO_SAMLP2_REQUEST_ABSTRACT(profile->request)->certificate_file =
LASSO_SAMLP2_REQUEST_ABSTRACT(profile->request)->certificate_file =
g_strdup(profile->server->certificate);
if (logout->initial_http_request_method == LASSO_HTTP_METHOD_SOAP) {
@ -208,7 +208,7 @@ lasso_saml20_logout_build_request_msg(LassoLogout *logout, LassoProvider *remote
profile->msg_body = lasso_node_export_to_soap(profile->request);
return 0;
}
if (logout->initial_http_request_method == LASSO_HTTP_METHOD_REDIRECT) {
char *url, *query;
@ -236,7 +236,7 @@ lasso_saml20_logout_build_request_msg(LassoLogout *logout, LassoProvider *remote
g_free(query);
return 0;
}
/* XXX: artifact support */
return critical_error(LASSO_PROFILE_ERROR_INVALID_HTTP_METHOD);
@ -366,13 +366,13 @@ lasso_saml20_logout_validate_request(LassoLogout *logout)
/* verify signature status */
if (profile->signature_status != 0) {
/* XXX: which SAML2 Status Code ? */
lasso_saml20_profile_set_response_status(profile,
lasso_saml20_profile_set_response_status(profile,
LASSO_LIB_STATUS_CODE_INVALID_SIGNATURE);
return profile->signature_status;
}
/* Get the name identifier */
name_id = LASSO_SAMLP2_LOGOUT_REQUEST(profile->request)->NameID;
name_id = LASSO_SAMLP2_LOGOUT_REQUEST(profile->request)->NameID;
if (name_id == NULL) {
message(G_LOG_LEVEL_CRITICAL, "Name identifier not found in logout request");
/* XXX: which status code in SAML 2.0 ? */
@ -495,7 +495,7 @@ check_soap_support(G_GNUC_UNUSED gchar *key, LassoProvider *provider, LassoProfi
if (supported_profiles)
return; /* provider support profile */
LASSO_LOGOUT(profile)->private_data->all_soap = FALSE;
}
@ -520,7 +520,7 @@ lasso_saml20_logout_build_response_msg(LassoLogout *logout)
response->InResponseTo = g_strdup(
LASSO_SAMLP2_REQUEST_ABSTRACT(profile->request)->ID);
}
lasso_saml20_profile_set_response_status(profile,
lasso_saml20_profile_set_response_status(profile,
LASSO_SAML2_STATUS_CODE_REQUEST_DENIED);
response->sign_method = LASSO_SIGNATURE_METHOD_RSA_SHA1;
@ -675,7 +675,7 @@ lasso_saml20_logout_process_response_msg(LassoLogout *logout, const char *respon
message(G_LOG_LEVEL_CRITICAL, "Status code is not success: %s", status_code_value);
return LASSO_PROFILE_ERROR_STATUS_NOT_SUCCESS;
}
/* LogoutResponse status code value is ok */
/* XXX: handle RelayState if necessary */
@ -694,7 +694,7 @@ lasso_saml20_logout_process_response_msg(LassoLogout *logout, const char *respon
* can be a proxy. So we have to use the role of the initial remote
* provider instead.
*/
if (logout->initial_remote_providerID &&
if (logout->initial_remote_providerID &&
g_hash_table_size(profile->session->assertions) == 0) {
remote_provider = g_hash_table_lookup(profile->server->providers,
logout->initial_remote_providerID);

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/id-ff/logout.h>

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -112,7 +112,7 @@ lasso_name_id_management_init_request(LassoNameIdManagement *name_id_management,
} else {
profile->nameIdentifier = g_object_ref(name_id_n);
}
if (oldNameIdentifier != NULL)
if (oldNameIdentifier != NULL)
g_object_unref(oldNameIdentifier);
/* XXX: check HTTP method is supported */
@ -135,7 +135,7 @@ lasso_name_id_management_init_request(LassoNameIdManagement *name_id_management,
LASSO_SAMLP2_MANAGE_NAME_ID_REQUEST(request)->Terminate = \
LASSO_SAMLP2_TERMINATE(lasso_samlp2_terminate_new());
}
profile->http_request_method = http_method;
return 0;
@ -147,7 +147,7 @@ lasso_name_id_management_init_request(LassoNameIdManagement *name_id_management,
* @name_id_management: a #LassoNameIdManagement
*
* Builds the Name Id Management request message.
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
gint
@ -213,7 +213,7 @@ lasso_name_id_management_build_request_msg(LassoNameIdManagement *name_id_manage
* lasso_name_id_management_process_request_msg:
* @name_id_management: a #LassoNameIdManagement
* @request_msg: the Name Id Management request message
*
*
* Processes a Name Id Management request message. Rebuilds a request object
* from the message and check its signature.
*
@ -233,9 +233,9 @@ lasso_name_id_management_process_request_msg(LassoNameIdManagement *name_id_mana
g_return_val_if_fail(LASSO_IS_NAME_ID_MANAGEMENT(name_id_management),
LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
g_return_val_if_fail(request_msg != NULL,
g_return_val_if_fail(request_msg != NULL,
LASSO_PARAM_ERROR_INVALID_VALUE);
profile = LASSO_PROFILE(name_id_management);
profile->request = lasso_samlp2_manage_name_id_request_new();
format = lasso_node_init_from_message(LASSO_NODE(profile->request), request_msg);
@ -295,7 +295,7 @@ lasso_name_id_management_process_request_msg(LassoNameIdManagement *name_id_mana
/**
* lasso_name_id_management_validate_request:
* @name_id_management: a #LassoNameIdManagement
*
*
* Processes a Name Id Management request, performing requested actions against
* principal federations. Profile identity may have to be saved afterwards.
*
@ -320,7 +320,7 @@ lasso_name_id_management_validate_request(LassoNameIdManagement *name_id_managem
if (profile->identity == NULL) {
return critical_error(LASSO_PROFILE_ERROR_IDENTITY_NOT_FOUND);
}
if (profile->remote_providerID) {
g_free(profile->remote_providerID);
}
@ -367,7 +367,7 @@ lasso_name_id_management_validate_request(LassoNameIdManagement *name_id_managem
/* verify signature status */
if (profile->signature_status != 0) {
/* XXX: which SAML2 Status Code ? */
lasso_saml20_profile_set_response_status(profile,
lasso_saml20_profile_set_response_status(profile,
LASSO_LIB_STATUS_CODE_INVALID_SIGNATURE);
return profile->signature_status;
}
@ -424,9 +424,9 @@ lasso_name_id_management_validate_request(LassoNameIdManagement *name_id_managem
/**
* lasso_name_id_management_build_response_msg:
* @name_id_management: a #LassoNameIdManagement
*
*
* Builds the Name Id Management response message.
*
*
* Return value: 0 on success; or a negative value otherwise.
**/
int
@ -453,7 +453,7 @@ lasso_name_id_management_build_response_msg(LassoNameIdManagement *name_id_manag
response->IssueInstant = lasso_get_current_time();
response->InResponseTo = g_strdup(
LASSO_SAMLP2_REQUEST_ABSTRACT(profile->request)->ID);
lasso_saml20_profile_set_response_status(profile,
lasso_saml20_profile_set_response_status(profile,
LASSO_SAML2_STATUS_CODE_REQUEST_DENIED);
response->sign_method = LASSO_SIGNATURE_METHOD_RSA_SHA1;
@ -525,7 +525,7 @@ lasso_name_id_management_build_response_msg(LassoNameIdManagement *name_id_manag
* lasso_name_id_management_process_response_msg:
* @name_id_management: a #LassoNameIdManagement
* @response_msg: the response message
*
*
* Parses the response message and builds the corresponding response object.
* Performs requested actions against principal federations. Profile identity
* may have to be saved afterwards.
@ -691,7 +691,7 @@ dispose(GObject *object)
static void
finalize(GObject *object)
{
{
G_OBJECT_CLASS(parent_class)->finalize(object);
}
@ -727,7 +727,7 @@ lasso_name_id_management_get_type()
if (!this_type) {
static const GTypeInfo this_info = {
sizeof (LassoNameIdManagementClass),
NULL, NULL,
NULL, NULL,
(GClassInitFunc) class_init,
NULL, NULL,
sizeof(LassoNameIdManagement),
@ -744,7 +744,7 @@ lasso_name_id_management_get_type()
/**
* lasso_name_id_management_new:
* @server: the #LassoServer
*
*
* Creates a new #LassoNameIdManagement.
*
* Return value: a newly created #LassoNameIdManagement object; or NULL if an error
@ -766,7 +766,7 @@ lasso_name_id_management_new(LassoServer *server)
/**
* lasso_name_id_management_destroy:
* @name_id_management: a #LassoNameIdManagement
*
*
* Destroys a #LassoNameIdManagement object.
**/
void
@ -795,7 +795,7 @@ lasso_name_id_management_new_from_dump(LassoServer *server, const char *dump)
name_id_management = lasso_name_id_management_new(g_object_ref(server));
doc = xmlParseMemory(dump, strlen(dump));
init_from_xml(LASSO_NODE(name_id_management), xmlDocGetRootElement(doc));
init_from_xml(LASSO_NODE(name_id_management), xmlDocGetRootElement(doc));
xmlFreeDoc(doc);
return name_id_management;

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/id-ff/profile.h>
#include <lasso/xml/saml-2.0/samlp2_manage_name_id_request.h>
@ -45,7 +45,7 @@ extern "C" {
(G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_NAME_ID_MANAGEMENT))
#define LASSO_NAME_ID_MANAGEMENT_GET_CLASS(o) \
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_NAME_ID_MANAGEMENT, \
LassoNameIdManagementClass))
LassoNameIdManagementClass))
typedef struct _LassoNameIdManagement LassoNameIdManagement;
typedef struct _LassoNameIdManagementClass LassoNameIdManagementClass;

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -264,7 +264,7 @@ lasso_saml20_profile_build_artifact_response(LassoProfile *profile)
response->certificate_file = g_strdup(profile->server->certificate);
profile->response = LASSO_NODE(response);
if (resp == NULL) {
lasso_saml20_profile_set_response_status(profile,
LASSO_SAML2_STATUS_CODE_REQUESTER);
@ -294,7 +294,7 @@ lasso_saml20_profile_process_artifact_response(LassoProfile *profile, const char
profile->response = lasso_samlp2_response_new();
return LASSO_PROFILE_ERROR_MISSING_RESPONSE;
}
profile->response = g_object_ref(artifact_response->any);
lasso_node_destroy(response);

View File

@ -1,22 +1,22 @@
/* $Id$
/* $Id$
*
* Lasso - A free implementation of the Liberty Alliance specifications.
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -28,7 +28,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
LASSO_EXPORT gboolean lasso_profile_is_saml_query(const gchar *query);

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/id-ff/profile.h>

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -63,7 +63,7 @@ load_descriptor(xmlNode *xmlnode, GHashTable *descriptor, LassoProvider *provide
provider->private_data->signing_key_descriptor = xmlCopyNode(t, 1);
}
if (use && strcmp((char*)use, "encryption") == 0) {
provider->private_data->encryption_key_descriptor =
provider->private_data->encryption_key_descriptor =
xmlCopyNode(t, 1);
}
if (use) {
@ -215,7 +215,7 @@ lasso_saml20_provider_get_first_http_method(LassoProvider *provider,
LassoHttpMethod method_bindings[] = {
LASSO_HTTP_METHOD_SOAP, LASSO_HTTP_METHOD_REDIRECT, LASSO_HTTP_METHOD_POST
};
if (remote_provider->role == LASSO_PROVIDER_ROLE_SP)
provider->role = LASSO_PROVIDER_ROLE_IDP;
if (remote_provider->role == LASSO_PROVIDER_ROLE_IDP)
@ -379,7 +379,7 @@ gboolean
lasso_saml20_provider_accept_http_method(LassoProvider *provider, LassoProvider *remote_provider,
LassoMdProtocolType protocol_type, LassoHttpMethod http_method,
gboolean initiate_profile)
{
{
LassoProviderRole initiating_role;
char *protocol_profile;
char *http_methods[] = {

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#include <lasso/xml/xml.h>
#include <lasso/id-ff/provider.h>

View File

@ -4,19 +4,19 @@
*
* Copyright (C) 2004-2007 Entr'ouvert
* http://lasso.entrouvert.org
*
*
* Authors: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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 General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -27,7 +27,7 @@
#include <lasso/id-ff/providerprivate.h>
int
int
lasso_saml20_server_load_affiliation(LassoServer *server, xmlNode *node)
{
xmlNode *t;
@ -40,7 +40,7 @@ lasso_saml20_server_load_affiliation(LassoServer *server, xmlNode *node)
}
for (t = node->children; t; t = t->next) {
if (t->type == XML_ELEMENT_NODE &&
if (t->type == XML_ELEMENT_NODE &&
strcmp((char*)t->name, "AffiliationDescriptor") == 0) {
break;
}
@ -55,7 +55,7 @@ lasso_saml20_server_load_affiliation(LassoServer *server, xmlNode *node)
owner_id = (char*)xmlGetProp(t, (xmlChar*)"affiliationOwnerID");
for (t = t->children; t; t = t->next) {
if (t->type == XML_ELEMENT_NODE &&
if (t->type == XML_ELEMENT_NODE &&
strcmp((char*)t->name, "AffiliateMember") == 0) {
member_id = (char*)xmlNodeGetContent(t);
provider = lasso_server_get_provider(server, member_id);

Some files were not shown because too many files have changed in this diff Show More