Skip to content

Commit

Permalink
drop conditional auth protocols use
Browse files Browse the repository at this point in the history
  • Loading branch information
etingof committed Dec 22, 2017
1 parent 4674238 commit 0ac99df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 27 deletions.
17 changes: 4 additions & 13 deletions scripts/snmprec.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,13 @@
authProtocols = {
'MD5': config.usmHMACMD5AuthProtocol,
'SHA': config.usmHMACSHAAuthProtocol,
'SHA224': config.usmHMAC128SHA224AuthProtocol,
'SHA256': config.usmHMAC192SHA256AuthProtocol,
'SHA384': config.usmHMAC256SHA384AuthProtocol,
'SHA512': config.usmHMAC384SHA512AuthProtocol,
'NONE': config.usmNoAuthProtocol
}

try:
authProtocols.update(
{
'SHA224': config.usmHMAC128SHA224AuthProtocol,
'SHA256': config.usmHMAC192SHA256AuthProtocol,
'SHA384': config.usmHMAC256SHA384AuthProtocol,
'SHA512': config.usmHMAC384SHA512AuthProtocol,
}
)

except AttributeError:
pass

privProtocols = {
'DES': config.usmDESPrivProtocol,
'3DES': config.usm3DESEDEPrivProtocol,
Expand Down
18 changes: 4 additions & 14 deletions scripts/snmpsimd.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,13 @@
authProtocols = {
'MD5': config.usmHMACMD5AuthProtocol,
'SHA': config.usmHMACSHAAuthProtocol,
'SHA224': config.usmHMAC128SHA224AuthProtocol,
'SHA256': config.usmHMAC192SHA256AuthProtocol,
'SHA384': config.usmHMAC256SHA384AuthProtocol,
'SHA512': config.usmHMAC384SHA512AuthProtocol,
'NONE': config.usmNoAuthProtocol
}

try:
authProtocols.update(
{
'SHA224': config.usmHMAC128SHA224AuthProtocol,
'SHA256': config.usmHMAC192SHA256AuthProtocol,
'SHA384': config.usmHMAC256SHA384AuthProtocol,
'SHA512': config.usmHMAC384SHA512AuthProtocol,
}
)

except AttributeError:
pass

privProtocols = {
'DES': config.usmDESPrivProtocol,
'3DES': config.usm3DESEDEPrivProtocol,
Expand All @@ -88,7 +79,6 @@
'NONE': config.usmNoPrivProtocol
}


# Transport endpoints collection

class TransportEndpointsBase:
Expand Down

0 comments on commit 0ac99df

Please sign in to comment.