Example #1
0
    def set_trusted_ca_db(self, certificate_db):
        """
        Configure the set of trusted CA certificates used by this domain to verify peers.

        If the local SSL client/server needs to verify the identity of the remote, it must
        validate the signature of the remote's certificate.  This function sets the database of
        trusted CAs that will be used to verify the signature of the remote's certificate.

        .. note:: This setting effects only those :class:`SSL` objects created after this call
            returns.  :class:`SSL` objects created before invoking this method will use the domain's
            previous setting.

        .. note:: By default the list of trusted CA certificates will be set to the system default.
            What this is is depends on the OS and the SSL implementation used: For OpenSSL the default
            will depend on how the OS is set up. When using the Windows SChannel implementation the default
            will be the users default trusted certificate store.

        :param certificate_db: Database of trusted CAs, used to authenticate the peer.
        :type certificate_db: ``str``
        :return: 0 on success
        :rtype: ``int``
        :raise: :exc:`SSLException` if there is any Proton error
        """
        return self._check(pn_ssl_domain_set_trusted_ca_db(self._domain,
                                                           certificate_db))
Example #2
0
 def set_trusted_ca_db(self, certificate_db):
     return self._check(pn_ssl_domain_set_trusted_ca_db(self._domain,
                                                        certificate_db))
Example #3
0
 def set_trusted_ca_db(self, certificate_db):
     return self._check(
         pn_ssl_domain_set_trusted_ca_db(self._domain, certificate_db))