On 02/21/2018 10:16 AM, Robert Watson wrote:
I'm trying to update a crypto library for crtmpserver
to work with openssl 1.1.0. The software is no longer
actively maintained and my c++ skills are somewhat
rudimentary but I keep getting a compilation error for
something that seems trivial.
Here's the code snippet:
bool DHWrapper::CopyPublicKey(uint8_t
*pDst, int32_t dstLength) {
if (_pDH == NULL) {
FATAL("DHWrapper not initialized");
return false;
}
BIGNUM *_keyPublic,*_keyPrivate;
_keyPublic = BN_new();
_keyPrivate = BN_new();
DH_get0_key( _pDH, *_keyPublic, *_keyPrivate );
Use '&' instead of '*'
-Ben
CopyKey(_keyPublic, pDst,
dstLength);
return true;
}
Here's the compilation error:
/build/crtmpserver/src/crtmpserver/sources/common/src/utils/misc/crypto.cpp:
In member function ‘bool
DHWrapper::CopyPublicKey(uint8_t*, int32_t)’:
/build/crtmpserver/src/crtmpserver/sources/common/src/utils/misc/crypto.cpp:92:47:
error: cannot convert ‘BIGNUM {aka bignum_st}’ to
‘const BIGNUM** {aka const bignum_st**}’ for argument
‘2’ to ‘void DH_get0_key(const DH*, const BIGNUM**,
const BIGNUM**)’
DH_get0_key( _pDH, *_keyPublic, *_keyPrivate );
^
make[2]: ***
[common/CMakeFiles/common.dir/build.make:591:
common/CMakeFiles/common.dir/build/crtmpserver/src/crtmpserver/sources/common/src/utils/misc/crypto.cpp.o]
Error 1
make[1]: *** [CMakeFiles/Makefile2:231:
common/CMakeFiles/common.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
What
am I doing wrong? Thanks,
Robert
|
--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users