diff --git a/README.md b/README.md index 557b4d8..6710a9e 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ pip install certy Create virtual environment by running `python3 -m venv .venv`, then activate it `source .venv/bin/activate`. Install dependencies by running `pip install -r dev-requirements.txt`. Run tests with `pytest`. +To build wheel, run `flit build` and check the generated wheel in `dist` directory. To find out coverage of tests, execute `coverage run -m pytest` and then `coverage html`. The coverage report is generated to `htmlcov/index.html`. diff --git a/src/certy/credential.py b/src/certy/credential.py index f2f25f7..b5ad395 100644 --- a/src/certy/credential.py +++ b/src/certy/credential.py @@ -405,6 +405,15 @@ def generate(self) -> Credential: ) builder = builder.add_extension(x509.BasicConstraints(ca=self._is_ca, path_length=None), critical=True) + builder = builder.add_extension( + x509.SubjectKeyIdentifier.from_public_key(self._private_key.public_key()), critical=False + ) + + if self._issuer is not None: + builder = builder.add_extension( + x509.AuthorityKeyIdentifier.from_issuer_public_key(effective_issuer._private_key.public_key()), + critical=False, + ) if self._subject_alt_names is not None: builder = builder.add_extension(x509.SubjectAlternativeName(self._subject_alt_names), critical=False)