MCPcopy Create free account
hub / github.com/apache/httpd / load_credentials

Method load_credentials

test/pyhttpd/certs.py:263–274  ·  view source on GitHub ↗
(self, name: str, key_type=None, single_file: bool = False, issuer: Credentials = None)

Source from the content-addressed store, hash-verified

261 return load_pem_private_key("".join(fd.readlines()).encode(), password=None)
262
263 def load_credentials(self, name: str, key_type=None, single_file: bool = False, issuer: Credentials = None):
264 cert_file = self.get_cert_file(name=name, key_type=key_type)
265 pkey_file = cert_file if single_file else self.get_pkey_file(name=name, key_type=key_type)
266 if os.path.isfile(cert_file) and os.path.isfile(pkey_file):
267 cert = self.load_pem_cert(cert_file)
268 pkey = self.load_pem_pkey(pkey_file)
269 creds = Credentials(name=name, cert=cert, pkey=pkey, issuer=issuer)
270 creds.set_store(self)
271 creds.set_files(cert_file, pkey_file)
272 self._add_credentials(name, creds)
273 return creds
274 return None
275
276
277class HttpdTestCA:

Callers 2

create_rootMethod · 0.95
issue_certMethod · 0.45

Calls 8

get_cert_fileMethod · 0.95
get_pkey_fileMethod · 0.95
load_pem_certMethod · 0.95
load_pem_pkeyMethod · 0.95
set_storeMethod · 0.95
set_filesMethod · 0.95
_add_credentialsMethod · 0.95
CredentialsClass · 0.70

Tested by

no test coverage detected