diff options
| author | Frederic Peters <fpeters@entrouvert.com> | 2004-07-25 17:31:43 +0000 |
|---|---|---|
| committer | Frederic Peters <fpeters@entrouvert.com> | 2004-07-25 17:31:43 +0000 |
| commit | 72fca15efd5e669b966a7ad87c5d30f769cd6a66 (patch) | |
| tree | fda60f185f45adf0301320f71f657414e604b736 | |
| parent | 64215114be290db2d55fd827a9089231f99c0383 (diff) | |
| download | lasso-72fca15efd5e669b966a7ad87c5d30f769cd6a66.tar.gz lasso-72fca15efd5e669b966a7ad87c5d30f769cd6a66.tar.xz lasso-72fca15efd5e669b966a7ad87c5d30f769cd6a66.zip | |
use message functions to show message (fix #217)
| -rw-r--r-- | lasso/id-ff/name_identifier_mapping.c | 4 | ||||
| -rw-r--r-- | lasso/id-ff/user.c | 2 | ||||
| -rw-r--r-- | lasso/lasso.c | 10 | ||||
| -rw-r--r-- | lasso/xml/tools.c | 22 |
4 files changed, 19 insertions, 19 deletions
diff --git a/lasso/id-ff/name_identifier_mapping.c b/lasso/id-ff/name_identifier_mapping.c index b4871f44..a5b9d132 100644 --- a/lasso/id-ff/name_identifier_mapping.c +++ b/lasso/id-ff/name_identifier_mapping.c @@ -156,13 +156,13 @@ lasso_name_identifier_mapping_init_request(LassoNameIdentifierMapping *mapping, /* get the name identifier (!!! depend on the provider type : SP or IDP !!!)*/ switch(profileContext->provider_type){ case lassoProviderTypeSp: - printf("service provider\n"); + debug("service provider\n"); nameIdentifier = LASSO_NODE(lasso_identity_get_local_nameIdentifier(identity)); if(!nameIdentifier) nameIdentifier = LASSO_NODE(lasso_identity_get_remote_nameIdentifier(identity)); break; case lassoProviderTypeIdp: - printf("identity provider\n"); + debug("identity provider\n"); /* get the next assertion ( next authenticated service provider ) */ nameIdentifier = LASSO_NODE(lasso_identity_get_remote_nameIdentifier(identity)); if(!nameIdentifier) diff --git a/lasso/id-ff/user.c b/lasso/id-ff/user.c index 823abe00..54b842d9 100644 --- a/lasso/id-ff/user.c +++ b/lasso/id-ff/user.c @@ -490,7 +490,7 @@ lasso_user_new_from_dump(gchar *dump) lasso_node_destroy(nameIdentifier_node); lasso_node_destroy(remote_nameIdentifier_node); } - printf("avant add identity\n"); + debug("avant add identity\n"); lasso_user_add_identity(user, remote_providerID, identity); g_free(remote_providerID); diff --git a/lasso/lasso.c b/lasso/lasso.c index 72b2f680..c330ff22 100644 --- a/lasso/lasso.c +++ b/lasso/lasso.c @@ -75,13 +75,13 @@ int lasso_init() /* Init xmlsec library */ if(xmlSecInit() < 0) { - fprintf(stderr, "Error: xmlsec initialization failed.\n"); + message(G_LOG_LEVEL_ERROR, "XMLSec initialization failed.\n"); return(-1); } /* Check loaded library version */ if(xmlSecCheckVersion() != 1) { - fprintf(stderr, "Error: loaded xmlsec library version is not compatible.\n"); + message(G_LOG_LEVEL_ERROR, "Loaded xmlsec library version is not compatible.\n"); return(-1); } @@ -92,7 +92,7 @@ int lasso_init() */ #ifdef XMLSEC_CRYPTO_DYNAMIC_LOADING if(xmlSecCryptoDLLoadLibrary(BAD_CAST XMLSEC_CRYPTO) < 0) { - fprintf(stderr, "Error: unable to load default xmlsec-crypto library. Make sure\n" + message(G_LOG_LEVEL_ERROR, "Unable to load default xmlsec-crypto library. Make sure\n" "that you have it installed and check shared libraries path\n" "(LD_LIBRARY_PATH) envornment variable.\n"); return(-1); @@ -101,13 +101,13 @@ int lasso_init() /* Init crypto library */ if(xmlSecCryptoAppInit(NULL) < 0) { - fprintf(stderr, "Error: crypto initialization failed.\n"); + message(G_LOG_LEVEL_ERROR, "Crypto initialization failed.\n"); return(-1); } /* Init xmlsec-crypto library */ if(xmlSecCryptoInit() < 0) { - fprintf(stderr, "Error: xmlsec-crypto initialization failed.\n"); + message(G_LOG_LEVEL_ERROR, "xmlsec-crypto initialization failed.\n"); return(-1); } return 0; diff --git a/lasso/xml/tools.c b/lasso/xml/tools.c index df7c0c7f..2215020a 100644 --- a/lasso/xml/tools.c +++ b/lasso/xml/tools.c @@ -312,7 +312,7 @@ lasso_query_verify_signature(const gchar *query, /* create signature context */ dsigCtx = xmlSecDSigCtxCreate(NULL); if(dsigCtx == NULL) { - fprintf(stderr,"Error: failed to create signature context\n"); + message(G_LOG_LEVEL_ERROR, "Failed to create signature context\n"); goto done; } @@ -321,14 +321,14 @@ lasso_query_verify_signature(const gchar *query, xmlSecKeyDataFormatPem, NULL, NULL, NULL); if(dsigCtx->signKey == NULL) { - fprintf(stderr,"Error: failed to load public pem key from \"%s\"\n", + message(G_LOG_LEVEL_ERROR, "Failed to load public pem key from \"%s\"\n", sender_public_key_file); goto done; } /* Verify signature */ if(xmlSecDSigCtxVerify(dsigCtx, sigNode) < 0) { - fprintf(stderr,"Error: signature verify\n"); + message(G_LOG_LEVEL_ERROR, "Signature verify failed\n"); ret = 0; goto done; } @@ -436,7 +436,7 @@ lasso_str_sign(xmlChar *str, } if (signNode == NULL) { - fprintf(stderr, "Error: failed to create signature template\n"); + message(G_LOG_LEVEL_ERROR, "Failed to create signature template\n"); goto done; } @@ -447,14 +447,14 @@ lasso_str_sign(xmlChar *str, refNode = xmlSecTmplSignatureAddReference(signNode, xmlSecTransformSha1Id, NULL, NULL, NULL); if (refNode == NULL) { - fprintf(stderr, "Error: failed to add reference to signature template\n"); + message(G_LOG_LEVEL_ERROR, "Failed to add reference to signature template\n"); goto done; } /* add enveloped transform */ if (xmlSecTmplReferenceAddTransform(refNode, xmlSecTransformEnvelopedId) == NULL) { - fprintf(stderr, "Error: failed to add enveloped transform to reference\n"); + message(G_LOG_LEVEL_ERROR, "Failed to add enveloped transform to reference\n"); goto done; } @@ -462,19 +462,19 @@ lasso_str_sign(xmlChar *str, signed document */ keyInfoNode = xmlSecTmplSignatureEnsureKeyInfo(signNode, NULL); if (keyInfoNode == NULL) { - fprintf(stderr, "Error: failed to add key info\n"); + message(G_LOG_LEVEL_ERROR, "Failed to add key info\n"); goto done; } if (xmlSecTmplKeyInfoAddKeyName(keyInfoNode, NULL) == NULL) { - fprintf(stderr, "Error: failed to add key name\n"); + message(G_LOG_LEVEL_ERROR, "Failed to add key name\n"); goto done; } /* create signature context */ dsigCtx = xmlSecDSigCtxCreate(NULL); if (dsigCtx == NULL) { - fprintf(stderr,"Error: failed to create signature context\n"); + message(G_LOG_LEVEL_ERROR,"Failed to create signature context\n"); goto done; } @@ -483,14 +483,14 @@ lasso_str_sign(xmlChar *str, xmlSecKeyDataFormatPem, NULL, NULL, NULL); if (dsigCtx->signKey == NULL) { - fprintf(stderr,"Error: failed to load private pem key from \"%s\"\n", + message(G_LOG_LEVEL_ERROR,"Failed to load private pem key from \"%s\"\n", private_key_file); goto done; } /* sign the template */ if (xmlSecDSigCtxSign(dsigCtx, signNode) < 0) { - fprintf(stderr,"Error: signature failed\n"); + message(G_LOG_LEVEL_ERROR,"Signature failed\n"); goto done; } |
