diff options
author | Micael Karlberg <[email protected]> | 2013-11-26 16:12:46 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2013-11-26 16:12:46 +0100 |
commit | 0f13b20298fd6f63a08d6fa1d1159a91d79fa1f6 (patch) | |
tree | a0e2ca49909defa1da5af2b7eaf24faf14f32a2c /lib/snmp/src/manager/snmpm_usm.erl | |
parent | 6dd7c114b018ac412ed0d5c3423e988094aa9655 (diff) | |
parent | 8852c947d413e8814d663c9319f7b8932b05a7ad (diff) | |
download | otp-0f13b20298fd6f63a08d6fa1d1159a91d79fa1f6.tar.gz otp-0f13b20298fd6f63a08d6fa1d1159a91d79fa1f6.tar.bz2 otp-0f13b20298fd6f63a08d6fa1d1159a91d79fa1f6.zip |
Merge branch 'maint'
Conflicts:
lib/snmp/doc/src/snmpm_user.xml
Diffstat (limited to 'lib/snmp/src/manager/snmpm_usm.erl')
-rw-r--r-- | lib/snmp/src/manager/snmpm_usm.erl | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/snmp/src/manager/snmpm_usm.erl b/lib/snmp/src/manager/snmpm_usm.erl index 497d6d6102..0a8a6436a3 100644 --- a/lib/snmp/src/manager/snmpm_usm.erl +++ b/lib/snmp/src/manager/snmpm_usm.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2004-2011. All Rights Reserved. +%% Copyright Ericsson AB 2004-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 @@ -19,6 +19,9 @@ %%----------------------------------------------------------------- %% This module implements the User Based Security Model for SNMP, %% as defined in rfc2274. +%% +%% AES: RFC 3826 +%% %%----------------------------------------------------------------- -module(snmpm_usm). @@ -416,11 +419,14 @@ get_des_salt() -> [?i32(EngineBoots), ?i32(SaltInt)]. aes_encrypt(PrivKey, Data) -> - snmp_usm:aes_encrypt(PrivKey, Data, fun get_aes_salt/0). + EngineBoots = get_engine_boots(), + EngineTime = get_engine_time(), + snmp_usm:aes_encrypt(PrivKey, Data, fun get_aes_salt/0, + EngineBoots, EngineTime). aes_decrypt(PrivKey, UsmSecParams, EncData) -> - #usmSecurityParameters{msgPrivacyParameters = MsgPrivParams, - msgAuthoritativeEngineTime = EngineTime, + #usmSecurityParameters{msgPrivacyParameters = MsgPrivParams, + msgAuthoritativeEngineTime = EngineTime, msgAuthoritativeEngineBoots = EngineBoots} = UsmSecParams, snmp_usm:aes_decrypt(PrivKey, MsgPrivParams, EncData, |