Class SnmpTlsTmMib

java.lang.Object
org.snmp4j.agent.mo.snmp.SnmpTlsTmMib
All Implemented Interfaces:
MOGroup, org.snmp4j.transport.tls.TlsTmSecurityCallback<X509Certificate>

public class SnmpTlsTmMib extends Object implements MOGroup, org.snmp4j.transport.tls.TlsTmSecurityCallback<X509Certificate>
  • Field Details

    • oidSnmpTlsTmMib

      public static final org.snmp4j.smi.OID oidSnmpTlsTmMib
      OID of this MIB module for usage which can be used for its identification.
    • oidSnmpTlstmCertSpecified

      public static final org.snmp4j.smi.OID oidSnmpTlstmCertSpecified
    • oidSnmpTlstmCertSANRFC822Name

      public static final org.snmp4j.smi.OID oidSnmpTlstmCertSANRFC822Name
    • oidSnmpTlstmCertSANDNSName

      public static final org.snmp4j.smi.OID oidSnmpTlstmCertSANDNSName
    • oidSnmpTlstmCertSANIpAddress

      public static final org.snmp4j.smi.OID oidSnmpTlstmCertSANIpAddress
    • oidSnmpTlstmCertSANAny

      public static final org.snmp4j.smi.OID oidSnmpTlstmCertSANAny
    • oidSnmpTlstmCertCommonName

      public static final org.snmp4j.smi.OID oidSnmpTlstmCertCommonName
    • oidSnmpTLSTCPDomain

      public static final org.snmp4j.smi.OID oidSnmpTLSTCPDomain
    • oidSnmpDTLSUDPDomain

      public static final org.snmp4j.smi.OID oidSnmpDTLSUDPDomain
    • oidSnmpTlstmSessionOpens

      public static final org.snmp4j.smi.OID oidSnmpTlstmSessionOpens
    • oidSnmpTlstmSessionClientCloses

      public static final org.snmp4j.smi.OID oidSnmpTlstmSessionClientCloses
    • oidSnmpTlstmSessionOpenErrors

      public static final org.snmp4j.smi.OID oidSnmpTlstmSessionOpenErrors
    • oidSnmpTlstmSessionAccepts

      public static final org.snmp4j.smi.OID oidSnmpTlstmSessionAccepts
    • oidSnmpTlstmSessionServerCloses

      public static final org.snmp4j.smi.OID oidSnmpTlstmSessionServerCloses
    • oidSnmpTlstmSessionNoSessions

      public static final org.snmp4j.smi.OID oidSnmpTlstmSessionNoSessions
    • oidSnmpTlstmSessionInvalidClientCertificates

      public static final org.snmp4j.smi.OID oidSnmpTlstmSessionInvalidClientCertificates
    • oidSnmpTlstmSessionUnknownServerCertificate

      public static final org.snmp4j.smi.OID oidSnmpTlstmSessionUnknownServerCertificate
    • oidSnmpTlstmSessionInvalidServerCertificates

      public static final org.snmp4j.smi.OID oidSnmpTlstmSessionInvalidServerCertificates
    • oidSnmpTlstmSessionInvalidCaches

      public static final org.snmp4j.smi.OID oidSnmpTlstmSessionInvalidCaches
    • oidSnmpTlstmCertToTSNCount

      public static final org.snmp4j.smi.OID oidSnmpTlstmCertToTSNCount
    • oidSnmpTlstmCertToTSNTableLastChanged

      public static final org.snmp4j.smi.OID oidSnmpTlstmCertToTSNTableLastChanged
    • oidSnmpTlstmParamsCount

      public static final org.snmp4j.smi.OID oidSnmpTlstmParamsCount
    • oidSnmpTlstmParamsTableLastChanged

      public static final org.snmp4j.smi.OID oidSnmpTlstmParamsTableLastChanged
    • oidSnmpTlstmAddrCount

      public static final org.snmp4j.smi.OID oidSnmpTlstmAddrCount
    • oidSnmpTlstmAddrTableLastChanged

      public static final org.snmp4j.smi.OID oidSnmpTlstmAddrTableLastChanged
    • oidSnmpTlstmServerCertificateUnknown

      public static final org.snmp4j.smi.OID oidSnmpTlstmServerCertificateUnknown
    • oidTrapVarSnmpTlstmSessionUnknownServerCertificate

      public static final org.snmp4j.smi.OID oidTrapVarSnmpTlstmSessionUnknownServerCertificate
    • oidSnmpTlstmServerInvalidCertificate

      public static final org.snmp4j.smi.OID oidSnmpTlstmServerInvalidCertificate
    • oidTrapVarSnmpTlstmAddrServerFingerprint

      public static final org.snmp4j.smi.OID oidTrapVarSnmpTlstmAddrServerFingerprint
    • oidTrapVarSnmpTlstmSessionInvalidServerCertificates

      public static final org.snmp4j.smi.OID oidTrapVarSnmpTlstmSessionInvalidServerCertificates
    • oidSnmpTlstmCertToTSNEntry

      public static final org.snmp4j.smi.OID oidSnmpTlstmCertToTSNEntry
    • oidSnmpTlstmCertToTSNID

      public static final org.snmp4j.smi.OID oidSnmpTlstmCertToTSNID
    • tcModuleSnmpTlsTmMib

      public static final String tcModuleSnmpTlsTmMib
      See Also:
    • tcDefSnmpTLSFingerprint

      public static final String tcDefSnmpTLSFingerprint
      See Also:
    • tcModuleSNMPv2Tc

      public static final String tcModuleSNMPv2Tc
      See Also:
    • tcDefAutonomousType

      public static final String tcDefAutonomousType
      See Also:
    • tcDefStorageType

      public static final String tcDefStorageType
      See Also:
    • tcDefRowStatus

      public static final String tcDefRowStatus
      See Also:
    • colSnmpTlstmCertToTSNFingerprint

      public static final int colSnmpTlstmCertToTSNFingerprint
      See Also:
    • colSnmpTlstmCertToTSNMapType

      public static final int colSnmpTlstmCertToTSNMapType
      See Also:
    • colSnmpTlstmCertToTSNData

      public static final int colSnmpTlstmCertToTSNData
      See Also:
    • colSnmpTlstmCertToTSNStorageType

      public static final int colSnmpTlstmCertToTSNStorageType
      See Also:
    • colSnmpTlstmCertToTSNRowStatus

      public static final int colSnmpTlstmCertToTSNRowStatus
      See Also:
    • idxSnmpTlstmCertToTSNFingerprint

      public static final int idxSnmpTlstmCertToTSNFingerprint
      See Also:
    • idxSnmpTlstmCertToTSNMapType

      public static final int idxSnmpTlstmCertToTSNMapType
      See Also:
    • idxSnmpTlstmCertToTSNData

      public static final int idxSnmpTlstmCertToTSNData
      See Also:
    • idxSnmpTlstmCertToTSNStorageType

      public static final int idxSnmpTlstmCertToTSNStorageType
      See Also:
    • idxSnmpTlstmCertToTSNRowStatus

      public static final int idxSnmpTlstmCertToTSNRowStatus
      See Also:
    • oidSnmpTlstmParamsEntry

      public static final org.snmp4j.smi.OID oidSnmpTlstmParamsEntry
    • oidSnmpTargetParamsName

      public static final org.snmp4j.smi.OID oidSnmpTargetParamsName
    • colSnmpTlstmParamsClientFingerprint

      public static final int colSnmpTlstmParamsClientFingerprint
      See Also:
    • colSnmpTlstmParamsStorageType

      public static final int colSnmpTlstmParamsStorageType
      See Also:
    • colSnmpTlstmParamsRowStatus

      public static final int colSnmpTlstmParamsRowStatus
      See Also:
    • idxSnmpTlstmParamsClientFingerprint

      public static final int idxSnmpTlstmParamsClientFingerprint
      See Also:
    • idxSnmpTlstmParamsStorageType

      public static final int idxSnmpTlstmParamsStorageType
      See Also:
    • idxSnmpTlstmParamsRowStatus

      public static final int idxSnmpTlstmParamsRowStatus
      See Also:
    • oidSnmpTlstmAddrEntry

      public static final org.snmp4j.smi.OID oidSnmpTlstmAddrEntry
    • oidSnmpTargetAddrName

      public static final org.snmp4j.smi.OID oidSnmpTargetAddrName
    • tcModuleSnmpFrameworkMib

      public static final String tcModuleSnmpFrameworkMib
      See Also:
    • tcDefSnmpAdminString

      public static final String tcDefSnmpAdminString
      See Also:
    • colSnmpTlstmAddrServerFingerprint

      public static final int colSnmpTlstmAddrServerFingerprint
      See Also:
    • colSnmpTlstmAddrServerIdentity

      public static final int colSnmpTlstmAddrServerIdentity
      See Also:
    • colSnmpTlstmAddrStorageType

      public static final int colSnmpTlstmAddrStorageType
      See Also:
    • colSnmpTlstmAddrRowStatus

      public static final int colSnmpTlstmAddrRowStatus
      See Also:
    • idxSnmpTlstmAddrServerFingerprint

      public static final int idxSnmpTlstmAddrServerFingerprint
      See Also:
    • idxSnmpTlstmAddrServerIdentity

      public static final int idxSnmpTlstmAddrServerIdentity
      See Also:
    • idxSnmpTlstmAddrStorageType

      public static final int idxSnmpTlstmAddrStorageType
      See Also:
    • idxSnmpTlstmAddrRowStatus

      public static final int idxSnmpTlstmAddrRowStatus
      See Also:
  • Constructor Details

    • SnmpTlsTmMib

      protected SnmpTlsTmMib()
      Constructs a SnmpTlsTmMib instance without actually creating its ManagedObject instances. This has to be done in a sub-class constructor or after construction by calling createMO(MOFactory moFactory).
    • SnmpTlsTmMib

      public SnmpTlsTmMib(MOFactory moFactory)
      Constructs a SnmpTlsTmMib instance and actually creates its ManagedObject instances using the supplied MOFactory (by calling createMO(MOFactory moFactory)).
      Parameters:
      moFactory - the MOFactory to be used to create the managed objects for this module.
    • SnmpTlsTmMib

      public SnmpTlsTmMib(MOFactory moFactory, SnmpTargetMIB snmpTargetMIB)
      Constructs a SnmpTlsTmMib instance and actually creates its ManagedObject instances using the supplied MOFactory (by calling createMO(MOFactory moFactory)) .
      Parameters:
      moFactory - the MOFactory to be used to create the managed objects for this module.
      snmpTargetMIB - the SNMP-TARGET-MIB where the TLS domains should be registered (i.e. where the parent tables for this MIB module resides).
      Since:
      3.2.1
  • Method Details

    • addTlsDomainsToSnmpTargetMIB

      public void addTlsDomainsToSnmpTargetMIB(SnmpTargetMIB snmpTargetMIB)
    • removeTlsDomainsFromSnmpTargetMIB

      public void removeTlsDomainsFromSnmpTargetMIB(SnmpTargetMIB snmpTargetMIB)
    • createMO

      protected void createMO(MOFactory moFactory)
      Create the ManagedObjects defined for this MIB module using the specified MOFactory.
      Parameters:
      moFactory - the MOFactory instance to use for object creation.
    • getSnmpTlstmSessionOpens

      public MOScalar<org.snmp4j.smi.Counter32> getSnmpTlstmSessionOpens()
    • getSnmpTlstmSessionClientCloses

      public MOScalar<org.snmp4j.smi.Counter32> getSnmpTlstmSessionClientCloses()
    • getSnmpTlstmSessionOpenErrors

      public MOScalar<org.snmp4j.smi.Counter32> getSnmpTlstmSessionOpenErrors()
    • getSnmpTlstmSessionAccepts

      public MOScalar<org.snmp4j.smi.Counter32> getSnmpTlstmSessionAccepts()
    • getSnmpTlstmSessionServerCloses

      public MOScalar<org.snmp4j.smi.Counter32> getSnmpTlstmSessionServerCloses()
    • getSnmpTlstmSessionNoSessions

      public MOScalar<org.snmp4j.smi.Counter32> getSnmpTlstmSessionNoSessions()
    • getSnmpTlstmSessionInvalidClientCertificates

      public MOScalar<org.snmp4j.smi.Counter32> getSnmpTlstmSessionInvalidClientCertificates()
    • getSnmpTlstmSessionUnknownServerCertificate

      public MOScalar<org.snmp4j.smi.Counter32> getSnmpTlstmSessionUnknownServerCertificate()
    • getSnmpTlstmSessionInvalidServerCertificates

      public MOScalar<org.snmp4j.smi.Counter32> getSnmpTlstmSessionInvalidServerCertificates()
    • getSnmpTlstmSessionInvalidCaches

      public MOScalar<org.snmp4j.smi.Counter32> getSnmpTlstmSessionInvalidCaches()
    • getSnmpTlstmCertToTSNCount

      public MOScalar<RowCount> getSnmpTlstmCertToTSNCount()
    • getSnmpTlstmCertToTSNTableLastChanged

      public MOScalar<org.snmp4j.smi.TimeTicks> getSnmpTlstmCertToTSNTableLastChanged()
    • getSnmpTlstmParamsCount

      public MOScalar<RowCount> getSnmpTlstmParamsCount()
    • getSnmpTlstmParamsTableLastChanged

      public MOScalar<org.snmp4j.smi.TimeTicks> getSnmpTlstmParamsTableLastChanged()
    • getSnmpTlstmAddrCount

      public MOScalar<RowCount> getSnmpTlstmAddrCount()
    • getSnmpTlstmAddrTableLastChanged

      public MOScalar<org.snmp4j.smi.TimeTicks> getSnmpTlstmAddrTableLastChanged()
    • getSnmpTlstmCertToTSNEntry

    • getSnmpTlstmParamsEntry

    • getSnmpTlstmAddrEntry

    • registerMOs

      public void registerMOs(MOServer server, org.snmp4j.smi.OctetString context) throws DuplicateRegistrationException
      Description copied from interface: MOGroup
      Registers the managed objects of this group with the server for the supplied context.
      Specified by:
      registerMOs in interface MOGroup
      Parameters:
      server - the MOServer where to register the managed objects.
      context - the context to use (may be null if no specific context is selected).
      Throws:
      DuplicateRegistrationException - if a managed object's scope (i.e. lower bound) is already registered at the server.
    • unregisterMOs

      public void unregisterMOs(MOServer server, org.snmp4j.smi.OctetString context)
      Description copied from interface: MOGroup
      Unregisters the managed objects of this group from the supplied server and from the supplied context.
      Specified by:
      unregisterMOs in interface MOGroup
      Parameters:
      server - the MOServer where to unregister the managed objects.
      context - the context to use (may be null if no specific context is selected).
    • snmpTlstmServerCertificateUnknown

      public void snmpTlstmServerCertificateUnknown(NotificationOriginator notificationOriginator, org.snmp4j.smi.OctetString context, org.snmp4j.smi.VariableBinding[] vbs)
    • snmpTlstmServerInvalidCertificate

      public void snmpTlstmServerInvalidCertificate(NotificationOriginator notificationOriginator, org.snmp4j.smi.OctetString context, org.snmp4j.smi.VariableBinding[] vbs)
    • getCounterListener

      public org.snmp4j.event.CounterListener getCounterListener()
    • applyRFC6353Restrictions

      protected void applyRFC6353Restrictions()
      Applies those restrictions of RFC 6353 on the managed objects of this MIB module that cannot be derived from the SMI definitions of the SNMP-TLS-TM-MIB but only from the DESCRIPTION clauses of its objects. This method is called by SnmpTlsTmMib(MOFactory) and therefore needs to be called explicitly by sub-classes only if they create the managed objects by calling createMO(MOFactory) directly.
      Since:
      3.9.3
    • isClientCertificateAccepted

      public boolean isClientCertificateAccepted(X509Certificate peerEndCertificate) throws CertificateException
      Specified by:
      isClientCertificateAccepted in interface org.snmp4j.transport.tls.TlsTmSecurityCallback<X509Certificate>
      Throws:
      CertificateException
    • getSecurityName

      public org.snmp4j.smi.OctetString getSecurityName(X509Certificate[] peerCertificateChain)
      Specified by:
      getSecurityName in interface org.snmp4j.transport.tls.TlsTmSecurityCallback<X509Certificate>
    • isServerCertificateAccepted

      public boolean isServerCertificateAccepted(X509Certificate[] peerCertificateChain)
      Specified by:
      isServerCertificateAccepted in interface org.snmp4j.transport.tls.TlsTmSecurityCallback<X509Certificate>
    • isAcceptedIssuer

      public boolean isAcceptedIssuer(X509Certificate issuerCertificate)
      Specified by:
      isAcceptedIssuer in interface org.snmp4j.transport.tls.TlsTmSecurityCallback<X509Certificate>
    • getLocalCertificateAlias

      public String getLocalCertificateAlias(org.snmp4j.smi.Address targetAddress)
      Specified by:
      getLocalCertificateAlias in interface org.snmp4j.transport.tls.TlsTmSecurityCallback<X509Certificate>
    • mapSubjAltNameAny

      protected static org.snmp4j.smi.OctetString mapSubjAltNameAny(X509Certificate cert) throws CertificateParsingException
      Maps the first rfc822Name, dNSName, or iPAddress subjectAltName value of the given certificate to a tmSecurityName using the mapping algorithm of the corresponding mapping type as defined by RFC 6353 for snmpTlstmCertSANAny. The order of the subjectAltName values in the certificate is significant: values that cannot be mapped are skipped.
      Parameters:
      cert - the peer certificate.
      Returns:
      the mapped tmSecurityName or null if the certificate does not contain a mappable subjectAltName value of one of the above types.
      Throws:
      CertificateParsingException - if the subjectAltName extension of the certificate could not be parsed.
      Since:
      3.9.3
    • mapRFC822Name

      protected static org.snmp4j.smi.OctetString mapRFC822Name(Object rfc822Name)
      Maps a subjectAltName's rfc822Name to a tmSecurityName as defined by RFC 6353 for snmpTlstmCertSANRFC822Name: the local part of the name is passed unaltered whereas the host part is converted to lower case.
      Parameters:
      rfc822Name - the rfc822Name value or null.
      Returns:
      the mapped tmSecurityName or null if rfc822Name is null or not a valid rfc822Name.
      Since:
      3.9.3
    • mapDNSName

      protected static org.snmp4j.smi.OctetString mapDNSName(Object dNSName)
      Maps a subjectAltName's dNSName to a tmSecurityName as defined by RFC 6353 for snmpTlstmCertSANDNSName: the name is converted to all lower case.
      Parameters:
      dNSName - the dNSName value or null.
      Returns:
      the mapped tmSecurityName or null if dNSName is null or empty.
      Since:
      3.9.3
    • mapCommonName

      protected static org.snmp4j.smi.OctetString mapCommonName(X509Certificate cert)
      Maps the CommonName of a certificate's subject to a tmSecurityName as defined by RFC 6353 for snmpTlstmCertCommonName: the CommonName is converted to a UTF-8 encoding.
      Parameters:
      cert - the peer certificate.
      Returns:
      the mapped tmSecurityName or null if the certificate's subject does not contain a CommonName that can be mapped.
      Since:
      3.9.3
    • getCommonName

      protected static org.snmp4j.smi.OctetString getCommonName(X500Principal name)
      Extracts the UTF-8 encoded value of the most specific (i.e. left-most) CommonName relative distinguished name of the given distinguished name.
      Parameters:
      name - a distinguished name, for example the subject of a certificate.
      Returns:
      the UTF-8 encoded CommonName or null if name does not contain a CommonName with a non-empty printable value.
      Since:
      3.9.3
    • addTCsToFactory

      protected void addTCsToFactory(MOFactory moFactory)
    • addImportedTCsToFactory

      public void addImportedTCsToFactory(MOFactory moFactory)