fixed bug in certificate signature

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-OpenPGP@5283 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-07-09 20:20:36 +00:00
parent 0a6c60d2df
commit 54511ad390
3 changed files with 6 additions and 3 deletions

View File

@ -24,7 +24,7 @@ extern "C" {
#include "util/rsdir.h"
#include "util/pgpkey.h"
#define DEBUG_PGPHANDLER
//#define DEBUG_PGPHANDLER 1
PassphraseCallback PGPHandler::_passphrase_callback = NULL ;
@ -806,6 +806,9 @@ bool PGPHandler::VerifySignBin(const void *literal_data, uint32_t literal_data_l
#ifdef DEBUG_PGPHANDLER
std::cerr << "Verifying signature from fingerprint " << key_fingerprint.toStdString() << ", length " << std::dec << sign_len << ", literal data length = " << literal_data_length << std::endl;
std::cerr << "Signature body: " << std::endl;
hexdump( sign,sign_len) ;
std::cerr << std::endl;
#endif
return ops_validate_detached_signature(literal_data,literal_data_length,sign,sign_len,key) ;

View File

@ -54,7 +54,6 @@
/****
* #define AUTHSSL_DEBUG 1
***/
#define AUTHSSL_DEBUG 1
// initialisation du pointeur de singleton
static AuthSSL *instance_ssl = NULL;

View File

@ -1327,7 +1327,8 @@ ops_memory_t* ops_sign_buf(const void* input, const size_t input_len,
fprintf(stderr, "** Writing out one pass sig\n");
// write one_pass_sig
ops_write_one_pass_sig(skey, hash_alg, sig_type, cinfo);
if(include_data)
ops_write_one_pass_sig(skey, hash_alg, sig_type, cinfo);
// hash file contents
hash=ops_signature_get_hash(sig);