fix warnings

This commit is contained in:
Benjamin Dauvergne 2018-04-06 10:45:36 +02:00
parent 1d56cd1e31
commit c1bd8ca117
5 changed files with 21 additions and 21 deletions

View File

@ -360,7 +360,7 @@ lasso_lecp_process_authn_response_envelope_msg(LassoLecp *lecp, const char *resp
return critical_error(LASSO_PROFILE_ERROR_INVALID_MSG);
}
profile->response = g_object_ref(lecp->authnResponseEnvelope->AuthnResponse);
profile->response = LASSO_NODE(g_object_ref(lecp->authnResponseEnvelope->AuthnResponse));
if (profile->response == NULL) {
return LASSO_PROFILE_ERROR_MISSING_RESPONSE;
}

View File

@ -439,7 +439,7 @@ lasso_login_build_assertion(LassoLogin *login,
ss = LASSO_SAML_SUBJECT_STATEMENT_ABSTRACT(assertion->AuthenticationStatement);
ss->Subject = LASSO_SAML_SUBJECT(lasso_saml_subject_new());
ss->Subject->NameIdentifier = g_object_ref(profile->nameIdentifier);
ss->Subject->NameIdentifier = LASSO_SAML_NAME_IDENTIFIER(g_object_ref(profile->nameIdentifier));
ss->Subject->SubjectConfirmation = lasso_saml_subject_confirmation_new();
/* liberty-architecture-bindings-profiles-v1.1.pdf, page 24, line 729 */
lasso_list_add_string(ss->Subject->SubjectConfirmation->ConfirmationMethod,
@ -829,10 +829,10 @@ lasso_login_accept_sso(LassoLogin *login)
if (ni->Format && strcmp(ni->Format, LASSO_LIB_NAME_IDENTIFIER_FORMAT_FEDERATED) == 0) {
federation = lasso_federation_new(LASSO_PROFILE(login)->remote_providerID);
if (ni != NULL && idp_ni != NULL) {
federation->local_nameIdentifier = g_object_ref(ni);
federation->remote_nameIdentifier = g_object_ref(idp_ni);
federation->local_nameIdentifier = LASSO_NODE(g_object_ref(ni));
federation->remote_nameIdentifier = LASSO_NODE(g_object_ref(idp_ni));
} else {
federation->remote_nameIdentifier = g_object_ref(ni);
federation->remote_nameIdentifier = LASSO_NODE(g_object_ref(ni));
}
/* add federation in identity */
lasso_identity_add_federation(LASSO_PROFILE(login)->identity, federation);
@ -1020,7 +1020,7 @@ lasso_login_build_artifact_msg(LassoLogin *login, LassoHttpMethod http_method)
profile->session = lasso_session_new();
lasso_session_add_status(profile->session, profile->remote_providerID,
g_object_ref(LASSO_SAMLP_RESPONSE(profile->response)->Status));
LASSO_NODE(g_object_ref(LASSO_SAMLP_RESPONSE(profile->response)->Status)));
} else {
lasso_session_remove_status(profile->session, profile->remote_providerID);
}

View File

@ -326,8 +326,8 @@ lasso_name_identifier_mapping_process_request_msg(LassoNameIdentifierMapping *ma
profile->http_request_method = LASSO_HTTP_METHOD_SOAP;
profile->nameIdentifier = g_object_ref(LASSO_LIB_NAME_IDENTIFIER_MAPPING_REQUEST(
profile->request)->NameIdentifier);
profile->nameIdentifier = LASSO_NODE(g_object_ref(LASSO_LIB_NAME_IDENTIFIER_MAPPING_REQUEST(
profile->request)->NameIdentifier));
return profile->signature_status;
}

View File

@ -279,18 +279,18 @@ lasso_name_registration_init_request(LassoNameRegistration *name_registration,
spNameIdentifier->NameQualifier = g_strdup(profile->remote_providerID);
spNameIdentifier->Format = g_strdup(LASSO_LIB_NAME_IDENTIFIER_FORMAT_FEDERATED);
idpNameIdentifier = g_object_ref(federation->remote_nameIdentifier);
idpNameIdentifier = LASSO_SAML_NAME_IDENTIFIER(g_object_ref(federation->remote_nameIdentifier));
if (federation->local_nameIdentifier) {
/* old name identifier is from SP,
* name_registration->oldNameIdentifier must be from SP */
oldNameIdentifier = g_object_ref(federation->local_nameIdentifier);
oldNameIdentifier = LASSO_SAML_NAME_IDENTIFIER(g_object_ref(federation->local_nameIdentifier));
} else {
/* oldNameIdentifier is none, no local name identifier at SP, old is IDP */
oldNameIdentifier = g_object_ref(idpNameIdentifier);
oldNameIdentifier = LASSO_SAML_NAME_IDENTIFIER(g_object_ref(idpNameIdentifier));
}
profile->nameIdentifier = g_object_ref(spNameIdentifier);
profile->nameIdentifier = LASSO_NODE(g_object_ref(spNameIdentifier));
name_registration->oldNameIdentifier = g_object_ref(oldNameIdentifier);
} else { /* if (remote_provider->role == LASSO_PROVIDER_ROLE_SP) { */
/* Initiating it, from an IdP */
@ -298,11 +298,11 @@ lasso_name_registration_init_request(LassoNameRegistration *name_registration,
return LASSO_PROFILE_ERROR_NAME_IDENTIFIER_NOT_FOUND;
}
oldNameIdentifier = g_object_ref(federation->local_nameIdentifier);
oldNameIdentifier = LASSO_SAML_NAME_IDENTIFIER(g_object_ref(federation->local_nameIdentifier));
spNameIdentifier = NULL;
if (federation->remote_nameIdentifier) {
spNameIdentifier = g_object_ref(federation->remote_nameIdentifier);
spNameIdentifier = LASSO_SAML_NAME_IDENTIFIER(g_object_ref(federation->remote_nameIdentifier));
}
idpNameIdentifier = lasso_saml_name_identifier_new();
@ -310,7 +310,7 @@ lasso_name_registration_init_request(LassoNameRegistration *name_registration,
idpNameIdentifier->NameQualifier = g_strdup(profile->remote_providerID);
idpNameIdentifier->Format = g_strdup(LASSO_LIB_NAME_IDENTIFIER_FORMAT_FEDERATED);
profile->nameIdentifier = g_object_ref(idpNameIdentifier);
profile->nameIdentifier = LASSO_NODE(g_object_ref(idpNameIdentifier));
name_registration->oldNameIdentifier = g_object_ref(oldNameIdentifier);
}
@ -413,15 +413,15 @@ gint lasso_name_registration_process_request_msg(LassoNameRegistration *name_reg
if (remote_provider->role == LASSO_PROVIDER_ROLE_IDP) {
/* IdP initiated */
if (request->SPProvidedNameIdentifier) {
profile->nameIdentifier = g_object_ref(request->SPProvidedNameIdentifier);
profile->nameIdentifier = LASSO_NODE(g_object_ref(request->SPProvidedNameIdentifier));
} else {
profile->nameIdentifier = g_object_ref(request->IDPProvidedNameIdentifier);
profile->nameIdentifier = LASSO_NODE(g_object_ref(request->IDPProvidedNameIdentifier));
name_registration->oldNameIdentifier = g_object_ref(
request->OldProvidedNameIdentifier);
}
} else if (remote_provider->role == LASSO_PROVIDER_ROLE_SP) {
/* SP initiated, profile->name */
profile->nameIdentifier = g_object_ref(request->IDPProvidedNameIdentifier);
profile->nameIdentifier = LASSO_NODE(g_object_ref(request->IDPProvidedNameIdentifier));
}
return profile->signature_status;
@ -519,7 +519,7 @@ lasso_name_registration_process_response_msg(LassoNameRegistration *name_registr
if (federation->local_nameIdentifier)
lasso_node_destroy(LASSO_NODE(federation->local_nameIdentifier));
federation->local_nameIdentifier = g_object_ref(nameIdentifier);
federation->local_nameIdentifier = LASSO_NODE(g_object_ref(nameIdentifier));
profile->identity->is_dirty = TRUE;
/* set the relay state */
@ -621,7 +621,7 @@ lasso_name_registration_validate_request(LassoNameRegistration *name_registratio
if (federation->remote_nameIdentifier)
lasso_node_destroy(LASSO_NODE(federation->remote_nameIdentifier));
federation->remote_nameIdentifier = g_object_ref(providedNameIdentifier);
federation->remote_nameIdentifier = LASSO_NODE(g_object_ref(providedNameIdentifier));
profile->identity->is_dirty = TRUE;
return 0;

View File

@ -386,7 +386,7 @@ lasso_name_id_management_process_response_msg(
if (federation->local_nameIdentifier)
lasso_node_destroy(LASSO_NODE(federation->local_nameIdentifier));
federation->local_nameIdentifier = g_object_ref(new_name_id);
federation->local_nameIdentifier = LASSO_NODE(g_object_ref(new_name_id));
profile->identity->is_dirty = TRUE;
}