OTP 24 compatibility
blkmajik opened this issue · 2 comments
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:
- crypto:hmac(md5,TSIG#dns_TSIG_RR.key,PKT);
To
- :crypto.mac(:hmac, :md5, TSIG#dns_TSIG_RR.key,PKT)
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.
Check the dev branch. It supports OTP24.
I didn't merge it to master yet.
That works for me. Thanks.