Class PeerSubjectVerifier

  • All Implemented Interfaces:
    SessionVerifier

    public final class PeerSubjectVerifier
    extends java.lang.Object
    implements SessionVerifier
    This is a TLS session verifier that checks the peer has a subject name that matches the subject name of the given certificate. This can be useful to prevent accidentally connecting with other nodes that have certificates that, while being signed by the same certificate authority, belong to different clusters.

    INTERNAL API

    • Constructor Summary

      Constructors 
      Constructor Description
      PeerSubjectVerifier​(java.security.cert.X509Certificate peerCertificate)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      scala.Option<java.lang.Throwable> verifyClientSession​(java.lang.String hostname, javax.net.ssl.SSLSession session)  
      scala.Option<java.lang.Throwable> verifyServerSession​(java.lang.String hostname, javax.net.ssl.SSLSession session)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PeerSubjectVerifier

        public PeerSubjectVerifier​(java.security.cert.X509Certificate peerCertificate)
    • Method Detail

      • verifyClientSession

        public scala.Option<java.lang.Throwable> verifyClientSession​(java.lang.String hostname,
                                                                     javax.net.ssl.SSLSession session)
        Specified by:
        verifyClientSession in interface SessionVerifier
      • verifyServerSession

        public scala.Option<java.lang.Throwable> verifyServerSession​(java.lang.String hostname,
                                                                     javax.net.ssl.SSLSession session)
        Specified by:
        verifyServerSession in interface SessionVerifier