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)