Is it possible to enable 3DES Priv algo when compile snmp++ with openssl? Looks like not possible since class Priv3DES_EDE implementing 3DES algo is only compiled under _USE_3DES_EDE macro which is defined when macro HAVE_LIBDES = 1.
Hi,
all wrapper macros in 3DES class are also defined for OpenSSL. So you can define _USE_3DES_EDE manually when compiling snmp++.
I will change this for the next release.
Kind regards,
Jochen
Thank you for answer.
I tried to manually define _USE_3DES_EDE macro, class Priv3DES_EDE has begun to be compiled after that, but it generated several compilation errors:
1>C:\Development\Core\3rdParty\snmppp\snmp++\src\auth_priv.cpp(2244,3): error C4996: ‘DES_key_sched’: Since OpenSSL 3.0
1>C:\Development\Core\3rdParty\snmppp\snmp++\src\auth_priv.cpp(2245,3): error C4996: ‘DES_key_sched’: Since OpenSSL 3.0
1>C:\Development\Core\3rdParty\snmppp\snmp++\src\auth_priv.cpp(2246,3): error C4996: ‘DES_key_sched’: Since OpenSSL 3.0
1>C:\Development\Core\3rdParty\snmppp\snmp++\src\auth_priv.cpp(2251,7): error C4996: ‘DES_ede3_cbc_encrypt’: Since OpenSSL 3.0
1>C:\Development\Core\3rdParty\snmppp\snmp++\src\auth_priv.cpp(2264,7): error C4996: ‘DES_ede3_cbc_encrypt’: Since OpenSSL 3.0
1>C:\Development\Core\3rdParty\snmppp\snmp++\src\auth_priv.cpp(2337,3): error C4996: ‘DES_key_sched’: Since OpenSSL 3.0
1>C:\Development\Core\3rdParty\snmppp\snmp++\src\auth_priv.cpp(2338,3): error C4996: ‘DES_key_sched’: Since OpenSSL 3.0
1>C:\Development\Core\3rdParty\snmppp\snmp++\src\auth_priv.cpp(2339,3): error C4996: ‘DES_key_sched’: Since OpenSSL 3.0
1>C:\Development\Core\3rdParty\snmppp\snmp++\src\auth_priv.cpp(2343,7): error C4996: ‘DES_ede3_cbc_encrypt’: Since OpenSSL 3.0
Can you help to fix theese errors?
Hi,
it seems that during my tests with OpenSSL 3 I did not expect that _USE_3DES_EDE is not defined and so only the DES class was adapted.
In theory the Priv3DES_EDE::encrypt()
and decrypt()
have to adapted like the PrivDES::encrypt()
and decrypt()
functions. But this will take some days.
Is it possible for you to change the compiler settings to not treat warnings as errors. My OpenSSL 3.1 just prints warnings about the usage of the deprecated API.
Kind regards,
Jochen
Hi,
the updated version can be downloaded here: https://sa-ha.de/auth_priv.cpp.gz
Kind regards,
Jochen
Hi,
Your code patch with a 3DES fix works well, thank you very much for fast help!