Adds a cert to the certstore. We register the CN in the cert plus any SANs, and also the list of names provided as an argument.
(self, entry: CertStoreEntry, *names: str)
| 650 | self.add_cert(CertStoreEntry(cert, private_key, path, chain), spec) |
| 651 | |
| 652 | def add_cert(self, entry: CertStoreEntry, *names: str) -> None: |
| 653 | """ |
| 654 | Adds a cert to the certstore. We register the CN in the cert plus |
| 655 | any SANs, and also the list of names provided as an argument. |
| 656 | """ |
| 657 | if entry.cert.cn: |
| 658 | self.certs[entry.cert.cn] = entry |
| 659 | for i in entry.cert.altnames: |
| 660 | self.certs[str(i.value)] = entry |
| 661 | for i in names: |
| 662 | self.certs[i] = entry |
| 663 | |
| 664 | @staticmethod |
| 665 | def asterisk_forms(dn: str | x509.GeneralName) -> list[str]: |