Interface CertifiedIdentity
- All Known Implementing Classes:
CertifiedTarget, TlsX509CertifiedTarget
public interface CertifiedIdentity
The
CertifiedIdentity interface describes an identity
that is associated with a client certificate fingerprint and a server
certificate fingerprint.- Since:
- 2.0
- Version:
- 3.13.0
- Author:
- Frank Fock
-
Method Summary
Modifier and TypeMethodDescriptionGets the client certificate fingerprint.default OctetStringGets the expected peer identity that has been configured explicitly, without any fallback to a value that serves another purpose - the security name in particular.Gets the identity that the peer is expected to prove with its certificate.Gets the server certificate fingerprint.
-
Method Details
-
getServerFingerprint
OctetString getServerFingerprint()Gets the server certificate fingerprint.- Returns:
- the server certificate fingerprint or
nullif no fingerprint has been configured.
-
getClientFingerprint
OctetString getClientFingerprint()Gets the client certificate fingerprint.- Returns:
- the client certificate fingerprint or
nullif no fingerprint has been configured.
-
getIdentity
OctetString getIdentity()Gets the identity that the peer is expected to prove with its certificate. This is not the security name (thetmSecurityNameused for access control), although an implementation may return the security name if no separate identity has been configured. The identity is matched against thedNSNameandiPAddresssubject alternative names of the peer certificate and thus corresponds tosnmpTlstmAddrServerIdentityof RFC 6353.- Returns:
- the expected peer identity or
null(or an emptyOctetString) if no identity comparison should be performed.
-
getConfiguredIdentity
Gets the expected peer identity that has been configured explicitly, without any fallback to a value that serves another purpose - the security name in particular. WhereasgetIdentity()may return such a fallback, this method returnsnullwhenever no identity has been configured deliberately.RFC 6353 ยง5.3.1 verification of a server certificate is based on this method, so that the verification is only performed for a target whose identity has been configured on purpose. The default implementation returns
getIdentity(), which keeps the behavior of implementations written before version 3.13.0.- Returns:
- the explicitly configured expected peer identity or
nullif none has been configured. - Since:
- 3.13.0
-