Security

The Security class gives access to various helper methods, which assist in working with certificates or accessing specific security related information.

Security

class firefox_puppeteer.api.security.Security(marionette)

Low-level access to security (SSL, TLS) related information.

get_address_from_certificate(certificate)

Retrieves the address of the organization from the certificate information.

The returned address may be None in case of no address found, or a dictionary with the following entries: city, country, postal_code, state, street.

Parameters:certificate – A JSON object representing the certificate, which can usually be retrieved via the current tab: self.browser.tabbar.selected_tab.certificate.
Returns:Address details as dictionary
get_certificate_for_page(tab_element)

The SSL certificate assiciated with the loaded web page in the given tab.

Parameters:tab_element – The inner tab DOM element.
Returns:Certificate details as JSON object.
get_domain_from_common_name(common_name)

Retrieves the domain associated with a page’s security certificate from the common name.

Parameters:certificate – A string containing the certificate’s common name, which can usually be retrieved like so: certificate[‘commonName’].
Returns:Domain as string