mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[snmp] Upgrade SNMP4J and fix AUTH_NO_PRIV (#16801)
Signed-off-by: Jan N. Klug <github@klug.nrw>
This commit is contained in:
parent
f8cbca62b7
commit
a177e699b3
@ -16,9 +16,9 @@
|
|||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.servicemix.bundles</groupId>
|
<groupId>org.snmp4j</groupId>
|
||||||
<artifactId>org.apache.servicemix.bundles.snmp4j</artifactId>
|
<artifactId>snmp4j</artifactId>
|
||||||
<version>2.6.3_1</version>
|
<version>2.8.6</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -166,8 +166,10 @@ public class SnmpServiceImpl implements SnmpService {
|
|||||||
@Override
|
@Override
|
||||||
public void addUser(String userName, SnmpAuthProtocol snmpAuthProtocol, @Nullable String authPassphrase,
|
public void addUser(String userName, SnmpAuthProtocol snmpAuthProtocol, @Nullable String authPassphrase,
|
||||||
SnmpPrivProtocol snmpPrivProtocol, @Nullable String privPassphrase, byte[] engineId) {
|
SnmpPrivProtocol snmpPrivProtocol, @Nullable String privPassphrase, byte[] engineId) {
|
||||||
UsmUser usmUser = new UsmUser(new OctetString(userName), snmpAuthProtocol.getOid(),
|
UsmUser usmUser = new UsmUser(new OctetString(userName),
|
||||||
authPassphrase != null ? new OctetString(authPassphrase) : null, snmpPrivProtocol.getOid(),
|
authPassphrase != null ? snmpAuthProtocol.getOid() : null,
|
||||||
|
authPassphrase != null ? new OctetString(authPassphrase) : null,
|
||||||
|
privPassphrase != null ? snmpPrivProtocol.getOid() : null,
|
||||||
privPassphrase != null ? new OctetString(privPassphrase) : null);
|
privPassphrase != null ? new OctetString(privPassphrase) : null);
|
||||||
OctetString securityNameOctets = new OctetString(userName);
|
OctetString securityNameOctets = new OctetString(userName);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user