crypto Package

certs Module

exception leap.crypto.certs.BadCertError

Bases: exceptions.Exception

raised for malformed certs

exception leap.crypto.certs.NoCertError

Bases: exceptions.Exception

raised for cert not found in given path

leap.crypto.certs.can_load_cert_and_pkey(string)

loads certificate and private key from a buffer

leap.crypto.certs.get_cert_fingerprint(domain=None, port=443, filepath=None, hash_type='SHA256', sep=':')

@param domain: a domain name to get a fingerprint from @type domain: str @param filepath: path to a file containing a PEM file @type filepath: str @param hash_type: the hash function to be used in the fingerprint.

must be one of SHA1, SHA224, SHA256, SHA384, SHA512

@type hash_type: str @rparam: hex_fpr, a hexadecimal representation of a bytestring

containing the fingerprint.

@rtype: string

leap.crypto.certs.get_cert_from_file(_file)
leap.crypto.certs.get_https_cert_from_domain(domain, port=443)

@param domain: a domain name to get a certificate from.

leap.crypto.certs.get_pkey_from_file(_file)
leap.crypto.certs.get_time_boundaries(certfile)

leapkeyring Module

class leap.crypto.leapkeyring.LeapCryptedFileKeyring(seed=None)

Bases: keyring.backend.CryptedFileKeyring

file_path
filename = '.secrets'
leap.crypto.leapkeyring.leap_get_password(key, seed='xxx')
leap.crypto.leapkeyring.leap_set_password(key, value, seed='xxx')

Table Of Contents

Previous topic

certs Package

Next topic

tests Package

This Page