Package pyxmpp2 :: Module cert :: Class CertificateData
[hide private]

Class CertificateData


Certificate information interface.

This class provides only that information from the certificate, which is provided by the python API.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
 
get_jids(self)
Return JIDs for which this certificate is valid (except the domain wildcards).
 
verify_server(self, server_name, srv_type='xmpp-client')
Verify certificate for a server.
bool
verify_jid_against_common_name(self, jid)
Return True if jid is listed in the certificate commonName.
bool
verify_jid_against_srv_name(self, jid, srv_type)
Check if the cerificate is valid for given domain-only JID and a service type.
 
verify_client(self, client_jid=None, domains=None)
Verify certificate for a client.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  display_name
Get human-readable subject name derived from the SubjectName or SubjectAltName field.

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__
(inherited documentation)

verify_server(self, server_name, srv_type='xmpp-client')

 

Verify certificate for a server.

otherwise.

Parameters:
  • server_name (unicode or JID) - name of the server presenting the cerificate
  • srv_type (unicode) - service type requested, as used in the SRV record
Returns:
True if the certificate is valid for given name, False

verify_jid_against_common_name(self, jid)

 
Return True if jid is listed in the certificate commonName.
Parameters:
  • jid (JID) - JID requested (domain part only)
Returns: bool

verify_jid_against_srv_name(self, jid, srv_type)

 
Check if the cerificate is valid for given domain-only JID and a service type.
Parameters:
  • jid (JID) - JID requested (domain part only)
  • srv_type (unicode) - service type, e.g. 'xmpp-client'
Returns: bool

verify_client(self, client_jid=None, domains=None)

 

Verify certificate for a client.

Please note that client_jid is only a hint to choose from the names, other JID may be returned if client_jid is not included in the certificate.

name is found.

Parameters:
  • client_jid (JID) - client name requested. May be None to allow any name in one of the domains.
  • domains (list of unicode) - list of domains we can handle.
Returns:
one of the jids in the certificate or None is no authorized

Property Details [hide private]

display_name

Get human-readable subject name derived from the SubjectName or SubjectAltName field.
Get Method:
unreachable.display_name(self) - Get human-readable subject name derived from the SubjectName or SubjectAltName field.