class

SNMP::V3::Security

Inherits Reference / Object

Constants

PASSKEY_CHUNK_SIZE = 64
PASSKEY_EXPANSION_SIZE = 1 << 20

RFC 3414 A.2 expands the password to 2^20 octets, hashed in 64-byte chunks.

Constructors

new(username : String, engine_id : String = "", auth_protocol : SNMP::V3::Security::AuthProtocol = AuthProtocol::MD5, auth_password : String = "", priv_protocol : SNMP::V3::Security::PrivacyProtocol = PrivacyProtocol::DES, priv_password : String = "", verify_messages : Bool = true)
Source

Instance methods

auth_key
Source
auth_param_length

msgAuthenticationParameters length: RFC 3414 (MD5/SHA1 = 12) and RFC 7860.

Source
auth_protocol
Source
decode(pdu : ASN1::BER, salt : Bytes, engine_time, engine_boots)
Source
encode(pdu : ASN1::BER, engine_time, engine_boots)
Source
engine_id
Source
engine_id=(engine_id : String)
Source
passkey(password)
Source
priv_key
Source
priv_protocol
Source
security_level
Source
security_model

This class implements the User-based Security Model.

Source
sign(message : ASN1::BER)
Source
username
Source
verify_messages?

Whether inbound authenticated messages have their HMAC verified.

WARNING: setting this to false disables authentication verification of received messages — a forged or tampered response is then accepted as genuine. Leave it at the default (true) unless you are deliberately inspecting traffic and understand that the security guarantee is voided.

Source

Nested types