diff options
-rw-r--r-- | lasso/id-wsf-2.0/discovery.c | 2 | ||||
-rw-r--r-- | lasso/id-wsf-2.0/idwsf2_helper.c | 4 | ||||
-rw-r--r-- | lasso/id-wsf-2.0/profile.c | 8 | ||||
-rw-r--r-- | lasso/id-wsf-2.0/saml2_login.c | 2 | ||||
-rw-r--r-- | lasso/saml-2.0/login.c | 2 | ||||
-rw-r--r-- | lasso/saml-2.0/saml2_helper.c | 6 | ||||
-rw-r--r-- | lasso/utils.h | 10 | ||||
-rw-r--r-- | lasso/xml/tools.c | 14 |
8 files changed, 24 insertions, 24 deletions
diff --git a/lasso/id-wsf-2.0/discovery.c b/lasso/id-wsf-2.0/discovery.c index ed6b7f84..4b9eb0c1 100644 --- a/lasso/id-wsf-2.0/discovery.c +++ b/lasso/id-wsf-2.0/discovery.c @@ -572,7 +572,7 @@ lasso_idwsf2_discovery_build_request_msg(LassoIdWsf2Discovery *discovery, lasso_foreach(i, discovery->private_data->metadatas) { LassoIdWsf2DiscoSvcMetadata *metadata = (LassoIdWsf2DiscoSvcMetadata *)i->data; if (lasso_is_empty_string(metadata->svcMDID)) { - g_warning("disco:MetadataReplace method called with " \ + message(G_LOG_LEVEL_WARNING, "disco:MetadataReplace method called with " \ "non registered metadatas " \ "(svcMDID attribute is missing)"); } else { diff --git a/lasso/id-wsf-2.0/idwsf2_helper.c b/lasso/id-wsf-2.0/idwsf2_helper.c index 33326c75..e7b4a2a0 100644 --- a/lasso/id-wsf-2.0/idwsf2_helper.c +++ b/lasso/id-wsf-2.0/idwsf2_helper.c @@ -133,7 +133,7 @@ lasso_wsa_endpoint_reference_get_idwsf2_security_context_for_security_mechanism( lasso_list_add_new_gobject (epr->Metadata->any, created); } if (create && ! security_mech_id) { - g_warning ("cannot create a LassoIdWsf2DiscoSecurityContext withou a security_mech_id"); + message(G_LOG_LEVEL_WARNING, "cannot create a LassoIdWsf2DiscoSecurityContext withou a security_mech_id"); } return created; @@ -168,7 +168,7 @@ lasso_wsa_endpoint_reference_get_token_by_usage( if (LASSO_IS_NODE(token->any)) { return (LassoNode*)token->any; } else if (token->ref) { - g_warning ("sec:Token ref attribute is not supported"); + message(G_LOG_LEVEL_WARNING, "sec:Token ref attribute is not supported"); return NULL; } } diff --git a/lasso/id-wsf-2.0/profile.c b/lasso/id-wsf-2.0/profile.c index de51b3c3..d1c96436 100644 --- a/lasso/id-wsf-2.0/profile.c +++ b/lasso/id-wsf-2.0/profile.c @@ -290,15 +290,15 @@ lasso_idwsf2_profile_build_request_msg(LassoIdWsf2Profile *profile, const char * lasso_release_gobject(misc); } } else { - g_warning ("No security mechanism specified, " \ + message(G_LOG_LEVEL_WARNING, "No security mechanism specified, " \ "failed to find security token for Bearer mechanism"); } if (lasso_wsa_endpoint_reference_get_target_identity_token(epr, lasso_security_mech_id_is_bearer_authentication, NULL) != NULL) { - g_critical("TargetIdentity token are not supported"); + message(G_LOG_LEVEL_CRITICAL, "TargetIdentity token are not supported"); } } else { - g_critical("Only Bearer security mechanism is supported by ID-WSF 2.0 module of Lasso"); + message(G_LOG_LEVEL_CRITICAL, "Only Bearer security mechanism is supported by ID-WSF 2.0 module of Lasso"); } } @@ -782,7 +782,7 @@ lasso_idwsf2_profile_get_name_identifier(LassoIdWsf2Profile *idwsf2_profile) } if (lasso_saml20_profile_process_name_identifier_decryption(&idwsf2_profile->parent, &nameID, &encryptedID) != 0) { - g_warning("process_name_identifier_decryption failed "\ + message(G_LOG_LEVEL_WARNING, "process_name_identifier_decryption failed "\ "when retrieving name identifier for ID-WSF profile"); } } diff --git a/lasso/id-wsf-2.0/saml2_login.c b/lasso/id-wsf-2.0/saml2_login.c index eda6adaf..49e81287 100644 --- a/lasso/id-wsf-2.0/saml2_login.c +++ b/lasso/id-wsf-2.0/saml2_login.c @@ -157,7 +157,7 @@ lasso_login_idwsf2_add_discovery_bootstrap_epr(LassoLogin *login, const char *ur LASSO_PROFILE_ERROR_MISSING_SERVER); /* Warn if the assertion is not a fresh one, we should not modify received assertion */ if (lasso_node_get_original_xmlnode((LassoNode*)assertion) != NULL) { - g_warning("%s should only be called after lasso_login_build_assertion", __func__); + message(G_LOG_LEVEL_WARNING, "%s should only be called after lasso_login_build_assertion", __func__); } diff --git a/lasso/saml-2.0/login.c b/lasso/saml-2.0/login.c index b876eeb7..7b80ffc3 100644 --- a/lasso/saml-2.0/login.c +++ b/lasso/saml-2.0/login.c @@ -1417,7 +1417,7 @@ lasso_saml20_login_build_authn_response_msg(LassoLogin *login) http_method = LASSO_HTTP_METHOD_REDIRECT; break; default: - g_critical("Cannot happen"); + message(G_LOG_LEVEL_CRITICAL, "Cannot happen"); break; } lasso_check_good_rc(lasso_saml20_profile_build_response_msg(profile, NULL, http_method, url)); diff --git a/lasso/saml-2.0/saml2_helper.c b/lasso/saml-2.0/saml2_helper.c index ae2cda33..c691b7e8 100644 --- a/lasso/saml-2.0/saml2_helper.c +++ b/lasso/saml-2.0/saml2_helper.c @@ -218,7 +218,7 @@ lasso_saml2_assertion_set_subject_name_id(LassoSaml2Assertion *saml2_assertion, } else if (LASSO_IS_SAML2_ENCRYPTED_ELEMENT(node)) { lasso_assign_gobject(saml2_subject->EncryptedID, node) } else { - g_warning("Cannot set subject name id, since node is neither an EncryptedElement or a NameID"); + message(G_LOG_LEVEL_WARNING, "Cannot set subject name id, since node is neither an EncryptedElement or a NameID"); } } @@ -243,7 +243,7 @@ lasso_saml2_assertion_set_subject_confirmation_name_id(LassoSaml2Assertion *saml } else if (LASSO_IS_SAML2_ENCRYPTED_ELEMENT(node)) { lasso_assign_gobject(saml2_subject_confirmation->EncryptedID, node) } else { - g_warning("Cannot set subject name id, since node is neither an EncryptedElement or a NameID"); + message(G_LOG_LEVEL_WARNING, "Cannot set subject name id, since node is neither an EncryptedElement or a NameID"); } } @@ -386,7 +386,7 @@ lasso_saml2_assertion_add_proxy_limit (LassoSaml2Assertion *saml2_assertion, int if (proxy_audiences) { lasso_assign_string (saml2_proxy_restriction->Audience, proxy_audiences->data); if (proxy_audiences->next) { - g_warning ("Trying to set multiple proxy_audience restriction is not possible with currrent version of Lasso"); + message(G_LOG_LEVEL_WARNING, "Trying to set multiple proxy_audience restriction is not possible with currrent version of Lasso"); } } } diff --git a/lasso/utils.h b/lasso/utils.h index 515625c7..0d7a737e 100644 --- a/lasso/utils.h +++ b/lasso/utils.h @@ -109,7 +109,7 @@ if (G_IS_OBJECT(dest) || dest == NULL) { \ lasso_release_full(dest, g_object_unref); \ } else { \ - g_critical("Trying to unref a non GObject pointer file=%s:%u pointerbybname=%s pointer=%p", __FILE__, __LINE__, #dest, dest); \ + message(G_LOG_LEVEL_CRITICAL, "Trying to unref a non GObject pointer file=%s:%u pointerbybname=%s pointer=%p", __FILE__, __LINE__, #dest, dest); \ } \ } @@ -333,7 +333,7 @@ if (__tmp_non_null_src != NULL) { \ dest = g_list_append(dest, __tmp_non_null_src); \ } else { \ - g_critical("Adding a NULL value to a non-NULL content list: dest=%s src=%s", #dest, #src); \ + message(G_LOG_LEVEL_CRITICAL, "Adding a NULL value to a non-NULL content list: dest=%s src=%s", #dest, #src); \ } \ } @@ -360,7 +360,7 @@ if (G_IS_OBJECT(__tmp_src)) { \ dest = g_list_append(dest, g_object_ref(__tmp_src)); \ } else { \ - g_critical("Trying to add to a GList* a non GObject pointer dest=%s src=%s", #dest, #src); \ + message(G_LOG_LEVEL_CRITICAL, "Trying to add to a GList* a non GObject pointer dest=%s src=%s", #dest, #src); \ } \ } @@ -370,7 +370,7 @@ if (G_IS_OBJECT(__tmp_src)) { \ dest = g_list_append(dest, __tmp_src); \ } else { \ - g_critical("Trying to add to a GList* a non GObject pointer dest=%s src=%s", #dest, #src); \ + message(G_LOG_LEVEL_CRITICAL, "Trying to add to a GList* a non GObject pointer dest=%s src=%s", #dest, #src); \ } \ } @@ -534,7 +534,7 @@ lasso_is_empty_string(const char *str) { #define goto_cleanup_if_fail_with_rc_with_warning(condition, rc_value) \ {\ if (! (condition) ) {\ - g_warning("%s failed, returning %s", #condition, #rc_value);\ + message(G_LOG_LEVEL_WARNING, "%s failed, returning %s", #condition, #rc_value);\ rc = (rc_value); \ goto cleanup; \ } \ diff --git a/lasso/xml/tools.c b/lasso/xml/tools.c index e2898e96..8c373507 100644 --- a/lasso/xml/tools.c +++ b/lasso/xml/tools.c @@ -254,7 +254,7 @@ xmlSecKeyPtr lasso_get_public_key_from_pem_file(const char *file) { file_type = lasso_get_pem_file_type(file); switch (file_type) { case LASSO_PEM_FILE_TYPE_UNKNOWN: - message(G_LOG_LEVEL_WARNING, "PEM file type unknown: %s", file); + message(G_LOG_LEVEL_CRITICAL, "PEM file type unknown: %s", file); break; /* with a warning ? */ case LASSO_PEM_FILE_TYPE_CERT: pub_key = lasso_get_public_key_from_pem_cert_file(file); @@ -358,7 +358,7 @@ lasso_load_certs_from_pem_certs_chain_file(const char* pem_certs_chain_file) goto_cleanup_if_fail (pem_certs_chain_file && strlen(pem_certs_chain_file) != 0); gioc = g_io_channel_new_file(pem_certs_chain_file, "r", NULL); if (! gioc) { - message(G_LOG_LEVEL_WARNING, "Cannot open chain file %s", pem_certs_chain_file); + message(G_LOG_LEVEL_CRITICAL, "Cannot open chain file %s", pem_certs_chain_file); goto cleanup; } @@ -746,7 +746,7 @@ lasso_saml2_query_verify_signature(const char *query, const xmlSecKey *sender_pu #undef value if (! saml_request_response) { - message(G_LOG_LEVEL_WARNING, "SAMLRequest or SAMLResponse missing in query"); + message(G_LOG_LEVEL_CRITICAL, "SAMLRequest or SAMLResponse missing in query"); ret = LASSO_PROFILE_ERROR_INVALID_QUERY; goto done; } @@ -1219,7 +1219,7 @@ lasso_saml_constrain_dsigctxt(xmlSecDSigCtxPtr dsigCtx) { (xmlSecDSigCtxEnableSignatureTransform(dsigCtx, xmlSecTransformSha1Id) < 0) || (xmlSecDSigCtxEnableSignatureTransform(dsigCtx, xmlSecTransformRsaSha1Id) < 0)) { - g_warning("Error: failed to limit allowed signature transforms"); + message(G_LOG_LEVEL_CRITICAL, "Error: failed to limit allowed signature transforms"); return FALSE; } if((xmlSecDSigCtxEnableReferenceTransform(dsigCtx, xmlSecTransformInclC14NId) < 0) || @@ -1227,7 +1227,7 @@ lasso_saml_constrain_dsigctxt(xmlSecDSigCtxPtr dsigCtx) { (xmlSecDSigCtxEnableReferenceTransform(dsigCtx, xmlSecTransformSha1Id) < 0) || (xmlSecDSigCtxEnableReferenceTransform(dsigCtx, xmlSecTransformEnvelopedId) < 0)) { - g_warning("Error: failed to limit allowed reference transforms"); + message(G_LOG_LEVEL_CRITICAL, "Error: failed to limit allowed reference transforms"); return FALSE; } @@ -1235,7 +1235,7 @@ lasso_saml_constrain_dsigctxt(xmlSecDSigCtxPtr dsigCtx) { if((xmlSecPtrListAdd(&(dsigCtx->keyInfoReadCtx.enabledKeyData), BAD_CAST xmlSecKeyDataX509Id) < 0) || (xmlSecPtrListAdd(&(dsigCtx->keyInfoReadCtx.enabledKeyData), BAD_CAST xmlSecKeyDataRsaId) < 0) || (xmlSecPtrListAdd(&(dsigCtx->keyInfoReadCtx.enabledKeyData), BAD_CAST xmlSecKeyDataDsaId) < 0)) { - g_warning("Error: failed to limit allowed key data"); + message(G_LOG_LEVEL_CRITICAL, "Error: failed to limit allowed key data"); return FALSE; } return TRUE; @@ -1341,7 +1341,7 @@ lasso_verify_signature(xmlNode *signed_node, xmlDoc *doc, const char *id_attr_na dsig_reference_ctx = (xmlSecDSigReferenceCtx*)xmlSecPtrListGetItem(&(dsigCtx->signedInfoReferences), i); if (dsig_reference_ctx->uri == NULL) { - g_warning("dsig_reference_ctx->uri cannot be null"); + message(G_LOG_LEVEL_CRITICAL, "dsig_reference_ctx->uri cannot be null"); continue; } lasso_list_add_xml_string(*uri_references, dsig_reference_ctx->uri); |