[core] add support for thin-sessions environment flag, to reduce size of LassoSession dumps
This commit is contained in:
parent
b6466549f6
commit
7498143628
|
@ -37,6 +37,7 @@ LASSO_EXPORT extern gboolean lasso_flag_memory_debug;
|
||||||
LASSO_EXPORT extern gboolean lasso_flag_strict_checking;
|
LASSO_EXPORT extern gboolean lasso_flag_strict_checking;
|
||||||
LASSO_EXPORT extern gboolean lasso_flag_add_signature;
|
LASSO_EXPORT extern gboolean lasso_flag_add_signature;
|
||||||
LASSO_EXPORT extern gboolean lasso_flag_sign_messages;
|
LASSO_EXPORT extern gboolean lasso_flag_sign_messages;
|
||||||
|
LASSO_EXPORT extern gboolean lasso_flag_thin_sessions;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -195,6 +195,9 @@ lasso_session_add_assertion_simple(LassoSession *session, const char *providerID
|
||||||
g_return_val_if_fail(providerID != NULL, LASSO_PARAM_ERROR_INVALID_VALUE);
|
g_return_val_if_fail(providerID != NULL, LASSO_PARAM_ERROR_INVALID_VALUE);
|
||||||
g_return_val_if_fail(assertion != NULL, LASSO_PARAM_ERROR_INVALID_VALUE);
|
g_return_val_if_fail(assertion != NULL, LASSO_PARAM_ERROR_INVALID_VALUE);
|
||||||
|
|
||||||
|
if (lasso_flag_thin_sessions) { /* do not store the full assertion */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
g_hash_table_insert(session->assertions, g_strdup(providerID),
|
g_hash_table_insert(session->assertions, g_strdup(providerID),
|
||||||
g_object_ref(assertion));
|
g_object_ref(assertion));
|
||||||
|
|
||||||
|
|
|
@ -95,6 +95,8 @@ gboolean lasso_flag_add_signature = TRUE;
|
||||||
static void lasso_flag_parse_environment_variable();
|
static void lasso_flag_parse_environment_variable();
|
||||||
/* do not sign messages */
|
/* do not sign messages */
|
||||||
gboolean lasso_flag_sign_messages = TRUE;
|
gboolean lasso_flag_sign_messages = TRUE;
|
||||||
|
/* thin sessions */
|
||||||
|
gboolean lasso_flag_thin_sessions = FALSE;
|
||||||
|
|
||||||
#ifndef LASSO_FLAG_ENV_VAR
|
#ifndef LASSO_FLAG_ENV_VAR
|
||||||
#define LASSO_FLAG_ENV_VAR "LASSO_FLAG"
|
#define LASSO_FLAG_ENV_VAR "LASSO_FLAG"
|
||||||
|
@ -317,6 +319,9 @@ void lasso_set_flag(char *flag) {
|
||||||
lasso_flag_sign_messages = value;
|
lasso_flag_sign_messages = value;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (lasso_strisequal(flag,"thin-sessions")) {
|
||||||
|
lasso_flag_thin_sessions = value;
|
||||||
|
}
|
||||||
} while (FALSE);
|
} while (FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue