Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.sip.net
Class RFC5922Matcher

java.lang.Object
  extended by net.java.sip.communicator.impl.protocol.sip.net.RFC5922Matcher
All Implemented Interfaces:
CertificateMatcher

public class RFC5922Matcher
extends Object
implements CertificateMatcher

Matcher that extracts certificate identities according to RFC5922, Section 7.1 and compares them with the rules from Section 7.2 and 7.3.

Author:
Ingo Bauersachs
See Also:
for wildcard handling; the default is false

Field Summary
static String PNAME_STRICT_RFC5922
          When set to true, enables strict validation of the hostname according to RFC5922 Section 7.2
 
Constructor Summary
RFC5922Matcher(ProtocolProviderServiceSipImpl provider)
          Creates a new instance of this class.
 
Method Summary
 void verify(Iterable<String> identitiesToTest, X509Certificate cert)
          Implementations check whether one of the supplied identities is contained in the certificate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PNAME_STRICT_RFC5922

public static final String PNAME_STRICT_RFC5922
When set to true, enables strict validation of the hostname according to RFC5922 Section 7.2

See Also:
Constant Field Values
Constructor Detail

RFC5922Matcher

public RFC5922Matcher(ProtocolProviderServiceSipImpl provider)
Creates a new instance of this class.

Parameters:
provider - The SIP Provider to which this matcher belongs.
Method Detail

verify

public void verify(Iterable<String> identitiesToTest,
                   X509Certificate cert)
            throws CertificateException
Description copied from interface: CertificateMatcher
Implementations check whether one of the supplied identities is contained in the certificate.

Specified by:
verify in interface CertificateMatcher
Parameters:
identitiesToTest - The that are compared against the certificate.
cert - The X.509 certificate that was supplied by the server or client.
Throws:
CertificateException - When any certificate parsing fails.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.