def new(cls, alias, cert):
        """
        Helper function to create a new TrustedCertEntry.

        :param str alias: The alias for the Trusted Cert Entry
        :param str certs: The certificate, as a byte string.

        :returns: A loaded :class:`TrustedCertEntry` instance, ready
          to be placed in a keystore.
        """
        timestamp = int(time.time()) * 1000

        tke = cls(timestamp = timestamp,
                               # Alias must be lower case or it will corrupt the keystore for Java Keytool and Keytool Explorer
                               alias = alias.lower(),
                               cert = cert)
        return tke
def new ( cls , alias , cert ) : timestamp = int ( time . time ( ) ) * 1000 tke = cls ( timestamp = timestamp , alias = alias . lower ( ) , cert = cert ) return tke
Helper function to create a new TrustedCertEntry.

        :param str alias: The alias for the Trusted Cert Entry
        :param str certs: The certificate, as a byte string.

        :returns: A loaded :class:`TrustedCertEntry` instance, ready
          to be placed in a keystore.