Homas / ioc2rpz

ioc2rpz is a place where threat intelligence meets DNS.
Apache License 2.0
106 stars 17 forks source link

OTP 24 compatibility #38

Closed blkmajik closed 3 years ago

blkmajik commented 3 years ago

Apparently in OTP 23 a bunch of crypto functions were deprecated and in OTP 24 those functions were removed. Judging by the errors I'm seeing I think the HMAC code needs to be adapted to work with OTP 24 and later. The docs indicate that there's a new crypto API.

Looks like the code needs to be updated from:

To

Below is the errors I'm seeing:

Sep 22 12:49:49 rpzmasterse01 ioc2rpz: ** {'function not exported', Sep 22 12:49:49 rpzmasterse01 ioc2rpz: [{crypto,hmac, Sep 22 12:49:49 rpzmasterse01 ioc2rpz: [sha512,

From https://erlang.org/download/OTP-24.0.README OTP-16656 Application(s): crypto

           The functions and cipher names that were deprecated in
           OTP-23.0 are now removed.

From https://erlang.org/download/OTP-23.0.README

OTP-16232 Application(s): crypto

           As announced in OTP 22.0, a New API was introduced in
           CRYPTO. See the New and Old API chapter in the CRYPTO
           User's Guide for more information and suggested
           replacement functions.

           The Old API is now deprecated in OTP-23.0 and will be
           removed in OTP-24.0.

           This deprecation includes cipher names. See the section
           Retired cipher names in the crypto User's Guide,
           chapter The Old API.
Homas commented 3 years ago

Check the dev branch. It supports OTP24. I didn't merge it to master yet.

blkmajik commented 3 years ago

That works for me. Thanks.