(path, cert_key_pair, password=None)
| 176 | |
| 177 | |
| 178 | def _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 | |
| 189 | def new_ca(path, private_key=None, **subject): |
no test coverage detected