T
Tobias Erbsland
Hello
I have a problem with an error message. I created a new class (as
OpenSSL helper):
class DataBlock
{
public:
DataBlock();
DataBlock( unsigned int size );
DataBlock( const DataBlock& copy );
DataBlock( const unsigned char* copy, unsigned int copySize );
~DataBlock();
// .... methods and datas...
};
Then i use the class in this way:
void foo()
{
unsigned char* sessionKey[1];
sessionKey[0] = new unsigned char[ EVP_PKEY_size( publicKey ) ];
int sessionKeySize[1];
// (...) call the openssl functions
// problem:
DataBlock sessionKey( sessionKey[0], sessionKeySize[0] );
}
I get the error message (vsc++.net):
error C2040: 'sessionKey' : 'DataBlock' differs in levels of indirection
from 'unsigned char *[1]'
I think i overlooked a fault, but i'd see it... (frustrating... *sigh*)
best regards
Tobias Erbsland
I have a problem with an error message. I created a new class (as
OpenSSL helper):
class DataBlock
{
public:
DataBlock();
DataBlock( unsigned int size );
DataBlock( const DataBlock& copy );
DataBlock( const unsigned char* copy, unsigned int copySize );
~DataBlock();
// .... methods and datas...
};
Then i use the class in this way:
void foo()
{
unsigned char* sessionKey[1];
sessionKey[0] = new unsigned char[ EVP_PKEY_size( publicKey ) ];
int sessionKeySize[1];
// (...) call the openssl functions
// problem:
DataBlock sessionKey( sessionKey[0], sessionKeySize[0] );
}
I get the error message (vsc++.net):
error C2040: 'sessionKey' : 'DataBlock' differs in levels of indirection
from 'unsigned char *[1]'
I think i overlooked a fault, but i'd see it... (frustrating... *sigh*)
best regards
Tobias Erbsland