diff options
author | Micael Karlberg <[email protected]> | 2013-10-21 14:32:20 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2013-10-21 14:32:20 +0200 |
commit | dc6f086a0751677da8724df397a062ab154f34cb (patch) | |
tree | 8ab41ccb19ebb0f2214da76acca5e47a5931f92f /lib/snmp/src/agent | |
parent | 7d2a1248d82027b5b0e91f4f7c2cdfa5814a3590 (diff) | |
parent | 300803837926d0bb28829f313fad07f757188d41 (diff) | |
download | otp-dc6f086a0751677da8724df397a062ab154f34cb.tar.gz otp-dc6f086a0751677da8724df397a062ab154f34cb.tar.bz2 otp-dc6f086a0751677da8724df397a062ab154f34cb.zip |
Merge branch 'bmk/snmp/aes_encryption_fixes/OTP-11412' into bmk/snmp/snmp425_integration
Conflicts:
lib/snmp/doc/src/notes.xml
Diffstat (limited to 'lib/snmp/src/agent')
-rw-r--r-- | lib/snmp/src/agent/snmpa_mpd.erl | 4 | ||||
-rw-r--r-- | lib/snmp/src/agent/snmpa_usm.erl | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/lib/snmp/src/agent/snmpa_mpd.erl b/lib/snmp/src/agent/snmpa_mpd.erl index 2d37ea56f0..11ae806866 100644 --- a/lib/snmp/src/agent/snmpa_mpd.erl +++ b/lib/snmp/src/agent/snmpa_mpd.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -657,7 +657,7 @@ generate_response_msg(Vsn, RePdu, Type, ?SEC_USM -> snmpa_usm end, - SecEngineID = LocalEngineID, + SecEngineID = LocalEngineID, % 3.1.1a ?vtrace("generate_response_msg -> SecEngineID: ~w", [SecEngineID]), case (catch SecModule:generate_outgoing_msg(Message, SecEngineID, diff --git a/lib/snmp/src/agent/snmpa_usm.erl b/lib/snmp/src/agent/snmpa_usm.erl index 6f54307f9f..719ea4e356 100644 --- a/lib/snmp/src/agent/snmpa_usm.erl +++ b/lib/snmp/src/agent/snmpa_usm.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1999-2011. All Rights Reserved. +%% Copyright Ericsson AB 1999-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -16,6 +16,9 @@ %% %% %CopyrightEnd% %% +%% AES: RFC 3826 +%% + -module(snmpa_usm). %% Avoid warning for local function error/1 clashing with autoimported BIF. @@ -652,7 +655,10 @@ get_des_salt() -> [?i32(EngineBoots), ?i32(SaltInt)]. aes_encrypt(PrivKey, Data) -> - snmp_usm:aes_encrypt(PrivKey, Data, fun get_aes_salt/0). + EngineBoots = snmp_framework_mib:get_engine_boots(), + EngineTime = snmp_framework_mib:get_engine_time(), + snmp_usm:aes_encrypt(PrivKey, Data, fun get_aes_salt/0, + EngineBoots, EngineTime). aes_decrypt(PrivKey, UsmSecParams, EncData) -> #usmSecurityParameters{msgPrivacyParameters = PrivParams, |