Replace deprecated des_ and fix LibreSSL build

uses deprecated des_ methods and types that were marked deprecated by
OpenSSL 0.9.7 and will be removed in OpenSSL 1.1.0 . This patch replaces
the des_ methods and types with their new DES_ counterparts. This
enables building with LibreSSL as OpenSSL library.
This commit is contained in:
Bernard Spil 2015-03-12 08:57:57 +01:00
parent dd4a042c52
commit ae324d6544
3 changed files with 12 additions and 12 deletions

View file

@ -335,8 +335,8 @@ int start_snmp(int s, char *ip, int port, unsigned char options, char *miscptr,
// xor initVect with salt
for (i = 0; i < 8; i++)
initVect[i] ^= privacy_params[i];
des_key_sched((C_Block *) key, symcbc);
des_ncbc_encrypt(snmpv3_get2 + 2, buf, sizeof(snmpv3_get2) - 2, symcbc, (C_Block *) (initVect), DES_ENCRYPT);
DES_key_sched((DES_cblock *) key, &symcbc);
DES_ncbc_encrypt(snmpv3_get2 + 2, buf, sizeof(snmpv3_get2) - 2, &symcbc, (DES_cblock *) (initVect), DES_ENCRYPT);
#endif