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

Function new_csr

tests/certs/gen.py:219–230  ·  view source on GitHub ↗
(path, private_key, **subject)

Source from the content-addressed store, hash-verified

217
218
219def new_csr(path, private_key, **subject):
220 request = (
221 x509.CertificateSigningRequestBuilder()
222 .subject_name(_new_subject(**subject))
223 .sign(
224 private_key,
225 hashes.SHA256(),
226 backends.default_backend(),
227 )
228 )
229 with open(path + ".csr.pem", "wb") as f:
230 f.write(request.public_bytes(serialization.Encoding.PEM))
231
232
233def new_crl(path, issuer, cert):

Callers 1

mainFunction · 0.85

Calls 2

_new_subjectFunction · 0.85
writeMethod · 0.80

Tested by

no test coverage detected