From 41cb5b7d344d14d8c6b53fdb10c15b7e81acdbb8 Mon Sep 17 00:00:00 2001 From: csoler Date: Mon, 17 Sep 2012 20:09:38 +0000 Subject: [PATCH] removed some debugging output git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5560 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/util/rsdir.cc | 4 ++++ openpgpsdk/src/openpgpsdk/openssl_crypto.c | 8 +++++++- openpgpsdk/src/openpgpsdk/validate.c | 3 ++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/util/rsdir.cc b/libretroshare/src/util/rsdir.cc index 47251f704..85fd5bc4e 100644 --- a/libretroshare/src/util/rsdir.cc +++ b/libretroshare/src/util/rsdir.cc @@ -957,12 +957,16 @@ RsStackFileLock::RsStackFileLock(const std::string& file_path) sleep(1) ; #endif } +#ifdef RSDIR_DEBUG std::cerr << "Acquired file handle " << _file_handle << ", lock file:" << file_path << std::endl; +#endif } RsStackFileLock::~RsStackFileLock() { RsDirUtil::releaseLockFile(_file_handle) ; +#ifdef RSDIR_DEBUG std::cerr << "Released file lock with handle " << _file_handle << std::endl; +#endif } #if 0 // NOT ENABLED YET! diff --git a/openpgpsdk/src/openpgpsdk/openssl_crypto.c b/openpgpsdk/src/openpgpsdk/openssl_crypto.c index 5cc8d33af..0edf6ac1e 100644 --- a/openpgpsdk/src/openpgpsdk/openssl_crypto.c +++ b/openpgpsdk/src/openpgpsdk/openssl_crypto.c @@ -381,6 +381,8 @@ void ops_hash_sha224(ops_hash_t *hash) *hash=sha224; } +ops_boolean_t already_said = ops_false ; + ops_boolean_t ops_dsa_verify(const unsigned char *hash,size_t hash_length, const ops_dsa_signature_t *sig, const ops_dsa_public_key_t *dsa) @@ -395,7 +397,11 @@ ops_boolean_t ops_dsa_verify(const unsigned char *hash,size_t hash_length, if(BN_num_bits(dsa->q) != 160) { - fprintf(stderr,"(WW) ops_dsa_verify: openssl does only supports 'q' of 160 bits. Current is %d bits.\n",BN_num_bits(dsa->q)) ; + if(!already_said) + { + fprintf(stderr,"(WW) ops_dsa_verify: openssl does only supports 'q' of 160 bits. Current is %d bits.\n",BN_num_bits(dsa->q)) ; + already_said=ops_true ; + } osig->r=osig->s=NULL; DSA_SIG_free(osig); return ops_false ; diff --git a/openpgpsdk/src/openpgpsdk/validate.c b/openpgpsdk/src/openpgpsdk/validate.c index ad01e8100..9c3990636 100644 --- a/openpgpsdk/src/openpgpsdk/validate.c +++ b/openpgpsdk/src/openpgpsdk/validate.c @@ -806,7 +806,8 @@ ops_boolean_t ops_validate_detached_signature(const void *literal_data, unsigned ops_parse(pinfo); - printf("valid=%d, invalid=%d, unknown=%d\n", result->valid_count, result->invalid_count, result->unknown_signer_count); + if(debug) + printf("valid=%d, invalid=%d, unknown=%d\n", result->valid_count, result->invalid_count, result->unknown_signer_count); // Tidy up //if (armoured)