mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added new authalgo support for SNMPv3 (#11966)
* Added new authalgo support for SNMPv3 * Update 2020_07_27_00522_alter_authalgo_column.php Fixed case * Update addhost.inc.php Fixed case * Update snmp.inc.php Fixed case * Update db_schema.yaml Fixed case * Fixed SHA-* order to ascending * Update 2020_07_27_00522_alter_authalgo_column.php Fixed space * Update db_schema.yaml Fixed line to be of type string * Update config_definitions.json Fixed sorting * Fixed test file case sensitivity * Fixed rollback function * SourceDoctor code for checks * Fixed indentation issues on Travis test * Update to re-trigger testing stuck on CLA step * Added crypto-algo updates * Incorporated suggestions from Jellyfrog * Added documentation entry * Fixed travis spacing error * Fixed validations * Delete snmpv3_version_compare.patch Sorry, this one was not supposed to be there. * Added poller evaluation * Added poller comparison * Fixed merge-conflicts * Fixed typo in test unit * code refinements only can check on webui that it supports the algorithms, hopefully, the eventlog is enough to notify users of distributed pollers. * style fixes and remove openssl setting * fix device access * fix missing migration column Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
@@ -100,8 +100,7 @@ class AddHostCliTest extends DBTestCase
|
||||
|
||||
public function testSnmpV3AuthProtocol()
|
||||
{
|
||||
// $modes = array('md5', 'sha', 'sha-512', 'sha-384', 'sha-256', 'sha-224');
|
||||
$modes = ['md5', 'sha'];
|
||||
$modes = ['MD5', 'SHA', 'SHA-224', 'SHA-256', 'SHA-384', 'SHA-512'];
|
||||
foreach ($modes as $mode) {
|
||||
$host = 'hostName' . $mode;
|
||||
$result = \Artisan::call('device:add ' . $host . ' -force -a ' . $mode . ' --v3');
|
||||
@@ -109,13 +108,13 @@ class AddHostCliTest extends DBTestCase
|
||||
$device = Device::findByHostname($host);
|
||||
$this->assertNotNull($device);
|
||||
|
||||
$this->assertEquals(strtoupper($mode), $device->authalgo, 'Wrong snmp v3 password algoritme');
|
||||
$this->assertEquals(strtoupper($mode), $device->authalgo, 'Wrong snmp v3 password algorithm');
|
||||
}
|
||||
}
|
||||
|
||||
public function testSnmpV3PrivacyProtocol()
|
||||
{
|
||||
$modes = ['des', 'aes'];
|
||||
$modes = ['DES', 'AES', 'AES-192', 'AES-256'];
|
||||
foreach ($modes as $mode) {
|
||||
$host = 'hostName' . $mode;
|
||||
$result = \Artisan::call('device:add ' . $host . ' -force -x ' . $mode . ' --v3');
|
||||
@@ -123,7 +122,7 @@ class AddHostCliTest extends DBTestCase
|
||||
$device = Device::findByHostname($host);
|
||||
$this->assertNotNull($device);
|
||||
|
||||
$this->assertEquals(strtoupper($mode), $device->cryptoalgo, 'Wrong snmp v3 crypt algoritme');
|
||||
$this->assertEquals(strtoupper($mode), $device->cryptoalgo, 'Wrong snmp v3 crypt algorithm');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user