It appears that OTP20 deprecated crypto:sha/1 in favor of crypto:hash/2
when running
make test
I get one failing test
dnssec:54: zone_test_ (Build Zone nsec3rsasha1-example)...*failed*
in function crypto:sha/1
called as sha([<<1,42,1,42,5,119,105,108,100,49,20,110,115,...>>,<<"salt">>])
in call from dnssec:ih/4 (src/dnssec.erl, line 170)
in call from dnssec:'-gen_nsec3/8-fun-0-'/8 (src/dnssec.erl, line 148)
in call from lists:foldl/3 (lists.erl, line 1263)
in call from dnssec:gen_nsec3/8 (src/dnssec.erl, line 145)
in call from dnssec:'-zone_test_/0-fun-6-'/9 (include/dnssec_tests.hrl, line 95)
**error:undef
output:<<"">>
Oddly, it appears that crypto:sha/1 is undefined when it is trying to be accessed:
ih(?DNSSEC_NSEC3_ALG_SHA1, Salt, X, I) -> ih(fun crypto:sha/1, Salt, X, I).
This creates an anonymous function #Fun<crypto.sha.1>. Then, when we try to execute it
It appears that OTP20 deprecated
crypto:sha/1
in favor ofcrypto:hash/2
when running
make test
I get one failing test
Test Data
Investigation
Oddly, it appears that
crypto:sha/1
is undefined when it is trying to be accessed:ih(?DNSSEC_NSEC3_ALG_SHA1, Salt, X, I) -> ih(fun crypto:sha/1, Salt, X, I).
This creates an anonymous function#Fun<crypto.sha.1>
. Then, when we try to execute itIt triggers the undef.
It appears that OTP20 deprecated
crypto:sha/1
in favor ofcrypto:hash/2