zadjii / nebula

The personal private cloud platform
http://starmap.io
MIT License
2 stars 1 forks source link

Read the remote's sery, key once, cache it, and use the value from memory #55

Open zadjii opened 6 years ago

zadjii commented 6 years ago

Case in point:

    def sign_host_csr(self, certificate_request, ip):
        # type: (crypto.X509Req, str) -> crypto.X509
        my_key = crypto.load_privatekey(crypto.FILETYPE_PEM, open(self.nebr_instance.get_key_file(), 'rt').read())
        my_crt = crypto.load_certificate(crypto.FILETYPE_PEM, open(self.nebr_instance.get_cert_file(), 'rt').read())
    ...