3 #include "../securitymodel.hpp"
4 #include "../types.hpp"
9 namespace dangerous {
namespace snmp {
namespace securitymodel {
125 std::chrono::seconds changeInTime = std::chrono::duration_cast<std::chrono::seconds>( std::chrono::system_clock::now() -
lastUpdateTime );
uint32_t authoritativeEngineBoots() const
This returns the number of times that the engine has booted.
Definition: usm.hpp:83
void updateTimeFromClock()
This will update the value of "authoritativeEngineTime" based on the amount of wall time elapsed sinc...
Definition: usm.hpp:122
Authentication::Type authentication() const
This returns the type of authentication used.
Definition: usm.hpp:143
Encryption::Type _encryption
The type of encryption used.
Definition: usm.hpp:209
uint32_t _authoritativeEngineBoots
The number of times that the engine has booted.
Definition: usm.hpp:239
std::string authenticationPassword() const
This returns the authentication password.
Definition: usm.hpp:150
Type
This defines the type of encryption.
Definition: types.hpp:44
void authoritativeEngineTime(std::chrono::seconds authoritativeEngineTime)
This updates the number of time since the last boot of the engine.
Definition: usm.hpp:109
std::string _encryptionPassword
If encryption is to be used, then the user will have a secret encryption password.
Definition: usm.hpp:216
The User-based Security Model (USM) associates a user (by "user name") with security information...
Definition: usm.hpp:36
std::string authoritativeEngineID() const
This returns the authoritative engine ID.
Definition: usm.hpp:68
Type
This defines the type of authentication.
Definition: types.hpp:24
std::chrono::seconds _authoritativeEngineTime
The amount of time since the last boot of the engine, measured in seconds.
Definition: usm.hpp:245
std::chrono::seconds authoritativeEngineTime() const
This returns the amount of time since the last boot of the engine, measured in seconds.
Definition: usm.hpp:98
std::string _encryptionKey
This is the actual encryption "key" to be used.
Definition: usm.hpp:224
std::string authenticationKey() const
This returns the authentication key.
Definition: usm.hpp:156
std::string _authenticationKey
This is the actual authentication "key" to be used.
Definition: usm.hpp:204
bool isAuthenticated() const
TODO: THIS.
This defines the base exception class for Dangerous SNMP.
Definition: exception.hpp:10
std::string _authenticationPassword
If authentication is to be used, then the user will have a secret authentication password.
Definition: usm.hpp:196
Authentication::Type _authentication
The type of authentication used.
Definition: usm.hpp:188
std::string _authoritativeEngineID
The authoritative engine ID OCTET STRING.
Definition: usm.hpp:234
Encryption::Type encryption() const
This returns the type of encryption used.
Definition: usm.hpp:162
std::string _username
The user name.
Definition: usm.hpp:185
std::string encryptionPassword() const
This returns the encryption password.
Definition: usm.hpp:169
This class is the base class for all security models.
Definition: securitymodel.hpp:29
void authoritativeEngineBoots(uint32_t authoritativeEngineBoots)
This updates the number of times that the engine has booted.
Definition: usm.hpp:90
USM()
Default constructor; this is essentially "noAuthNoPriv".
std::string encryptionKey() const
This returns the encryption key.
Definition: usm.hpp:175
std::string username() const
This returns the user name.
Definition: usm.hpp:137
std::chrono::system_clock::time_point lastUpdateTime
This is the last time that authoritative engine information was updated.
Definition: usm.hpp:254