forked from Uninett/mod_auth_mellon
-
Notifications
You must be signed in to change notification settings - Fork 49
/
lasso_compat.h
62 lines (47 loc) · 2.13 KB
/
lasso_compat.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifdef HAVE_LASSO_UTILS_H
#include <lasso/utils.h>
#else
#define lasso_assign_string(dest,src) \
{ \
char *__tmp = g_strdup(src); \
lasso_release_string(dest); \
dest = __tmp; \
}
#define lasso_release_string(dest) \
lasso_release_full(dest, g_free)
#define lasso_release_full(dest, free_function) \
{ \
if (dest) { \
free_function(dest); dest = NULL; \
} \
}
#define lasso_check_type_equality(a,b)
#define lasso_release_full2(dest, free_function, type) \
{ \
lasso_check_type_equality(dest, type); \
if (dest) { \
free_function(dest); dest = NULL; \
} \
}
#define lasso_release_list(dest) \
lasso_release_full2(dest, g_list_free, GList*)
#define lasso_release_list_of_full(dest, free_function) \
{ \
GList **__tmp = &(dest); \
if (*__tmp) { \
g_list_foreach(*__tmp, (GFunc)free_function, NULL); \
lasso_release_list(*__tmp); \
} \
}
#define lasso_release_list_of_strings(dest) \
lasso_release_list_of_full(dest, g_free)
#endif
#ifndef LASSO_SAML2_ECP_PROFILE_WANT_AUTHN_SIGNED
#define LASSO_SAML2_ECP_PROFILE_WANT_AUTHN_SIGNED "urn:oasis:names:tc:SAML:2.0:profiles:SSO:ecp:2.0:WantAuthnRequestsSigned"
#endif
#ifndef LASSO_SAML2_CONDITIONS_DELEGATION
#define LASSO_SAML2_CONDITIONS_DELEGATION "urn:oasis:names:tc:SAML:2.0:conditions:delegation"
#endif
#ifndef LASSO_SAML_EXT_CHANNEL_BINDING
#define LASSO_SAML_EXT_CHANNEL_BINDING "urn:oasis:names:tc:SAML:protocol:ext:channel-binding"
#endif