mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-07 13:52:43 -04:00
added new individual config saving system
global signature file format will be converted git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3514 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
831c73dd9d
commit
52e0d2a095
9 changed files with 830 additions and 24 deletions
|
@ -1039,13 +1039,19 @@ bool AuthSSLimpl::decrypt(void *&out, int &outlen, const void *in, int inlen)
|
|||
int in_offset = 0, out_currOffset = 0;
|
||||
int size_net_ekl = sizeof(net_ekl);
|
||||
|
||||
if(size_net_ekl > inlen) return false;
|
||||
|
||||
memcpy(&net_ekl, (unsigned char*)in, size_net_ekl);
|
||||
eklen = ntohl(net_ekl);
|
||||
in_offset += size_net_ekl;
|
||||
|
||||
if(eklen > (inlen-in_offset)) return false;
|
||||
|
||||
memcpy(ek, (unsigned char*)in + in_offset, eklen);
|
||||
in_offset += eklen;
|
||||
|
||||
if(EVP_MAX_IV_LENGTH > (inlen-in_offset)) return false;
|
||||
|
||||
memcpy(iv, (unsigned char*)in + in_offset, EVP_MAX_IV_LENGTH);
|
||||
in_offset += EVP_MAX_IV_LENGTH;
|
||||
|
||||
|
@ -1064,7 +1070,8 @@ bool AuthSSLimpl::decrypt(void *&out, int &outlen, const void *in, int inlen)
|
|||
|
||||
outlen += out_currOffset;
|
||||
|
||||
free(ek);
|
||||
if(ek != NULL)
|
||||
free(ek);
|
||||
|
||||
#ifdef AUTHSSL_DEBUG
|
||||
std::cerr << "AuthSSLimpl::decrypt() finished with outlen : " << outlen << std::endl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue