MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / _write_cert

Function _write_cert

tests/certs/gen.py:178–186  ·  view source on GitHub ↗
(path, cert_key_pair, password=None)

Source from the content-addressed store, hash-verified

176
177
178def _write_cert(path, cert_key_pair, password=None):
179 certificate, private_key = cert_key_pair
180 _write_key(path + ".key.pem", private_key, password)
181 with open(path + ".cert.pem", "wb") as f:
182 f.write(
183 certificate.public_bytes(
184 encoding=serialization.Encoding.PEM,
185 )
186 )
187
188
189def new_ca(path, private_key=None, **subject):

Callers 2

new_caFunction · 0.85
new_certFunction · 0.85

Calls 2

_write_keyFunction · 0.85
writeMethod · 0.80

Tested by

no test coverage detected