java.lang.Object
org.snmp4j.agent.mo.snmp.dh.DHKickstartParametersImpl
- All Implemented Interfaces:
DHKickstartParameters
The
DHKickstartParametersImpl
provides the kickstart public parameters needed to
initialize Diffie Hellman key exchange. These parameters have to exchanged out-of-band as
defined by RFC 2786. This implementation of the DHKickstartParameters
interface provides
a static method to create kickstart parameters from a set of properties of the following form:
dh.publicKey.<securityName>=<publicKeyHexFormattedWithoutSeparator>
dh.authProtocol.<securityName>=<OID>
dh.privProtocol.<securityName>=<OID>
dh.vacm.role.<securityName>=<vacmRole>
dh.reset.<securityName>=true|false
- Since:
- 3.0
- Author:
- Frank Fock
-
Constructor Summary
ConstructorDescriptionDHKickstartParametersImpl
(org.snmp4j.smi.OctetString securityName, org.snmp4j.smi.OctetString publicKey) Create a Diffie Hellman kickstart parameter set with default authentication (MD5) and privacy (DES) protocols.DHKickstartParametersImpl
(org.snmp4j.smi.OctetString securityName, org.snmp4j.smi.OctetString publicKey, org.snmp4j.smi.OID authenticationProtocol, org.snmp4j.smi.OID privacyProtocol, String vacmRole, boolean resetRequested) Create a Diffie Hellman kickstart parameter set with the provided authentication and privacy protocols. -
Method Summary
Modifier and TypeMethodDescriptionboolean
org.snmp4j.smi.OID
As extension for RFC 2786 this parameter allows to select the authentication protocol to use for the kickstart operation.org.snmp4j.smi.OID
As extension for RFC 2786 this parameter allows to select the privacy protocol to use for the kickstart operation.org.snmp4j.smi.OctetString
Gets the public Diffie Hellman public key for this security name (from the command generator).org.snmp4j.smi.OctetString
Gets the security name associated with the kickstart parameters.Returns the (optional) role associated with the security name.int
hashCode()
boolean
Indicates whether an existing user with StorageType nonVolatile or permanent should be replaced by this kickstart user or not.static List
<DHKickstartParameters> readFromProperties
(String propertyPrefix, Properties properties) toString()
-
Constructor Details
-
DHKickstartParametersImpl
public DHKickstartParametersImpl(org.snmp4j.smi.OctetString securityName, org.snmp4j.smi.OctetString publicKey, org.snmp4j.smi.OID authenticationProtocol, org.snmp4j.smi.OID privacyProtocol, String vacmRole, boolean resetRequested) Create a Diffie Hellman kickstart parameter set with the provided authentication and privacy protocols.- Parameters:
securityName
- the security name of the provisioned user.publicKey
- the Diffie Hellman public key as defined by RFC 2786.authenticationProtocol
- the OID of the authentication protocol to be used by this user.privacyProtocol
- the OID of the privacy protocol to be used by this user.vacmRole
- the agent implementation specific VACM role that defines the access rights associated with the user.resetRequested
- iftrue
, existing nonVolatile or permanent USM user with the same security name will be replaced by this new kickstart user.
-
DHKickstartParametersImpl
public DHKickstartParametersImpl(org.snmp4j.smi.OctetString securityName, org.snmp4j.smi.OctetString publicKey) Create a Diffie Hellman kickstart parameter set with default authentication (MD5) and privacy (DES) protocols.- Parameters:
securityName
- the security name of the provisioned user.publicKey
- the Diffie Hellman public key as defined by RFC 2786.
-
-
Method Details
-
getSecurityName
public org.snmp4j.smi.OctetString getSecurityName()Description copied from interface:DHKickstartParameters
Gets the security name associated with the kickstart parameters.- Specified by:
getSecurityName
in interfaceDHKickstartParameters
- Returns:
- a SNMPv3 security name.
-
getPublicKey
public org.snmp4j.smi.OctetString getPublicKey()Description copied from interface:DHKickstartParameters
Gets the public Diffie Hellman public key for this security name (from the command generator).- Specified by:
getPublicKey
in interfaceDHKickstartParameters
- Returns:
- an octet string.
-
getAuthenticationProtocol
public org.snmp4j.smi.OID getAuthenticationProtocol()Description copied from interface:DHKickstartParameters
As extension for RFC 2786 this parameter allows to select the authentication protocol to use for the kickstart operation. Default is usmHMACMD5AuthProtocol, ifnull
is returned.- Specified by:
getAuthenticationProtocol
in interfaceDHKickstartParameters
- Returns:
- the OID of the authentication protocol or
null
if the default (usmHMACMD5AuthProtocol) should be used.
-
getPrivacyProtocol
public org.snmp4j.smi.OID getPrivacyProtocol()Description copied from interface:DHKickstartParameters
As extension for RFC 2786 this parameter allows to select the privacy protocol to use for the kickstart operation. Default is usmDESPrivProtocol, ifnull
is returned.- Specified by:
getPrivacyProtocol
in interfaceDHKickstartParameters
- Returns:
- the OID of the privacy protocol or
null
if the default (usmDESPrivProtocol) should be used.
-
getVacmRole
Description copied from interface:DHKickstartParameters
Returns the (optional) role associated with the security name. The actual access rights of the role is implementation dependent but should offer at least the following roles:admin - unlimited access monitor - read-only access
- Specified by:
getVacmRole
in interfaceDHKickstartParameters
- Returns:
- the VACM role that defines the VACM access rights (implementation specific). If no role is provided, the agent will implementation specific select appropriate access rights.
-
isResetRequested
public boolean isResetRequested()Indicates whether an existing user with StorageType nonVolatile or permanent should be replaced by this kickstart user or not.- Specified by:
isResetRequested
in interfaceDHKickstartParameters
- Returns:
true
if a reset of an existing user is requested,false
otherwise.
-
equals
-
hashCode
public int hashCode() -
toString
-
readFromProperties
public static List<DHKickstartParameters> readFromProperties(String propertyPrefix, Properties properties)
-