Skip to content

Commit

Permalink
[snmp] Upgrade SNMP4J and fix AUTH_NO_PRIV (openhab#16801)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan N. Klug <github@klug.nrw>
  • Loading branch information
J-N-K authored May 25, 2024
1 parent f8cbca6 commit a177e69
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions bundles/org.openhab.binding.snmp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

<dependencies>
<dependency>
<groupId>org.apache.servicemix.bundles</groupId>
<artifactId>org.apache.servicemix.bundles.snmp4j</artifactId>
<version>2.6.3_1</version>
<groupId>org.snmp4j</groupId>
<artifactId>snmp4j</artifactId>
<version>2.8.6</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,10 @@ public void send(PDU pdu, Target target, @Nullable Object userHandle, ResponseLi
@Override
public void addUser(String userName, SnmpAuthProtocol snmpAuthProtocol, @Nullable String authPassphrase,
SnmpPrivProtocol snmpPrivProtocol, @Nullable String privPassphrase, byte[] engineId) {
UsmUser usmUser = new UsmUser(new OctetString(userName), snmpAuthProtocol.getOid(),
authPassphrase != null ? new OctetString(authPassphrase) : null, snmpPrivProtocol.getOid(),
UsmUser usmUser = new UsmUser(new OctetString(userName),
authPassphrase != null ? snmpAuthProtocol.getOid() : null,
authPassphrase != null ? new OctetString(authPassphrase) : null,
privPassphrase != null ? snmpPrivProtocol.getOid() : null,
privPassphrase != null ? new OctetString(privPassphrase) : null);
OctetString securityNameOctets = new OctetString(userName);

Expand Down

0 comments on commit a177e69

Please sign in to comment.