aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/agent
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2013-05-28 16:56:44 +0200
committerMicael Karlberg <[email protected]>2013-05-28 16:56:44 +0200
commit6aca7052709ea0f88503b08685c1699845a6de89 (patch)
treeeb5adbabbb2e40d6909f3d0511f239b827c7c374 /lib/snmp/src/agent
parent80c02173c9fc1d76ac1b404a05e2706817a4c308 (diff)
downloadotp-6aca7052709ea0f88503b08685c1699845a6de89.tar.gz
otp-6aca7052709ea0f88503b08685c1699845a6de89.tar.bz2
otp-6aca7052709ea0f88503b08685c1699845a6de89.zip
[snmp] Use of new crypto interface correctd in manager
Added a common utility function (in the snmp_misc module) for testing for crypto support (sed both by the manager and agent code). OTP-11009
Diffstat (limited to 'lib/snmp/src/agent')
-rw-r--r--lib/snmp/src/agent/snmp_user_based_sm_mib.erl14
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/snmp/src/agent/snmp_user_based_sm_mib.erl b/lib/snmp/src/agent/snmp_user_based_sm_mib.erl
index e675cf1b83..223d3f7218 100644
--- a/lib/snmp/src/agent/snmp_user_based_sm_mib.erl
+++ b/lib/snmp/src/agent/snmp_user_based_sm_mib.erl
@@ -1219,16 +1219,10 @@ split(N, [H | T], FirstRev) when N > 0 ->
split(N-1, T, [H | FirstRev]).
-is_crypto_supported(Algo) ->
- %% The 'catch' handles the case when 'crypto' is
- %% not present in the system (or not started).
- Supported = crypto:supports(),
- Hashs = proplists:get_value(hashs, Supported),
- Ciphers = proplists:get_value(ciphers, Supported),
- case catch lists:member(Algo, Hashs ++ Ciphers) of
- true -> true;
- _ -> false
- end.
+-compile({inline, [{is_crypto_supported,1}]}).
+is_crypto_supported(Func) ->
+ snmp_misc:is_crypto_supported(Func).
+
inconsistentValue(V) -> throw({inconsistentValue, V}).
inconsistentName(N) -> throw({inconsistentName, N}).